Recent Topics

1 Feb 16, 2018 20:39    

Is there a way to custom order the organisation members on the (our awesome team)i page, t seems they are ordered by ID number in ascending order.

2 Feb 17, 2018 02:29

Yes and no. Yes you can change the order but it is limited. No you can't order them to an exact order you like. Edit it in Collections > Widgets > Our awesome team widget

3 Feb 19, 2018 00:38

Thanks. yes that's the problem, reordering when members are added isn't easy unless maybe I give them an ordered last name, then find it's object and add a css to make it hidden.?

4 Feb 19, 2018 02:40

Ok I've hard coded the widget [inc/widgets/widgets/_org_members.widget.php]
I have used an ordered number as the 'last name' 01,02,03 etc and then dropped the last 3 characters (last name), of (fullname)

$member_text=$org_User->get( 'fullname' );
$member_text_len=strlen($member_text)-3;
$member_text=substr("$member_text",0,$member_text_len);
									
echo '<h3 class="evo_user_name">'.$member_text.'</h3>';

Works fine:)

5 Feb 19, 2018 11:23

@amoun as some advice I can offer, hacking the core with your custom code may frustrate you in the long run because every time a new release is available you will either be reluctant to upgrade or has to make the changes all over again.

The solution to this, is to port a widget into a plugin, this way you can install the plugin across all compatible future updates.

6 Feb 19, 2018 12:34

Yes I've been upgrading my own mods since version 2 and keep a blog just on my mods :) I have never got the head space to port a widget to a plugin, somehow it seems to daunting and requires extra running resources.

7 Feb 19, 2018 22:58

See this pull request:

https://github.com/b2evolution/b2evolution/pull/65/files

Apply the patch, go to install process and select upgrade.

With this implemented you can prioritize users by a number, 1 = first, 2=second ect. https://yoursite.com/admin.php?ctrl=organizations

in the Organization widget setting for 'order_by' add 'org_priority' => 'Priority in Organization',

'order_by' => array(
					'label' => T_('Order by'),
					'note' => T_('Field used to determine the order in which the members are displayed'),
					'type' => 'select',
					'options' => array(
							'user_id' => 'User ID', 
							'user_level' => 'User Level',
							'org_role' => 'Role in Organization',
							'org_priority' => 'Priority in Organization',
							'username' => 'Username',
							'lastname' => 'Last Name, First Name',
							'firstname' => 'First Name, Last Name'
					),
					'defaultvalue' => 'user_id',
				),

USE WITH CAUTION. NOT FULLY TESTED

9 Mar 08, 2018 03:09

ok, we added this to the core. thanks.


Form is loading...