Forum Replies Created
-
In reply to: 404 on everything except home. sweet home.
It sounds like a permalink issue. @malik, you said that when you switched your WP permalinks to something other than the default, WP stopped working. It’s probably the case that your provider is missing mod_rewrite or otherwise does not have the correct server configuration to support WP permalinks (which are, in turn, required for BP). Here is the page on permalinks from the WP Codex; there are technical details in the second part of the page: https://codex.wordpress.org/Using_Permalinks
If you’re using the bp-default theme, the login sidebar is created at buddypress/bp-themes/sidebar.php. You could copy that file to your child theme directory and modify lines 29-56 to contain whatever login markup you’d like.
The BP-Dev plugins used to do this. There’s a chance that these plugins are what is powering the site you gave a screenshot of. http://bp-dev.org/projects/
I’m pretty sure those plugins don’t work with current versions of BP, but it might give you a starting point.
In reply to: Favorites improvementsGood suggestions, I like them all.
You can already change the “favorites” language to “bookmarks” or whatever else you’d like with a custom language file: https://codex.buddypress.org/how-to-guides/customizing-labels-messages-and-urls/
In reply to: Alternative to Facebook@andrea_r I’d say that MU isn’t distributed in the way that’s important here, because the data is all stored in the same db, on the same server (at least that’s how it works by default). In a truly distributed network, each individual/cluster of individuals would have full, sysadmin level control over his or her data. WP/BP is still largely under the control of the person who owns the particular machine where the stuff lives – if the owner decides to pull the plug, there goes the network.
In reply to: JQuery IssuesIs your problem that the javascript isn’t loading?
The best way to include the script is with https://codex.wordpress.org/Function_Reference/wp_enqueue_script.
You could also just edit the header.php file of your theme to include a script tag.
In reply to: Understanding bp_core_load_templateWhat @r-a-y said. It can be nice to use templates if you think that other BP themes will possibly provide override template for what you’re building. Unless you’re building a BP plugin that has extremely rich functionality or can only work if it’s extremely customizable, I wouldn’t worry about it – just put the markup code directly into display(), or in a function that gets referenced in display(), or required as in the Group Wiki plugin.
In reply to: Creating a new page for groupsUse the Group Extension API: https://codex.buddypress.org/developer-docs/group-extension-api/
Most of the methods will be irrelevant to your purposes. function display() is what you’re looking for – that’s the part that will display the content of the tab.
In reply to: Tiny MceJonas – the only thing I can think of is a javascript conflict. Are you running other plugins that load scripts into the head of the document?
Make sure that when using the Group Extension API, you change the class name and the name of the init method to match the name in bp_register_group_extension() call at the end. So, in the file that you sent me, since you say bp_register_group_extension( ‘New_Tab’ ), make sure that at the beginning of the file you have class New_Tab extends BP_Group_Extension and function New_Tab.
In reply to: Understanding bp_core_load_templateI must admit that I all the template redirection of BP and WP are somewhat magical and mysterious to me.
What about just requiring the template? If you’re using the BP Group Extension API, you need to have a display() method; the content of the method could be to require the necessary template file. That’s what the BuddyPress Group Wiki plugin does.
It’s helpful to look at a few plugins that have robust templating for their display: Group Wiki, Group Documents, and Group Blog all do it differently, but maybe they’ll point you in the right direction.
The reason that the admin bar is loaded in the footer might be partially for SEO reasons, as @hnla hypothesizes, but I’m guessing it’s more for plain old load time while it’s a minor annoyance if the admin bar takes an extra second or two to show up, it’s a real problem if the content of the page is delayed. Putting this kind of stuff in a footer is, I think, pretty standard practice. @mrsalty If you want to move the code higher up in the document for some reason, put the following into your theme’s functions.php file:
remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );
add_action( 'bp_head', 'bp_core_admin_bar' );
If all you want to do is to have the admin bar stay at the top of the page instead of sticking to the top of the browser window as you scroll, just set its positioning to absolute rather than fixed:
#wp-admin-bar { position: absolute !important; }
Go into bp-themes/bp-default/functions.php and find the function called bp_dtheme_js_terms. Copy it (including the add_action line at the bottom) and paste into functions.php of the theme you’re using.
That should at least fix the error I’m seeing in that screenshot.
Ha, that is a lot easier! Thanks for sharing @arxpoetica
If you follow the instructions I gave above, you’ll have to edit the content of the screen by typing HTML directly into display() in the plugin. It’s a bit more complicated to make the pages editable by you on the front end.
The code on the codex page will actually function as a plugin, so that’s a good place to start. Instead of a stand-alone plugin, the easiest thing is to drop it inside of bp-custom.php (and if you don’t have a bp-custom.php already, create one in your plugins directory). Start playing around with the code to see what each part does.
You’ll need a separate class (the code on that page counts as a single class), with a different name, for each new tab.
Sure, it’s easy to do.
Use the BP Group Extension API: https://codex.buddypress.org/developer-docs/group-extension-api/
Basically, each method will be blank, except for the first one (my_group_extension(), or whatever you rename it to) and display(). You will probably also want to disable the create step and the edit step, as under “Optional Parameters”.
Ok. In that case you’ll have to check the JavaScript to see what element it’s trying to grab. (I’m not at my computer at the moment so I can’t). It’s likely that the problem has to do with the parent elements of the favorite button – somewhere up the tree, your theme doesn’t have the necessary CSS selector.
Can you switch back to bp-default to see if the problem still happens?
In reply to: Verify email before registerI don’t know off the top of my head of a good plugin that does this, but I did find some helpful (if wordy) tutorials on writing some jQuery that will make it work: http://theadhamian.wordpress.com/2009/12/01/jquery-validation-part-2-using-jquery-validation-plugin/
In reply to: Verify email before registerExactly what do you mean by “verify”? How are you going to guarantee that the user gets it right? Just checking that it’s a well-formatted email address?
It’s working OK for me. Are you using the default theme, or a custom theme? What version of BP?
In reply to: Avatar errorAre you using a custom theme? It looks like the necessary JavaScript might not be loading.
Strictly speaking, wp-load.php is the handlet for all AJAX calls, in virtue of the WP AJAX API.
The key to finding the function that processes data is to look in bp-themes/_inc/ajax.php for an add_action hooked to wp_ajax_[youraction]. For instance, since in this case the action being passed is members_filter, search for wp_ajax_members_filter, and the function hooked to it.
In reply to: What Buddypress & WordPress blogs do you follow?I’ll also pimp my own blog, http://teleogistic.net
Quite a few people working with WP in education have their feeds aggregated at http://dev.wpmued.org. It’s not terribly active, but good things do pass through there.
In reply to: How do a post a variable in a link?bp_loggedin_user_domain() .’settings’ is probably what you want in this case. The general point about looking at the template files for this kind of thing is exactly right. You can also browse through the core templatetags files (bp-groups/bp-groups-templatetags.php, etc) to see what kinds of output functions are available.