![]() |
thanks btw
|
The code in your showthread.php is wrong - it is not needed.
What you need to do is add an extra line that does a query on your database to call up those variables in showthread.php (ie. does the opposite of the write query in newthread). You cannot get those variables without a db query unfortunately. Once you have called those variables, you don't need the code you have in the first post for showthread.php. The $thread['trader_trade'] variable will automatically work in your template - no need to specify it - but you must add a db query first. |
Something like:
$trader = $DB_site->query_first("SELECT trader_price,trader_shipping,trader_payment,trader _man,trader_trade,trader_condi tion,trader_age FROM thread WHERE XXX"); Replace XXX with whatever condition you want... Then use the variable $trader[trader_price] in your templates. |
I tried this:
PHP Code:
|
I'm guessing this actually needs to go somewhere in functions.php possibly. Anyone got any ideas?
|
What do you want it to do???
If you want to display variables in the postbit, yes you need to put that in functions.php. Bear in mind that it will increase your server load by adding 1 query FOR EACH POST in a thread that you show, so if someone is showing a thread with 40 posts, that is 40 EXTRA queries on top of the normal showthread queries. |
I'm only wanting it to show up on the first postbit, and I'm only calling them in the first postbit. Not sure if that matters.
Well, I entered the code: PHP Code:
|
I guess I'm asking which function does this query go under and if have this correct:
PHP Code:
|
bumper
|
All times are GMT. The time now is 01:45 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|