Forum Replies Created
-
In the languages / language file is missing … when it is available?
<?php
/*
Plugin Name: BPDEV-GROUPS-EXTRA-SAMPLE
Plugin URI: http://bp-dev.org/projects/#groups-extra
Description: Example of groups-extra configs
Author: Nicola Greco
Version: 0.3
Author URI: http://nicolagreco.com/
Copyright (c) 2009-2011, Nicola Greco (mail: notsecurity@gmail.com | website: http://nicolagreco.com).
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
function bpdev_groups_extra_custom_fields() {
global $group_extras;
bpdev_groups_extra_register_field(
‘link’, //slug
‘ДомашнÑÑ Ñтраница’, //name
‘singletext’, //type
false, //extra (false means no extra stuff for that extra field)
‘on’, //the status on the admin panel
‘on’, //it shows it in the admin panel
true //it shows that everytime
);
bpdev_groups_extra_register_field(
‘link’, //slug
‘ДомашнÑÑ Ñтраница’, //name
‘multitext’, //type
false, //extra (false means no extra stuff for that extra field)
‘on’, //the status on the admin panel
‘on’, //it shows it in the admin panel
true //it shows that everytime
);
$types = array(
array( ‘type1’, ‘Ð”Ð»Ñ Ð´ÐµÐ²Ð¾Ñ‡ÐµÐº’ ),
array( ‘type2’, ‘Ð”Ð»Ñ Ð´ÐµÐ²ÑƒÑˆÐµÐº’ ),
array( ‘type3’, ‘Ð”Ð»Ñ Ð¶ÐµÐ½Ñ‰Ð¸Ð½’ ),
array( ‘type4’, ‘Ð”Ð»Ñ Ð²Ñех’ )
);
bpdev_groups_extra_register_field(
‘type’, //slug
‘Тип группы’, //name
‘dropdown’, //type
$types, //extra it has to be an array like $types
‘on’, //the status on the admin panel
‘on’, //it shows it in the admin panel
true //it shows that everytime
);
$checks = array(
array( ‘check1’, ‘Checkbox 1’ ),
array( ‘check2’, ‘Checkbox 2’ ),
array( ‘check3’, ‘Checkbox 3’ ),
array( ‘check4’, ‘Checkbox 4’ )
);
bpdev_groups_extra_register_field(
‘checks’, //slug
‘Checkboxes’, //name
‘checkbox’, //type
$checks, //extra it has to be an array like $types
‘on’, //the status on the admin panel
‘on’, //it shows it in the admin panel
true //it shows that everytime
);
}
add_action( ‘bpdev_groups_extra_fields_setup_globals’, ‘bpdev_groups_extra_custom_fields’ );
?>
don’t work checkboxes or i something don’t understand…