CuteNews

Welcome Guest ( Log In | Register )

> [FAQ][INSTALL] A Basic Site With Cutenews Tutorial, Where to use the php include method
dubster
post Sep 2 2004, 10:23 PM
Post #1


Don't pet the sweaty things.
***

Group: Support
Posts: 1,004
Joined: 23-July 04
From: Near London, UK
Member No.: 369



OK, for starters, make a new page in Dreamweaver or whatever web design program you prefer.

Add a table, 1 row x 2 columns (2 boxes - left & right)

Align the table center or left, depending what you want to go for.

In the left cell, put a new table, 1 column wide, 5 rows high. This will be your nav bar.

In that 5 high table you made, write each page name in a cell of it's own, (home, news, sport, blog, guestbook for example) in the "url" box for each one, write the name of the page it's going to link to (index.php, news.php, sport.php etc)

Now save that page as index.php & make 4 copies of it, renaming the copies to suit. (index.php, news.php, sport.php etc)

Index will be your main entry page, so put relevant info in the right hand cell of that page.

news.php will be your main cutenews page, so in the right cell place the standard include code from the readme, making sure you're in code input mode, not wysiwyg!!
CODE
<?PHP
include("path/to/show_news.php");
?>


In all other pages, just place your content in the right cell, or if it's a php guestbook, you can use the same include code from CuteNews, but pointing at the guestbook script instead, like this for example:
include("../guestbook/index.php");

This system is REALLY basic, but it'll get you up & running, you can make it look pretty once it works properly!!
In the CuteNews zip file you download you have example.php and example2.php which are pretty much a demo for this tutorial.


Hope that's given you some ideas.
Dubs'


--------------------
You don't have to work here to help, but it's mad!



Come visit - http://dubster.co.uk or even http://myspace.com/jaydubster
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 24th May 2013 - 12:24 PM