Topic: AP_News_Generator -> HELP!

Hello. I've just started to use PunBB former PhpBB user. I love this forum, have everything I need smile. But here is one thing, I can't get my AP_News_Generator to work, I've generated the news and so on, but my index.html seems to be empty, I also dont know how to get the index.html into another page?

I want it like this page, you enter the homepage, see the news, then can you choose forums in the links. How do I fix this? A guide with good explainations would be good since I'm pretty noobish on PHP (just started to learn).

Yours,
Blixmo

2

Re: AP_News_Generator -> HELP!

you have to include the generated text file

<? php include "path/to/your/newsfile.txt"; ?>

Re: AP_News_Generator -> HELP!

In other words you have to pull the generated page into your page by calling it as a include from within your index.html home page.

You can do it as a php include from within the HTML of your page, as per the example Wai gave, or as a regular server-side include, viz:

<!--#include virtual="forums/news.html" -->

However, you have to tell Apache that it should scan your index.html page for include statements or PHP code.

By default, Apache won't go looking into .html files for includes of any sort, or PHP code to execute, for that matter.

Do this via a .htaccess statement such as this (for a html file):

# Enable Server-Side Includes
AddHandler server-parsed .html
Options FollowSymLinks Includes

However be aware that this may slow down your site as now Apache will try and scan every html page it loads for include statements.

It may be better for you to just try to run your index page as a SSI page straight up - ie index.shtml - which Apache should already know to scan for include statements.
Or just rename your index page as index.php, and then pull in your newsfile.htm using the syntax Wai describes.

Re: AP_News_Generator -> HELP!

Ah, thanks smile