vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Call Thread Author in SHOWTHREAD template (https://vborg.vbsupport.ru/showthread.php?t=143585)

Triky 03-30-2007 09:14 AM

Call Thread Author in SHOWTHREAD template
 
How can I call the user thread author into the SHOWTHREAD template?
For call the thread title I've used $thread[title], and it works. But if I use $thread[musername], it doesn't show anything. Can you help me, please?

Marco van Herwaarden 03-30-2007 09:37 AM

try using $thread[postusername]

Triky 03-30-2007 10:00 AM

Thanks, it works!

I need also to put the selected thread icon into the SHOWTHREAD template. Can you help me? :)

TECK 03-30-2007 04:49 PM

Tricky, make me a favor and look into showthread.php file to understand why $thread['postusername'] works. You will get your answer instantly for any thread table field, if you look into the file.
Hint: Search for postusername

Thanks and let me welcome you to the community. :)

Triky 04-02-2007 07:22 AM

Thanks. But there I find all the fields I can use. And if I want use a field that isn't listed in the showthread.php file code?

For example, I need to call the current thread rating, with the images, in my SHOWTHREAD template. I have tried to search into the showthread.php file code, but I've found only this: $show[threadrating].. and it show just a number: "1". I don't know why.

TECK 04-02-2007 12:33 PM

Open /install/mysql-schema.php (line 1679), all thread fields are listed there.
To see what is the actual result, insert into showthread_post_start hook a var_dump(), so you see what it will be spit as data.

Example:
var_dump($thread['iconid']);
This will return the icon id you are using. Then, all you have to do is instert into your template the html related code to display the image.


All times are GMT. The time now is 02:17 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.01002 seconds
  • Memory Usage 1,711KB
  • 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)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