|
#46478
04/26/2006 1:46 PM
|
Joined: Feb 2005
Posts: 11
stranger
|
stranger
Joined: Feb 2005
Posts: 11 |
Approved posts are displaying fine but in the MAIN VIEW where all Discussion Topics are listed the LAST POST is not updating.
Any ideas anyone - thanks?
|
|
|
#46479
04/26/2006 2:09 PM
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
What version are you currently running? Can you give a URL to your forums?
|
|
|
#46480
04/26/2006 4:25 PM
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
It looks like you have all posts being moderated. I know there are a couple of bugs in the current version with this where it doesn't update properly. How are you approving these posts? In the admin section or within the post itself?
|
|
|
#46481
04/30/2006 7:23 AM
|
Joined: Jul 2004
Posts: 87
journeyman
|
journeyman
Joined: Jul 2004
Posts: 87 |
Via Admin section - can I force the latest posts to display?
|
|
|
#46482
04/30/2006 11:07 AM
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
There is nothing in the admin section to fix this by default. Since this is a bug though I wrote up a quick script that you can place in your admin section and call when you need to do so:
<?
// Require the library
require ("../includes/main.inc.php");
require ("$thispath/languages/{$myprefs['language']}/admin/generic.php");
$query = "
SELECT Bo_Keyword
FROM {$config['tbprefix']}Boards
";
$sth = $dbh->do_query($query);
while(list($board) = $dbh->fetch_array($sth)) {
$board_q = addslashes($board);
$query = "
SELECT B_Number,B_Main,B_Posterid,B_Posted
FROM {$config['tbprefix']}Posts
WHERE B_Board='$board_q'
AND B_Topic='1'
ORDER BY B_Posted DESC
LIMIT 1
";
$sti = $dbh->do_query($query);
list($blastnum,$bnum,$blastposterid,$blast) = $dbh->fetch_array($sti);
$query = "
UPDATE {$config['tbprefix']}Boards
SET Bo_LastNumber='$blastnum',
Bo_LastMain = '$bnum',
Bo_Posterid = '$blastposterid',
Bo_Last='$blast'
WHERE Bo_Keyword='$board_q'
";
$dbh->do_query($query);
echo "Fixing Board ID $board_q<br>";
}
echo "Done";
Last edited by Rick Baker; 04/30/2006 4:42 PM.
|
|
|
#46483
04/30/2006 2:54 PM
|
Joined: Apr 2006
Posts: 116
member
|
member
Joined: Apr 2006
Posts: 116 |
There is something wrong with it...maybe something has been pasted twice?
|
|
|
#46484
04/30/2006 4:43 PM
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Yeah, my copy and paste didn't quite copy and paste properly. Edited and fixed.
|
|
|
#46485
04/30/2006 4:53 PM
|
Joined: Jul 2004
Posts: 87
journeyman
|
journeyman
Joined: Jul 2004
Posts: 87 |
Yikes - being a total dunce - I have no idea what to do with this script!!!????
|
|
|
#46486
04/30/2006 5:04 PM
|
Joined: Apr 2006
Posts: 116
member
|
member
Joined: Apr 2006
Posts: 116 |
I am as well not sure what it is for. Do you need to run it everytime someone makes a new post?
Anyway, on the same note,[ ubbthreads view ], when forum is moderated should admin be able to see the last post in the last post column as (NA) nameofthepost or just the last approved post and the amount of unread posts in the forum IF it is enabled from the CP?
|
|
|
#46487
04/30/2006 10:01 PM
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
This script could be used if your last post column gets out of whack. Under normal, non moderated, forums this isn't the case, but in the current version there are a couple problems on fully moderated forums where the last post doesn't get updated properly. It's not a great solution, the actual bugs should be fixed instead. Just been feverishly working on the new version to ensure we have it out and ready on time.
We used to show the actual non approved post on the ubbthreads view along with total number of unapproved but the extra queries required were quite a drain so that was pulled out.
|
|
|
2 members (Ruben, 1 invisible),
422
guests, and
169
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|
|