Search Results for 'buddypress'
-
Search Results
-
BP1.2trunk/WPMU2.9.1, custom child theme of bp-default. For dev site where I limit blog creation to 2 per user (increase limits on user by user basis), I wanted to change part of introductory text from
“There is no limit to the number of blogs you can have, so create to your heart’s content, but blog responsibly.” to “Please blog responsibly and observe copyright information before adding content to your blog.”
Traced the intro text to bp-blogs/bp-blogs-templatetags.php specifically in “function bp_show_blog_signup_form” wherein
display_name) ?>
Since I don’t want to change core files, I had to – create a remove function, then call to remove such function during BP initialization, created mercime_replacement function, then added the action to replace the original function – which resulted to additional 45 lines in child theme’s functions.php (without spacing and comment lines) to change that one sentence.
What would have been the easier or simpler way to do this? Thank you.
Topic: How to add user location
Hi,
I would like to know how to add user location to my registration form please.
A drop down list with example – Country
State
City
This would also make it better to sort users according to location.
I am on the latest version of Buddypress and WPMU.
Thanks a lot!
Okay. I’ve got CometChat and I’m trying to get it to work with buddypress. The developer says it will work just fine with the proper edits to the config.php file so that it can talk to the database properly.
I’d Like to get it working so I can post the config for other Buddypress Users.
I have two sets of things that I need help with – I need to make sure I’m calling the database propery here:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* DATABASE */
include_once dirname(dirname(__FILE__))."/wp-load.php";
define('DB_SERVER', DB_HOST );
define('DB_PORT', '3306' );
define('DB_USERNAME', DB_USER );
define('DB_PASSWORD', '******' );
define('DB_NAME', '**************' );
define('TABLE_PREFIX', $table_prefix_wp );
define('DB_USERTABLE', 'wp_1_useronline' );
define('DB_USERTABLE_NAME', 'displayname' );
define('DB_USERTABLE_USERID', 'userid' );
define('DB_USERTABLE_LASTACTIVITY', 'timestamp' );
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I’m pretty sure that all of the above is correct. As I’m no longer getting database errors. But What I really need help with is the FriendList Functions. These are the default functions in the config.php file:
/* FUNCTIONS */
function getUserID() {
global $current_user;
get_currentuserinfo();
$userid = 0;
if (!empty($current_user->ID)) {
$userid = $current_user->ID;
}
return $userid;
}
function getFriendsList($userid,$time) {
$sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid,
".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username,
".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,
".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." avatar, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link,
cometchat_status.message, cometchat_status.status
from ".TABLE_PREFIX."friends join ".TABLE_PREFIX.DB_USERTABLE."
on ".TABLE_PREFIX."friends.toid = ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID."
left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid
where ".TABLE_PREFIX."friends.fromid = '".mysql_real_escape_string($userid)."'
order by username asc");
return $sql;
}
function getUserDetails($userid) {
$sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX."useronline.timestamp lastactivity, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." link, ".TABLE_PREFIX.DB_USERTABLE.".user_email avatar, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid left join ".TABLE_PREFIX."useronline on ".TABLE_PREFIX."useronline.userid = ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'");
return $sql;
}
function updateLastActivity($userid) {
$sql = ("update ".TABLE_PREFIX."useronline set timestamp = '".getTimeStamp()."' where userid = '".mysql_real_escape_string($userid)."'");
return $sql;
}
function getUserStatus($userid) {
$sql = ("select cometchat_status.message, cometchat_status.status from cometchat_status where userid = '".mysql_real_escape_string($userid)."'");
return $sql;
}
function getLink($link) {
return '';
}
function getAvatar($image) {
return"http://www.gravatar.com/avatar/".md5($image)."?d=identicon";
}
function getTimeStamp() {
return current_time('timestamp');
}
function processTime($time) {
return $time;
}
The First Three Function are the most important to get right and I don’t really know how to edit them so they will pull the right information from the right tables.
function getUserID()
function getFriendsList($userid,$time)
&
function getUserDetails($userid)
The instructions for modifying these functions is located here:
http://www.cometchat.com/support/page/documentation?record=16
But being rather new to SQL queries within PHP – the instructions don’t make much sense to me.
Thanks in advance for your help
Couple of questions regarding Buddypress 1.2 and bbPress integration: Is there going to be a way to somehow get to the admin interface for bbPress? And is there going to be a way to add and activate bbPress plugins?
At the moment I don’t see anything in BP 1.2 that allows for either of those things to happen.

Any help or direction is appreciated.