Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

  • sbdm05
    Participant

    @sbdm05

    Hello Leon,
    This plugin would display the answer in the group header, might help:

    How to Edit Group Meta Tutorial


    sbdm05
    Participant

    @sbdm05

    Hey Shane! Right now, the city is not ‘clickable’ in the group profile.
    It would be great if it could be just like a category. (what i would like to achieve is a drop down menu with a limited choice of towns).
    If i click, i would have all the groups that have the same town.
    Do you think that is possible?
    Hope I am not pushing too far!

    So


    sbdm05
    Participant

    @sbdm05

    Works perfectly! thanks you so much!!!! ๐Ÿ˜‰ thank you for your time and patience!!!
    Still need to figure out how to use that in the search form though, if you have any idea…;-)

    (btw, i was putting the code in mytheme-child>functions.php)

    Cheers, So


    sbdm05
    Participant

    @sbdm05

    Hey,
    Actually, it appears for the admin only under groupname/admin/edit-details/ville.

    But for regular users and admin, the tab ‘ville’, next to ‘admin’ is empty.

    Hope this is not too much confusing!

    So


    sbdm05
    Participant

    @sbdm05

    Hey Shane!
    Thank you for your help.

    So here is the new code, but still nothing appears : again iam really sorry to ask you such basic things! really appreciate your help on this!


    sbdm05
    Participant

    @sbdm05

    First, thank you very much for you quick reply!

    I’ve been trying to implement that but nothing happens.

    Could you please have a look at the code as I am really a beginner at this! Thank you so much!

    [edited – Please Use the ‘code’ button when including code.
    Or even better, use gist or pastebin and just share the link ]

    if ( class_exists( 'BP_Group_Extension' ) ) :
    	
    	class Group_Extension_Ville extends BP_Group_Extension {
    		
    		function __construct() {
    			$args = array(
    			'slug' => 'group-extension-ville',
    			'name' => 'ville',
    			);
    			parent::init( $args );
    		}
    		
    		
    		function display() {
    			$group_extension_ville = groups_get_groupmeta( $group_id, 'group_extension_ville' );
    			echo esc_attr( $group_extension_ville );
    		}
    		
    		
    		function settings_screen( $group_id ) {
    			$setting = groups_get_groupmeta( $group_id, 'group_extension_ville' );
    		
    		?>
    			Save your plugin setting here: <input type=โ€textโ€ name='group_extension_ville_setting' value='<?php echo esc_attr( $setting ) ?>' />
    		<?php
    		}
    		
    		
    		function settings_screen_save( $group_id ) {
    			$setting = '';
    			
    			if ( isset( $_POST['group_extension_ville_setting'] ) ) {
    				$setting = $_POST['group_extension_ville_setting'];
    			}
    			
    			groups_update_groupmeta( $group_id, 'group_extension_ville_setting', $setting );
    		}
    	}
    	bp_register_group_extension( 'Group_Extension_Ville' );
    
    endif; // if ( class_exists( 'BP_Group_Extension' ) )
Viewing 6 replies - 1 through 6 (of 6 total)
Skip to toolbar