Forum Replies Created
-
@korhanekinci: it is available in the trunk, which contains the latest, bleeding-edge, development version of BuddyPress. Not for use in a “real environment”, but you can download it by typing
svn co https://svn.buddypress.org/trunkin a your command line terminal (if you have Subversion installed). I believe it will be included in BuddyPress 1.1, expected release date August 17.You could do:
<?php
global $bp;
$status = get_usermeta( $bp->displayed_user->id, 'bp_status' );
echo $status['content'];
?>That saves you one line
I’m not sure what you want to do, but with this code, you can get a list of the options and the amount of users who have selected the option. Note: for selectbox and radio fields only.
$field_id = 1; // this should be the id of the
// field you want, see your wp_bp_xprofile_fields
// database table to find it
global $wpdb;
$sql = "SELECT value FROM {$wpdb->base_prefix}bp_xprofile_data WHERE field_id = {$field_id} ORDER BY id DESC";
$result = $wpdb->get_col($wpdb->prepare($sql));
foreach($result as $row){
if(strlen($row) > 0){
$values[$row]++;
}
}
$i = 0;
foreach($values as $key => $value){
$i++;
if($i != 1){
echo ", ";
}
echo $key . "(" . $value . ")";
}You could probably doing something like
.site-wide-activity-widget blockquote { display: none; }in your custom.css file. (Note that the above sample won’t work, but something similar.)
If you have disabled registration on your WordPress MU installation, and users are still signing up, you may have forgotten that if you are running group forums you have a bbPress installation that synchronizes users with the WordPress MU installation. Disable registration in bbPress and you should be good to go.
More specifically, I’m wondering:
- Is it a good idea to add fancy graphs using the Google Maps API (each user would have to use their own API key, naturally)?
- Should there be an option to display all or some of these graphs publicly, that is, not in the administration panel? If so, where and which?
- What more graphs would you like? I’m thinking about adding Wire and Forum stats, good/bad?
bbPress does not have any native ways to hide forums that should be hidden. You can do as I have done – installing a “blank” theme that redirects users to your main site, limiting users to use the built-in group forums functionality only – or you could install a bbPress plugin that hides forums from those that are not allowed to view them. There is such a plugin, intended specifically for buddypress users, but I can’t remember what it is called.
My users had “no role on these forums” until I installed some bbPress plugin that fixed this (by giving them the “member” role automatically – before that I had to it by hand). Are you sure this is not the case?
BuddyPress is not used by many community sites because it is still a brand new product.
Many e-mail services also support “plus addressing” – including gmail. I usually use “myname+mysitename1@gmail.com”, “myname+mysitename2@gmail.com”, etc. See http://en.wikipedia.org/wiki/Plus_addressing#Sub-addressing .
абвгдеёжзийклмнопрÑтуфхцчшщъыьÑÑŽÑ
However, it shouldn’t be too hard to create a “special page” in buddypress/wordpress that outputs some data (XML, serialized PHP, or something) about the logged in users that can be fetched with some kind of Joomla extension at regular intervals.
BuddyPress is based on WordPress, which as you probably know can be used as a CMS too. Therefore, it is not likely that any effort is made in tying together Joomla and BuddyPress.
I’d say it is not a functionality.
Note that the default home theme for buddypress already links to the member profile. If you are using another theme – awesome!
My hack above should also go into a bp-custom.php (or similar), but I’d use Burt’s code snippet instead.
The regex is missing some slashes though… if someone needs help figuring the proper regex out, contact me (through writing a reply to this topic, par example) and I’ll give it to you.
The hack:
<?
// Fulhack for fixing obscure [p] bug: see
// https://buddypress.org/forums/topic/p-showing-up-in-group-forums-and-activity-with-bp-102-and-latest-phplibxml
function fulhack_for_fixing_p_bug($string) {
$string = preg_replace("#\[a href=\"([^<]+)\"\]([^<]+)\[/a\]#i", "<a href=\"\\1\" target=\"_blank\">\\2</a>", $string);
$string = str_replace("[p]", "<p>", $string);
$string = str_replace("[/p]", "</p>", $string);
$string = str_replace("[ol]", "<ol>", $string);
$string = str_replace("[/ol]", "</ol>", $string);
$string = str_replace("[ul]", "<ul>", $string);
$string = str_replace("[/ul]", "</ul>", $string);
$string = str_replace("[li]", "<li>", $string);
$string = str_replace("[/li]", "</li>", $string);
$string = str_replace("
", "<br />", $string);
return $string;
}
add_filter( 'bp_get_the_topic_post_content', 'fulhack_for_fixing_p_bug' );
?>Burt was told via IRC that I am running 1.0.1 (as it says in my starting post).
However, we weren’t able to squash the bug. I am working on a “fulhack” (a Swedish programming term that is very useful – literally “ugly hack”) that will work around it.
Unfortunately, the patch does not work for me. I am however not running from the trunk, I am running 1.0.2. I suppose something differs that affects this issue…
ipstenu: no, I am not running any bbCode plugins.
Further investigation says I am aalready running PHP 5.2.9 and libxml 2.7.3…
This has somehow returned for me. I am running BuddyPress 1.0.2, WordPress MU 2.7.1, and bbPress 1.0.1. The [p]s show up in the sitewide activity for group forum posts, and in the group forums, but they don’t show up in the bbPress view of the group forums.
I am using the buddypress-enable.php from the latest stable BuddyPress download. Is it really so that I have to upgrade the xmllib library? I do not have my own server, I am using a web host…
If that’s so, I haven’t been around for that long
You’re missing the fact that there are two themes – the “home theme” and the “member theme”.
“Soon” is good enough for me.