Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
Converting the Templates to PHP?
I want to convert my templates to PHP, for a feature that I'm making. You see, the theme url is 'blue.php', and it has a few things which are PHP in it.
What, you ask? Well, this is the code in between the head tags: PHP Code:
Code:
templates/blue/blue.php<?php echo $stylesheet ?>.css |
#2
|
|||
|
|||
RE: Converting the Templates to PHP?
You won't be able to run PHP from the .html template file. The system doesn't work like that. What you can try is make a new template variable, such as :MYCODE: and place that in the template. Then in the adoptables script you do your queries and then use the template system to parse the final result into :MYCODE: so it appears in the template. :)
|
#3
|
||||
|
||||
RE: Converting the Templates to PHP?
Hmm, however I had it as a PHP file - does this mean that you can't use PHP files as templates? :/
And I'm also assuming that I'd need to put the replacement thing on every php page, right? |
#4
|
|||
|
|||
RE: Converting the Templates to PHP?
I don't think you can use PHP files as templates, however you may be able to use the eval() function with your code to make it execute from a PHP file template. It would be worth looking into, but I doubt it would work.
To use my method then yes, you would have to put it on every page. |
#5
|
||||
|
||||
RE: Converting the Templates to PHP?
Okay - I might start that, then, next weekend. It might be some work, but I think that it would be worth it. Is there any way that I could have it as a function or something - say that I changed the theme location - the css thing would change, and I'd need to change all of the files - again. xP Do you get what I mean? xD
|
#6
|
|||
|
|||
RE: Converting the Templates to PHP?
Yeah, I see what you mean and that is something I am working on as well. :)
I'll let you know if I get it working. :) |
#7
|
||||
|
||||
RE: Converting the Templates to PHP?
I finished the whole system yesterday! Apart from the fact that my FTP program thought it would be funny if it scrambled and squished together the last lines in some files (I still can't find out why), it works. I'll post a tutorial, either here or in the donators forum, to show how to do it. :)
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free Rodent/Rat Templates | AlexC | Art Gallery | 0 | 04-12-2011 01:24 PM |
Converting a layout? | Rozel | Questions and Supports | 1 | 03-29-2011 10:28 PM |
Templates | CrystalShards | Suggestions and Feature Requests | 1 | 07-18-2009 12:48 PM |
Templates Built in | Techdude7 | Suggestions and Feature Requests | 1 | 04-01-2009 04:28 PM |
templates | aroymart | Questions and Supports | 15 | 02-18-2009 01:46 PM |
What's New? |
What's Hot? |
What's Popular? |