Help with switch

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Help with switch

Post by DJ Skitzo »

I currently have 2 installations of phpBB, I am currently using phpBB2 as my live forum and I have Olympus RC4 on a second domain so I can get my pages ready for the conversion.

I have several custom pages on my site which use the phpBB sessions and userdata etc

I have the following code in my includes/page_header.php file

Code: Select all

if ( $userdata['user_id'] == '2')
{
  $template->assign_block_vars('switch_admin_only', array());
} elseif ( $userdata['user_id'] == '43')
{
  $template->assign_block_vars('switch_admin_only', array());
}
which allows me to use the <!--BEGIN/END switch_admin_only --> feature on every phpBB2 related page. How would I include this feature into phpBB3

Thank you for any help
DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Help with switch

Post by DJ Skitzo »

Can anyone help please?.....I really need this feature
User avatar
david63
Registered User
Posts: 17965
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Help with switch

Post by david63 »

David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
SpongeWeb
Registered User
Posts: 766
Joined: Thu Jan 27, 2005 2:57 pm
Location: End of the Universe
Contact:

Re: Help with switch

Post by SpongeWeb »

Your live conversion will ignore all modifications, you will lose any phpbb2x mods during conversion.
A friend is someone who knows the song in your heart, and will sing, when you forget the words..
DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Help with switch

Post by DJ Skitzo »

SpongeWeb wrote:Your live conversion will ignore all modifications, you will lose any phpbb2x mods during conversion.
Yeah I no that and I have got a new blank page template from a thread on this forum, and I am just wanting to get my new pages ready to upload when I do my conversion.

I need to get them ready as its going to take me quite a while to get the new pages sorted and even once phpBB3 is stable I cannot do the conversion unless I can use this switch
DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Help with switch

Post by DJ Skitzo »

Someones got to know the answer for this, its only a simple piece of code for those who understand the code layout for phpBB3 isn't it?
DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Help with switch

Post by DJ Skitzo »

If no one knows how to add that switch to my forum does anyone know any other possible way in which I can make a part of a page so that it is admin only?
DarrenSW
Registered User
Posts: 58
Joined: Fri May 11, 2007 11:50 pm
Location: Sweden
Contact:

Re: Help with switch

Post by DarrenSW »

Open yours overall_footer.html template and look after following:

Code: Select all

<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
<!-- IF U_ACP --> is a part that you are interested of.
That's how link to administration panel is displayed to the admins only.
DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: Help with switch

Post by DJ Skitzo »

Thanks, I can get to work on these new files now :D
Locked

Return to “[3.0.x] Support Forum”