Idea rolls off a quick question...

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Idea rolls off a quick question...

Postby thegametb » Mon Dec 26, 2005 7:38 am

I am currently using the PHP include method to parse the CGI code in to PHP. I was wondering within the same PHP page, is it possible to actually have other data?

Maybe do something similar to an If/Else statement? To put it as best as I could in to words, if someone goes to the page.php hyper link throughout the site, I want them to view the static data on the page.php. On the other side of the coin, if they go to a Coranto generated news article that would lead to something similar to page.php?id=EEFJFSjdjFskjhff, it would show that instead of the static data.

I was thinking if an If/Else statement that could either include the parsed Coranto news articles or parse an external TXT page with the static data. Does any of this make sense?

I could be using the wrong concept in PHP and I know there's much more to something like this, but If/Else made sense explaining it in words. Sadly, I've only found tutorials using numerical values and nothing close to what I'd use it for.

Thanks and Happy Holidays to everyone.
User avatar
Posts: 109
Joined: Mon Jul 05, 2004 11:38 am

Postby bozoka45 » Mon Dec 26, 2005 7:47 am

Like a viewnews but in PHP?
User avatar
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby thegametb » Mon Dec 26, 2005 8:02 am

Yeah, I used Parahead's parsing PHP method, which changed the viewnews.cgi to viewnews.php. Anyways, this is the code I drew up and it seems to work as desired.

Code: Select all

if ($_GET['id']) {
} else {


If you go to, you can see the end result if you click the link in the QUICK ARCHIVE section (bottom-right). That is where the generated Coranto articles will show up (atleast the most recent ones) and the 'Role Play' mouse over (roleplay.php) basically parses the sample.php in to roleplay.php. In the near future I will remove the archives.php and use roleplay.php as my archives section.

I wrote it up to parse the Coranto generated articles as it originally did. Now it also is a filler page. This basically removed the default message the CGI gave you when you had no 'ID' value after viewnews.cgi. I don't know if anyone has done this yet, but I can find many uses for this method.

A great, but generic idea for this use would to have a complete archive of your news as page.php and also use the same page.php to parse the Coranto articles.

It's my recycling method. Simple, but effective.
User avatar
Posts: 109
Joined: Mon Jul 05, 2004 11:38 am

Return to Customization

Who is online

Users browsing this forum: No registered users and 3 guests