vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How can i get the first post only? (https://vborg.vbsupport.ru/showthread.php?t=184174)

Dismounted 07-04-2008 03:55 AM

What are you trying to do there? Why are you assigning the thread id to pagetext? Please explain what you want to do.

vietdjclub 07-04-2008 04:34 AM

Quote:

Originally Posted by Dismounted (Post 1566438)
What are you trying to do there? Why are you assigning the thread id to pagetext? Please explain what you want to do.

thank for your reply.

my plan for the mod:

step 1: run query to get 10 threadid from thread table
step 2: auto create 1 new thread on the special forum, with 10 threadid that i got from step 1

ex:

step 1: after query i got threadid = 1,2,3,4,5,6,7,8,9,10
step 2: one new thread auto open on the special forum = 3
step 3: then put 1,2,3,4,5,6,7,8,9,10 on the new thread on step 2


please help me. thank again

Blindspot 07-04-2008 05:07 AM

even easier
PHP Code:

$postinfo fetch_postinfo($thread['firstpostid']); 

and if you dont have $thread

PHP Code:

$threadinfofetch_postinfo($threadid);
$postinfo fetch_postinfo($threadinfo['firstpostid']); 


vietdjclub 07-04-2008 09:31 AM

finally i found how to do it. thank for support

Opserty 07-04-2008 09:45 AM

Quote:

Originally Posted by Blindspot (Post 1566503)
even easier
PHP Code:

$postinfo fetch_postinfo($thread['firstpostid']); 

and if you dont have $thread

PHP Code:

$threadinfofetch_postinfo($threadid);
$postinfo fetch_postinfo($threadinfo['firstpostid']); 


Using that method you'd be using two queries, when you can cover it in a single query with a JOIN.

vietdjclub 07-04-2008 02:20 PM

exactly as Opserty said. I use JOIN

vietdjclub 07-08-2008 08:23 AM

1 Attachment(s)
Thank friends for helping me . i just finished my mod on yesterday
mod: Auto Top 10 Threads - Auto run very month

some pics for the mod (setting & Result)


All times are GMT. The time now is 02:06 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.01621 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete