Results 1 to 5 of 5
  1. #1
    New Pligger netbear's Avatar
    Joined
    May 2006
    Posts
    4

    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.

  2. #2
    New Pligger Lancelot_one's Avatar
    Joined
    Jun 2006
    Posts
    7
    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.

  3. #3
    Constant Pligger 3dKiller's Avatar
    Joined
    Mar 2006
    Posts
    370
    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

  4. #4
    Mayor of PliggVille AshDigg's Avatar
    Joined
    Dec 2005
    Posts
    1,515
    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.

  5. #5
    New Pligger Lancelot_one's Avatar
    Joined
    Jun 2006
    Posts
    7
    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

Similar Threads

  1. How to separate tags using + instead of comma
    By af_40 in forum Questions & Comments
    Replies: 5
    Last Post: 04-27-2012, 09:36 AM
  2. how ro separate tags by + instead of comma
    By kariminejad in forum Questions & Comments
    Replies: 5
    Last Post: 09-28-2009, 09:21 AM
  3. Selling Pligg Skin Design + Matching vBulletin Design
    By CaitSith4343 in forum Templates for Sale
    Replies: 2
    Last Post: 05-09-2009, 08:11 AM
  4. Separate Banner page / tpl
    By scoughli2004 in forum Questions & Comments
    Replies: 8
    Last Post: 04-27-2009, 09:04 PM
  5. A good article on PHP code design
    By dollars5 in forum Questions & Comments
    Replies: 0
    Last Post: 06-23-2007, 07:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting