View Full Version : Hooks, plugins?
Muazam
04-24-2011, 12:44 PM
I want to insert a PHP script right below these two in the "postbit_legacy" template.
<div id="post_message_{vb:raw post.postid}">
<blockquote class="postcontent restore ">
But, I don't know how. Anyone has any idea how?
Edit: I tried this:
http://img851.imageshack.us/img851/9170/test321.jpg
Probably wrong, I got a lot of errors.
Thanks!
Lynne
04-24-2011, 04:17 PM
What do you mean you want to enter a php script there? Templates are for html - you don't put php in a template. You may run a script in the plugin and then put the output into a variable and then put the variable into the template. Can you tell us a bit more about what you are trying to do?
Muazam
04-24-2011, 06:39 PM
What do you mean you want to enter a php script there? Templates are for html - you don't put php in a template. You may run a script in the plugin and then put the output into a variable and then put the variable into the template. Can you tell us a bit more about what you are trying to do?
I'm trying to insert a PHP script in users posts.
Php script:
The PHP script basically reads a random line from a .txt file and print it out.
Thanks for replying, any idea how to get this done?
Lynne
04-24-2011, 09:11 PM
You will need to write a plugin to read the php script and then put the random line into a variable. Then preregister the variable for use in that specific template. And then put the variable into the template.
This exact thing has actually been covered quite a few times if you try a search.
Muazam
04-25-2011, 09:11 PM
You will need to write a plugin to read the php script and then put the random line into a variable. Then preregister the variable for use in that specific template. And then put the variable into the template.
This exact thing has actually been covered quite a few times if you try a search.
I did try search, I'm not even sure what Is should search after.
Lynne
04-25-2011, 10:24 PM
Here's an article on it, but there have also been threads about it - https://vborg.vbsupport.ru/showthread.php?t=242454
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.