Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 24 Apr 2011, 13:44
Muazam Muazam is offline
 
Join Date: Mar 2010
Hooks, plugins?

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:


Probably wrong, I got a lot of errors.

Thanks!

Last edited by Muazam; 24 Apr 2011 at 14:07.
Reply With Quote
  #2  
Old 24 Apr 2011, 17:17
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 24 Apr 2011, 19:39
Muazam Muazam is offline
 
Join Date: Mar 2010
Originally Posted by Lynne View Post
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?
Reply With Quote
  #4  
Old 24 Apr 2011, 22:11
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 25 Apr 2011, 22:11
Muazam Muazam is offline
 
Join Date: Mar 2010
Originally Posted by Lynne View Post
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.
Reply With Quote
  #6  
Old 25 Apr 2011, 23:24
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Here's an article on it, but there have also been threads about it - http://www.vbulletin.org/forum/showthread.php?t=242454
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:46.

Layout Options | Width: Wide Color: