The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
links in footer template based on page name - ideally using php
I am trying to add external links to the footer template. I dont want the same link on every page. So I have say 10 links that I want distributed in the footer on the pages, I only want 1 link per page. I want the links to always be tied to the page ie when ever pagexyz is opened link1 is displayed.
I wrote a bit of php to count the number of character in the page name and use that in a case statement. But php wont run in the footer template. So does anyone have any ideas? This is the php that I was going to use: <?php $theUri = $_SERVER['REQUEST_URI']; $theUriLength = strlen($theUri); while ($theUriLength >9) { $theUriLength = $theUriLength-10; settype($theUriLength,'integer'); } switch ($theUriLength){ case "0": print "<a href='http://www.one.com' target='_blank'>Site 0</a>"; break; case "1": print "<a href='http://www.two.com' target='_blank'>Site 1</a>"; break; case "2": print "<a href='http://www.three.com' target='_blank'>Site 2</a>"; break; case "3": print "<a href='http://www.four.com' target='_blank'>Site 3</a>"; break; case "4": print "<a href='http://www.five.com' target='_blank'>Site 4</a>"; break; case "5": print "<a href='http://www.six.com' target='_blank'>Site 5</a>"; break; case "6": print "<a href='http://www.seven.com' target='_blank'>Site 6</a>"; break; case "7": print "<a href='http://www.eight.com' target='_blank'>Site 7</a>"; break; case "8": print "<a href='http://www.nine.com' target='_blank'>Site 8</a>"; break; case "9": print "<a href='http://www.ten.com' target='_blank'>Site 9</a>"; break; default: print "<a href='http://www.default.com' target='_blank'>Site 1</a>"; } ?> Cheers for any suggestions on how I can solve the problem. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|