Forum Replies Created
-
I found the solution to this yesterday, see bugs 306 and 322 I believe.
The problem is you don’t have maxmembers set in currently online widget.
<input type=”hidden” name=”bp_core_widget_members_max” id=”bp_core_widget_members_max” value=”” />
Look at line 139 of your source (generated, not php). If you set the max members in who’s online the problem goes away, or if who’s online is loaded after members, there is no problem.
I talked to Andy about this yesterday, and I think it just needs to have some better documentation for the widgets.
Brad
The reason for going the myspace route, it allows members to generate themes, and not requiring me to upload css files.
I will take a look at these other options, but this might be a good starting route to allow members to adjust their own group look and feel.
Here is a very very rough attempt,
http://gorgeousgamers.com/beta/groups/official-wii-group/home
as a note, you need to modify kses.php to allow style tags.
Brad
I hate to take the myspace approach, but could add <style>CSS</style> into the group description.
If there was a action added, then yes it could be a plugin. But for now hacked code is good enough. I guess I could have written it with a hook, and added the hook myself, but either way it requires having a version not match the svn checkout, so I just hard coded values in for now.
@JJJ, due to the simplicity of profiles at this point, and the niche of my site, I don’t really have way to draw connections between users. The idea of showing people in the group, was just to attract attention to the groups and to member profiles. Our site is about showing off hot profiles, and the more places on the site where profile pictures are, the more page views the site can generate.
Brad
Honestly, I think it is time for a new host.
I believe buddypress highly recommends using subdomains for member blogs, for example:
myblog.example.com and if you host doesn’t support that I don’t think it is a solid hosting solution.
If you are trying out buddypress for a small scale deployment, with just a few friends using it and they don’t need blogs you might be ok.
There are already a few posts around here of what people are using for hosting, but I have never heard of a paid solution that wouldn’t allow nonwww domains.
Brad
yes
it is just sql…
line 260 from bp-friends-classes.php Version 813 (has not been adjusted for new $bp changes)
function get_random_online_friends( $user_id, $total_friends = 5 ) {
global $wpdb, $bp;
$sql = $wpdb->prepare( “SELECT u.friend_user_id, u.initiator_user_id FROM {$wpdb->base_prefix}usermeta um LEFT JOIN ” . $bp . ” u ON u.ID = um.user_id WHERE um.meta_key = ‘last_activity’ AND (u.friend_user_id = %d || u.initiator_user_id = %d) && u.is_confirmed = 1 AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW() ORDER BY rand() LIMIT %d”, $user_id, $user_id, $total_friends );
$results = $wpdb->get_results($sql);
for ( $i = 0; $i < count($results); $i++ ) {
$fids[] = ( $results[$i]->friend_user_id == $user_id ) ? $results[$i]->initiator_user_id : $results[$i]->friend_user_id;
}
// remove duplicates
if ( count($fids) > 0 )
return array_flip(array_flip($fids));
else
return false;
}
reference: get_online_users, in bp-core-classes
you can always pass in values when you call the javascript.
Or your js file could be a php file which would just print your js?
Brad
Check out this..
http://gorgeousgamers.com/beta/
I created a simple widget that shows the most recent memebers, and current members online by gender.
I had it coded to work with the member rating functionality, but decided to order by newest members.
You could do it as a page template, and then publish a blank page with that template. That is the easiest way to do it.
Enjoy,
Brad
I have written a general forum plugin, which takes the group forum plugin, and initialize it to a second bbpress install, which is a general forums. It is very rough, and needs some work before I might release it. It has the advantage over doing a bbpress theme, that is uses the buddypress theme. The downside is it uses the xmlrpc for all communication to the bbpress install.
You can see it here, I’m waiting for a ticket I opened in trac for the error to go away, but you get an idea how it works:
http://gorgeousgamers.com/beta/forums/
Enjoy,
Brad
this is silly but…
set $is_single_group = true
I have spent a long time and created a general forums plugin. I will not be releasing it, as it requires additional modifications to the core of buddypress, but you cen see it working at:
http://gorgeousgamers.com/beta/forums
There is a modification request which I submitted, to remove the error in the core, but I don’t believe it has been resolved yet.
Brad
Due to all communication of buddypress and bbpress being done over xmlrpc, the normal plugins most likely won’t work. I have been looking at ones like a view counter and they require massive modification of buddypress. Because of caching, the forums are not always pulled from bbpress. So it would produce falsely low view count.
Also, group forums, are just a single forum in bbpress, this changes the administration and moderation of the forums and topics. If someone is a moderator on bbpress, they can moderate the whole site I believe, with buddypress a moderator is only a moderator of that group forum.
Hope this helps,
Brad
http://buddypressdev.org/phpxref/nav.html?_functions/index.html
That is a complete list of every function in buddypress, along with location of code and places where it is referenced.
As far as your request for a function which returns groups created by a particular user, what did you need the list for? and where did you want to use it?
Hopefully that helps.
Brad
I think the error might be in your use of php_self
<form name=”search” method=”post” action=”<?=$PHP_SELF?>”>
What does the html look like when you view the page? I have a feeling it might be putting the wrong url into the form?
Also…
<input type=”text” value=”bob” name=”s” id=”s” />
Change that name and id, because “s”, is caught by wordpress and shows you a search result page:
That is a wordpress page not found result, basically.
That is why you search isn’t working.
You may find this helpful:
https://codex.wordpress.org/Creating_a_Search_Page
Hope that helps,
Brad
Can you confirm that they are making it back to the bbpress tables correctly? IE if you open the post in bbpress, are they already corrupt?
Or is it only when they get displayed back to Buddypress?
Also if you make a post in bbpress, does it show up in buddypress correctly or is it corrupt there also?
Answering these questions may help to narrow down the bug, or may prove to be a wide spread issue.
Sorry I couldn’t give you a solution, but first we must understand the problem at hand.
Brad
There is already a default friend plugin floating around.
POT and PO Files
To provide a template for translations, the English menu and dialog texts of a program are stored in text files with the extension .pot (short for “PO Template” like .po stands for “Portable Object”.)
If you open up the file and look it would have given so some hints.
Brad
Ok, I realize there is a profile type of date.
It stores the date as a unix time stamp, for example my birthday is:
363326400
So all you need to do is this, subtract stored birthday from time(), if less then 18*365*24*60* then birthday is that of a minor.
how and where you do this is up to you.
charge membership with a credit card.
Require members to enter birthday, if they have real friends, let another member “validate” their birthday.
have people uploading avatars of themselves holding up signs for your site. This is pretty low tech, but most people can handle it.
There is a level of animosity which the internet provides, and is often hard to penetrate.
You can also protect yourself, by registering your site with known parental control software packages, such as mcafee. This would probably get your domain, and possibly your server marked as adult so probably not the advised solution.
Brad
check out this plugin:
https://wordpress.org/extend/plugins/tinymcecomments/
Why the need of a preview box if you have the What You See Is What You Get Editor in the same place as your visitors type in the comments?
This plugin turns the comment field from a primitive into a WYSIWYG editor, using the internal TinyMCE library bundled with WordPress 2.0 or up, without the need of another separate installation. Functions that only available to writers like adding images were removed and will not show up in the toolbar.
If you add to the mu-plugins and add this line to the end of the plugin file:
add_action(‘template_notices’, ‘mcecomment_init’);
This is only the concept, I have not tested it, and don’t have the time but wanted to point you in a direction.
Brad
Actually,
I believe you need to be friends to post on other peoples wire’s, but that can be easily changed in the code so it doesn’t check for friendship.
Brad
Ok Great News, changed 4 lines of Code, and get ratings working at a simple level for users.
I took the wp-postrating plugin, normally designed to allow vistors to rate posts, and feed in the custom id of the user id. I had to bypass the area where it try’s to validate the number as a post, but overall seems to work.
Now I can take the widget and modify that to show top users, instead of top posts.
Try it out here:
http://gorgeousgamers.com/beta/members/bradmkjr/
Let me know what you think,
Brad
That is my project for next week.
I’m going to be developing both a user rating system, which should be pretty simple, and in network token system.
The current site which we are porting over to has a hot or not style voting for all members. We are going to develop a way to import current users ratings to make sure no one looses their ranking.
For the in-site money, we currently have a token system, with a 12k plus tokens already in circulation, so we can’t just throw those out during the conversion. We are going to start by having people give gifts to other members. Every gift will cost X tokens. Eventually we will be adding a real store, where people can make purchases with tokens, once we ensure the system can’t be hacked or gamed unfairly.
Brad
If you goto the directory where you checked out the svn repository, and run this, it will tell you the version you currently have checked out:
svn status -u
The out may look something like this, depending on how close to current you are:
~/public_html/beta/buddypresssvn]$ svn status -u
Status against revision: 845
if you are not up to date, it will show changes between your checkout and the trunk, similar to this:
~/public_html/beta/buddypresssvn]$ svn status -u
* 844 bp-languages/buddypress.pot
Status against revision: 845
This tells me that the language file has been updated since my last checkout.
you can then run
svn up
to bring your directory up to currrent status.
If you used the zip to download a copy this will not work.