TUTORIALS SUBMENU ---->

PHOTOSHOP    FLASH    ILLUSTRATOR    BLENDER    CINEMA 4D    WEB-CODING

Simple Template Systems


Last 5 User Comments

view entire thread

User:  mytruedesire (#47045)
Date: Sat Dec 29, 2007. 03:33:22

Post #7 of 7

that makes sense now lol.i couldnt really figure that out when i read other peoples tutorials for it.i use wordpress so i dont have to do much coding.i would like to know how to skin wordpress though.

Reply to this post


User:  nassaublu (#22851)
Date: Sat Jan 14, 2006. 15:36:14

Post #6 of 7

I was trying to follow 72dpi post but got lost with trying to understand where $page.php was defined. Can someone show me what I missed or was it not defined?

Got it

Reply to this post


User:  psychophat (#22790)
Date: Fri Jan 13, 2006. 00:19:52

Post #5 of 7

72dpi in using your posted script do I need to add links like the previous script of ViciOuS in this topic or do I just add the headers on every page I make? If so how does it detect if the page is invalid and would redirect to the custom error404.php page?

I'm new to PHP so could anyone explain the further usages of the script above.

Reply to this post


User:  72dpi (#18221)
Date: Fri Sep 02, 2005. 09:04:50

Post #4 of 7

Great usage of the Switch method,
however, I feel that people should be able to expand further, so we can include as many pages as we want .

Save this document as index.php





Dynamic Content















 

Navigation


Home

Contact

Links

Downloads




Welcome to My Site


$thefile = "includes/$page.php";
if (file_exists($thefile))
{
include("$thefile");
}
else
{
include("includes/start_content.php");
}

?>
© 2005 Yourname





Create a folder called "includes"

Next, save this as start_content.php in that folder:
(note we can stop people opening the page directly (good 4 security)


// keep people from accessing this page directly
if (eregi('start_content.php', $_SERVER['PHP_SELF'])) {
// go to index page
header('Location: ../index.php?page=start_content');
die();
}

?>

Start Content Goes Here!




Save this as contact.php
(This is a fully functioning contact form I have added to help out).
Just edit the content where appropriate.

// keep people from accessing this page directly
if (eregi('contact.php', $_SERVER['PHP_SELF'])) {
// go to index page
header('Location: ../main.php?page=contact');
die();
}

?>

ContactPage


Blah Blah


I hope this helps someone else out there. Just add more pages, using the headers as shown to prevent people opening the pages without going via the link "index.php?page=whatever"
Now you can see we can add more pages so easily, sinmce we are not stuck to predefined content blocks..!

Reply to this post


User:  stingerblue (#17717)
Date: Thu Aug 04, 2005. 01:13:03

Post #3 of 7

is there any web sites that have examples around this code that go further?

I have experimented with it, but none have worked (graphics, and title)

Reply to this post


--- View Entire Thread ---


FEATURED TUTORIALS & GUIDES

view all

Laser-Cut Metal
Laser-Cut Metal
- Adobe Photoshop -
3D Pill
3D Pill
- Adobe Illustrator -
The Glamour Effect
The Glamour Effect
- Adobe Photoshop -
Windows XP Folders
Windows XP Folders
- Adobe Photoshop -

Username:
Password:  
Remember Me

Lost Password? || Register

  
Printer Friendly Version
Tell A Friend v2.0
   
 [WIP] Hairdresser Site Design
Author: YinToniq
Posted: Jul 03rd, 5:58am
Activity: 1 replies, 42 views
Simple Flash Help Needed (AS2)
Author: stiney51
Posted: Jul 02nd, 2:40pm
Activity: 9 replies, 57 views
Transformers
Author: Jacorre
Posted: Jun 29th, 6:33pm
Activity: 2 replies, 76 views
 Quick question about Jasc PaintShop Pro 9.
Author: Rydium-41
Posted: Jun 28th, 8:21pm
Activity: 2 replies, 76 views
I bought film today!!
Author: NikonErik
Posted: Jun 27th, 12:04am
Activity: 2 replies, 77 views
New Battle
Author: MoodsR4Cattle
Posted: Jun 26th, 6:28pm
Activity: 2 replies, 86 views
Image Loading
Author: funkyfela
Posted: Jun 22nd, 9:00pm
Activity: 1 replies, 85 views
Headshot Critique Please
Author: NikonErik
Posted: Jun 19th, 11:32pm
Activity: 6 replies, 155 views
 imagecopy() and imagecopyresized() problem
Author: thatpyrokid
Posted: Jun 18th, 3:05pm
Activity: 1 replies, 151 views
Problem With Regitration Code...?
Author: RXS
Posted: Jun 17th, 3:18am
Activity: 2 replies, 153 views
Topaz Labs do it again!
Author: Tamlin
Posted: Jun 17th, 12:08am
Activity: 5 replies, 231 views
[Photoshop] Anime Coloring Tutorial
Author: Wavechan
Posted: Jun 16th, 3:47pm
Activity: 2 replies, 293 views
--- Site Resources ---
Total Tutorials:212
Total Downloads:    415
Linkbase Links:

Design & Content © BioRUST 2009 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT
:: BIORUST AFFILIATES -->
DividerDividerDividerDivider