Forum Replies Created
-
In reply to: Plugins required
Some thoughts:
1. Forums – WordPress are developing a new approach to forums, releasing bbPress as a plugin. A beta is due mid September, with a key BuddyPress developer leading the initiative. Have a Google / Bing and check that one out
2. Tutorials – I suggest creating these in a sub-blog dedicated to tutorials (each tutorial is a separate post in the blog – video / image uploading is then no problem). Maybe use a forms plugin (e.g. gravity) if you want front end posting. There should a standard WP plugin that allows post ratings
3. Job Board – these is a plugin out there from @travel-junkie : https://buddypress.org/community/groups/third-party-components-plugins/forum/topic/introducing-jobboardr/
4. Community Store – check out some of the WP extensions for e-commerce. Shopp and WP-commerce seem to be the main contenders
5. There is a facebook connect plugin (have a search in these forums) and @modemlooper is doing some work with twitter. It depends whether you are talking about connecting accounts (e.g. facebook connect), or simply sharing activity on social sites (facebook like, tweet this, etc.). There are loads of plugins / code snippets you can install for sharing (check out shareThis and their snippets for WordPress)
Cheers, Roger
In reply to: only for logged in membersYou could look at using functions like:
groups_is_user_member( $user_id, $group_id )
To test if the user is in a specific group, and only show the page if they are in the appropriate group. This is defined in bp-groups.php.bp_is_member()
To simply check whether the current user is a member (and logged in). This is defined in bp-core-templatetags.phpThere is also a group blogs plugin: https://buddypress.org/community/groups/bp-groupblog/
I don’t know if this can be adapted to implement the private pages for your group members.
Cheers, Roger
In reply to: Favourite Posts in WPMU / BuddyPressThis plugin does a lot of what you are after as well, although it was designed for external links: https://buddypress.org/community/groups/buddypress-links/
It requires you to type in a URL from the links page. It would be nice it if had a “pop up” form / button, that you could attach to posts throughout your site.
In reply to: No Title of Each Posts and PagesHave a look at the bp_page_title() function I pointed you to in bp_core_templatetags.php.
That shows how the title string is built – you’ll have to rework that code in your own function (in bp-custom.php) to build the string in the order you want it.
BuddyPress (with the primary admin blog for your news stories, info pages, etc.) and the following plugins:
BP Media + for photo and video uploads
bbPress forum plugin (a beta version is due September 15th)You’ll have to work on the templates, write some PHP / CSS / HTML to get them looking exactly as you want, but they’ll give you all the building blocks and some
In reply to: No Title of Each Posts and PagesYou should have signed up for the 24 hour priority support plan – drop @apeatling a line and ask him to upgrade you.
You can change the structure of the page title by implementing your own version of the function: bp_page_title(), or by implementing a filter on bp_page_title. ( You’ll find these functions in bp-core-templatetags.php)
Put your modified function (or filter) in your bp_custom.php file
If you go the modified function route, remember to update your header.php in your bespoke theme to call the modified function instead of the core bp_page_title().
You might also want to suggest a change request for a future version of BuddyPress to output title in a more SEO friendly way by default.
If you have any problems with filters, bp_custom.php, or writing your own bespoke theme, you will find plenty of support threads in these forums
In reply to: How to add attachments to activity updatesFurther info:
The BP Group Documents plugin lets us upload image files within a tab in groups, and the BP Links plugin lets us upload URLs to tabs within profiles and groups.
Unfortunately, neither augments the Activity Post Update boxes with an attachment capability.
In reply to: What’s the php echo for “.com/username”or… if you just need the default tab when visit a user to be their profile you can do it by setting: BP_DEFAULT_COMPONENT
See this thread for details: https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/customizing-buddypress-profile-page-default-tab-and-item-nav-order
In reply to: What’s the php echo for “.com/username”try: echo bp_loggedin_user_domain()
In reply to: Adding title to activity stream in blog postsThe activity content is written out by the function bp_activity_content_body() called from activity/entry.php in your bespoke BuddyPress theme.
You could try implementing your own version of bp_activity_content_body(), and changing your entry.php to call the new function. Or you could try implementing a filter on bp_get_activity_content_body. Either way you’ll want them to output the link to the blog and blog title. Have a look at these in bp-activity-templatetags.php.
I’m not sure quite how (you’ll have to dig in the activities_template structure), but you should be able to pull out the blog_id and query for blog link and title as well. Any core gurus got a pointer or two here?
To make it a bit more efficient, and restrict it just to blog post activity updates, you can check whether the activity is a blog post in your loop in entry.php with:
If (bp_get_activity_type() == ‘new_blog_post’) :
Good luck… let me know how you get on.
Have a look at the functions in bp-core.php, bp-core-templatetags.php :
You can call functions such as bp_core_get_username, bp_core_get_user_displayname, bp_member_avatar, bp_member_profile_data
There is a list of template tags being developed, (https://codex.buddypress.org/developer-discussions/buddypress-template-tags/), but I tend to resort to using find in files in my editor (Coda) and trawling the BuddyPress files.
I understand @johnjamesjacoby is doing work to significantly enhance the API for future BuddyPress releases
I suggest asking your group id questions in a separate thread
In reply to: Detecting if logged in User is Administrator@johnjamesjacoby – I suspected you might have that one covered
In reply to: Display Number of Unread MessagesIn reply to: Detecting if logged in User is Administratorinterestingly, it has been deprecated in WP3.0 and replaced with is_super_admin:
https://codex.wordpress.org/WPMU_Functions/is_site_admin
It’s still used in numerous places in the BuddyPress plugin though
In reply to: Detecting if logged in User is Administratoryou could try the function:
is_site_admin()
It’s used extensively throughout the BuddyPress core files
In reply to: Favourite Posts in WPMU / BuddyPress@jamieea – you might want to check this one out:
http://www.dnxpert.com/2010/06/11/mark-blog-post-as-favorite-in-buddypress/
For it to work, you’ll need to have control over the themes being used for the member blogs (as it requires some code adding to single.php to create the favourite / unfavourite button.
Possible thoughts on enhancing this into something really special, borrowing ideas from del.icio.us: creating and sharing lists of favourites, annotating them with notes, and perhaps even allowing for links from outside the site to be added.
In reply to: Need to check if bp_profile_field_data() has dataHave you tried calling bp_get_profile_field_data and testing against NULL / empty string?
Here’s its definition:
function bp_get_profile_field_data( $args = ” ) {
$defaults = array(
‘field’ => false, // Field name or ID.
‘user_id’ => $bp->displayed_user->id
);..
}Most of the template tags have a “get” version that doesn’t echo the result.
In reply to: Age and GenderThis article shows you to calculate the age:
http://code.hyperspatial.com/all-code/buddypress-code/buddypress-age/
If you want to display the gender as an image, you can do it with a simple PHP if clause that checks your gender field and inserts the correct
tag appropriately (or marks the field up with a class identifier), and style as a background image in your CSS.
I suggest posting your “check for online” query as a separate forum post, so that it doesn’t get overlooked
In reply to: Hide profile fieldGet your list of ‘hidden’ field ids, add them to an array, and modify your if clause above to test whether the current id is in the array.
This is one for you to look up in the PHP books.
In reply to: How to add attachments to activity updates@faisalmajeed – we have a similar need.
Facebook allows this type of attachment for Photos, Videos, Events, Links and others.
In our case, we want to allow users to attach PDFs and URLs. URLs can be typed directly into the update (although, the Facebook approach of making adding a link explicit is perhaps easier for the novice user – additionally the FB solution does clever things liking sourcing text and thumbnail options from the URL).
Perhaps what’s stopping this in BuddyPress is that most of the attachment types we’d want are media related (images, videos), and BuddyPress doesn’t have core components to handle these.
Is this a challenge for the developers of media plugins / components (@foxly) to also augment the activity update boxes to allow attachments?
Does the core system need to provide hooks / api that allows plugins to add attachment handling to the update boxes (@johnjamesjacoby)? Perhaps it already exists, and I’m missing something obvious.
Has anyone else addressed / thought about the issue of adding attachments to status updates in BuddyPress?
In reply to: dynamically create new sets of profile fields@arxpoetica – we haven’t implemented any code yet, as we may now be moving all profile field handling out of BuddyPress on this client project.
If we do end up cutting BP code this, I’ll remember to post a snippet.
The constant is supposed to set the default tab that is active when you visit a profile.
In my case, although I’ve made activity the 3rd tab, it is still the default active one when I visit the profile.
Defining BP_DEFAULT_COMPONENT in wp_config.php is now working for me – provided I use my new slug (‘account’) instead of ‘profile’. Also, as @nuprn1 points out – it won’t work if you cut and paste the code from this thread (because the quotes are mangled).
Thanks for the help on this guys. Much appreciated.
@nuprn1 @hnla – Ok, I’ve found the problem, or perhaps the bug in BP (I suspect this belongs in the trac)… OR, perhaps this is correct behaviour??
We’d renamed the XPROFILE_SLUG:
define(‘BP_XPROFILE_SLUG’, ‘account’);
If I remove this definition, the routine to setup the nav works fine.
Or, if I use $bp->bp_nav = 20; instead of $bp->bp_nav = 20; it works fine.
I guess bp_core isn’t taking into account changes to the xprofile slug, and that is stopping re-assignments of the nav order for the ‘profile’ tab from working
The profile tab is breaking it for me. If I remove that tab from my function, I no longer get the nonsense code generated. Note: I still get a profile tab inserted (I assume from the bp-core), even though it is no longer in my function (unfortunately, it is in the wrong place).
p.s. yes, I replaced the quotes
p.s. @hnla yes, the default component constant also failed to load the profile for me. So, I’ve removed that