PDA

View Full Version : Using PHP


Starr
08-11-2006, 03:06 PM
Is it possible to use php instead of regular html?
I changed the image_template.html to image_template.php so I can use a php command.
I also changed index.php - by finding all the image_template.html and changing the extensions to .php
am i missing anything else to change it entirely? Because the php code I'm using isn't initiating the way it's suppose to.

Thanks in advance!

Connie
08-11-2006, 04:05 PM
no, you cannot as the script looks for HTML

you cannot include php in Pixelpost templates

if you know what you do you can try and test, but we cannot give you support for that

as I would say, you cannot include php in php other than using include() function, but included it will not render the tags

why don't you write an Addon?
The AddOns are the interface for that, they get rendered...

so write an Addon, let that Addon create a Tag and place this Tag into your template and you are on the safe way and can follow the coming upgrades

Pixelpost's principle: KISS! (Keep It Simple, Stupid!)

good luck, Connie

Starr
08-11-2006, 04:24 PM
@Connie: Thanks for the suggestion =)!
However, I'm not that "GOOD" to be able to write an addon, sadly =*(.

Anyone willing to help? It would be greatly appreciated! <3

GeoS
08-11-2006, 05:26 PM
As it is open source, yes you can but dont expect any future support from us. Noone made official hack so you will be first who is trying to execute own code with Pixelpost from this side. You must change all template calls to supporting PHP extension instead of HTML (try to grep/search in source for .html).

Snap
09-05-2006, 12:18 PM
I have been able to call in PHP scripts via an include.. well, sort of an include.

I just did a mod in my index.php, for the time being - - until I do it with an addon .. which I will do another day. But for today - my code looks roughly like this:

$phpinclude_output = file_get_contents('your_file.php');
$tpl = ereg_replace("<PHP_INCLUDE_1>",$phpinclude_output,$tpl);

Maybe that will help someone?

I make a few hundred bucks every month selling text ad links (http://www.text-link-ads.com/?ref=14296) - they serve the text ads to my site via PHP... so I was motivated to get that piece of code working :)

Connie
09-05-2006, 01:00 PM
Snap,

please do this as an addon, I suggest as an Admin-Addon
because then the admin defines the text which should be included

we try not to suggest any hacks here anymore because the memory of people is short and life is long... and after updating their hacks won't work anymore ;=)