![]() |
php replacement variables
I have a php file working in mo forum and i have a lot of styles. My problem is this php file is calling a template but i have to edit the php file to change background color so it causes a problem with differet styles.
here is the code inside the php file. Code:
################################################## ######################### |
What you would need to do is instead of hard coding the HTML into the script, make a new template, and call it from the script. In the template, you can put the replacement variables (to see which exactly, check out other templates that have same colors).
|
I am not really good in coding how can i do that ? can you explain a little more bit ?
|
To call a template, use this:
$var = fetch_template('template_name'); In the template, you can use template variables. To find out, which variables work, go into your admincp, open the style you need, the go to "style variables". It will open a list of colors, size, etc. If you hover your mouse over a table row with a thing you need, it will popup a variable name in a tooltip - something like $stylevar['something']. EDIT Sorry, there are no color variables. To apply the colors etc., use classes. To see which classes have what, go to the CSS part of the template (Style manager -> CSS table). And then just use "class='classuneed'" in HTML. |
Is it possible to give you an example what kind of template i need to create ?
$var = fetch_template('adv_portal_shoutbox1'); and then what do i have to edit in adv_portal_shoutbox1 template ? <body class="tcat"> will this be enough or something else ? |
Depends on your objectives.
|
if i use alt1 for example is the total code i will enter the template will be ?
<body class="alt1"> </body> or do i have to add something more ? |
If you only add <body class="alt1"> </body> to your template, then you can count your template empty - you have nothing except for tags...
|
Quote:
|
Quote:
i would avoid putting it in the body declaration. Its a bit too global for my tastes. It would help if you could specify exactly what you were trying to do though. HTH's |
All times are GMT. The time now is 04:31 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|