Recommended Directory Software

Discussion in 'Directories' started by Torsten, Dec 14, 2007.

  1. dog222

    dog222 Active Member

    Messages:
    446
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    70
    #41
    Why would you say that?
     
    dog222, Dec 18, 2009 IP
  2. linkenginepro

    linkenginepro Peon

    Messages:
    197
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #42
    Some reasons I drop using smarty:

    1) It compile the template to .php file (templates_c folder). There are disadvantages: slow run in first time and not easy to store templates in database (you will need to force recompile, smarty does not understand when the template is updated since it is not a file).

    2) Smarty support php code, BUT it is not as flexible as using php itself. Exchange variables require assignments and you can't send back the value from template to core php script.

    Some of you might argue that smarty will make html code more clean and easier to understand for designer. That's true. But there is solution. We can also make php template file so simple.

    Smarty:
    Link ID: {$link_id}

    PHP as template:
    Link ID: <?php print $link_id; ?>

    It depend on the programmer skill how to make the template as easy as possible and readable for non-programmers.

    Not to mention that php as template is much faster. For advance user, they can easily enhance the codes without need to touch the core php files.
     
    linkenginepro, Dec 18, 2009 IP
  3. dog222

    dog222 Active Member

    Messages:
    446
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    70
    #43
    Thanks for the reply. I however don't agree.

    I'm sure you've seen this:
    http://www.smarty.net/whyuse.php
     
    dog222, Dec 19, 2009 IP
  4. an0n

    an0n Prominent Member

    Messages:
    5,688
    Likes Received:
    915
    Best Answers:
    0
    Trophy Points:
    360
    #44

    #2 is incorrect. You can assign variables back to php via smarty.

    I'll demonstrate for you.

    In your .tpl

    {assign var="link_id" value=$link_id}

    {php}

    $link_id= $this->get_template_vars('link_id');

    do some other stuff with the acquired link id, such as a call to the database etc etc...

    {/php}


    .. Also, smarty does us caching.

    And in that, you can set the cache type, the life time of the cache and also run checks of the cached page to ensure efficient execution prior to anything ever being reexecuted.
     
    an0n, Dec 19, 2009 IP
  5. Torsten

    Torsten Peon

    Messages:
    960
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #45
    I purchased phpLD recently and, when I installed it. It did give me an error.
    Still waiting for proper assistance there:mad:.
     
    Torsten, Dec 28, 2009 IP
  6. Torsten

    Torsten Peon

    Messages:
    960
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #46
    OK, they helped with the installation and I'm starting to work on the directory.
     
    Torsten, Dec 28, 2009 IP