Previous Thread
Next Thread
Print Thread
Hop To
Joined: Feb 2005
Posts: 11
J
stranger
stranger
J Offline
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?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
What version are you currently running? Can you give a URL to your forums?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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?

Joined: Jul 2004
Posts: 87
J
journeyman
journeyman
J Offline
Joined: Jul 2004
Posts: 87
Via Admin section - can I force the latest posts to display?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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:

Code
<?

// 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.
Joined: Apr 2006
Posts: 116
F
member
member
F Offline
Joined: Apr 2006
Posts: 116
There is something wrong with it...maybe something has been pasted twice?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Yeah, my copy and paste didn't quite copy and paste properly. Edited and fixed.

Joined: Jul 2004
Posts: 87
J
journeyman
journeyman
J Offline
Joined: Jul 2004
Posts: 87
Yikes - being a total dunce - I have no idea what to do with this script!!!????

Joined: Apr 2006
Posts: 116
F
member
member
F Offline
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?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
2 members (Ruben, 1 invisible), 422 guests, and 169 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)