Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #21  
Old 07-20-2005, 06:58 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
Quote:
Originally Posted by seriocomic
I believe something does need to be done sooner rather than later in regards to the tag system. Either introduce smarty or adopt created function tags like Wordpress.

Already I find myself limited in creating new templates because I want to include php coding in my template for conditional use but because the templates are imported as a string before being echo'ed out then the php isn't parsed.
I think you can do that right now and the functionality is not limited. In WP when you design a template you are writing php codes but in PP when you write a template you write pure HTML codes with PP tags. you can add new functionality with writing php code similar to WP in the addons of PP and then use the addons along with your templates.

I don't think the functionality is affected but it's more clean.

BTW, I suggest to fetch <?php ?> codes from the template file and evaluating them seperately and the using ereg_replace. in this way we can have PHP codes running inside the current template system. but I don't know how!

My other suggestion is reading the tags with argument before processing the page. then extracting the arguments and passing them to the related addon. the addon uses thes argument and do some dynamic things and the produces the replacement of the tag. at the bottom of index.php (as it is not) the tags will be replaced with new values but the behavior is more dynamic and controlled by arguments that users put on their template.

I hate PHP coding inisde template. In the long run it will just mess up things...
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #22  
Old 07-20-2005, 07:26 AM
riken Offline
pp veteran
 
Join Date: Apr 2005
Location: In VB Hell!
Posts: 87
Quote:
Originally Posted by raminia
BTW, I suggest to fetch <?php ?> codes from the template file and evaluating them seperately and the using ereg_replace. in this way we can have PHP codes running inside the current template system. but I don't know how!

<snip>

I hate PHP coding inisde template. In the long run it will just mess up things...
So are you for or against having PHP code in the template?
__________________
Riken
Photoblog: Distant Imagery
Reply With Quote
  #23  
Old 07-20-2005, 07:29 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
I'm against. but meanwhile, I'm speculating.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #24  
Old 07-20-2005, 07:41 AM
seriocomic's Avatar
seriocomic Offline
forum loafer
 
Join Date: Jul 2005
Location: Taupo, NZ
Posts: 13
Quote:
Originally Posted by raminia
I think you can do that right now and the functionality is not limited. In WP when you design a template you are writing php codes but in PP when you write a template you write pure HTML codes with PP tags. you can add new functionality with writing php code similar to WP in the addons of PP and then use the addons along with your templates.
Yes, I can see this as working - it's just a change of mindset. But it does seem to be double processing.

Quote:
Originally Posted by raminia
BTW, I suggest to fetch <?php ?> codes from the template file and evaluating them seperately and the using ereg_replace. in this way we can have PHP codes running inside the current template system. but I don't know how!

My other suggestion is reading the tags with argument before processing the page. then extracting the arguments and passing them to the related addon. the addon uses thes argument and do some dynamic things and the produces the replacement of the tag. at the bottom of index.php (as it is not) the tags will be replaced with new values but the behavior is more dynamic and controlled by arguments that users put on their template.
Once again this seems to be overcomplicating what should be simple methodology - but I like your thinking.

Quote:
Originally Posted by raminia
I hate PHP coding inisde template. In the long run it will just mess up things...
While you may hate it, others may love it. It should come down to what's most practicable - but I'm only new around here
Reply With Quote
  #25  
Old 07-20-2005, 07:14 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
no php in templates

about 10% of us will have a clue what the heck it is...many pixelpost users do not know html and have enough trouble with that.

I do think the template engine could be approved upon greatly though, we must brainstorm every detail about it possible and how it can be made better.
__________________
i should say more clever stuff
Reply With Quote
  #26  
Old 07-20-2005, 08:52 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
let me clarify my points:
- addons are not double processing. they are simple php codes that run to produce some new html stuff. the payload of ereg_replace on the server site is ABSOLUTLY NEGLIGIBLE.

- I can challenge you to mention a functionality in writing a template for WP that you cannot do it with not greater complexity.

- PHP inside HTML is evil. Making them apart is a programming goal and that's way Smarty is there. As Blinking's just stated, PP's templates are HTML and even with this many people don't underestand how to modify it. I know many people that don't go near WP 'cause its complicated template. (1.2 templates where nightmare and 1.5 got better)

- I think you could have tags with arguments. Keeping the compatibility with simple tags but accepting new tags with arguments just like HTML itself.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #27  
Old 07-21-2005, 04:59 AM
seriocomic's Avatar
seriocomic Offline
forum loafer
 
Join Date: Jul 2005
Location: Taupo, NZ
Posts: 13
I agree with everything you said except...

Quote:
Originally Posted by raminia
- addons are not double processing. they are simple php codes that run to produce some new html stuff. the payload of ereg_replace on the server site is ABSOLUTLY NEGLIGIBLE.
Not double processing??

1. the entire template is pulled into a string variable
2. php is processed, arguments if then elsed etc
3. a replace is done on the entire string
4. the string is echoed/printed out.

compare this to php tags (included functions):

1. php is processed, arguments if then elsed etc
2. result is output

Granted this is an oversimplification of things and I AM NO EXPERT WHO KNOWS MORE THAN ANYBODY ELSE. It is/was in my opinion a legitimate point to raise.

Like I said before/elsewhere - I am only new to PP and fully appreciate the work you developers are doing. If it means hacking a few things to get my required level of functionality then so be it.
Reply With Quote
  #28  
Old 07-21-2005, 06:28 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
I didn't want to be rude and you didn't get my point in that way.

the PP does not accept arguements right now. again, processing needed for echo and replace are negligible. I appreciate brainstorming here!
welcome to PP.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #29  
Old 07-21-2005, 06:29 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
Quote:
Originally Posted by seriocomic
compare this to php tags (included functions):
2. result is output
result is echoed!
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #30  
Old 07-21-2005, 06:43 AM
seriocomic's Avatar
seriocomic Offline
forum loafer
 
Join Date: Jul 2005
Location: Taupo, NZ
Posts: 13
yup, echoed - what i meant.

Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 08:13 AM.

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