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

Current Version: 2.0.2
Released: 2013-10-27
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked
User avatar

Topic author
robra
Active Member
Posts: 5
Joined: 4. April 2012 20:21
phpBB.de User: robra
phpBB.com User: robra

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

Post 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
Last edited by robra on 5. April 2012 22:12, edited 2 times in total.
User avatar

Topic author
robra
Active Member
Posts: 5
Joined: 4. April 2012 20:21
phpBB.de User: robra
phpBB.com User: robra

Re: Adding a new group in Team Block

Post 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
Last edited by robra on 5. April 2012 22:12, edited 1 time in total.
User avatar

archivar
Portal Professional
Posts: 1959
Joined: 19. April 2009 21:34
phpBB.de User: archivar
phpBB.com User: archivar
Location: Deutschland

Re: The Team Block Modify

Post by archivar »

Posts separated and moved into a suitable forum. ;)
V.G. archivar
sorry for my bad english

maestrowing
Active Member
Posts: 1
Joined: 29. May 2012 10:19
phpBB.de User: maestrowing
phpBB.com User: maestrowing

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

Post 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?
User avatar

Topic author
robra
Active Member
Posts: 5
Joined: 4. April 2012 20:21
phpBB.de User: robra
phpBB.com User: robra

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

Post 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
Locked

Return to “Board3 Portal 2.0.x - English Support”