vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to find 1st post in a thread (https://vborg.vbsupport.ru/showthread.php?t=237933)

Thr33 03-10-2010 11:50 AM

How to find 1st post in a thread
 
Im trying to code an action into just the original post of a thread but not in replies. So for a new thread it will do something, but when replying in that thread it does something else. Ive been looking through similar related topics but can only find code written in older versions of vbulletin.

Example (in functions_newpost.php)
PHP Code:

if $postinfo['postid'] == 

This is Vbulletin 3.5 for finding the first post in a thread, but it dosnt work in Vbulletin 4.0+

Can anyone help?

Lynne 03-10-2010 01:45 PM

Are you using a plugin for this? If so, what hook location? Or are you wanting to do a condition in a template? If so, what template. We really need as many details as possible in order to help.

Andy 03-11-2010 04:14 AM

Quote:

Originally Posted by TopFloorDjs (Post 2000839)
Im trying to code an action into just the original post of a thread but not in replies.

Please be more specific.

Thr33 03-14-2010 01:48 AM

It dosnt matter now i worked it out..

PHP Code:

if ($type == 'thread'

(TOPIC CLOSED)


All times are GMT. The time now is 11:45 PM.

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.01376 seconds
  • Memory Usage 1,718KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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