Template variables/switches/loops in php

Tutorials for <a href="http://www.phpbbstyles.com/viewtopic.php?t=356">eXtreme Styles mod</a> for phpBB 2.0.

Moderator: Moderators

Postby UseLess on Wed Sep 14, 2005 4:45 pm

Greetings,

You'd have to add a variable, before the 'page_header.php' is loaded in 'index.php' such as '$on_index = true;' for example and then use this;

Code: Select all
<?php 
global $on_index, $forum_id;   
if($on_index || $forum_id == 5)   
{   
?>   

banner 

<?php   
}
else
{
?>

banner2

<?php
}   
?>
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby Gogi on Wed Sep 14, 2005 4:55 pm

UseLess, thank you.
This works!
Regards from Russia.
Gogi
Registered User
Registered User
 
Posts: 8
Joined: Tue Jun 22, 2004 2:32 am
Location: made in Russia

Noobee

Postby davidshook on Sat May 13, 2006 10:15 pm

I need to place advertisment directly inside the 1st post and only in the 1st post. How would I go about doing that. I have a little more than basic understanding of PHP and general understanding of phpbb... so with some explanation and examples I may be able to do it myself.

Thank you
davidshook
Registered User
Registered User
 
Posts: 1
Joined: Sat May 13, 2006 9:32 pm

Previous

Return to eXtreme Styles mod tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron