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
-this is the directory where your news script is
-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
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,
Total Posts: 1395
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
which would include the news script
I would suggest changing this to something like
then in the new index.php file if you look at the top of it about 4 lines down you'll see
$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.
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
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.