Forum Replies Created
-
In reply to: Call to arms – Own your task
If those template functions are similar, I don’t see a problem changing it, but get_template_part() fires an action, but it doesn’t let you filter things. What’s the benefit?
get_template_part() isn’t filterable, but creating a wrapper function would do the job much like the bbPress plugin is doing. (Sorry if I wasn’t clear above.)
I basically wrote a wrapper function for locate_template(). Similar to what’s suggested here:
http://bpdevel.wordpress.com/2011/01/12/there-is-a-dev-chat-today-wednesday-12t/There’s an open ticket (#2649) on BP Trac suggesting to wait for WP core to implement the filter. However, in all likelihood, the WP filter for locate_template() will probably be implemented in a future release.
In reply to: How to Display Profile Field in the Topic TemplateYour first example code is closer, but you need to put those parameters in an array:
`bp_profile_field_data( array( ‘field’ => FIELDID, ‘user_id’ => my_topic_poster_id() ) );`
The frontend is to the main location of your groups or singular group:
hxxp://example.com/groups
hxxp://example.com/groups/YOURGROUPThat plugin is not intended for blog subscriptions; you’d have to find another plugin for that:
https://wordpress.org/extend/plugins/tags/subscribeIn reply to: Would Buddy Press work for this?You could turn BP groups into locations.
There are a few album plugins that work for groups. BP Gallery by buddydev.com works as far as I know and BP Media is scheduled to have this functionality as well.
Members could create new locations by creating new groups.
Remember to change the groups slug to locations:
https://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/And modifying group labels to locations with a language file:
https://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/You’ll probably have to do some theme modding as well.
In reply to: Install a plugin twiceThere should be hooks in BuddyPress Links to accomplish what you’re after.
You’ll have to dive through the documentation and the source code though.
In reply to: How to Display Profile Field in the Topic TemplateCheck out the bp_profile_field_data() function (located in bp-xprofile/bp-xprofile-templatetags.php):
https://buddypress.trac.wordpress.org/browser/tags/1.2.8/bp-xprofile/bp-xprofile-templatetags.php#L551It takes “user_id” as a parameter.
Since you’re referring to the topic template, you’ll need to use a custom function to grab the topic poster ID since a native one doesn’t exist in BP at the moment. Here’s a post I made awhile back that will help:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-display-the-user-post-count-in-topic-php#post-92596Also luvs, be aware that the people who post on these support forums are volunteers who take time out of their day to help the community.
In reply to: Install a plugin twiceIf you duplicated everything and renamed everything, then technically, you should be able to activate them both.
What’s the plugin in question?
In reply to: Please give me your oppinions – I broke the rules.You can do whatever you want with your theme. However, since you’re not using a child theme of bp-default, your theme subsequently will not receive any updates for bugs or features when a new version of BuddyPress is released. You’d then have to manually check over new BuddyPress releases and merge them into your custom theme. A lot of BP functionality is tied to the theme (AJAX, JS), so hopefully you’re aware of that.
Re: labels – I’m guessing you mean the BuddyPress localization strings. The BP localization strings are convenient if a user is already using the BuddyPress language file, but you’re happy to run with your own theme language file as well.
It sounds like you’re doing a lot of modding to the original bp-default theme, so since you seem happy with this approach you should be fine.
In reply to: Duplicate version of groups on same site. Ajax.phpIf you duplicated and renamed the function and add_action, you’d also need to add some javascript, so WP will recognize the new AJAX function.
Check out the following lines in in /bp-default/_inc/global.js:
https://buddypress.trac.wordpress.org/browser/tags/1.2.8/bp-themes/bp-default/_inc/global.js#L607In reply to: Duplicate version of groups on same site. Ajax.phpInstead of adding your tournament code directly into the bp_dtheme_ajax_invite_user() function, you’d need to duplicate and rename that entire function and add_action and do a search and replace for groups to tournaments.
In reply to: Sorting your activitiesThe bug tracker is available here:
https://buddypress.trac.wordpress.org/Login with the same username and password as you use here on buddypress.org.
In reply to: Gettinng id of the activity statusAlways use BP-native functions when you can.
Use bp_activity_get_specific() (available in /bp-activity.php). It takes an activity ID as an argument.
So you can do this:
`
// get activity
$activity_get = bp_activity_get_specific( array( ‘activity_ids’ => YOURACTIVITYID ) );// single out the activity
$activity = $activity_get[0];// grab specific activity item
$activity_body = $activity->content;
`In reply to: Activating existing user accounts in BPTry this new plugin by BP’s very own Boone Gorges – “Unconfirmed”:
http://teleogistic.net/2011/05/new-wordpress-plugin-unconfirmed/(Edit) Are you talking about manually activating user accounts on your BP install? Or are you talking about members not showing up in the members directory?
In reply to: Change the title on members widgetI believe you’ll have to use a customized language file.
Read this article:
https://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/In reply to: Language Files…Your language files are currently suffixed with “WyoDLC”. Try using “en_US” or whatever your WordPress locale is.
If you want to keep your language files with the suffix “WyoDLC”, use this snippet in /wp-content/plugins/bp-custom.php:
`define( ‘BPLANG’, ‘WyoDLC’ );
if ( file_exists( WP_LANG_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
load_textdomain( ‘buddypress’, WP_LANG_DIR . ‘/buddypress-‘ . BPLANG . ‘.mo’ );
}
`Also make sure to rename your languages directory back to /wp-content/languages/.
If this still doesn’t work, try regenerating your .po and .mo or post about the “weirdness” you’re experiencing.
In reply to: Call to arms – Own your taskEven the bbPress plugin comes with a small set of fallback template files (as a child theme of twentyten) to display forums.
I didn’t say we’d get rid of bp-default! bp-default can continue to be a parent theme. Even if we backport the simplest changes from bbPress for now like get_template_part() to BP (instead of locate_template() like Bowe mentions above), this will make things very easy to build a plugin to serve BP template files without copying them over to the WP theme (as BP Template Pack does now).
In my unreleased plugin, I created a function similar to bbp_get_template_part(), copied bp-default BP-only template files to my plugin directory and swapped out locate_template() for this new function. The plugin served BP template files. Then, combined with this, all you’d need to is create a header-buddypress.php (or footer-buddypress.php, etc.) in your WP theme to make it gel with BuddyPress.
Thanks for posting about this problem.
This is fixed in the upcoming release of BP, though not for v1.2:
https://buddypress.trac.wordpress.org/ticket/3189If you encounter any other bugs, please post them on BuddyPress Trac:
https://buddypress.trac.wordpress.org/newticketLogin with the same credentials you use on buddypress.org.
Apply a filter to “bp_get_group_description_excerpt” (located in bp-groups/bp-groups-templatetags.php).
The default is 20 words.
Try something like this in your theme’s functions.php:
function my_group_excerpt() { global $groups_template; $group = $groups_template->group; return bp_create_excerpt( $group->description, 40 ); // change 40 to anything you want } add_filter( 'bp_get_group_description_excerpt', 'my_group_excerpt' );Code hasn’t been tested.
You could try using jQuery’s submit event handler:
http://api.jquery.com/submit/In reply to: Allow users to select time zone — not the site adminIt’s possible, you could try setting up the timezones as an xprofile field, but you’d still have to write a custom plugin to override any timestamp that has a filter like `bp_activity_time_since` (available in bp-activity-templatetags.php).
In reply to: Call to arms – Own your taskA little late to this thread, anyway, I’m in total agreement with MrMaz; while there’s some nice work going on in bp-default to make it blog and theme-review compatible, I don’t believe it should be the job of the core devs to maintain a blogging theme. BP should only worry about the templating aspects of BP only and should support any WP theme thrown at it.
With that being said, JJJ has done some awesome, awesome work on this same issue with the bbPress plugin. I’d like to help and see this backported to BuddyPress as soon as possible, but I’m not sure if that is considered too big a change for v1.3. (I did write a similar plugin that attempted to add BP functionality to any WP theme, but I didn’t release it.)
In reply to: User Online Icon@luvs123 – BP_Core_User refers to an older version of BuddyPress.
I would try something like what shanebp outlines here:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-display-if-the-user-is-online-or-not-in-the-forum-topic-and-profile/#post-99118@embergermedia – I believe this is the thread you’re talking about:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/showing-random-group-members/If it is a WordPress post or page, check out this function:
https://codex.wordpress.org/Function_Reference/is_pageIf it is a BuddyPress page, then you’ll need to use `bp_is_blog_page()` to check to see if you’re on a BuddyPress page.
@embergermedia – Notifications get cleared depending on the component screen that is loaded. Which notification are you having trouble clearing?