vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Kill first post in showthread.php (https://vborg.vbsupport.ru/showthread.php?t=81404)

Logikos 05-13-2005 12:21 AM

Kill first post in showthread.php
 
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

Quote:

Originally Posted by Paul M
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.

PHP Code:

if ($post['visible'] == 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

Quote:

Originally Posted by Live Wire
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. :)


All times are GMT. The time now is 08:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02814 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete