Search Results for 'group_id'
-
AuthorSearch Results
-
September 1, 2011 at 4:41 am #119341
evo252
ParticipantSorry the code I wanted to show has been stripped:
`global $bp;
if(bp_get_current_profile_group_id()==1)
bp_core_redirect($bp->displayed_user->domain.”profile/edit/group/2″);`August 25, 2011 at 3:50 pm #119061kizinko
ParticipantHey,
I tried the following code from your post above, but it still isn’t working.
The activity from the group I’m trying to hide is still showing up on the home page.‘
function bp_my_activity_filter( $a, $activities ) {
global $bp;if ( $bp->current_component != $bp->activity->slug )
return $activities;foreach( $activities->activities as $key => $activity ) {
if ( $activity->type ==’activity_update’ && $activity->item_id == ‘131’ ) {
unset( $activities->activities[$key] );
$activities->total_activity_count = $activities->total_activity_count – 1;
$activities->activity_count = $activities->activity_count – 1;
}
}$activities_new = array_values( $activities->activities );
$activities->activities = $activities_new;
return $activities;
}
add_action( ‘bp_has_activities’, ‘bp_my_activity_filter’, 10, 2 );
‘I added the new file /wp-content/plugins/bp-custom.php. I got the group id by adding bp_group_id() into groups-loop.php which is 131 as dictated in the code above. I did a test and removed the first if statement, and it removed all of the activity on that group’s page successfully. Everything from that group was still visible on the home page though.
By the way, thank you soooo much for helping me with this. I am totally lost on this thing.
August 23, 2011 at 2:52 am #118882In reply to: BP 1.5b2 and bbpress 2.0 RC3 – Integration
Boone Gorges
Keymaster@anointed There is nothing in the BP UI to do this, but you *should* be able to do it by adding a piece of groupmeta:
`groups_update_groupmeta( $group_id, ‘forum_id’, $forum_id );`Should be as simple as that…
August 20, 2011 at 2:09 am #1187624ella
ParticipantIf somebody interested I have modified @modemlooper buddypress-group-fields.php for my website
I have deleted $links , so it doesn’t show WARNING , I have found an error in phone field so it works now and also other fields are memorized well , I have also added some new location and contact fields , I have created all 247 countries list (dropdown menu) – everything looks working well ,
I don’t know how to display it in templates yet , Opening days(Monday , Tuesday , Wednesday ….) field I wanted to use checkboxes , but I wasn’t not sure if I was able to do that , so I have used dropdown menu now too.<?php
add_filter( 'groups_custom_group_fields_editable', 'group_details_markup' );
add_action( 'groups_group_details_edited', 'group_details_save' );
add_action( 'groups_created_group', 'group_details_save' );
function group_details_markup() {
global $bp, $wpdb;
$group_text = groups_get_groupmeta( $bp->groups->current_group->id, 'e2e_text' );
?>
Job Description
(Type of job you offer, detailed description of the work you offer.. etc)
Location
groups->current_group->id, 'e2e_country' ); ?>
<option value="Afghanistan" selected="selected">Afghanistan
<option value="Albania" selected="selected">Albania
<option value="Algeria" selected="selected">Algeria
<option value="American Samoa" selected="selected">American Samoa
<option value="Andorra" selected="selected">Andorra
<option value="Angola" selected="selected">Angola
<option value="Anguilla" selected="selected">Anguilla
<option value="Antigua & Barbuda" selected="selected">Antigua & Barbuda
<option value="Argentina" selected="selected">Argentina
<option value="Armenia" selected="selected">Armenia
<option value="Aruba" selected="selected">Aruba
<option value="Australia" selected="selected">Australia
<option value="Austria" selected="selected">Austria
<option value="Azerbaijan" selected="selected">Azerbaijan
<option value="Bahamas" selected="selected">Bahamas
<option value="Bahrain" selected="selected">Bahrain
<option value="Bangladesh" selected="selected">Bangladesh
<option value="Barbados" selected="selected">Barbados
<option value="Belarus" selected="selected">Belarus
<option value="Belgium" selected="selected">Belgium
<option value="Belize" selected="selected">Belize
<option value="Benin" selected="selected">Benin
<option value="Bermuda" selected="selected">Bermuda
<option value="Bhutan" selected="selected">Bhutan
<option value="Bolivia" selected="selected">Bolivia
<option value="Bonaire" selected="selected">Bonaire
<option value="Bosnia & Herzegovina" selected="selected">Bosnia & Herzegovina
<option value="Botswana" selected="selected">Botswana
<option value="Brazil" selected="selected">Brazil
<option value="British Indian Ocean Ter" selected="selected">British Indian Ocean Ter
<option value="Brunei" selected="selected">Brunei
<option value="Bulgaria" selected="selected">Bulgaria
<option value="Burkina Faso" selected="selected">Burkina Faso
<option value="Burundi" selected="selected">Burundi
<option value="Cambodia" selected="selected">Cambodia
<option value="Cameroon" selected="selected">Cameroon
<option value="Canada" selected="selected">Canada
<option value="Canary Islands" selected="selected">Canary Islands
<option value="Cape Verde" selected="selected">Cape Verde
<option value="Cayman Islands" selected="selected">Cayman Islands
<option value="Central African Republic" selected="selected">Central African Republic
<option value="Chad" selected="selected">Chad
<option value="Channel Islands" selected="selected">Channel Islands
<option value="Chile" selected="selected">Chile
<option value="China" selected="selected">China
<option value="Christmas Island" selected="selected">Christmas Island
<option value="Cocos Island" selected="selected">Cocos Island
<option value="Colombia" selected="selected">Colombia
<option value="Comoros" selected="selected">Comoros
<option value="Congo" selected="selected">Congo
<option value="Cook Islands" selected="selected">Cook Islands
<option value="Costa Rica" selected="selected">Costa Rica
<option value="Cote de Ivoire" selected="selected">Cote D'Ivoire
<option value="Croatia" selected="selected">Croatia
<option value="Cuba" selected="selected">Cuba
<option value="Curaco" selected="selected">Curacao
<option value="Cyprus" selected="selected">Cyprus
<option value="Czech Republic" selected="selected">Czech Republic
<option value="Denmark" selected="selected">Denmark
<option value="Djibouti" selected="selected">Djibouti
<option value="Dominica" selected="selected">Dominica
<option value="Dominican Republic" selected="selected">Dominican Republic
<option value="East Timor" selected="selected">East Timor
<option value="Ecuador" selected="selected">Ecuador
<option value="Egypt" selected="selected">Egypt
<option value="El Salvador" selected="selected">El Salvador
<option value="Equatorial Guinea" selected="selected">Equatorial Guinea
<option value="Eritrea" selected="selected">Eritrea
<option value="Estonia" selected="selected">Estonia
<option value="Ethiopia" selected="selected">Ethiopia
<option value="Falkland Islands" selected="selected">Falkland Islands
<option value="Faroe Islands" selected="selected">Faroe Islands
<option value="Fiji" selected="selected">Fiji
<option value="Finland" selected="selected">Finland
<option value="France" selected="selected">France
<option value="French Guiana" selected="selected">French Guiana
<option value="French Polynesia" selected="selected">French Polynesia
<option value="French Southern Ter" selected="selected">French Southern Ter
<option value="Gabon" selected="selected">Gabon
<option value="Gambia" selected="selected">Gambia
<option value="Georgia" selected="selected">Georgia
<option value="Germany" selected="selected">Germany
<option value="Ghana" selected="selected">Ghana
<option value="Gibraltar" selected="selected">Gibraltar
<option value="Great Britain" selected="selected">Great Britain
<option value="Greece" selected="selected">Greece
<option value="Greenland" selected="selected">Greenland
<option value="Grenada" selected="selected">Grenada
<option value="Guadeloupe" selected="selected">Guadeloupe
<option value="Guam" selected="selected">Guam
<option value="Guatemala" selected="selected">Guatemala
<option value="Guinea" selected="selected">Guinea
<option value="Guyana" selected="selected">Guyana
<option value="Haiti" selected="selected">Haiti
<option value="Hawaii" selected="selected">Hawaii
<option value="Honduras" selected="selected">Honduras
<option value="Hong Kong" selected="selected">Hong Kong
<option value="Hungary" selected="selected">Hungary
<option value="Iceland" selected="selected">Iceland
<option value="India" selected="selected">India
<option value="Indonesia" selected="selected">Indonesia
<option value="Iran" selected="selected">Iran
<option value="Iraq" selected="selected">Iraq
<option value="Ireland" selected="selected">Ireland
<option value="Isle of Man" selected="selected">Isle of Man
<option value="Israel" selected="selected">Israel
<option value="Italy" selected="selected">Italy
<option value="Jamaica" selected="selected">Jamaica
<option value="Japan" selected="selected">Japan
<option value="Jordan" selected="selected">Jordan
<option value="Kazakhstan" selected="selected">Kazakhstan
<option value="Kenya" selected="selected">Kenya
<option value="Kiribati" selected="selected">Kiribati
<option value="Korea North" selected="selected">Korea North
<option value="Korea Sout" selected="selected">Korea South
<option value="Kuwait" selected="selected">Kuwait
<option value="Kyrgyzstan" selected="selected">Kyrgyzstan
<option value="Laos" selected="selected">Laos
<option value="Latvia" selected="selected">Latvia
<option value="Lebanon" selected="selected">Lebanon
<option value="Lesotho" selected="selected">Lesotho
<option value="Liberia" selected="selected">Liberia
<option value="Libya" selected="selected">Libya
<option value="Liechtenstein" selected="selected">Liechtenstein
<option value="Lithuania" selected="selected">Lithuania
<option value="Luxembourg" selected="selected">Luxembourg
<option value="Macau" selected="selected">Macau
<option value="Macedonia" selected="selected">Macedonia
<option value="Madagascar" selected="selected">Madagascar
<option value="Malaysia" selected="selected">Malaysia
<option value="Malawi" selected="selected">Malawi
<option value="Maldives" selected="selected">Maldives
<option value="Mali" selected="selected">Mali
<option value="Malta" selected="selected">Malta
<option value="Marshall Islands" selected="selected">Marshall Islands
<option value="Martinique" selected="selected">Martinique
<option value="Mauritania" selected="selected">Mauritania
<option value="Mauritius" selected="selected">Mauritius
<option value="Mayotte" selected="selected">Mayotte
<option value="Mexico" selected="selected">Mexico
<option value="Midway Islands" selected="selected">Midway Islands
<option value="Moldova" selected="selected">Moldova
<option value="Monaco" selected="selected">Monaco
<option value="Mongolia" selected="selected">Mongolia
<option value="Montserrat" selected="selected">Montserrat
<option value="Morocco" selected="selected">Morocco
<option value="Mozambique" selected="selected">Mozambique
<option value="Myanmar" selected="selected">Myanmar
<option value="Nambia" selected="selected">Nambia
<option value="Nauru" selected="selected">Nauru
<option value="Nepal" selected="selected">Nepal
<option value="Netherland Antilles" selected="selected">Netherland Antilles
<option value="Netherlands" selected="selected">Netherlands (Holland, Europe)
<option value="Nevis" selected="selected">Nevis
<option value="New Caledonia" selected="selected">New Caledonia
<option value="New Zealand" selected="selected">New Zealand
<option value="Nicaragua" selected="selected">Nicaragua
<option value="Niger" selected="selected">Niger
<option value="Nigeria" selected="selected">Nigeria
<option value="Niue" selected="selected">Niue
<option value="Norfolk Island" selected="selected">Norfolk Island
<option value="Norway" selected="selected">Norway
<option value="Oman" selected="selected">Oman
<option value="Pakistan" selected="selected">Pakistan
<option value="Palau Island" selected="selected">Palau Island
<option value="Palestine" selected="selected">Palestine
<option value="Panama" selected="selected">Panama
<option value="Papua New Guinea" selected="selected">Papua New Guinea
<option value="Paraguay" selected="selected">Paraguay
<option value="Peru" selected="selected">Peru
<option value="Phillipines" selected="selected">Philippines
<option value="Pitcairn Island" selected="selected">Pitcairn Island
<option value="Poland" selected="selected">Poland
<option value="Portugal" selected="selected">Portugal
<option value="Puerto Rico" selected="selected">Puerto Rico
<option value="Qatar" selected="selected">Qatar
<option value="Republic of Montenegro" selected="selected">Republic of Montenegro
<option value="Republic of Serbia" selected="selected">Republic of Serbia
<option value="Reunion" selected="selected">Reunion
<option value="Romania" selected="selected">Romania
<option value="Russia" selected="selected">Russia
<option value="Rwanda" selected="selected">Rwanda
<option value="St Barthelemy" selected="selected">St. Barthelemy
<option value="St Eustatius" selected="selected">St. Eustatius
<option value="St Helena" selected="selected">St. Helena
<option value="St Kitts-Nevis" selected="selected">St. Kitts-Nevis
<option value="St Lucia" selected="selected">St. Lucia
<option value="St Maarten" selected="selected">St. Maarten
<option value="St Pierre & Miquelon" selected="selected">St. Pierre & Miquelon
<option value="St Vincent & Grenadines" selected="selected">St. Vincent & Grenadines
<option value="Saipan" selected="selected">Saipan
<option value="Samoa" selected="selected">Samoa
<option value="Samoa American" selected="selected">Samoa American
<option value="San Marino" selected="selected">San Marino
<option value="Sao Tome & Principe" selected="selected">Sao Tome & Principe
<option value="Saudi Arabia" selected="selected">Saudi Arabia
<option value="Senegal" selected="selected">Senegal
<option value="Seychelles" selected="selected">Seychelles
<option value="Sierra Leone" selected="selected">Sierra Leone
<option value="Singapore" selected="selected">Singapore
<option value="Slovakia" selected="selected">Slovakia
<option value="Slovenia" selected="selected">Slovenia
<option value="Solomon Islands" selected="selected">Solomon Islands
<option value="Somalia" selected="selected">Somalia
<option value="South Africa" selected="selected">South Africa
<option value="Spain" selected="selected">Spain
<option value="Sri Lanka" selected="selected">Sri Lanka
<option value="Sudan" selected="selected">Sudan
<option value="Suriname" selected="selected">Suriname
<option value="Swaziland" selected="selected">Swaziland
<option value="Sweden" selected="selected">Sweden
<option value="Switzerland" selected="selected">Switzerland
<option value="Syria" selected="selected">Syria
<option value="Tahiti" selected="selected">Tahiti
<option value="Taiwan" selected="selected">Taiwan
<option value="Tajikistan" selected="selected">Tajikistan
<option value="Tanzania" selected="selected">Tanzania
<option value="Thailand" selected="selected">Thailand
<option value="Togo" selected="selected">Togo
<option value="Tokelau" selected="selected">Tokelau
<option value="Tonga" selected="selected">Tonga
<option value="Trinidad & Tobago" selected="selected">Trinidad & Tobago
<option value="Tunisia" selected="selected">Tunisia
<option value="Turkey" selected="selected">Turkey
<option value="Turkmenistan" selected="selected">Turkmenistan
<option value="Turks & Caicos Is" selected="selected">Turks & Caicos Is
<option value="Tuvalu" selected="selected">Tuvalu
<option value="Uganda" selected="selected">Uganda
<option value="Ukraine" selected="selected">Ukraine
<option value="United Arab Erimates" selected="selected">United Arab Emirates
<option value="United Kingdom" selected="selected">United Kingdom
<option value="United States of America" selected="selected">United States of America
<option value="Uraguay" selected="selected">Uruguay
<option value="Uzbekistan" selected="selected">Uzbekistan
<option value="Vanuatu" selected="selected">Vanuatu
<option value="Vatican City State" selected="selected">Vatican City State
<option value="Venezuela" selected="selected">Venezuela
<option value="Vietnam" selected="selected">Vietnam
<option value="Virgin Islands (Brit)" selected="selected">Virgin Islands (Brit)
<option value="Virgin Islands (USA)" selected="selected">Virgin Islands (USA)
<option value="Wake Island" selected="selected">Wake Island
<option value="Wallis & Futana Is" selected="selected">Wallis & Futana Is
<option value="Yemen" selected="selected">Yemen
<option value="Zaire" selected="selected">Zaire
<option value="Zambia" selected="selected">Zambia
<option value="Zimbabwe" selected="selected">Zimbabwe
groups->current_group->id, 'e2e_province' ); ?>
<input type="text" name="group-province" id="group-province" value="" />
groups->current_group->id, 'e2e_city' ); ?>
<input type="text" name="group-city" id="group-city" value="" />
groups->current_group->id, 'e2e_street' ); ?>
<input type="text" name="group-street" id="group-street" value="" />
Club
groups->current_group->id, 'e2e_type' ); ?>
<option value="agency" selected="selected">Agency
<option value="nightclub" selected="selected">Nightclub
<option value="stripclub" selected="selected">Stripclub
<option value="lapdance" selected="selected">Lap dance club
<option value="tabledance" selected="selected">Table dance club
<option value="cabaret" selected="selected">Cabaret
<option value="disco" selected="selected">Disco
<option value="restaurant" selected="selected">Restaurant
groups->current_group->id, 'e2e_capacity' ); ?>
<option value="10" selected="selected">5-10
<option value="20" selected="selected">10-20
<option value="30" selected="selected">20-30
<option value="40" selected="selected">30-40
<option value="50" selected="selected">40-50
<option value="60" selected="selected">50+
groups->current_group->id, 'e2e_opened' ); ?>
<option value="0:00" selected="selected">0:00
<option value="0:30" selected="selected">0:30
<option value="1:00" selected="selected">1:00
<option value="1:30" selected="selected">1:30
<option value="2:00" selected="selected">2:00
<option value="2:30" selected="selected">2:30
<option value="3:00" selected="selected">3:00
<option value="3:30" selected="selected">3:30
<option value="4:00" selected="selected">4:00
<option value="4:30" selected="selected">4:30
<option value="5:00" selected="selected">5:00
<option value="5:30" selected="selected">5:30
<option value="6:00" selected="selected">6:00
<option value="6:30" selected="selected">6:30
<option value="7:00" selected="selected">7:00
<option value="7:30" selected="selected">7:30
<option value="8:00" selected="selected">8:00
<option value="8:30" selected="selected">8:30
<option value="9:00" selected="selected">9:00
<option value="9:30" selected="selected">9:30
<option value="10:00" selected="selected">10:00
<option value="10:30" selected="selected">10:30
<option value="11:00" selected="selected">11:00
<option value="11:30" selected="selected">11:30
<option value="12:00" selected="selected">12:00
<option value="12:30" selected="selected">12:30
<option value="13:00" selected="selected">13:00
<option value="13:30" selected="selected">13:30
<option value="14:00" selected="selected">14:00
<option value="14:30" selected="selected">14:30
<option value="15:00" selected="selected">15:00
<option value="15:30" selected="selected">15:30
<option value="16:00" selected="selected">16:00
<option value="16:30" selected="selected">16:30
<option value="17:00" selected="selected">17:00
<option value="17:30" selected="selected">17:30
<option value="18:00" selected="selected">18:00
<option value="18:30" selected="selected">18:30
<option value="19:00" selected="selected">19:00
<option value="19:30" selected="selected">19:30
<option value="20:00" selected="selected">20:00
<option value="20:30" selected="selected">20:30
<option value="21:00" selected="selected">21:00
<option value="21:30" selected="selected">21:30
<option value="22:00" selected="selected">22:00
<option value="22:30" selected="selected">22:30
<option value="23:00" selected="selected">23:00
<option value="23:30" selected="selected">23:30
groups->current_group->id, 'e2e_closed' ); ?>
<option value="0:00" selected="selected">0:00
<option value="0:30" selected="selected">0:30
<option value="1:00" selected="selected">1:00
<option value="1:30" selected="selected">1:30
<option value="2:00" selected="selected">2:00
<option value="2:30" selected="selected">2:30
<option value="3:00" selected="selected">3:00
<option value="3:30" selected="selected">3:30
<option value="4:00" selected="selected">4:00
<option value="4:30" selected="selected">4:30
<option value="5:00" selected="selected">5:00
<option value="5:30" selected="selected">5:30
<option value="6:00" selected="selected">6:00
<option value="6:30" selected="selected">6:30
<option value="7:00" selected="selected">7:00
<option value="7:30" selected="selected">7:30
<option value="8:00" selected="selected">8:00
<option value="8:30" selected="selected">8:30
<option value="9:00" selected="selected">9:00
<option value="9:30" selected="selected">9:30
<option value="10:00" selected="selected">10:00
<option value="10:30" selected="selected">10:30
<option value="11:00" selected="selected">11:00
<option value="11:30" selected="selected">11:30
<option value="12:00" selected="selected">12:00
<option value="12:30" selected="selected">12:30
<option value="13:00" selected="selected">13:00
<option value="13:30" selected="selected">13:30
<option value="14:00" selected="selected">14:00
<option value="14:30" selected="selected">14:30
<option value="15:00" selected="selected">15:00
<option value="15:30" selected="selected">15:30
<option value="16:00" selected="selected">16:00
<option value="16:30" selected="selected">16:30
<option value="17:00" selected="selected">17:00
<option value="17:30" selected="selected">17:30
<option value="18:00" selected="selected">18:00
<option value="18:30" selected="selected">18:30
<option value="19:00" selected="selected">19:00
<option value="19:30" selected="selected">19:30
<option value="20:00" selected="selected">20:00
<option value="20:30" selected="selected">20:30
<option value="21:00" selected="selected">21:00
<option value="21:30" selected="selected">21:30
<option value="22:00" selected="selected">22:00
<option value="22:30" selected="selected">22:30
<option value="23:00" selected="selected">23:00
<option value="23:30" selected="selected">23:30
groups->current_group->id, 'e2e_days' ); ?>
<option value="3x THU-FRI-SAT" selected="selected">3x THU-FRI-SAT
<option value="4x WED-THU-FRI-SAT" selected="selected">4x WED-THU-FRI-SAT
<option value="4x THU-FRI-SAT-SUN" selected="selected">4x THU-FRI-SAT-SUN
<option value="5x WED-THU-FRI-SAT-SUN" selected="selected">5x WED-THU-FRI-SAT-SUN
<option value="5x THU-FRI-SAT-SUN-MON" selected="selected">5x THU-FRI-SAT-SUN-MON
<option value="6x WED-THU-FRI-SAT-SUN-MON" selected="selected">6x WED-THU-FRI-SAT-SUN-MON
<option value="6x THU-FRI-SAT-SUN-MON-TUE" selected="selected">6x THU-FRI-SAT-SUN-MON-TUE
<option value="7x WED-THU-FRI-SAT-SUN-MON-TUE" selected="selected">7x WED-THU-FRI-SAT-SUN-MON-TUE
Contact details
groups->current_group->id, 'e2e_url' ); ?>
<input type="text" name="group-url" id="group-url" value="" />
groups->current_group->id, 'e2e_phone' ); ?>
<input type="text" name="group-phone" id="group-phone" value="" />
groups->current_group->id, 'e2e_email' ); ?>
<input type="text" name="group-email" id="group-email" value="" />
groups->current_group->id, 'e2e_facebook' ); ?>
<input type="text" name="group-facebook" id="group-facebook" value="" />
groups->current_group->id, 'e2e_myspace' ); ?>
<input type="text" name="group-myspace" id="group-myspace" value="" />
groups->current_group->id, 'e2e_twitter' ); ?>
<input type="text" name="group-twitter" id="group-twitter" value="" />
groups->current_group->id, 'e2e_skype' ); ?>
<input type="text" name="group-skype" id="group-skype" value="" />
<?php
return;
}
function group_details_save( $group_id ) {
global $bp, $wpdb;
$plain_fields = array(
'text',
'country',
'province',
'city',
'street',
'type',
'capacity',
'opened',
'closed',
'days',
'url',
'phone',
'email',
'facebook',
'myspace',
'twitter',
'skype'
);
foreach( $plain_fields as $field ) {
$key = 'group-' . $field;
if ( isset( $_POST[$key] ) ) {
$value = $_POST[$key];
groups_update_groupmeta( $group_id, 'e2e_' . $field, $value );
}
}
}
?>August 17, 2011 at 2:31 am #118595Boone Gorges
KeymasterThe groups extension API is meant to add a new tab to the groups interface. If by “create extra fields” you mean that you want to add additional metadata to the Group Details tab, here is some code from a client project I once did. I’ve modified it a bit to remove some custom functions. This should give you an idea of how to start.
`add_filter( ‘groups_custom_group_fields_editable’, ‘group_details_markup’ );
add_action( ‘groups_group_details_edited’, ‘group_details_save’ );
add_action( ‘groups_created_group’, ‘group_details_save’ );function group_details_markup() {
$group_links = groups_get_groupmeta( $bp->groups->current_group->id, ‘e2e_links’ );
extract( $group_links );$group_text = groups_get_groupmeta( $bp->groups->current_group->id, ‘e2e_text’ );
?>
(Type of food, etc)
groups->current_group->id, ‘e2e_price’ ); ?><option value="1" selected=”selected”>$
<option value="2" selected=”selected”>$$
<option value="3" selected=”selected”>$$$
<option value="4" selected=”selected”>$$$$
<option value="5" selected=”selected”>$$$$$groups->current_group->id, ‘e2e_url’ ); ?>
<input type="text" name="group-url" id="group-url" value="” />groups->current_group->id, ‘e2e_url’ ); ?>
<input type="text" name="group-phone" id="group-phone" value="” />
<input type="text" name="group-menupages" id="group-menupages" value="” />
<input type="text" name="group-yelp" id="group-yelp" value="” />
<input type="text" name="group-chow" id="group-chow" value="” />
<input type="text" name="group-everyblock" id="group-everyblock" value="” /><?php
return;
}function group_details_save( $group_id ) {
global $bp, $wpdb;$plain_fields = array(
‘url’,
‘phone’,
‘text’,
‘price’
);$links_fields = array(
‘menupages’ => ‘MenuPages’,
‘yelp’ => ‘Yelp’,
‘chow’ => ‘Chow’,
‘everyblock’ => ‘EveryBlock’
);foreach( $plain_fields as $field ) {
$key = ‘group-‘ . $field;
if ( isset( $_POST[$key] ) ) {
$value = $_POST[$key];
groups_update_groupmeta( $group_id, ‘e2e_’ . $field, $value );
}
}$links = array();
foreach( $links_fields as $fn => $name ) {
$key = ‘group-‘ . $fn;
if ( isset( $_POST[$key] ) ) {
$links[$name] = $_POST[$key];
}
}
groups_update_groupmeta( $group_id, ‘e2e_links’, $links );// Prevent null searches by entering dummy values for important meta
if ( !groups_get_groupmeta( $group_id, ‘bpgr_rating’ ) )
groups_update_groupmeta( $group_id, ‘bpgr_rating’, ‘null’ );if ( !groups_get_groupmeta( $group_id, ‘bpgr_how_many_ratings’ ) )
groups_update_groupmeta( $group_id, ‘bpgr_how_many_ratings’, ‘null’ );if ( !groups_get_groupmeta( $group_id, ‘e2e_price’ ) )
groups_update_groupmeta( $group_id, ‘e2e_price’, ‘null’ );
}`August 12, 2011 at 1:43 pm #118275staurand
MemberSame issue here with BuddyPress 1.2.9 & WP 3.2.1
The problem seems to come from this file :
/buddypress/bp-groups.php
which calls
do_action( 'groups_promoted_member', $user_id, $bp->groups->current_group->id );before the file below is included
/buddypress/bp-groups/bp-groups-notifications.php
that should add the action to add the notification:
add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );Quick fix:
function addGroupNotificationFile($user_id, $group_id)
{
require_once ( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );
}
add_action('groups_promoted_member', 'addGroupNotificationFile', 100, 2);
July 25, 2011 at 9:09 pm #116910In reply to: Add all member of group X to group Y
Boone Gorges
KeymasterHi Andrea,
Maybe not the most straightforward method, but a loop roughly like this would do it:
`if ( bp_group_has_members( array( ‘group_id’ => $group_x_id, ‘per_page’ => 100000 ) ) ) {
while ( bp_group_members() ) {
bp_group_the_member();$user_id = bp_get_group_member_id();
// Don’t do this if the user is already a member
if ( groups_is_user_member( $user_id, $group_y_id ) ) {$new_member = new BP_Groups_Member;
$new_member->group_id = $group_y_id;
$new_member->user_id = $user_id;
$new_member->inviter_id = 0;
$new_member->is_admin = 0;
$new_member->user_title = ”;
$new_member->date_modified = bp_core_current_time();
$new_member->is_confirmed = 1;$new_member->save();
groups_update_groupmeta( $group_y_id, ‘total_member_count’, (int) groups_get_groupmeta( $group_y_id, ‘total_member_count’) + 1 );
}
}
}`I haven’t tested that, but something very much like it should work.
July 7, 2011 at 7:26 pm #115923In reply to: How to show activity from ALL the members of a GROUP
r-a-y
KeymasterCheck out the activity stream loop:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/You’ll need to pass the “object” param as “groups” and the “primary_id” param as the group ID.
eg.
if ( bp_has_activities( ‘object=groups&primary_id=’ . YOUR_GROUP_ID ) ) :
… the rest of the code as written in the codex articleJuly 5, 2011 at 12:58 am #115733In reply to: Adding Posts to a BuddyPress Group
sdls
MemberTo be a more concise with the requirement.
Allow members of a group to create posts within that group.
________________> Add new Post to Group (including media pop-up, RTE, taxonomy relation)
> Edit existing Post in Group (including media pop-up, RTE, taxonomy relation)
> Browse my Group Posts
> Integrating the creating of new posts and commenting of posts within a group into buddypress components such as activity feed, plug-ins such as subscribe to group by email, ect…ect…
________________The above work is what I’m scared of ,,,,,, using custom taxonomy you associate posts to a group with a few lines of code…..
add to….. groups / single / forum.php
//
global $bp;
$group_id = $bp->groups->current_group->id;
$group = groups_get_group( array( ‘group_id’ => $group_id ) );
$group_slug = $group -> slug;$args=array(
‘group_terms’ => $group_slug,
‘post_type’ => ‘nuggets’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘caller_get_posts’=> 1
);
query_posts( $args );//
June 23, 2011 at 8:28 pm #115125In reply to: Mass Group Creation possible?
Boone Gorges
KeymasterGenerally, for this purpose, there will be no need for direct SQL manipulation. The general idea:
`$data = fgetcsv( $csv );
foreach( $data as $d ) {
$args = array() // do some stuff with the $d array to set up args
$group_id = groups_create_group( $args );
groups_update_groupmeta( $group_id, ‘whatever’, $d[4] ); // again, whatever you want
}`May 29, 2011 at 7:42 pm #113333In reply to: Dynamic Admin Bar Link – Can’t find answer anywhere
Ipstenu (Mika Epstein)
ParticipantIf you’re talking about the buddybar, read this: https://codex.buddypress.org/theme-development/modifying-the-buddypress-admin-bar/
If you’re talking about the WordPress 3.0 admin bar, that’s different.
In either case, you want this code: `groups_is_user_member( $user_id, $group_id )`
May 6, 2011 at 5:37 am #111689In reply to: Adding “Post To Forum Page”
LPH2005
ParticipantOK ! It’s working with the exception of the file attachments (because I removed the do_action lines) but the page now posts to the proper forum.

Here is the code:
`<?php
/*
Template Name: Question
*/
?>IMPORTANT: This form does not work yet.
Please do not use this form.
How To Ask A Great Question And Get It Answered
Maybe you are stuck on a homework problem or do not understand a particular concept. Don’t panic. TheChemBook.com is a great place to ask your questions.
First search to see if someone else has asked about the problem. Next, search The Chemistry Text by reading the section on the topic.
If none of this helps, start a new topic by completing the form below.
Start with a great headline. Avoid saying, “I’m lost” or “how do I do problem 12?”
A great headline might be “Determining Significant Figures – Captured Zeros”
Next, type as much detail as possible, for example, add the exact wording of the problem you are trying to answer.
Finally, explain the problem and what you have tried.
The more details you add then the faster someone can help you.
Teachers are available at irregular intervals, therefore, make sure that you help others with their questions, too.<?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not create a new group? Once you have joined or created the group you can post your topic in that group’s forum.”, ‘buddypress’ ), site_url( BP_GROUPS_SLUG . ‘/create/’ ) ) ?>
You need to <a href="”>log in or <?php printf( __( ' create an account‘, ‘buddypress’ ), site_url( BP_REGISTER_SLUG . ‘/’ ) ) ?> to participate in the tutoring area.
`
If you see a way to enhance this template then please let me know. The file attachment plugin isn’t working with this page (nor edit a topic) so something obvious is probably missing.
Hope this helps someone else trying to get a page with a form to post to the forums ….
May 6, 2011 at 4:24 am #111685In reply to: Adding “Post To Forum Page”
LPH2005
ParticipantUgh. I feel like I’m so close to getting this to work.
Rather than try to create a BP page, a WP page was created with a template. The template contains the following code:
`<?php
/*
Template Name: Question
*/
?>How To Ask A Great Question And Get It Answered
Maybe you are stuck on a homework problem or do not understand a particular concept. Don’t panic. TheChemBook.com is a great place to ask your questions.
First search to see if someone else has asked about the problem. Next, search The Chemistry Text by reading the section on the topic.
If none of this helps, start a new topic by completing the form below.
Start with a great headline. Avoid saying, “I’m lost” or “how do I do problem 12?”
A great headline might be “Determining Significant Figures – Captured Zeros”
Next, type as much detail as possible, for example, add the exact wording of the problem you are trying to answer.
Finally, explain the problem and what you have tried.
The more details you add then the faster someone can help you.
Teachers are available at irregular intervals, therefore, make sure that you help others with their questions, too.<?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not create a new group? Once you have joined or created the group you can post your topic in that group’s forum.”, ‘buddypress’ ), site_url( BP_GROUPS_SLUG . ‘/create/’ ) ) ?>
`
Now – the header has gone wild on the whole site, the buttons at the top right disappear on the WP page for ask-a-question, and NO submit button is showing when logged into the site.
Link: http://www.thechembook.com/ask-a-question/
Any thoughts on what is wrong with the code?
Update: Looking at the source after the page loads – the form is not completing; that is, no `` is being served.
May 5, 2011 at 3:23 pm #111638kizinko
ParticipantI took this issue to a buddy of mine and he found the answer. The first thing you need to do is create an anonymous user. Then access your database and find the user_id value for that user. In this example the user_id is 7. You’ll notice in the last step that we are setting the user_id to 7 if no one is logged in.
wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php
Comment out line 118
`
/*if ( !is_user_logged_in() ) {
echo ‘-1’;
return false;
}*/
`wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/activity.php
Pull locate_template out of if statement line 31
“wp-content/plugins/buddypress/bp-groups.php
At line 1952 add
`if( empty($user_id) )
$user_id = 7;`
And
`
if ($user_id != 7)
{
/* Be sure the user is a member of the group before posting. */
if ( !is_super_admin() && !groups_is_user_member( $user_id, $group_id ) )
return false;
}
`All of the credit goes to Jonathan Creamer from jcreamerlive.com!
April 29, 2011 at 6:03 am #111300In reply to: How to create more fields in a group?
nit3watch
ParticipantI put this together some time ago though should still work. change gcode and dress code to what you would like. Save it as what ever you would like, with a php extension and place it in your plugins. Active and gl
I also greated some group map plugin some time ago thats floating around on the forums.. you would have to search or wait for gpress.`<?php
/*
Plugin Name: BuddyPress Group Dress Code
Plugin URI:
Description: This plugin adds an additional field to group creation for a dress code
Version: 1.0
Revision Date: June 25, 2010
License: GNU General Public License 2.0 (GPL) http://www.gnu.org/licenses/gpl.html
Author: Charl Kruger
Author URI:
*//* Show group dresscode number in group header */
$gdcode_show_dresscode_in_header = true ;/* – HERE BEGINS THE CODE – */
// create the form to add the field
function gdcode_add_dresscode_form() {
?>
<input type="text" name="group-dresscode" id="group-dresscode" value="” /><?php
}
add_action( ‘groups_custom_group_fields_editable’, ‘gdcode_add_dresscode_form’ );// Save the dresscode number in the group meta – perhaps use serialize() and maybe_unserialize()
function gdcode_save_dresscode( $group_id ) {
global $bp;if($bp->groups->new_group_id)
$id = $bp->groups->new_group_id;
else
$id = $group_id;if ( $_POST )
groups_update_groupmeta( $id, ‘gdcode_group_dresscode’, $_POST );
}// Get or return the dresscode number
function gdcode_group_dresscode() {
echo gdcode_get_group_dresscode();
}
function gdcode_get_group_dresscode( $group = false ) {
global $groups_template;
if ( !$group )
$group =& $groups_template->group;
$group_dresscode = groups_get_groupmeta( $group->id, ‘gdcode_group_dresscode’ );
$group_dresscode = stripcslashes( $group_dresscode );
return apply_filters( ‘gdcode_get_group_dresscode’, $group_dresscode );
}// show dresscode number in group header
function gdcode_show_dresscode_in_header( $description ) {
global $gdcode_show_dresscode_in_header;
if ( gdcode_get_group_dresscode() && $gdcode_show_dresscode_in_header ) {
$description .= ‘‘. __(‘Dress code’, ‘gdcode’).’:‘.gdcode_make_dresscode_for_group().”;
}
return $description;
}
add_filter( ‘bp_get_group_description’, ‘gdcode_show_dresscode_in_header’ );// show number for an individual group
function gdcode_make_dresscode_for_group() {
global $bp, $wpdb, $gdcode_args;$group_dresscode = gdcode_get_group_dresscode();
$group_dresscode = ‘‘.$group_dresscode.’‘;
return $group_dresscode;
}add_action( ‘groups_create_group_step_save_group-details’, ‘gdcode_save_dresscode’ );
add_action( ‘groups_details_updated’, ‘gdcode_save_dresscode’ );
?>`April 27, 2011 at 11:50 pm #111203Dwenaus
Participant@djpaul oh boy – I was hoping you wouldn’t say that!
Can you tell me why you are re-writing it, and if you’ve started any difficulties you’ve encountered.Here is my initial db scheme with examples (initially visualized as a mysql table)
rating_id – auto-generated
object_id – id of object being rated. ie. post_id, group_id, bp_album image id, forum_post_id
object_type – type of thing beind rated. ie. group, blog post, album image, forum post
rater_user_id – the user_id of the person doing the rating (need to be logged in)
owner_user_id – the user id of the person who ‘owns’ the object being rated
rate_type – either ‘like’, ‘vote’ or ‘rate’.
rate_value – value of rating/like/vote. Like can only be ‘like’, vote is 1 or -1, rate can be range from 1 to 5.
date_ratedmaybe I’m being too flexible with the different rate types and I should just stick to one type, such as Facebook style ‘Like’. but then that leaves out a lot of functionality for amazon and app store style ratings. it would be nice if these were consolidated in one area, but maybe too ambitious.
Looking again at custom post types/taxonomies I can see how the custom post type will be an individual rating, and the owner of that custom post type will be the rater. I can add a custom field for the user id of the object owner. It looks like the object_type would be a custom taxonomy, and the id of the object rated would be another custom field. The value of the rating could either be a custom field or maybe a taxonomy.
Should I be connecting up the object being rated or the object owner using custom taxonomies? if yes, then I’m having trouble visualizing that.
thanks!
April 18, 2011 at 5:29 am #110490velomash
MemberI found a much easier solution for this….
Line 59 of the register.php file contains this code when it’s forming the query to get all the signup fields…
“The ‘profile_group_id=1’ restricts the query to only the base fields. Delete that argument and it should display all the fields. The code looks like:
“April 17, 2011 at 2:43 am #110436In reply to: Fatal Error on activating BuddyPress Plugin
hran
MemberI am having the same problem, but are you sure this isn’t a bug in the plugin? It shouldn’t need 33MB of RAM just to activate the plugin. I got the same error trying to activate Buddypress 1.2.8 on a fresh install of WordPress 3.1.1 on a high-quality host. There are a huge number of warnings that come before the memory error. Here’s the full output with debug on (I cut out another ~50 warnings on call-time pass-by-reference).
`Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of apply_filters(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core.php on line 565
Warning: Call-time pass-by-reference has been deprecated in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core/bp-core-classes.php on line 228
[many more errors on call-time pass-by-reference…]
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of apply_filters(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-friends.php on line 433
Notice: Undefined offset: 0 in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 85
Notice: is_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. (This message was added in version 3.1.) in /sites/www.mysite.org/web/content/wp-includes/functions.php on line 3422
Notice: Undefined offset: 2 in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core/bp-core-catchuri.php on line 158
Notice: Undefined property: stdClass::$loggedin_user in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-forums.php on line 530
Notice: Trying to get property of non-object in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-forums.php on line 530
Notice: Undefined property: stdClass::$displayed_user in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core.php on line 1070
Notice: Trying to get property of non-object in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core.php on line 1070
Notice: Undefined index: user-avatar-default in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core.php on line 160
Notice: Undefined property: stdClass::$profile in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-classes.php on line 816
Notice: Undefined index: bp-xprofile-base-group-name in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-xprofile.php on line 101
Notice: Undefined index: bp-xprofile-fullname-field-name in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-xprofile.php on line 102
WordPress database error: [Table ‘z_mysitewp.wp_bp_xprofile_data’ doesn’t exist]
SELECT value FROM wp_bp_xprofile_data WHERE field_id = 1 AND user_id = 1WordPress database error: [Table ‘z_mysitewp.wp_bp_xprofile_fields’ doesn’t exist]
SELECT * FROM wp_bp_xprofile_fields WHERE id = 1WordPress database error: [Table ‘z_mysitewp.wp_bp_xprofile_fields’ doesn’t exist]
SELECT id FROM wp_bp_xprofile_fields WHERE id = 1Notice: Undefined index: bb-config-location in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-forums.php on line 23
Notice: Undefined index: bp-xprofile-base-group-name in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-xprofile.php on line 101
Notice: Constant BP_XPROFILE_BASE_GROUP_NAME already defined in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-xprofile.php on line 101
Notice: Undefined index: bp-xprofile-fullname-field-name in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-xprofile.php on line 102
Notice: Constant BP_XPROFILE_FULLNAME_FIELD_NAME already defined in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-xprofile.php on line 102
Notice: Undefined index: fileupload_maxk in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php on line 35
WordPress database error: [Table ‘z_mysitewp.wp_bp_groups_members’ doesn’t exist]
SELECT COUNT(DISTINCT m.group_id) FROM wp_bp_groups_members m, wp_bp_groups g WHERE m.group_id = g.id AND m.user_id = 1 AND m.is_confirmed = 1 AND m.is_banned = 0Notice: Undefined property: stdClass::$current_group in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-groups.php on line 223
Notice: Trying to get property of non-object in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-groups.php on line 223
WordPress database error: [Table ‘z_mysitewp.wp_bp_messages_recipients’ doesn’t exist]
SELECT unread_count FROM wp_bp_messages_recipients WHERE user_id = 1 AND is_deleted = 0 AND sender_only = 0Notice: Undefined variable: count_indicator in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-messages.php on line 115
Notice: Undefined index: action in /sites/www.mysite.org/web/content/wp-content/plugins/buddypress/bp-core/bp-core-signup.php on line 571
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /sites/www.mysite.org/web/content/wp-admin/includes/media.php on line 1963`
April 14, 2011 at 10:49 pm #110277In reply to: How to hide "Base" group in the edit profile panel?
sdpkelkar
MemberHi.
Thanks for the code Brajesh! I just had one question. I’ve defined different profile field groups for different user types. I want to restrict the visibility of these filed groups to only those users (e.g. users of type A get to see only those profile fields for user type A). My problem is that when I use your code<?php global $bp;
if(bp_get_current_profile_group_id()==1)
bp_core_redirect($bp->displayed_user->domain.”profile/edit/group/2″);
?>it shows the same profile fields for all user types. I guessed it was because 1 is the base profile group ID and tried changing the if loop to
if(bp_get_current_profile_group_id()==ID number of group)
bp_core_redirect($bp->displayed_user->domain.”profile/edit/group/ID number of group”);but now it shows me only the ‘Editing base profile’ screen
Is this code correct?
Cheers
April 10, 2011 at 12:07 am #109892In reply to: Re: How to Display an Array of XProfile Groups
Alan
Memberyou can delete those groups in your profile field setup panel

what are you trying to achieve?Are you trying to display those based on user roles?
bp_get_the_profile_group_id() is returning only one ID you have to create an function that returns an array of id’s and then you need to loop over those and exclude 7 and 6.
you can try this
profile loop
`<?php
if ( bp_profile_group_has_fields() && 6 != bp_get_the_profile_group_id() && 7 != bp_get_the_profile_group_id() ) :
?>
<div class="bp-widget “>
<tr>
`
April 7, 2011 at 3:28 pm #109752In reply to: Creating large dropdowns in profile admin
GRAQ
Participant@ultimateuser Do you mean write values directly into bp_xprofile_fields ?
I wrote some dirty SQL to do just that.
` $insertsql = $wpdb->prepare(“INSERT INTO {$tablename} (group_id, parent_id, type, name, description, is_required, order_by, field_order, is_default_option, option_order ) VALUES (%d, %d, %s, %s, %s, %d, %s, %d, %d, %d )”, $group_id, $parent_id, $type, $region, ”, 0, ”, 0, 0, $option_order );`To be honest, I was hoping there would be a better way.
April 7, 2011 at 3:01 pm #109748matpol
MemberI think this is mainly a cookies issue – if you clear you cookies and start again you might find it all works. Or try it in another browser. The ‘bp_new_group_id’ cookie didn’t go away until I deleted it using the options in firefox. The webdev toolbar did not get rid of it.
April 4, 2011 at 4:35 pm #109532In reply to: How to get group info by id outside of the loop
drebabels
MemberI needed to do this recently too… this is the technique I used:
$group = groups_get_group( array( ‘group_id’ => $group_id ) );
Found on http://bluemandala.com/buddypress-plugin/127/buddypress-get-group-details-from-group_id/
So in order to get the link to your groups try something like this
global $bp;
$group = groups_get_group( array( ‘group_id’ => $group_id ) );
home_url( $bp->groups->slug . ‘/’ . $group -> slug )March 28, 2011 at 1:26 am #108884In reply to: How to get group info by id outside of the loop
Virtuali
Participant`bp_get_group_id()`
or:
`global $bp;
$bp->groups->current_group->id;`March 15, 2011 at 12:08 am #107820In reply to: How to display the Group’s recent activity
r-a-y
KeymasterUse the activity loop:
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/Set parameters to:
object – groups
primary_id – $group_id (you need to grab the group id and put it in)
action – activity_update
max – 1 (or how many updates you want to return) -
AuthorSearch Results