Page 1 of 1

Adding a new group in Team Block - v.2.0.0b1

Posted: 4. April 2012 21:44
by robra
To add a new group, you will need edit the files:
- /styles/your_style/template/portal/modulesleaders_side.html
- root/portal/modules/portal_leaders.php
- root/language/en/mods/portal/portal_leaders_module.php
- root/language/en/common.php

Let's go add a new group called "Colaborators", but first you have to create this group in your Forum, from ACP.
Basically is:
1- /styles/your_style/template/portal/modulesleaders_side.html:
Find the line...

Code: Select all

{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
... and Add Before in new line:

Code: Select all

	<br style="clear:both" />
	<strong>{L_COLABORATORS}</strong><br />
	<!-- BEGIN col -->
		<span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{col.USERNAME_FULL}</strong></span><br style="clear:both" />
	<!-- BEGINELSE -->
		{L_NO_COLABORATORS_P}
	<!-- END col -->
2- root/portal/modules/portal_leaders.php:
Find the line...

Code: Select all

'WHERE'        => 'u.group_id = g.group_id AND ' . $db->sql_in_set('g.group_name', array('ADMINISTRATORS', 'GLOBAL_MODERATORS')), 
... and Replace with:

Code: Select all

'WHERE'        => 'u.group_id = g.group_id AND ' . $db->sql_in_set('g.group_name', array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'Colaborators')), 
Find the lines...

Code: Select all

                elseif ($row['group_name'] == 'GLOBAL_MODERATORS')
                {
                    $which_row = 'mod';
                } 
... and Add After, in new lines:

Code: Select all

                elseif ($row['group_name'] == 'Colaborators')
                {
                    $which_row = 'col';
                } 
3- root/language/en/portal_leaders_module.php:
Find the line...

Code: Select all

'NO_MODERATORS_P'        => 'No Moderators', 
... and Add After, in new line:

Code: Select all

'NO_COLABORATORS_P'        => 'No Colaborators', 
Find the line...

Code: Select all

'PORTAL_LEADERS_EXT_EXP'    => 'The standard block lists all admins/mods, while the extended block includes all non-hidden groups with a legend.', 
... and on line, Replace the text "admins/mods" for "admins/mods/colaborators".

4- root/language/en/common.php:
Find the line...

Code: Select all

    'G_BOTS'                    => 'Bots', 
... and Add after, in new line:

Code: Select all

    'G_COLABORATORS'        => 'Colaborators', 
Find the line...

Code: Select all

    'CLICK_VIEW_PRIVMSG'    => '%sGo to your inbox%s', 
... and Add after, in new line:

Code: Select all

    'COLABORATORS'        => 'Colaborators', 
[]. Image

Source: http://www.suportephpbb.com.br

Re: Adding a new group in Team Block

Posted: 4. April 2012 21:46
by robra
If you want only change the position of the group names on block, you have to change the positions of the lines on file /styles/your_style/template/portal/modulesleaders_side.html. The original file is:

Code: Select all

{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" />&nbsp;<!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
	<strong>{L_ADMINISTRATORS}</strong><br />
	<!-- BEGIN admin -->
		<span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />
	<!-- BEGINELSE -->
		{L_NO_ADMINISTRATORS_P}<br /><br />
	<!-- END admin -->
	<br style="clear:both" />
	<strong>{L_MODERATORS}</strong><br />
	<!-- BEGIN mod -->
		<span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />
	<!-- BEGINELSE -->
		{L_NO_MODERATORS_P}
	<!-- END mod -->
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
If you want the Moderators stay first, then, the lines will be:

Code: Select all

{$LR_BLOCK_H_L}<!-- IF $S_BLOCK_ICON --><img src="{$IMAGE_SRC}" width="{$IMAGE_WIDTH}" height="{$IMAGE_HEIGHT}" alt="" />&nbsp;<!-- ENDIF -->{$TITLE}{$LR_BLOCK_H_R}
	<strong>{L_MODERATORS}</strong><br />
	<!-- BEGIN mod -->
		<span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{mod.USERNAME_FULL}</strong></span><br style="clear:both" />
	<!-- BEGINELSE -->
		{L_NO_MODERATORS_P}
	<!-- END mod -->
	<br style="clear:both" />
	<strong>{L_ADMINISTRATORS}</strong><br />
	<!-- BEGIN admin -->
		<span style="float:left;"><img src="{T_THEME_PATH}/images/portal/portal_user.png" width="16" height="16" alt="" /></span><span style="float:left; padding-left:5px; padding-top:2px;"><strong>{admin.USERNAME_FULL}</strong></span><br style="clear:both" />
	<!-- BEGINELSE -->
		{L_NO_ADMINISTRATORS_P}<br /><br />
	<!-- END admin -->
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
[]. Image

Re: The Team Block Modify

Posted: 5. April 2012 18:27
by archivar
Posts separated and moved into a suitable forum. ;)

Re: Adding a new group in Team Block - v.2.0.0b1

Posted: 29. May 2012 10:26
by maestrowing
Hello,
I followed this guide completely and run, now I see the block groups are in my portal but see no members in it.
So I see only the group name in the portal block.
Any ideas what I might have done wrong, or there are other files should be edited?

Re: Adding a new group in Team Block - v.2.0.0b1

Posted: 29. May 2012 20:07
by robra
maestrowing wrote:Hello,
I followed this guide completely and run, now I see the block groups are in my portal but see no members in it.
So I see only the group name in the portal block.
Any ideas what I might have done wrong, or there are other files should be edited?
What is the URL of your Forum ?

[]. Image