Forum Replies Created
-
For example here in this WPMUorg tutorial the author explains how to replace some piece of code, but it is passed as a variable in the execution time, after it’s assigned with a value http://wpmu.org/how-to-create-your-very-first-wordpress-plugin/
Will it work if I want to modify the php templating code BEFORE it gets parsed by the PHP engine? I think not…
Hi, @modemlooper I researched a lot and there’s no one who did this, maybe you heard of myself since I wrote a kind-of-tutorial here at the forums explaining how to achieve this, but I would like to make a plugin with it

I have all the work done, you can see a working demo here (scroll down to see it in action) http://www.horizontea.com/ the thing is I do not want the “Load More” button to appear since the user won’t need it and the appended items will have problems with the way that the new instances of the button are created…
I just want to know how some plugins code manages to “rewrite” some theme parts from backend, not frontend, if such a thing is even possible. For example I want to replace as explained in https://buddypress.org/community/groups/creating-extending/forum/topic/auto-load-more-activity-stream-items-when-scroll-reaches-the-bottom-of-the-page/ (I have poolished and improved the code now loads only when needed and included throttling functionality).
If it cannot be done it will keep being just a tutorial and never a plugin, sadly

Hi, @sakarya I’ve managed to get that kind of functionality in my site by using groups with added custom extra fields. That way I can sub-categorize them and list them in any special ways I want. Maybe that could help you… let me know if you want me to tell you more, regards
Hi, @shawn38 Glad to see someone found this useful

I have actually optimized the code to work flawless and best performing. I could make a plugin with it just have to learn how to replace some code that is already given with BuddyPress, I will investigate that today and hopefully upload the plugin really soon. Will let you know with another message here. Thanks a lot for your encouraging words!

I think that depending on the final result you want to achieve, there are already a few tools that will get the work done. For example: if you want to mention your users, you can use de bp labs plugin that will add the “autocomplete” feature to the mentions for more usability (also could be used vía comments for mimicking the picture-tagging like Facebook). In the other hand, you can use profile fields to let members “tag” themselves on a different number of topics… etc.
Maybe if you tell us what would you use it for we can think of a posible way to achieve that

Hi, @raminjan
Here you’ve got a few powerful tutorials on how to get that

http://wpmu.org/how-to-build-a-facebook-style-members-only-wordpress-buddypress-site/
Hi, @streidl you just have to change the order of appearance of some elements, in concrete:
``
And all of it’s contents should go before:
`…`
You should move that immediately after `` opening tag appears.The files you want to tweak should be in your theme folder, something like
`/wp-content/plugins/buddypress/bp-themes//members/single/home.php`There you’ll see something like:
`
`Just move the “item-nav” before the header
, hope it helps, cheersHi, @joemd clearly one of the best options and the one I use is http://buddydev.com/plugins/bp-gallery/ you will pay only 30 dollars if I remember well and have access to tons of premium plugins. That plugin BP Gallery is pretty complete, you can set it to work only with pictures or if you want also videos and music, hope it suits you

I 100% agree with this, I’ll see if I can find a solution, for the time being, any help will be welcomed!

@rogercoathup thanks to your help I just achieved what I wanted

I’m doing this now and it’s working fine (still will polish it a bit more):
if ( !isset( $bp->groups->current_group ) || !$bp->groups->current_group || $gid != $bp->groups->current_group->id ) { $group = groups_get_group( array( 'group_id' => $gid ) ); } else { $group = $bp->groups->current_group; }; groups_record_activity( array( 'action' => apply_filters( 'groups_activity_new_update_action', sprintf( __( '%1$s publicó una actualización en %2$s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . esc_attr( bp_get_group_name( $group ) ) . '</a>' ) ), 'content' => $content, 'type' => $type, 'item_id' => $gid, 'user_id' => $user_id ) )Thanks a lot for your help!!!

@rogercoathup thanks for your help, do you have any links for documentation on that function? I’ll try to find out in the meantime
If someone else has an example for what I need it would be awesomeHi, @raminjan you can certainly achieve that, both making it yourself working at code level or (what I suggest) start with a plugin that achieves the “private community” functionality and set yourself a “front page” (you’ll use a modified version of the login page I guess
).Here are some helpful links on how to do what you need:
http://wpmu.org/buddypress-news-create-your-own-private-buddypress-community/
http://www.1stwebdesigner.com/tutorials/buddypress-collaboration-system/
https://wordpress.org/extend/plugins/buddypress-private-community/
https://wordpress.org/extend/plugins/private-buddypress/Hope it helps! cheers,
-JM
Hi, @gearupandplay first I recommend you to always create a “normal” (non-admin) user for testing purposes in your networks, and test both with admin and non-admin users what happens when you tweak the code, otherwise you may have the problem you found or the opposite, which would be even worst, that normal users may get admin permissions.
That said, I would recommend you to test putting those functions individually inside a var_dump() to see what they’re returning. Maybe you have not invoked the $bp global before using it…
Regards!
@mercime, that is EXACTLY what I needed. Thanks!!!!

Thanks a lot, @mercime I’ll check them out!!!

Hi, all, all fixed now. Below this:
<div id="message" class="info"> </div>Add this:
jq('.pixelMonitor').remove(); jq(document).unbind('scroll');That’s it! You can change the text “Sorry, there was no activity found. Please try a different filter.” for something more customized for the purposes of this feature… cheers!

Hi, @landwire, thanks for you comments, I’ll update the snippet within this week. I don’t want to go off topic a lot but you could accomplish that task by AJAX: http://tomsbigbox.com/wordpress-load-more-posts-on-page-scroll/ Hope it helps! Regards
@janismo (James) now i’ve got it!
Thanks for your help, man! Now I was finally able to reproduce it. The bug is caused in activity streams were no “load more” button was intended to be shown. I have to Tweak it again, will post it tonight/tomorrow morning but with help from people like you I think we’ll have a pretty “bullet-proof” snippet
!Thanks a lot, again, will update as soon as I fixed this altogether with the dropdown filter change support.

Hi, @James I could not reproduce the error. The string “Sorry, there was no activity found. Please try a different filter.” Is not able to be shown unless you’ve made the changes in the template wrong or something I cannot see. You’re welcome to post a video but there’s no way I can send you an email through here. Regards
hi, @janismo I cannot reproduce the bug you mention. It currently does not support the dropdown list change, but no “error” is visibly shown. Maybe you are using some tweaked code that I don’t know… could you provide more details about the bp_has_members loop customization you made? thanks!
Hi, @shawn38 I have updated the code in the previous comment I made with that bug fixed. Please copy/paste it now and it’ll work fine. As you mention, my “example” has an image (loading bar gif) included, that you can easily add by adding some style and the image. In my example, I used:
<div id="loadingActivityMessage">Loading...</div>Hi, @jafar1374 I think there’s a misunderstanding. The Default theme is the one this site is using: http://www.soyskater.com/ and the one that http://patomatlovers.com/ is using is not. Neither way I think you’re needing some designer’s help to achieve what you want. To separate any boxes you should add something like “margin-bottom:20px;” in the current css stylesheet but for that to look ok your theme should have some style to actually make differences between each widget block, ie: “border:1px solid #000” just to make an example.
@naijaping @brainiacwebdesigns
I found the plugin by buddydev is full working and compatible with 1.5+ Doesn’t this suits your needs? Hope it does!

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
IMPORTANT UPDATE: Since a few pals here have tested and found some things to correct, I have addeded this correction (so now it works OK, yay!):Below this:
<div id="message" class="info"> </div>Add this:
jq('.pixelMonitor').remove(); jq(document).unbind('scroll');:::::::::::::::::::::::::::::::::: END OF THE UPDATE ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Hi, all, @naijaping @abysshorror @funmi-omoba
I finally found the time to work on this. I’ll post a detailed explanation on my blog later but here it goes for you to be able to use it right away. I’ll maybe make a plugin of all this, and some code you’ll have to tweak will be overridden if you update your buddypress theme but by that time I hope this will be improved and I’ll post to you back with the updates.
So:
1) Edit the file: /wp-content/plugins/buddypress/bp-themes/bp-default/activity/activity-loop.php (around line 38) This assumes you're using the default theme, if not, do it in your other theme file. // Change: <li class="load-more"> <a href="#more"></a> </li> // For this: jq('.pixelMonitor').remove(); jq(document).unbind('scroll'); // 2) Add this at the bottom of that file: <div class="pixelMonitor" style="width: 1px;height: 1px"> <div id="loadingActivityMessage" style="background-color: white;float: right;height: 16px;padding: 4px 2px 4px 39px;width: 100px">Loading...</div> </div> /* Auto load more updates at the end of the page when reaching the bottom of the page */ jq(document).ready( function() { iterationAllowed = true; function loadActivityOnScroll(){ jq("#loadingActivityMessage").show(); if ( null == jq.cookie('bp-activity-oldestpage') ) jq.cookie('bp-activity-oldestpage', 1, {path: '/'} ); var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1; jq.post( ajaxurl, { action: 'activity_get_older_updates', 'cookie': encodeURIComponent(document.cookie), 'page': oldest_page }, function(response){ jq("#loadingActivityMessage").hide(); jq.cookie( 'bp-activity-oldestpage', oldest_page, {path: '/'} ); jq("#content ul.activity-list").append(response.contents); }, 'json' ); return false; }; jq(document).scroll(function(){ if ( Math.round(jq('.pixelMonitor').last().offset().top) > ( jq(document).height() -500 ) && iterationAllowed === true ) { loadActivityOnScroll(); iterationAllowed = false; setTimeout('iterationAllowed = true', 3000); }; }); }); /* Auto load more activity block ending here */Hope you enjoy it. In near future I hope I’ll have it as a plugin and I’ll post it here to let you know.
Some demo: http://www.horizontea.com/ (scroll to the bottom to see in action).
PS: I’m not saying this is bug free, but will not affect any data on your db or installation, it just tweaks the interface
Cheers!PS 2: As soon as I check the “WP/BP” way to add this code to the file “automatically” (as a plugin) I’ll update it.
Hi, @jafar1374 the design you’re showing is not from the Default BuddyPress Theme… I think you’re using a WordPress Theme or another one. Could you re-check that and give us more information in order for us to help you? Regards!