Go Back   Pligg CMS Forum > Other > Suggestions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-05-2006, 05:40 PM
New Pligger
 
Join Date: May 2006
Location: San Francisco Bay Area
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to netbear
Lightbulb Separate Design from Code

I wanted to register some thoughts about a problem with the current version of Pligg. Not critisizm, mind you. These are just observations and suggestions to help make the application better.

After working with Pligg for a number of weeks now I have often found Pligg templates that contained full-blown code logic. For example, in template index_center.tpl there are {php} blocks where specific Pligg routines are called. This co-mingling of design and program execution is less than ideal. (OK, it's pure evil! ) If you change a template you'd better have maintained those PHP blocks. Otherwise the application will cease to function. This defeats the purpose of using a template system.

In an ideal Smarty template based application the templates only define HTML and Smarty logic necessary to render the page. For example, a Smarty loop block iterating over an array to output lines from a list. Instead of the template itself invoking code calls directly the application that invokes the Smarty template object takes care of looking-up data and providing it to Smarty. Then Smarty is finally invoked to take care of rendering the output page.

I don't have a lot to complain about since Pligg does work. But it would be much easier to support template variations if there weren't any {php} code blocks inside the templates themselves.
Reply With Quote
  #2 (permalink)  
Old 07-29-2006, 06:42 AM
New Pligger
 
Join Date: Jun 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
The smarty code also seems to be tightly intertwined with the original spanish site's template function code, possibly the php you speak of, and css from the original spanish site. One might think, that smarty should instead cleanly replace it.

All this makes it really hard to use, understand, debug, follow and create with.

I would like to see this go all smarty or all original template functions and css. The mix really blunts pligg's effectiveness to be used and it's ability to be upgraded and or the ability to use it as a digglike engine or even to create effective visual designs for it or add on new code.

If not addressed, I fear for pligg's continued acceptance. So I am hoping the good pligg folks here realize the high coefficent of drag this places on pligg's continued growth and possible life span. And address this as I wish them well.
Reply With Quote
  #3 (permalink)  
Old 07-29-2006, 11:09 AM
3dKiller's Avatar
Constant Pligger
 
Join Date: Mar 2006
Location: Newport Beach
Posts: 142
Thanks: 24
Thanked 2 Times in 1 Post
Hey guys,

I've read what you've written here, and agree whole-heartedly. I'm passing this along to Ash to see what he can do to fix this. To speed things along I agree to personally fund some help to clean this up.

Sound good?

~3d
Reply With Quote
  #4 (permalink)  
Old 07-29-2006, 11:15 AM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
When I added smarty into pligg, I had zero experience with smarty, so there was some code I just didn't know how to deal with. Since then I have been slowly working converting more code, but it's never been a priority. New features and bug fixes have taken priority.
__________________
- Ash
Reply With Quote
  #5 (permalink)  
Old 08-01-2006, 03:52 AM
New Pligger
 
Join Date: Jun 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Hi AshDigg!

Thanks for all the hard work you've put in. I spy you being the only coder committing recently. So I hear where you are coming from.

Possibly time to open this up to the community? I'm sure there's all kinds of folks willing to lend a hand to fuel the pligg, if recruited, organized or allowed.

Just something to chew on.

I know it's going to put me on a totally different code branch, but tomorrow I'm removing the Smarty from one version of my code and totally Smartyifying another version. Just to see how it works out.

Cheers,

-LOne
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
wawo.biz about Good design product phonograph My Pligg Site 0 03-21-2008 09:58 AM
URGENT: Have 80% Pligg Design Done, Need Experienced Programmer/Designer to finish it anothercollegestudent Template Support 3 11-07-2007 01:39 AM
A good article on PHP code design dollars5 Off-topic 0 06-23-2007 10:43 AM


Search Engine Friendly URLs by vBSEO 3.2.0