01-19-2005 04:31 AM by SrNupsen
On this page... (hide)
OK, so you've installed Coranto, logged in and are now at the main page. Eager to start posting? Let's begin by clicking "Submit news". This will bring up the "Submit news" page (wow!), and for exercise purposes, try filling out the fields with anything you like. Then click "Submit" at the bottom of the page. Your item will be added to the news database (if you don't trust me, click "Modify news" and you'll see your item appearing in the list). Next question: How do you make it appear on your site?
When Coranto builds news, it generates text files. To display your news, you need to include these files one way or another. You actually have at least two options: SSI (Server Side Includes) or PHP:
SSI: To do this, the HTML document you're working in must have the extension .shtml, for instance index.shtml. In the file index.shtml where you want your news to appear, insert the following command:
Note that where I've put news.txt, you need to put the RELATIVE path to the file news.txt. If this file is in the same directory as the file index.shtml, you can go with my example. If you keep your news in, say, a subdirectory called "news", the following would be correct
PHP: In this case, your HTML file must have the extension .php, for instance index.php. Somewhere in your file, insert the command:
<?php include("news.txt"); ?>
As above, if your news.txt in in the same directory as index.php, then the above example is sufficiant. Now the PHP include command accepts both ABSOLUTE paths and URLs. This means that you can either provide the absolute path to the file news.txt:
<?php include("/home/www/mysite/news/news.txt"); ?>
(Note: Just an example!)
or you can provide the full URL:
<?php include("h**p://www.mysite.com/news/news.txt"); ?>
If you can't get this to work, there are comprehensive help available in the forums. Do a search and see what you can find, and when you have also triple-checked your paths, you are welcome to post a question about it.
You may freely distribute this text, provided that the information header at the top is left intact. Neither the author of this document nor the makers of any part of Coranto shall be held responsible for any damage caused by following (or not following) the instructions in this article.