vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Show Thread Query (https://vborg.vbsupport.ru/showthread.php?t=125866)

rogersnm 09-05-2006 03:17 PM

Show Thread Query
 
I have this code in a plugin with the location showthread_getinfo, all the columns are valid for the query:
PHP Code:

$threadfieldvalues $vbulletin->db->query_read("
            SELECT thread.field1 AS field1, thread.field2 AS field2, thread.field3 AS field3, thread.field4 AS field4, thread.field5 AS field5, thread.field6 AS field6,         thread.field7 AS field7, thread.field8 AS field8, thread.field9 AS field9, thread.field10 AS field10, thread.field11 AS field11, thread.field12 AS field12,     thread.field13 AS field13, thread.field14 AS field14, thread.field15 AS field15
            FROM " 
TABLE_PREFIX "thread
            WHERE thread.threadid = " 
$thread['threadid']
        );
        
        while (
$value $vbulletin->db->fetch_array($threadfieldvalues))
        {
        
$thread['field1'] = $value['field1'];
        
$thread['field2'] = $value['field2'];
        
$thread['field3'] = $value['field3'];
        
$thread['field4'] = $value['field4'];
        
$thread['field5'] = $value['field5'];
        
$thread['field6'] = $value['field6'];
        
$thread['field7'] = $value['field7'];
        
$thread['field8'] = $value['field8'];
        
$thread['field9'] = $value['field9'];
        
$thread['field10'] = $value['field10'];
        
$thread['field11'] = $value['field11'];
        
$thread['field12'] = $value['field12'];
        
$thread['field13'] = $value['field13'];
        
$thread['field14'] = $value['field14'];
        
$thread['field15'] = $value['field15'];
        } 

But then i put $thread[fieldx] in the postbit template it doesn't work. Any Ideas?

Ntfu2 09-05-2006 04:26 PM

try $post[fieldx] inside postbit

rogersnm 09-05-2006 04:28 PM

no that won't work because that stores as $thread[fieldx] and that's for user fields this is an extra thread field.

Kirk Y 09-05-2006 08:41 PM

Wouldn't this only show up on the Showthread template then?

rogersnm 09-06-2006 04:50 PM

It's the same file. Unless you un-set the variables then it would work in the postbit.

Kirk Y 09-06-2006 06:33 PM

Ah yes, true.


All times are GMT. The time now is 09:24 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.00960 seconds
  • Memory Usage 1,730KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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