Old 07-18-2005   #1 (permalink)
Registered User
 
Join Date: Jul 2005
Posts: 5

Advanced Template System Help!

PHP Code:
<?php
$page 
$_GET['p']; 
if ((
$page == "news") or ($page =="")) { include('news.php'); 
} else if(
$page == "tutorials") { include('tutorials.php');
} else if(
$page == "downloads") { include('downloads.php');
} else if(
$page == "faqs") { include('faqs.php'); 
} else if(
$page == "links") { include('links.php');
} else if(
$page == "legalinfo") { include('legalinfo.php');
} else if(
$page == "privacy") { include('privacy.php');
} else { include(
'404error.php');
}
?>
I got this script of the site tutorials that allows me to make links such as

http://www.yourdomain.com/index.php?p=yourpage

I am new to php and was wondering if any of you know how to edit this script to create an the comples urls such as

http://www.yourdomain.com/index.php?...eme&p=yourpage

or even

http://www.yourdomain.com/index.php?...cat&p=yourpage
oli_gibson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-18-2005   #2 (permalink)
Local Biorust Beast
 
Order's Avatar
 
Join Date: Oct 2003
Location: San Diego, CA, USA
Posts: 2,253

Send a message via AIM to Order Send a message via MSN to Order Send a message via Yahoo to Order
The theme is simple:

PHP Code:
$theme $_GET['theme'];
switch(
$theme)
{
  case 
"one": include('themes/one/header.htm');
              break;
  case 
"two": include('themes/two/header.htm');
              break;
  default: include(
'themes/default/header.htm');
           break;

Just do the same at the top and bottom, at the bottom, use footer.htm instead.
__________________
Order is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-18-2005   #3 (permalink)
Registered User
 
Join Date: Jul 2005
Posts: 5

thanks

thanks for that so does the code look like this then

PHP Code:
<?php 
$page 
$_GET['p']; 
if ((
$page == "news") or ($page =="")) { include('news.php'); 
} else if(
$page == "tutorials") { include('tutorials.php'); 
} else if(
$page == "downloads") { include('downloads.php'); 
} else if(
$page == "faqs") { include('faqs.php'); 
} else if(
$page == "links") { include('links.php'); 
} else if(
$page == "legalinfo") { include('legalinfo.php'); 
} else if(
$page == "privacy") { include('privacy.php'); 
} else { include(
'404error.php');
}
$theme $_GET['theme']; 
switch(
$theme

  case 
"one": include('themes/one/header.htm'); 
              break; 
  case 
"two": include('themes/two/header.htm'); 
              break; 
  default: include(
'themes/default/header.htm'); 
           break; 

?>
oli_gibson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-18-2005   #4 (permalink)
Registered User
 
Join Date: Jul 2005
Posts: 5

sori ignore that
oli_gibson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-19-2005   #5 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
speaking of this kind of templating system; mog: do we have any tutorials on URL rewriting via mod_rewrite/htaccess and php?
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-19-2005   #6 (permalink)
Sheep Worrier
 
Man1c M0g's Avatar
 
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,105
Blog Entries: 14

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
Quote:
Originally Posted by scrowler
speaking of this kind of templating system; mog: do we have any tutorials on URL rewriting via mod_rewrite/htaccess and php?
Nope - not yet!
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-21-2005   #7 (permalink)
Registered User
 
Join Date: Jul 2005
Posts: 5

are you able to make a script on this?
oli_gibson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Mangament System Question LimitLess HTML / PHP / ASP / JS 3 06-01-2006 12:32 AM
Help needed with PHP: Pagination in a tut system nitr0x HTML / PHP / ASP / JS 3 05-24-2005 05:30 PM
Most Advanced Design Order Showrooms & Works In Progress 5 05-18-2005 07:18 AM
Free Template High-Tech Pressure Dumb Genius The Marketplace 4 02-27-2005 08:06 PM


All times are GMT +1. The time now is 05:17 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT