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.
Pages: 1
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
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
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
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
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
Pages: 1