vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=327976

using PHP in templates
by Dr.CustUmz
01 May 2020 16:24

ok I have been out of the scene for a LONG time, I'm working on a new product, and im just having a huge brain fart.

Im trying to use php in a template I have created what I want to convert to a product in PHP, an example of my source is


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I know I cant use php in a template of a product, but what I cant remember is how to create a variable that would equal the php so i can pull that into the template.

Im brain farting so hard.

Global Plugin:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Template

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Dave 01 May 2020 17:00

That would only work if the variables were evaluated to PHP code, but they are not.
In vBulletin, they would loop in a PHP script and then call the template that would contain:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To render what is needed.

Dr.CustUmz 01 May 2020 17:14

scratch this, my brain un farted lol. Im going about this wrong, i need to create a plugin with this PHP/HTML in it, and give that the variable, then use that variable in the template..... if that makes sence


All times are GMT. The time now is 15:48.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.