Log in

View Full Version : Call Thread Author in SHOWTHREAD template


Triky
03-30-2007, 09:14 AM
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.