The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Simple hack to inject javascript to first post in thread?
I have a script block I want to include in the textual body of the first post of a thread. Actually I may want the first post of page N of a thread, so the same script gets injected to the first post on each page of the thread.
I have read and understand a hack for repeating the first post on every page of the thread, so I understand in general where to hook in. What I don't understand is how to manipulate the body of that first post. If I do something like Code:
if ($post['postid'] == $thread['firstpostid']) { $post['pagetext'] = 'My Script Goes Here' . $post['pagetext']; } This makes me thing I should be mucking with $post['pagetext_html'], but if I try to append to that value then ALL I get in the post body is my script text. Obviously I'm doing something wrong. Any tip on if pagetext_html is in fact what I should be touching, and what hook I can safely modify its value in? Thanks! -Adrian the newbie |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|