View Full Version : No news displayed
I have just installed EP-Dev Forum News. My forum is running on phpBB 2.0.22. My forum site is 'http://www.divine-chaos.org/phpBB2/'
i am trying to display news from 'http://www.divine-chaos.org/phpBB2/viewforum.php?f=2'
the absolute path is '/var/www/htdocs/forum_news/'
cache time is set to '0'
the code generated is:
<?php include_once("/var/www/htdocs/forum_news/news.php");
$forum_obj = new EP_Dev_Forum_News();
$forum_obj->display_News("3", "2", "0", "0"); ?>
there is no error message but no news displays
when i look at the source code for the test page it says 'No posts found in selected forum category.' and then stops executing the rest of the page i.e. it does not include the footer.
Any help would be greatly appreciated.
Thanks
Patrick
04-29-2007, 07:08 PM
The error "No posts found in selected forum category." is thrown when the query that is being used has not returned any rows (any forum posts).
The first thing you should do is double check that the phpBB 2 forum type is selection as your news source in the ep-dev forum news admin panel. Also double check your table prefix (on the same news sources page) and ensure that it matches your forum's database table prefix. If you have no idea what your table prefix is, you can check by looking at the config.php file in your FORUM's folder (the configuration file for your phpbb2 forum).
If you have confirmed that you have phpBB 2 selected and that you are using the correct prefix, I will need a copy of the structure of your database table 'topics' (which may have a prefix) as obviously something is different. If you have no idea how to do this, let me know and I can either post instructions or you can PM me some FTP / control panel info and I can look at it myself.
Patrick
04-29-2007, 11:46 PM
I have looked at the details of your database and they seem to be standard.
Are you sure that you are connecting to the correct phpbb 2 database? I am out of explanations. The only thing you can do now is debug.
In the EP-Dev Forum News script folder open classes/sources/Forum/phpBB2.php .
Find:
// error if no posts
if (!$this->DB->rows())
{
$this->ERROR->go("no_posts_found");
return false;
}
And before it place:
var_dump($this->DB->debug());
Then visit your script and post the output here (you may have to view the html source of your webpage). The above code will output the queries that have been executed against the database. You can then run those queries yourself to see if you get any results. If you get results while the script is not, it is safe to assume you are accessing the wrong database.
I found the problem and now have the EP-Dev Forum News working properly.
The problem was in the mysql user permissions for the phpBB_ database.
Sorry for wasting your time for such a simple error on my part.
Your script works great and saved a lot of time and coding on my end.
Again, thank you very much both for the script and your time and assistance
Powered by vBulletin™ Version 4.0.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.