The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
PHP include within postbit
I know that I can't include php in the templates (other than header and footer).
I need to include additional information for each user with each post. Example: When a user posts, I need it to say: Posts: 1245 (normal) Comments: 346 (new custom) Classified Ads: 2 (new custom) These values are calculated for each user. (I already have the php code for this) I'm currently moving from phpbb to vB .. and I have always had this working with phpBB .. now I need to make it work for vB. So .. I tried editting the postbit template to spit out a custom variable .. and then I tried setting this variable in the showthread.php file .. but I am not having any luck. Can anyone help me out here? .. or point me in the right direction? I know php really well .. I'm just not sure where the best place is to put the code and make it work in the vB template system. This is my first time messing around in vB. Thanks in advance! I just read the announcement in this forum. Sorry ... I guess I posted in the wrong place. Can someone please move this to General vBulletin questions for me? |
#2
|
||||
|
||||
Anyone?
|
#3
|
||||
|
||||
Have you tried a left join in showthread.php where it handles grabbing the information for the postbit?
|
#4
|
||||
|
||||
Quote:
I just need to know where to put this code .. how to set a template variable in postbit .. and then display the value that I need to display. I figured this would be a fairly common thing to do. Its so easy in phpbb .. I'm sure its pretty simple in vB too .. I just wanted to make sure I was doing it right, without hacking the vB code too much. |
#5
|
||||
|
||||
you can put the codes in includes/showthread.php, and call those vars in postbit(_lagacy) template.
|
#6
|
|||
|
|||
hello,
I need this only to include a webservice when viewing a user profile. Where can I include PHP script and use it ? Regards |
#7
|
|||
|
|||
Has anyone figured out how to call a PHP fumction in the postbit template?
The php code is in teh php includes file and I was trying a call like: phpadsraw1 Thanx, Mike |
#8
|
|||
|
|||
There is no way to execute PHP in a template. You should place it in a plugin.
|
#9
|
|||
|
|||
You can call a php include function through a $variable in a template I beleive.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|