Forum Replies Created
-
“Is this really the loop or just each group?”
Let’s put it this way … whenever I cycle through all groups and whenever I cycle through a single group, my plug-in takes effect. I know that because my latest attempt to get it to work was using your code and I got a Server 500 Error in both instances (in my terms “loops”).
Bottom-line, I am just trying to capture what I think should be available in the Group ID (at least I would think it should be there). I don’t want to write more code. I’ll just hard code it as we go. Not the most ideal solution,but then again….it is Buddypress.
Anyone — is it possible to know the Group ID during the Loop?
I get `HTTP 500 Internal Server Error` on that statement.
I am running WP 3.4.2 and BP 1.5.6
let’s start a new thread. BP Is getting too deep in my shorts here.
MAJOR FRUSTRATION — BP FORUM TELLS ME “It looks like you’ve already said that!”
@modemlooper (bp forum not letting me post nicely, so I am splitting my reply in 2 parts)
Out-of-the-box, BP has a Send Invites link on the Groups forum. We don’t want that link unless you are a Group Admin or Group Moderator. Currently, we only have 1 private group set at this time with a group moderator. It is Group 17. But I know we will be getting more and more of these instances and I want to avoid hard coding the Groups each time to control the Send Invites link.
See my code below from a plug-in I wrote. It is in next thread post.
@modemlooper (having technical trouble posting right now…stay tuned)
I remember trying those last week and ended up having to resort to the if() statements I have included earlier in this thread.
I have progressed to the point of having to hard code the group ID because I can’t capture it on the fly while in the Group section of the Loop.
Tried `bp_group_id()` — no luck.
`
if (groups_is_user_mod( get_current_user_id(), $guid ) == “1”) return;
elseif (groups_is_user_admin( get_current_user_id(), $guid ) == “1”) return;
else …
`Everything else works — `groups_is_user_mod()`, `groups_is_user_admin()`, and `get_current_user_id()`.
Right now I have hardcoded the Group ID and assigned it to var $guid. But I want to do this dynamically so I don’t have to manually hardcode certain group ids.
Here’s what I want to get to work:
`
if (groups_is_user_mod( get_current_user_id(), bp_get_group_id() ) == “1”) return;
elseif (groups_is_user_admin( get_current_user_id(), bp_get_group_id() ) == “1”) return;
`Thanks for helping !
Just tested your recommended code.
`$guid` is still empty during the loop in my Groups.
Thanks @modemlooper.
My question is not how to display it. My question is how to capture it.
Currently I assign it to a variable like this `$guid = bp_get_group_id();`
The problem is that while I am in the loop of groups & discussions, the current group id is not being captured. `bp_get_group_id()` returns an empty string or NULL.
Also, I issued a bug report on it as well.
Why not answer the question?
Any BuddyPress Guru’s out there?
Any experts or specialists or experienced BuddyPress types out there that know how to capture the `$group_id` so I can use it in the following?
`groups_is_user_mod( $user_id, $group_id )`
Is it even possible?
Any experts or specialists or experienced BuddyPress types out there that know how to capture the `$group_id` so I can use it in the following?
`groups_is_user_mod( $user_id, $group_id )`
Is it even possible?
Found it
`groups_is_user_mod( $user_id, $group_id )`But now I need to find out how to capture the current group id. Right now I am hard coding it and I don’t want to do it that way.
Does anyone know how to retrieve the current Group ID?
Found it
`get_current_user_id()`
Is that plug-in a WordPress plug-in or a Firefox plug-in?
Thanks @FIQ
NextGen was only installed last week because we wanted to publish a photo gallery. The install and activation of NextGen really had little to no impact on the site — it was already trudging along prior to NextGen.
But I’ll see if I can have it load only on the photo galley page.
Images are optimized using “WP Smush.it”
Not sure what the “slider” is.
As for the widgets, we eliminated a number of them during initial setup. We need the 3-4 widgets we are currently using.
As for the theme, we developed it our self. We have on staff, a pro designer/theme-developer that develops themes for all our WordPress sites. The theme for our BP site is identical to the theme for our complementary public facing site. The public facing site runs a WP blog and it is lightning fast (on the same sever as well)
How do you go about evaluating the quality of a plug-in? (ie., how would you personally do that if you had a slow running WP site?)
I appreciate your comments and insight.
Here is log file dump from the HTTP Live Headers add-on to Firefox:
the following header response comes back immediately when I hit the BP Home Page
`#request# GET http://my.domain.com/insider/`the following header responses take about 5 clock seconds to compile and come back prior to rendering the BP Home Page
`GET /insider/
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-core/css/buddybar.css?ver=20110723
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/style.css?ver=1.8.2-6
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/css/event.css?ver=1.8.2-6
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.css?ver=1.3.4
#request# GET http://my.domain.com/insider/wp-content/plugins/bbpress/bbp-theme-compat/css/bbpress.css?ver=2.1.2
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/themes/my-theme/style.css?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/responsive.css?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress-sitewide-activity-widget/swa.css?ver=3.4.1
#request# GET http://my.domain.com/insider/wp-includes/js/jquery/jquery.js?ver=1.7.2
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/js/event.min.js?ver=1.8.2-6
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js?ver=1.3.3
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.9995
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.06
#request# GET http://my.domain.com/insider/wp-includes/js/comment-reply.js?ver=3.4.1
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress-sitewide-activity-widget/swa.js?ver=3.4.1
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/js/general.min.js?ver=3.4.1
GET /insider/wp-content/themes-ai1ec/vortex/css/event.css?ver=1.8.2-6
GET /insider/wp-content/themes-ai1ec/vortex/style.css?ver=1.8.2-6
GET /insider/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0
GET /insider/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.css?ver=1.3.4
GET /insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css?ver=20120110
GET /insider/wp-content/themes/my-theme/style.css?ver=20120110
GET /insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/responsive.css?ver=20120110
GET /insider/wp-content/plugins/buddypress-sitewide-activity-widget/swa.css?ver=3.4.1
GET /insider/wp-includes/js/jquery/jquery.js?ver=1.7.2
GET /insider/wp-content/themes-ai1ec/vortex/js/event.min.js?ver=1.8.2-6
GET /insider/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js?ver=1.3.3
GET /insider/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.9995
GET /insider/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.06
GET /insider/wp-includes/js/comment-reply.js?ver=3.4.1
GET /insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js?ver=20120110
GET /insider/wp-content/plugins/buddypress-sitewide-activity-widget/swa.js?ver=3.4.1
GET /insider/wp-content/themes-ai1ec/vortex/js/general.min.js?ver=3.4.1
GET /insider/wp-content/plugins/buddypress/bp-core/css/buddybar.css?ver=20110723
GET /insider/wp-content/plugins/bbpress/bbp-theme-compat/css/bbpress.css?ver=2.1.2
#request# GET http://www.google-analytics.com/ga.js
#request# GET http://my.domain.com/insider/
#request# GET http://www.google-analytics.com/__utm.gif?utmwv=5.3.5&utms=29&utmn=1265154557&utmhn=my.domain.com&utmcs=UTF-8&utmsr=1280×800&utmvp=1263×700&utmsc=24-bit&utmul=en-us&utmje=1&utmfl=11.4%20r402&utmdt=Insider&utmhid=839616288&utmr=0&utmp=%2Finsider%2F&utmac=UA-33894838-1&utmcc=__utma%3D4033783.1564170897.1323362212.1345719185.1345723065.111%3B%2B__utmz%3D4033783.1334666053.51.2.utmcsr%3Dmy.domain.com%7Cutmccn%3D(referral)%7Cutmcmd%3Dreferral%7Cutmcct%3D%2Fdev%2Fblog%2Fabout-us%2F%3B&utmu=q~
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-core/css/buddybar.css?ver=20110723
GET /__utm.gif?utmwv=5.3.5&utms=29&utmn=1265154557&utmhn=my.domain.com&utmcs=UTF-8&utmsr=1280×800&utmvp=1263×700&utmsc=24-bit&utmul=en-us&utmje=1&utmfl=11.4%20r402&utmdt=Insider&utmhid=839616288&utmr=0&utmp=%2Finsider%2F&utmac=UA-33894838-1&utmcc=__utma%3D4033783.1564170897.1323362212.1345719185.1345723065.111%3B%2B__utmz%3D4033783.1334666053.51.2.utmcsr%3Dmy.domain.com%7Cutmccn%3D(referral)%7Cutmcmd%3Dreferral%7Cutmcct%3D%2Fdev%2Fblog%2Fabout-us%2F%3B&utmu=q~
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/style.css?ver=1.8.2-6
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/css/event.css?ver=1.8.2-6
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.css?ver=1.3.4
#request# GET http://my.domain.com/insider/wp-content/plugins/bbpress/bbp-theme-compat/css/bbpress.css?ver=2.1.2
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/themes/my-theme/style.css?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/responsive.css?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress-sitewide-activity-widget/swa.css?ver=3.4.1
#request# GET http://my.domain.com/insider/wp-includes/js/jquery/jquery.js?ver=1.7.2
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/js/event.min.js?ver=1.8.2-6
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js?ver=1.3.3
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.9995
#request# GET http://my.domain.com/insider/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.06
#request# GET http://my.domain.com/insider/wp-includes/js/comment-reply.js?ver=3.4.1
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js?ver=20120110
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress-sitewide-activity-widget/swa.js?ver=3.4.1
#request# GET http://my.domain.com/insider/wp-content/themes-ai1ec/vortex/js/general.min.js?ver=3.4.1
#request# GET http://www.google-analytics.com/ga.js
#request# GET http://my.domain.com/insider/wp-content/themes/my-theme/bg-body.gif
#request# GET http://my.domain.com/insider/wp-content/themes/my-theme/logo.png
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/images/60pc_black.png
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress-group-documents/images/icons/page_white_acrobat.png
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-core/images/admin-menu-arrow.gif
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/1/f92527bfdbc2c908f05319315beccc97-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/plugins/buddypress/bp-core/images/mystery-man.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/8/2376a70360ea90862328b5145f60e1b0-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/211/047c3149835126e0fd951c20644d8642-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/15/c4bf6ef1ace368628002573d5fec845b-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/201/c38bee7c846c6d31ee1b9c5f748771aa-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/70/2370531312fbe8d9f305acba204e0aa6-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/160/f77493475b78419437e6c3d0942a0b76-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/232/11e4ab1c22244e42f1d9533a71057e3f-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/41/b93c4db828f99cc02cb37242fcce903e-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/200/6368568e6bd72723a989116a8f63edba-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/42/de833684484713243add0776725e5c9a-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/12/7879fff38f31bed31fed1d4bdb7731a4-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/23/9f891af41f52da1cf0c056c4c9662e3b-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/89/c86fbe0b2068951757927283c8656ec3-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/239/310e82358507a4455c67aa411a9b2904-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/14/b73f47f905a0beb0cd94ad00b5eb70d5-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/uploads/avatars/16/b25cafa8cbb4afc8074855fc0493ad89-bpthumb.jpg
#request# GET http://my.domain.com/insider/wp-content/themes/my-theme/favicon.ico
#request# GET http://my.domain.com/insider/links/
GET /insider/links/`Nice site @Chouf1 !
What plug-ins are you running? Especially what cache plug-in(s)?
My plug-in stack can be viewed at https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-optimize-and-maximize-buddypress-performance/
I am already running Firebug and I was using Google Page Speed to monitor.
I immediately get `#request` and then the monitor tool sits and waits just as long as BP waits to build the page(s). Typically between 3-8 clock seconds.
Tried your 2 ini_set commands for zlib compression. That did not do it.
Moving on to the next set of suggestions by Sarah Gooding.