Forum Replies Created
-
In reply to: define BP_DEFAULT_COMPONENT not working
Ahhh moving it to the top worked.
Thanks Paul
In reply to: define BP_DEFAULT_COMPONENT not workingPaul, I tried that and still no joy.
I added it to the bottom of wp-config.php and still it jumps to activity.
Is there any reason why this wouldnt work?
Cheers
In reply to: Different profiles for different user typesCould I just have multiple slugs pointing to the same component? And where is the members component located?
Thanks
In reply to: Add extra sections to membersno luck with this yet mate. What ever I do seems to add the link to both the userbar and options bar!
In reply to: Add extra sections to membersMan this one is still killing me!
the code you have given me works. but it puts the link in all 3 levels (buddybar, userbar & options bar)
After looking in the docs $bp->bp_users_nav seems to do what i want (which apparently works the same as $bp-bp_nav)
However nothing gets returned
In reply to: Add extra sections to memberscheres brajesh. will have a go with those now
In reply to: Where is the members component?AHH ok.
It looks like the core function I need to modify is bp_get_displayed_user_nav(); Which is called in the options bar.
Is it possible to modify that function without going into the core component? ie could i just re-write it and place it in bp-custom.php?
Thanks for the help so far
In reply to: Add extra sections to membersOK basically I want to do this;
Add an item to the optionbar for this;
http://example.org/members/XXXXX/
So when I’m viewing someone elses profile I would like to add an item to the options bar which by defualt includes;
Activity
Profile
Blogs
Wire
Friends
Groups
I don’t want to add the new item to the usersbar or the buddy bar
In reply to: Where is the members component?Cool thanks.
Ok thats not the set of files i need. I’m looking for the template that outputs the optionsbar.
The output is something like;
<div id=”optionsbar”>
<h3>Jebel Ali Golf Resort</h3>
<ul id=”options-nav”>
……
</div>
In reply to: Add extra sections to membersHey so I gave up in the end and will continue tonight.
Does anybody know how I can get something to the options bar of the members section with out adding it to the users bar?
In reply to: Add extra sections to membersJust to add to this, after further searching I think what I need to do is add only a menu item to the the options bar only.
In reply to: Add extra sections to membersOk so now my next question.
What would I need to do to only make this visible on certain profiles (ie ones where a certain field in xprofile_data is present)?
Currently I have the extra component visible on;
My Account on the buddybar
The Me section
and a users profile menu.
I put an if statement around the part that sets up the nav. but that doesnt work. It just either shows it in all 3 or none at all
In reply to: Add extra sections to membersOh great, that was simple!
In reply to: Add extra sections to memberscool, already looking into that now.
although (correct me if im wrong), that seems to create a standalone component accessed via;
However I was wanting to create one that ties into the users profile…. such as
http://example.com/members/some-member/my-custom-component/
Could you give me some pointers on to how I should get started?
Cheers
In reply to: Running 2 Copies of BBPressThanks for the help Jeff.
The reason I posted is due to not finding anything definitive in the search… all results I have found on “deep integration” are either people saying you need it or are they using it….
however one of the results gave me an idea.
What if I keep bbpress as the group forum. but then use simplepress to handle the more traditional forum?
That way im guessing it would be treated as 2 seperate forums – all i would need to do then is share the user data?
In reply to: Running 2 Copies of BBPressThanks Jeff.
I’ve followed that link and got stuck a bit.
I have the one-click-install working without a problem.
I then uploaded BBPRESS to a new directory off the root (called it /forum/). browsed to that directory and didnt get taken to an install page….
Am I missing something?
Thanks
In reply to: Different User ProfilesI called the function incorrectly
$bp->bp_check_usertype($bp->displayed_user->id);
should have be
bp_check_usertype($bp->displayed_user->id);
In reply to: Different User Profilesworks a charm
In reply to: Different User ProfilesOk so I created;
/wp-content/plugins/bp-custom.php with the below in it;
/**
* bp_check_usertype()
* TEMPLATE TAG
*
*/
function bp_check_usertype($userID) {
global $bp, $wpdb;
$qry = $wpdb->get_var("SELECT value FROM wp_bp_xprofile_data WHERE field_id = 5 AND user_id = " . $userID);
/* Sort the nav by key as the array has been put together in different locations */
echo $qry;
}However when I call it in /bp-themes/mymember/profile/index.php like so;
$bp->bp_check_usertype($bp->displayed_user->id);I get the following error
Fatal error: Call to undefined function: bp_check_usertype() in /html/wp-content/bp-themes/mymember/profile/index.php on line 31
Am I missing something?
In reply to: Different User ProfilesI think I’ve solved it (but havent built it yet). This is what I’m going to do;
-Write a function in bp-custom.php
– Function takes the current ID and passes that to the db returning the usertype (which is a custom profile field)
– Run the function on profile/index.php
– then do a simple switch statement to show the appropriate template
In reply to: Help with new functionahhhhh you’d don’t know how long I stayed up trying to work out how to get it to work.
adding the global got it working.
Thanks hugely
In reply to: Help with new functionJeff that sounds more logical.
and in fact i was trying to get that to work last night.
why would it be <?php echo $bp->displayed_user->id; ?> added into /profile/index.php doesn’t output the id?
Thanks
In reply to: Help with new functionI had similar that needed that recently.
Have you tried
global $wpdb;
$row = $wpdb->get_results( $wpdb->prepare(“SELECT user_login FROM $wpdb->users WHERE u.ID = %s”, $username) );
print_r($row);
I think you access each individual column like this
$row[“coloumRow”];
see if this helps https://codex.wordpress.org/Function_Reference/wpdb_Class
In reply to: Help with new functionjust a guess but is it get_row you need?
In reply to: Global Change of Member RightsI would also like to know this