Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 08-11-2006, 03:06 PM
Starr Offline
forum loafer
 
Join Date: Jul 2006
Posts: 8
Exclamation Using PHP

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!
Reply With Quote
  #2  
Old 08-11-2006, 04:05 PM
Connie
Guest
 
Posts: n/a
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
Reply With Quote
  #3  
Old 08-11-2006, 04:24 PM
Starr Offline
forum loafer
 
Join Date: Jul 2006
Posts: 8
@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
Reply With Quote
  #4  
Old 08-11-2006, 05:26 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
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).
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #5  
Old 09-05-2006, 12:18 PM
Snap Offline
forum loafer
 
Join Date: Sep 2006
Posts: 5
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:

Code:
$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 - they serve the text ads to my site via PHP... so I was motivated to get that piece of code working
__________________

--------------------------------------------------
Photoblog: Snapping Photos
Personal blog: Just A Girl
Reply With Quote
  #6  
Old 09-05-2006, 01:00 PM
Connie
Guest
 
Posts: n/a
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 ;=)
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 02:27 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs