Then you can use $vbulletin->GPC['threadid'] or assign another variable to that value. example:
PHP Code:
$thread_id_inj = $vbulletin->GPC['threadid'];
Then, use query_first instead of query_readsince you are only expecting one result. Then you don't have to do a fetch_array (which you didn't do which is why it isn't working).
And don't echo. Assign the result to a variable and then insert the variable into the template where you want it.
You may have issues just using the pagetext as is (I can't remember). Perhaps use stripslashes or similar after you get it from the database.
i was only doing the styleid while testing it in our dev template so our users wouldn't receive any errors while i screwed around.
the echo thing was just to see some quick output before putting it in a variable for real testing. i think i was staring at the screen too when i posted that too so that didn't help. lol
anyway, thanks to your help, i finally got it done. it went from a quick query to adding a bunch of little things to make it work good. like limiting it to 30 words, removing line breaks, quotes and all that other stuff.
i'll test this for a bit to make sure it's working well and then i'll post it so if someone else wants to do the same they can.