First of congratulations on creating the ultimate news script, i've been looking for one for ages with categories and an option to include just news from a selected category, so many thanks network-13.
Right im having problems with the ajax comments thing and when you click profile it comes up page not found i think its something to do with my file paths
The directory structure of my site is as follows
-vyb308
-images
-news
-index.php
-this is the directory where your news script is
-about.php
-contact.php
-main.php *This is the file where I include("news/index.php");
-index.php *this file includes("main.php");
Its kind of hard to explain but I hope you understand I have a php navigation system on my index.php page so this includes main.php when index.php?id=main so the main.php file actually includes news/index.php
But to get the news to display I have to use the whole url in the include as follows: <?php
include "http://www.vyb3.co.uk/vyb308/news/index.php";
?>
If you check out my website http://www.vyb3.co.uk/vyb308/index.php you will see my newspost try and click comments and profile, you will see what I mean,
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
Hi Vyb3,
I've made a few changes for you to try that are included in this file. Simply grab that file and replace the exising index.php for the news script with that new one.
One thing you'll need to change though is, at the moment your nav system is using &id as the main variable, unfortunately this is also a variable the script uses. To prevent this causing problems what I suggest you do is change your nav system to use another variable, for example at the moment you have
Code:
id=main
which would include the news script
I would suggest changing this to something like
Code:
page=main
then in the new index.php file if you look at the top of it about 4 lines down you'll see
Code:
$lprefix = "page=main&";
If you chose to use &page instead of &id then leave this as is, otherwise change it to whichever variable you chose.
Hello, thanks for the reply and the support, I have uploaded your altered copy of the index file and changed the variable in my site navigation to page and to no avail.
http://www.vyb3.co.uk/vyb308/index.php?page=main
just a quick question say if i wanted to include the news from a certain category on say page=articles would this sort of system work still?
I tried changing the include to news/index.php instead of the full url, now when i click comments i get a page come up with this error
Quote:
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/news/index.php on line 13
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/news/index.php on line 13
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/news/index.php on line 14
Fatal error: Call to undefined function slash2() in /home/fhlinux159/v/vyb3.co.uk/user/htdocs/vyb308/news/index.php on line 183
At least this is progress though before nothing came up.