Eli käytössäni on modi millä saan tiettyjä juttuja näkymään vain tietylle käyttäjäryhmälle.
Nyt olis tarvis saada toinen vastaava, että pystyisin kahta eri käyttäjäryhmää käyttämään samallasivulla.
^Ompas vaikeesti selitetty^

Mitä tosta pitäis muuttaa että sais esmes <!-- BEGIN switch_user_display_html2 --> tehtyä?
Koodi: Valitse kaikki
##############################################################
## MOD Title: Usergroup Switches
## MOD Author: Lumpy Burgertushie < lumpy@phpbb-installer.com > (Robert Adams) http://phpbb-installer.com
## MOD Author: dicky <rfoote@telink.net > (Richard Foote) http://dicky.askmaggymae.com
## MOD Description: This MOD creates switches like the login logout switches,
## only for certain usergroups. It will allow you to show buttons, links, tables,
## etc , to only those in certain usergroups.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit:
## includes/page_header.php
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## you will need to find what the usergroup ID is before you do this.
##you can look in the database for the group_id in the phpbb_user_group table
##############################################################
## MOD History:
##
## 2006-01-05 - Version 1.0.0
## - first release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#------[OPEN ]-----------
#
includes/page_header.php
#
#--------[ FIND ]------------
#
$template->assign_block_vars('switch_user_logged_in', array());
#
#--------[ AFTER, ADD ]-----------------------
#
//Begin usergroup switches MOD
// Change these numbers to the ID's of the groups you want to allow access to
$display_html_group = array(1,2,3,4);
$display_html_allowed = false;
$sql = "SELECT group_id FROM " . USER_GROUP_TABLE . "
WHERE user_id = " . $userdata['user_id'];
if(!($result = $db->sql_query($sql)))
message_die(GENERAL_ERROR,'Could not select from usergroup table','',__LINE__,__FILE__,$sql);
while ($row = $db->sql_fetchrow($result))
{
$dhag = $row['group_id'];
}
if (in_array($dhag, $display_html_group))
{
$display_html_allowed = true;
}
if ( $display_html_allowed )
{
$template->assign_block_vars('switch_user_display_html',array() );
}
//End usergroup switches MOD
#
#----------[ DIY INSTRUCTIONS ]---------------
#
Then in your overall_header.tpl and other tpl files, You can then surround whatever you want to display to only certain usergroups
with the switches;
<!-- BEGIN switch_user_display_html -->
... stuff that only shows up when the user is in usergroup(s)...
<!-- END switch_user_display_html -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM