Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2011-01-25 20:37:47

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

forum

when I deleted a post from the front end it deleted just fine but now it show some crazy for posts in that topic (announcements) and the "last post by" is blank.

Offline

#2 2011-01-28 15:49:28

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: forum

Can you please explain in detail? So basically you delete a post (or topic?) from the forum frontend and then what happens?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2011-01-28 17:29:44

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

Re: forum

I deleted a topic from the frontend and it still shows 4 topics (should now only be 3) and under the posts is says there are 4294967295 and the last post by is blank

see here:
look at announcements

This is what showed up once I deleted the topic.

Offline

#4 2011-01-28 17:46:17

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: forum

Will check on my box. Delete a topic from the frontend and see what happens. Can you please email me ssh root access? (i see your site is slow and i wanna check
and see what the reason for this is. It shouldnt be slow).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2011-01-28 18:11:15

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: forum

Found the bug. Fixed in BETA4. If you want to fix before we release BETA4 please edit:
templates/your-template/extend/ajax/delete_post.plugin.php and search for this line:

if ($post['parent_id'] == '0') {

Remove following code:

               if ($post['parent_id'] == '0') {
                    $db->query("UPDATE #__user_activity
                                SET total_posts = total_posts-1
                                WHERE user_id = ".(int) $post['user_id']."
                                LIMIT 1");
                    $db->query("UPDATE #__forum
                                SET total_posts = total_posts-1
                                WHERE forum_id = ".(int) $post['forum_id']."
                                LIMIT 1");
                    $db->query("UPDATE #__forum_posts
                                SET total_replies = total_replies-1
                                WHERE post_id = ".(int) $post['parent_id']."
                                LIMIT 1");
                } else {
                    $db->query("UPDATE #__user_activity
                                SET total_topics = total_topics-1
                                WHERE user_id = ".(int) $post['user_id']."
                                LIMIT 1");
                    $db->query("UPDATE #__forum
                                SET total_topics = total_topics-1
                                WHERE forum_id = ".(int) $post['forum_id']."
                                LIMIT 1");
                }

with:

              if ($post['parent_id'] == '0') {
                    $db->query("UPDATE #__user_activity
                                SET total_topics = total_topics-1
                                WHERE user_id = ".(int) $post['user_id']."
                                LIMIT 1");
                    $db->query("UPDATE #__forum
                                SET total_topics = total_topics-1
                                WHERE forum_id = ".(int) $post['forum_id']."
                                LIMIT 1");
                } else {
                    $db->query("UPDATE #__user_activity
                                SET total_posts = total_posts-1
                                WHERE user_id = ".(int) $post['user_id']."
                                LIMIT 1");
                    $db->query("UPDATE #__forum
                                SET total_posts = total_posts-1
                                WHERE forum_id = ".(int) $post['forum_id']."
                                LIMIT 1");
                    $db->query("UPDATE #__forum_posts
                                SET total_replies = total_replies-1
                                WHERE post_id = ".(int) $post['parent_id']."
                                LIMIT 1");
                }

Let me know if this fixes the problem for you (worked for me on my box).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB