[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 173: Cannot modify header information - headers already sent by (output started at [ROOT]/feed.php:1)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 174: Cannot modify header information - headers already sent by (output started at [ROOT]/feed.php:1)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 180: Cannot modify header information - headers already sent by (output started at [ROOT]/feed.php:1)
IntegraMOD Home of phpBB Integrated Modifications 2006-04-20T01:11:36-07:00 https://integramod.com/forum/feed.php?f=23&t=253 2006-04-20T01:11:36-07:00 2006-04-20T01:11:36-07:00 https://integramod.com/forum/viewtopic.php?t=253&p=2366#p2366 <![CDATA[Re: Switches in overall_header.tpl to Select Javascript Menu]]>
############################################### ##   Hack Title]http://www.phpbbhacks.com/forums[/url] for support. ############################################### ## ############################################### ##   This hack is released under the GPL License. ##   This hack can be freely used, but not distributed, without permission. ##   Intellectual Property is retained by the hack author(s) listed above. ###############################################  # #-----[ OPEN ]------------------------------------------ #     includes/page_header.php# #-----[ FIND ]------------------------------------------ # //// Login box?//if ( !$userdata['session_logged_in'] ){     $template->assign_block_vars('switch_user_logged_out', array());}else{     $template->assign_block_vars('switch_user_logged_in', array());       if ( !empty($userdata['user_popup_pm']) )     {         $template->assign_block_vars('switch_enable_pm_popup', array());     }}# #-----[ AFTER - ADD ]------------------------------------------ # if ( $userdata['user_level'] == MOD ){     $template->assign_block_vars('moderators_only', array());}else if ( $userdata['user_level'] == ADMIN ){     $template->assign_block_vars('admins_only', array());}else if ( $userdata['user_level'] == MOD || $userdata['user_level'] == ADMIN ) {     $template->assign_block_vars('admins_and_moderators_only', array());}# #-----[ STOP ]------------------------------------------ # This is where you need to determine which switches you want to add.  Below is the code forADMINS ONLY, MODERATORS ONLY and for both MODS AND ADMINS.  Find the proper content that you want to hideand add the BEGIN switch just before and add the END switch just after your content.  -------  ADMIN ONLY SWITCHES --------  # #-----[ OPEN ]------------------------------------------ #     templates/subSilver/*# #-----[ BEFORE - ADD ]------------------------------------------ #     <BEGIN># #-----[ AFTER - ADD ]------------------------------------------ #     <END># #----------------------------------------------- #  -------  MODERATOR ONLY SWITCHES --------  # #-----[ OPEN ]------------------------------------------ #     templates/subSilver/*# #-----[ BEFORE - ADD ]------------------------------------------ #     <BEGIN># #-----[ AFTER - ADD ]------------------------------------------ #     <END># #----------------------------------------------- #  -------  MODERATOR & ADMINS ONLY SWITCHES --------  # #-----[ OPEN ]------------------------------------------ #     templates/subSilver/*# #-----[ BEFORE - ADD ]------------------------------------------ #     <BEGIN># #-----[ AFTER - ADD ]------------------------------------------ #     <END># #-----[ SAVE & CLOSE ALL FILES ]-------------------------- # #End  


I dont know if it helps at all....

:mrgreen:

EDIT email address in script modified - A

Statistics: Posted Author: found it — Thu Apr 20, 2006 1:11 am


]]>
2006-04-19T15:57:15-07:00 2006-04-19T15:57:15-07:00 https://integramod.com/forum/viewtopic.php?t=253&p=2339#p2339 <![CDATA[Re: Switches in overall_header.tpl to Select Javascript Menu]]> and an admin menu being loaded. I am listing the code below for comments. Thanks in advance!
<BEGIN> <ALLWEBMENUS><END>  <BEGIN> <ALLWEBMENUS> <END>  <BEGIN>  <ALLWEBMENUS> <END>

Statistics: Posted Author: Dr. Bantham — Wed Apr 19, 2006 3:57 pm


]]>
2006-04-16T15:11:08-07:00 2006-04-16T15:11:08-07:00 https://integramod.com/forum/viewtopic.php?t=253&p=1910#p1910 <![CDATA[Switches in overall_header.tpl to Select Javascript Menu]]>
<BEGIN>
INSERT CODE HERE
<END>

This code handles the member state well, as it only executes the code if the visitor is logged in.

I found a small mod which allows for the same function relative to administrators:
[url=http]Admin View Only[/url]

My problem is how do I do the same for visitors not logged in? Right now, I have a sequential series of menu calls. The first calls a visitor menu (without a test), the second calls for a member menu (logged in test), and the third calls for the admin menu (admin test). This actually works, since the first menu is always called each subsequent successful menu call creates a javascript menu over the previous one. If you have a good broadband connection, the stacking of menus is hardly noticeable. My concern is that dial-up users may experience a considerable lag as the menus are called, especially since this menu cycle is a part of overall_header.tpl and is called with every page. I also noticed a horrendous lag when Opera encountered this section of code. Opera seems to behave with a singular menu.

You can have a look at the result here:
[url=http]THOMAS LIGOTTI ONLINE[/url]

I need a way to define a single menu selection for each state. A successive if, then...else statement would be ideal. I know very little PHP, however.

Basically, the logic would be

If ADMIN then AdminMenu
---> else if USER then UserMenu
-------->else VisitorMenu

Note that I am using generic variables for the logic. The above is not my feeble attempt at coding, though it may not be far from the mark! I may be totally off base on my approach here. I would greatly appreciate any help!

Statistics: Posted Author: Dr. Bantham — Sun Apr 16, 2006 3:11 pm


]]>