Forum Replies Created
-
In reply to: Custom Language changes not showing
The tutorial is not very clear on that, no. But you can see that it’s expecting the file to be named that way, since BPLANG is defined as ‘mysite’ and it’s looking for a file called ‘buddypress-‘ . BPLANG . ‘.mo’.
Glad it works! I should fix up the codex page so that it’s clearer.
In reply to: Custom Language changes not showingThat code looks correct, as long as your .mo file is located at
wp-content/plugins/buddypress/bp-languages/buddypress-mysite.mo
Are you sure you’ve named it correctly?In reply to: Custom Language changes not showingUse pastebin.com to post code and then put a link here. I’d like to see what’s in your bp-custom.php file.
bp-custom.php should be in wp-content/plugins.
In reply to: Custom Language changes not showingMake sure you’ve got the path to the .mo file correct. The tutorial assumes that you’re keeping it at wp-content/plugins/buddypress/bp-languages. Is that where you’ve got it?
Can you post the code that you’re using in your bp-custom.php file?
In reply to: Using image upload in my pluginAh, you’re doing it from the BP frontend. No, there is no standard image uploader for BP, or even for WP as far as I know. (Sadly.)
Here are some examples of plugins that allow file uploads. Each takes a different tack. Maybe you can decide what you want to do based on them.
– https://wordpress.org/extend/plugins/buddypress-group-documents/
– https://wordpress.org/extend/plugins/forum-attachments-for-buddypress/
– https://wordpress.org/extend/plugins/buddypress-group-wiki/In reply to: AdminBar broken in Webkit Browsers (Chrome, Safari)Awesome!
In reply to: AdminBar broken in Webkit Browsers (Chrome, Safari)Try moving the @import rule to the very first thing in the document. http://www.w3.org/TR/CSS2/cascade.html#at-import
In reply to: Language file load evidence?Right, I was assuming that the directory structure was wp-content/bp-languages. And yes, it’s a good idea to relocate it.
In reply to: Invite Friends systemI wrote a plugin called Invite Anyone that doesn’t do quite what you are looking for (it doesn’t restrict registration) but it could be modified to do what you’re asking: https://wordpress.org/extend/plugins/invite-anyone/
In reply to: Remove Automatic Links in ProfileKalman, the plugin should work fine on 2.9.2, even if I haven’t tagged it as such. Should work for 3.0, for that matter.
Is *any* of the code in bp-custom.php being activated? Maybe it’s a problem with that file.
In reply to: Language file load evidence?I think that your file location is the problem. If you have your file in wp-content, it should read
load_textdomain( 'buddypress', '/wp-content/bp-languages/bp-family-' . BPLANG . '.mo' );
In reply to: adding new alert into activity stream@ninanoki – There are three strategies for doing what you want to do.
1) Load WP/BP in the background when you, for instance, save a mediawiki edit. You can do that by including wp-load.php. Then you can use the BP activity API, as @nuprn1 suggests above. The downside is that you’ve got a lot of overhead, loading both MW and WP at the same time.
2) Write directly to the WP database with a MW extension. I wrote this http://www.mediawiki.org/wiki/Extension:BuddyPressActivity a while back and it is out of date and doesn’t work right now, but you could hack it to work. Downside: it’s fugly
3) You could pull edits in via RSS. I have a working version of such a plugin on my localhost right now, but I have to clean it up before releasing it. It’ll let the admin put in any RSS feed (like MW Recent Changes) and have the updates be posted as activity items. If you’re sharing a user database, it’ll even key the user_id correctly. I might get a chance to work this up in the next day or two, and I’ll post it on these forums when I do.
In reply to: Using image upload in my pluginDepends how you’re doing it. If you’re using custom post types in WP 3.0, uploads should be enabled by default with the editor: https://codex.wordpress.org/Function_Reference/register_post_type
In reply to: Language file load evidence?Did you do step 3 here? https://codex.buddypress.org/how-to-guides/customizing-labels-messages-and-urls/
In reply to: Getting rid of all activity before I go liveThe safest way is to go through the UI on the front end and manually delete all the content items (forum posts, etc) and activity items, and then to delete all the test members from the Dashboard. I don’t suggest selective deletion directly from the database unless you really know what you’re doing.
Or you could go with a fresh install, by dropping all the tables in your installation, clearing your .htaccess and wp-config.php files, and going through the WP setup process again. You’ll also want to remove user-specific data like avatars, which on WPMU are in blogs.dir. As long as you don’t delete any plugin or theme files, you should be able to recreate your site pretty quickly – though your settings will be lost in the process, and will have to be recreated.
I’ll have to go back and rename some of my plugins, if this happens. There’s got to be a better way. Maybe sortabllity by rating or popularity as determined by bp.org users, which would filter out the irrelevant stuff.
Happy to hear that it works!
Oops, yeah, you’ll need to remove the parenthesis before get_blog_option in both of those.
I don’t know about the blog class thing. Try without changing it and see what happens.
In bp-blogs.php, change 379 from
if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
to
if ( (get_blog_option( $blog_id, 'blog_public' ) > 0 || !bp_core_is_multisite() ) {Also, change 427 from
if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
to
if ( (get_blog_option( $recorded_comment->blog_id, 'blog_public' ) > 0 || !bp_core_is_multisite() ) {I haven’t tested this but it should work.
In reply to: bpGroups – BuddyPress Plugin – Fatal ErrorbpGroups is not needed now that bbPress is integrated into BP forums. Delete the plugin files, then go to Dashboard > BuddyPress > Forum Setup to set up forums.
In reply to: BP System Report Error MessageYou can delete lines 372-379 in the plugin, which will get rid of the first error. It was meant for testing but I forgot to take it out.
The second error is due to some crappy math functions I wrote. I’m going to completely revamp the plugin math, but I can’t really do it for the next few weeks at least because of other conflicts.
If the plugin is causing you big problems, you should probably just disable it for now. It’s very beta and should not be used on a production site if it’s throwing errors.
In reply to: pagination within my plugin shortcode+1 @travel-junkie – I learned whatever I know about paginate_links() by seeing how BP uses it.
In reply to: Displaying forum topic tagsPS you’ll probably want to style that ul.
In reply to: Displaying forum topic tagsI guess I’ll do it in pastebin:
http://pastebin.com/hXgfJnY1Hi @pollyplummer. You have basically got the right idea, but there are a few problems.
First, your check for usermeta is not formatted correctly. See https://codex.wordpress.org/Function_Reference/get_usermeta for get_usermeta syntax. In any case, get_usermeta gets stuff from the wp_usermeta table, and I used it as an example in my code to give you a sense of the kind of check you’d want to do. But that’ll only work if you’re checking against a piece of data that is stored using update_usermeta. BP xprofile fields are not. If the “114” information is stored in a bp xprofile field, you will probably have to do some magic with xprofile_get_field() to get it to work. The following will check for a field called “Type” and check to see if the current user’s Type value is 114:
$field_id = xprofile_get_field_id_from_name( 'Type' );
$field = xprofile_get_field( $field_id );
$value = $field->data->value;if ( bp_the_profile_group_name() == 'awesome' && $value == '114' ) {
There’s probably a slicker way to do this, but it works. Again, this is only relevant if you’re storing the salient data in the xprofile tables.The second problem is that you don’t want to repeat the bp_has_profile etc stuff inside of the if statement. If you want to feed a profile_group_id argument to bp_has_profile, you should do it in the initial loop.
Then make sure that you include the markup inside of the conditional if statement. In edit.php, that means everything, including the