View Full Version : Kill first post in showthread.php
Logikos
05-13-2005, 12:21 AM
Any advice on what i can do to stop the first post from showing?
Paul M
05-13-2005, 12:39 AM
Set it's visible property to zero ? (I can't remember if they have one, and cannot check from where I am).
AN-net
05-13-2005, 01:07 AM
well when grabbing the posts for the thread tell it in the where query not to grab the first post. the first post id is defined in the thread table;)
Paul M
05-13-2005, 01:15 AM
Perhaps if you elaborated - do you mean not show it for all topics dynamically, for just one topic, or just hide all old first posts ?.
Logikos
05-13-2005, 01:16 AM
Set it's visible property to zero ? (I can't remember if they have one, and cannot check from where I am).
So heres my theroy. When a user clicks on the thread it will open the showthread.php file so im using this query.
$post['postid'] variable is the id of the first post.
$foruminfo['killfirstpost'] == 1 is picking which forum to do this at.
if ($post['visible'] == 1 AND $foruminfo['killfirstpost']==1)
{
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "post
SET visible = '0'
WHERE postid = '". $post['postid']."')
");
}
But its not working and i don't want to have to run a update query everytime showthread opens in that forum.
Paul M
05-13-2005, 01:21 AM
The answer depends on what you are trying to achieve and why.
Logikos
05-13-2005, 01:32 AM
I told you want i'm trying to achive. I'm trying to stop the first post from showing up on the forums that i select. Why isn't really relevant. I'll figure it out...
Paul M
05-13-2005, 01:36 AM
Gee, sorry I asked. I'll leave you too it.
Logikos
05-13-2005, 01:42 AM
I figured it out, what i did it add the query when a user makes a new thread and i made a quick script to update all firstpost ids in my forum to set it to 0. Thanks Paul M, didn't know there was a visable row in the post table. I was just getting fustruated at the code, didn't mean to sound rude.
Paul M
05-13-2005, 01:43 AM
I figured it out, what i did it add the query when a user makes a new thread and i made a quick script to update all firstpost ids in my forum to set it to 0. Thanks Paul M, didn't know there was a visable row in the post table. I was just getting fustruated at the code, didn't mean to sound rude.No problem, we all get frustrated when things don't work. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.