Forum Replies Created
-
Thanks r-a-y, that looks like a good fall-back option.
I don’t mind doing some work to keep my custom theme current with whereever BP is going though, so a list of the name changes would still be extremely helpful.
I have a highly-customized theme. I noticed in an earlier attempt to upgrade from 1.0 to 1.2 beta that name changes for the template tags were a big hurdle. I’ll now stay on 1.1.3, probably until the summer. Not looking forward to the next upgrade…
Is there/will there be a list of template tag name changes, so you can go through them systematically with search/replace?
In reply to: Move profile fields to another field group?Thanks Devrim. How do I “run” this? Would putting it into bp-custom.php take care of it? I know how to run a SQL query in phpMyAdmin. That’s essentially what this is, right?
Is there a reason not to try this manually in phpMyAdmin? Is the group_id field connected to/dependant on other fields that are easy to overlook?
In reply to: Spam, Spam and more spamAfter changing the register slug, what can you use to get the right redirect?
Tried this:
bp_core_redirect( bp_signup_page() );But it just prints the URL on a blank page.
This works of course:
bp_core_redirect( $bp->root_domain.'/mycustomslug' );But I shouldn’t hardcode. Already got email complaints caused by links I’d missed…
In reply to: MU 2.9.1 Upgrade … What broke?Andy Peatling posted this code on another thread:
/*** Make sure BuddyPress is loaded ********************************/
if ( !function_exists( 'bp_core_install' ) ) {
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
if ( is_plugin_active( 'buddypress/bp-loader.php' ) )
require_once ( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
else {
deactivate_plugins( __FILE__, true );
return;
}
}
/*******************************************************************/You have to put it at the top of plugins to make sure that BuddyPress is loaded before the plugin. Does this accomplish the same thing as dpolant’s and M’s code? Are there arguments to use one instead of the other?
Haven’t had time to try it yet…
In reply to: Spam, Spam and more spamChanged the signup slug to something unusual last night. Had a new splogger 11 minutes ago. They’re not actually making blogs, just accounts.
In reply to: Spam, Spam and more spamI never had spam on my main site, until now. The invisible-defender plugin doesn’t help at all and clashes with Beau Lebens’s wp-email-login plugin. Haven’t had time to try any of the other solutions yet. It’s now after midnight, deadlines tomorrow, wasting time deleting spam accounts…
In reply to: Is there any way to stop spammers?Crap, the spammers have now found my site.

These are not the spammers with name+year usernames, like ‘johndoe1973’, that I used to get on test sites. Those seemed to bypass the registration and activation process, because they didn’t show up on my mailing list.
The spammers I get now have realistic sounding full names and apparently usernames generated from those fullnames (my regular custom registration). I recognize them from the long random strings they add in my custom Company field.
Haven’t seen them registering blogs yet. What are they even trying to achieve?!
Sploggers is a serious problem that WPMU/BPAutomattic needs to address!
In reply to: Way to hide 'all' content from unregistered users?In reply to: BP Groupblog Error – Call to undefined function‘M’ gave a solution to fix plugins that broke between 2.8.6 and 2.9.1 at the end of this thread. Haven’t had time to try yet…
In reply to: Ajax Tutorials?Ajax in BP is interwoven with lots of CSS tags. As soon as you change something in templates, Ajax breaks. There are also some known problems with Ajax in version 1.1.3.
I’ve worked on a similar problem last weekend and found this extremely usefull function:
function strip_tags_attributes($string,$allowtags=NULL,$allowattributes=NULL){
$string = strip_tags($string,$allowtags);
if (!is_null($allowattributes)) {
if(!is_array($allowattributes))
$allowattributes = explode(",",$allowattributes);
if(is_array($allowattributes))
$allowattributes = implode(")(?<!",$allowattributes);
if (strlen($allowattributes) > 0)
$allowattributes = "(?<!".$allowattributes.")";
$string = preg_replace_callback("/<[^>]*>/i",create_function(
'$matches',
'return preg_replace("/ [^ =]*'.$allowattributes.'
"[^"]*"|'[^']*')/i", "", $matches[0]);'
),$string);
}
return $string;
}You can apply it on a piece of content like this:
strip_tags_attributes($content, '<p><a><img><object><param><embed>','href,src,allowfullscreen,type');The tags and attributes in this example are allowed, everything else is stripped. This example also leaves embedded video, but because the width and height attributes are stripped you can define those in the CSS so the object/embed fits in your widget. Or just disallow object/embed.
Where and how you should apply this function in your case I haven’t figured out yet. Let me know, I should probably use this myself.
In reply to: I don't receive registration e-mailsWhich registration emails do you mean? The WPMU welcome email is disabled in BP; see function bp_core_disable_welcome_email() in bp_core_activation.php. It’s a feature…
In reply to: Is there any way to stop spammers?There was a new blunt solution here. Apparently having a couple of required custom profile fields also cuts down spam.
I use this as temporary solution:
function js_restrict_access(){
global $bp, $bp_unfiltered_uri;
if (!is_user_logged_in() &&
(BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] ||
BP_GROUPS_SLUG == $bp->current_component ||
BP_BLOGS_SLUG == $bp->current_component)){
bp_core_redirect( get_option('home') . "/register" );
}
}
add_action( 'wp', 'js_restrict_access', 3 );It closes the members, groups and blogs sections for non-registered users. You have to put it in bp-custom.php.
Privacy is planned for a later version, maybe, or maybe not.
In reply to: Privacy ?OK, to bring the thread back to the original subject, in the current version of my site I use Burt Adsit’s solution for the most immediate privacy problem, making members sections members-only:
function js_restrict_access(){
global $bp, $bp_unfiltered_uri;
if (!is_user_logged_in() &&
(BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] ||
BP_GROUPS_SLUG == $bp->current_component ||
BP_BLOGS_SLUG == $bp->current_component)){
bp_core_redirect( get_option('home') . "/register" );
}
}
add_action( 'wp', 'js_restrict_access', 3 );Put that in bp-custom.php and it works pretty painlessly. It doesn’t have a built-in message to let the user know why he’s being redirected though.
Haven’t tried Jeff Sayre solution yet, but apparently it has some problems. I’ll try that one in my next upgrade to BP 1.2 and WP 3.0.
Also commercial membership plugins apparently have built-in privacy features, so that could be a solution. Haven’t gotten that far yet…
In reply to: Privacy ?If you are comparing an open source project to a car manufacturer then you don’t get it. Did you pay for BuddyPress?
Automattic is a regular company. WP is supposedly aimed at content creators, not developers. If WP/WPMU/BP lacks certain key functionality that forces users to get into coding, it fails in its mission. As a user I’m free to point that out without having to pay tribute to the developers first. I didn’t pay for WP/BP, but don’t have any obligations towards Automattic either.
@Erich73, I didn’t start turning this thread into an attack on me.
In reply to: Privacy ?So what I have to say to people that are complaining about missing features in the core: Start writing code.
This is like a car maker selling a car without brakes and telling the user he should manufacture them himself. I’m just a regular WordPress user giving feedback. I don’t get paid to write code. Andy does.
In reply to: Blog Avatars – how to get them to display?There is no way. I think it’s on the roadmap for version 1.4 or 1.5.
In reply to: Privacy ?There was some talk in the recent buddypress-dev meeting about creating a poll for future feature requests. When such a poll appears on the site, be sure to vote for privacy in the core if you think it’s important for it not to be located in a plugin.
Didn’t we do the exact same thing six months ago?
Privacy is crucial imho. If access management is not core, what is? Social networks can’t function without privacy controls. Members won’t use it for anything serious if they can’t control whether their posts goes to their friends or out to the world.
I hadn’t paid much attention to this issue because I assumed it was coming. With all due respect, the developers seem more interested in “new features” and cool coding challenges than straightforward usability and making sure the core is rock solid.
In reply to: Login re-directThanks for this excellent bit of code Brajesh Singh! Should be part of the core imho.
In reply to: groupblog fatal errorThis has been discussed here, with some solutions – that I haven’t tried yet…
In reply to: Multiple user types – possible?My original comment was more in response to psyber than to DevWeb’s original question from 10 months ago. I just thought that “you can code it in 20 minutes” didn’t really answer the “this is a huge hurdle for me to overcome” point.
In reply to: Multiple user types – possible?Why’s that worrisome? It just shows how fast you can get results with BP.
Only when you are a PHP programmer. If you are not, you waste weeks figuring out little things like storing firstname/lastname, fixing Ajax buttons that are intricately connected with CSS elements and fixing plugins that break between versions of WPMU.
The worrisome thing is when BP developers assume the end users are all PHP programmers. Or if they are not, that they should learn PHP.
WordPress was originally intended for content creators who know some html/css, but don’t have to know “programming”. I’d hate to see Buddypress abandon that goal.
That basically means you talk an aweful lot about things you really don’t know that much about…
I don’t and make that very clear, but I still need to figure out ways to get these little things to work or they would derail my project. And I can’t afford to hire anyone to do it for me.
I know general structural things; I don’t know programming from scratch. In particular working with arrays etc. is pure hocus pocus to me.
In reply to: Advanced Search, is it possible??Adding field specific search criteria -> Old thread is old. Jjj has a plugin for this.
Where can I find this plugin? What is it called?