'Smart' header Custom Switches hack

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
mikedean2
Registered User
Posts: 199
Joined: Thu Feb 26, 2004 8:22 pm

'Smart' header Custom Switches hack

Post by mikedean2 »

I've been looking for a way to mod my bb to display custom information in the overall header without success, so now I'm asking if someone could make a hack to do it.

Idea is simple - force the overall_header.tpl file to recognise which page it is being displayed on and show information related to that page, rather than the generic stuff at the top of all pages. I know already that overall_header contains data from the displayed page, for example {page title} is obviously within the header file, but 'calls' the title from somewhere within the page content.

All I want is to be able to display some of the standard links in the header if we're displaying the index page, for example, but other links if we're buried deep within a thread. I hoped it might end up a bit like <begin_user_logged_in> sort of thing, so I could enter what I wanted within the brackets and it only be displayed if that condition is true; e.g.

Code: Select all

<!-- BEGIN switch_portal -->
<a href="blah">portal blah </a> etc etc etc
<!-- END switch_portal -->
<!-- BEGIN switch_album-->
<a href="blah">extra gallery links blah </a> etc etc etc
<!-- END switch_album-->
Does this make sense, and if so can someone create these custom switches and release it as a hack?
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di »

You may want to read this article and maybe start for yourself?
Isn't so hard ;)

http://www.phpbb.com/kb/article.php?article_id=200
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
mikedean2
Registered User
Posts: 199
Joined: Thu Feb 26, 2004 8:22 pm

Post by mikedean2 »

Okay, I've read that article, and rather than simply say "Eh?" and run away, I've read it again. And again (you can insert a few more agains here if you want, but you get the point).
I do understand <!-- BEGIN/END whatever_existing_switch --> stuff and I've modified some of these already, but they are existing switches. I've spent ages studying that page, and some other stuff that showed up on searches for 'custom switches' but I'm afraid I'm really in the dark here as regards to how to set the switch parameters.
Is there an easier way? Or maybe a tutorial that would reflect what I'm actually trying to achieve? I hate to look stupid, but there does come a time when you have to confess yer sins :oops:
Post Reply

Return to “[2.0.x] MOD Requests”