If you've wondered which of the addon scripts is driving the Latest Threads section on this site's home page, let me share it with you! I modified the topthreads.php script into latestthreads.php.
It can be found here! Again, if you find any bugs/issues/concerns, please let me know!
Fatal error: Failed opening required '/home/httpd/html/wwwthreads.com/php/main.inc.php' (include_path='.:/usr/local/lib/php') in /home/htdocs/vhosts/ubbdev.com/htdocs/threads/php/uploads/43365-latestthreads.php on line 66
are you running this on a page that has other addon scripts...? If so, comment out the line that includes main.inc.php / ubbt.inc.php and let me know if that works...
It looks like the latestthreads.php does not look where he is allowed to grab messages from and just goes through all the forums.
So it shows messages from private boards that are only accesible by moderators and administrators. (Which is ofcourse not the intention for a main guest page)
A quick and dirty fix is
// -------------------------- // Let's grab the news items $query = " SELECT B_Number,B_Posted,B_Last_Post,B_Username,B_Subject,B_Body,B_Main,B_Replies,B_Counter,B_Board, Bo_Read_Perm FROM w3t_Posts, w3t_Boards WHERE BO_Keyword = B_Board AND Bo_Read_Perm = '-1-2-3-4-' AND $qual AND B_Last_Post > '$date' ORDER BY $sort DESC LIMIT $totalthreads ";
$sth = $dbh -> do_query($query);
// ---------------------------
but probably it can be optimized.
But I would be like to be able to strip out all the images (so the HTML code) ... anyone knows a quick way to do this?
instead of equals ... now all forums were guests and registered normal members have access to are listed. Whenever you change the permissions of a forum you don't need to worry about the addon ... it follows.
A second small bug is the sort order when using full posts.
If you change it to
$sort = "B_Posted";
instead of B_Last_Post the output is correct, because B_Last_Post is changed for all posts of a thread when a post is added ...
I changed a few smaller things It's inspired on the good old UBB includes we had ...
In this version.
HTML is automaticly striped out in the body. -this caused problems if body was X characters and last charcter was in the middle of HTML code. -no huge images showing up on your include page and thus ruining your design
LANG file added. - language used in the code is replaced by variables
READ THREAD - added link for full thread even if "all" is selected.
USER INFO - added link to userinfo
REACT NOW - added a REPLY NOW so you can direct reply on a thread.
FORUMS SELECTED on READ PERMISSIONS - added a function so you can select wich forums are used based on the read access for the User Groups you have.
to be honest, my site died, and I'm in the process of rebuilding it... Allen might have the latest and greatest version... (I hope!! []/forum/images/icons/wink.gif[/])
I have an older one, I'll post it as soon as I get to work today, right now I have some major plumbing problems at my house []/forum/images/icons/tongue.gif[/]
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.