PDA

View Full Version : Combining several <? Include "link" ?> statements?


Xplorer4x4
11-04-2005, 09:27 AM
Ok I have several instanced os PSNews installed on my site due to the fact it is a very simple program that takes up roughly less then a MB per instance and as you see we have 6 instances on our site. We will probably upgrade to a better news script when we upgrade hosting next year.

As it is say I post something in Post 2-1 and the go to post something on Post5, well the post from 2-1 is still at the top of the list even though Post5 has the newer article.


<? include "http://www.xtremepain.net/news/post2-1/Data/topheadlines.txt" ?>
<? include "http://www.xtremepain.net/news/post2-2/Data/topheadlines.txt" ?>
<? include "http://www.xtremepain.net/news/post2-3/Data/topheadlines.txt" ?>
<? include "http://www.xtremepain.net/post3/Data/topheadlines.txt" ?>
<? include "http://www.xtremepain.net/post4/Data/topheadlines.txt" ?>
<? include "http://www.xtremepain.net/post5/Data/topheadlines.txt" ?>

I could use some major help with combining these so the latest post shows up on top.

I was thinking of something along the lines of:
<? include="<if condition=http://www.xtremepain.net/post4/Data/topheadlines.txt" AND "http://www.xtremepain.net/post4/Data/topheadlines.txt"> may work.

This is a major necessity to my site! Thank you so much to anyone that can help me !

Xplorer4x4
12-07-2005, 01:56 PM
Anyone?

Marco van Herwaarden
12-07-2005, 04:30 PM
Sorry but i don't have any clue on what you want to do.

Xplorer4x4
12-07-2005, 05:11 PM
Well I want to run 5 instances of PSNews. On my main website, the articles will show up in the order of the txt files.

Say I post something on Post2-1. Then something on post 5. Post 5 will remain at the bottom of the list where post5/Data/topheadlines.txt is.

I either need the articles to apear in order of of when they were posted, not in order of these text files.

Marco van Herwaarden
12-07-2005, 06:02 PM
Well without any knowledge of how PSNews works, it would be impossible to answer. My instincts tell me that in order to compair the post dates, they would have to be pulled by 1 script from 1 database.

Xplorer4x4
12-07-2005, 06:20 PM
I was affraid of that. The Main reason for so may diffrent instances is organazation.

HEADLINE_DIR => q?/public_html/Area51XP/post3/headlines?,
HEADLINE_URL => q?http://www.yoursite.net/Area51XP/post3/headlines?,


Above is two lines of config.php file. Well these two lines in paticular refer the program where to print the headlines to. Would it be possible to add an "AND" condition to make the file print to two diffrent headlines files?

On a diffrent note, I tried PHPNuke but it was to confusing. I could really use a bassic free catgorized news script but no one answers me when I ask for suggestions. :(

I am attemtping to set up one called Easy Content Managment. Not so easy. to configure it I need to set site.xml to read form a datbase which I have already set up using there installer file which sets up the tables and so forth. In site.xml it lists:
<database type="mysql">
<server>localhost</server>
<login>root</login>
<password></password>
<default>onews</default>
</database>


I can not seem to configure this properley. Should server be "localhost" and "osnews" be changes to the datbase name?