Auto Update your PhpLD copyright

Discussion in 'Directories' started by floppydrivez, Jun 2, 2008.

  1. #1
    floppydrivez, Jun 2, 2008 IP
    fear, jminscoe, hyper and 1 other person like this.
  2. hyper

    hyper Peon

    Messages:
    1,565
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    0
    #2
    haha, nice one.
    I will try it soon.
    Thanks man ! :)
     
    hyper, Jun 2, 2008 IP
  3. Brian1970

    Brian1970 Notable Member

    Messages:
    2,886
    Likes Received:
    416
    Best Answers:
    1
    Trophy Points:
    290
    #3
    Nice, will do mine later.

    +Rep

    Thanks Brian
     
    Brian1970, Jun 2, 2008 IP
  4. humm

    humm बहादुर बच्चा

    Messages:
    4,346
    Likes Received:
    850
    Best Answers:
    0
    Trophy Points:
    310
    #4
    Niceone, very useful buddy. Thanks. :)
     
    humm, Jun 2, 2008 IP
  5. vicdigi

    vicdigi Banned

    Messages:
    1,917
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    0
    #5
    "Just too simple" is marvellous - thank you.

    This makes things so so easy and you no longer need worry that you may forget.

    .
     
    vicdigi, Jun 2, 2008 IP
  6. aubenrey

    aubenrey Banned

    Messages:
    126
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Why go to the extent of adding to the init.php file, you can simply do this in smarty, as the phpld template is smarty based you can simply add this to the footer of any smarty based template file, well thats if you have it in the footer.

    
    © YourDomain.com {$smarty.now|date_format:"%Y"} All Rights Reserved
    
    Code (markup):
    thanks
    aubenrey
     
    aubenrey, Jun 2, 2008 IP
  7. floppydrivez

    floppydrivez Peon

    Messages:
    453
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Try it and then try mine. Report back. You will see its not the same. I am not saying it can't be done in smarty, but I chose php.
     
    floppydrivez, Jun 2, 2008 IP
  8. aubenrey

    aubenrey Banned

    Messages:
    126
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #8
    oh sorry,

    
    © YourDomain.com 2007 - {$smarty.now|date_format:"%Y"} All Rights Reserved
    
    Code (markup):
    :)
     
    aubenrey, Jun 2, 2008 IP
  9. aubenrey

    aubenrey Banned

    Messages:
    126
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Or you could probably go one better with

    
    © Yourdomain.com {if $smarty.now|date_format:"%Y" gt 2007} 2007 - {$smarty.now|date_format:"%Y"} {else} 2007 {/if}All Rights Reserved
    
    Code (markup):
    Keeps everything in the template file then.

    I prefer to utilize smarty code within smarty templates as much as I can, Smarty if very powerful and you would not believe what you can do with it right in the template files.

    Hope this makes people learn more about smarty.
    aubenrey
     
    aubenrey, Jun 2, 2008 IP
    Spider-Man likes this.
  10. humm

    humm बहादुर बच्चा

    Messages:
    4,346
    Likes Received:
    850
    Best Answers:
    0
    Trophy Points:
    310
    #10
    Will this work in the tpl file of the template? :)
     
    humm, Jun 2, 2008 IP
  11. aubenrey

    aubenrey Banned

    Messages:
    126
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #11
    It should do yes, I dont really use phpld but prefer phplynx but both are smarty based and it should work.

    for phplynx users simply replace the

    
    {if $smarty.now|date_format:"%Y" gt 2007} 2007 - {$smarty.now|date_format:"%Y"} {else} 2007 {/if}
    
    Code (markup):
    with this code

    
    <!--{if $smarty.now|date_format:"%Y" gt 2007}--> 2007 - <!--{$smarty.now|date_format:"%Y"}--> <!--{else}--> 2007 <!--{/if}-->
    
    Code (markup):
    thanks
    aubenrey
     
    aubenrey, Jun 2, 2008 IP
  12. WallaceYeung

    WallaceYeung Notable Member

    Messages:
    3,377
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    230
    Digital Goods:
    1
    #12
    oh, thanks for the small trick~!
     
    WallaceYeung, Jun 2, 2008 IP
  13. floppydrivez

    floppydrivez Peon

    Messages:
    453
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #13
    This one is prolly the best option, also their has to be defined for the sitename, but I didn't look it up. That would be the finishing touch.
     
    floppydrivez, Jun 2, 2008 IP
  14. aubenrey

    aubenrey Banned

    Messages:
    126
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #14
    As previously mentioned I dont really use phpld so don't know the site name variable, once you find it out simply replace the site name with the smarty variable which corresponds to the site name and it will be done.

    Thanks
    aubenrey
     
    aubenrey, Jun 2, 2008 IP
  15. dog222

    dog222 Active Member

    Messages:
    446
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    70
    #15
    eSyndiCat uses smarty and this is what is used in the footer.tpl
    <div class="copyright">&copy; {$smarty.server.REQUEST_TIME|date_format:"%Y"} Powered by<br /><a href="http://www.esyndicat.com/">eSyndiCat Directory Software</a></div>
    Code (markup):
     
    dog222, Jun 2, 2008 IP
  16. JamieG

    JamieG Banned

    Messages:
    1,825
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    0
    #16
    It does work for phpLynx, in fact I think its the code we have, doing some checking on that one.
     
    JamieG, Jun 2, 2008 IP
  17. fear

    fear Banned

    Messages:
    3,750
    Likes Received:
    221
    Best Answers:
    0
    Trophy Points:
    205
    #17
    Very impressive. Reps for you :D
     
    fear, Jun 3, 2008 IP
  18. Spider-Man

    Spider-Man Banned

    Messages:
    2,684
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Yes Jamie, phplynx has this feature built-in to the script, much like every other possible add-on I can think of which is actually useful for both directory owner and visitors to the directory:D It's funny how the most popular script has such few, low-level features:confused:
     
    Spider-Man, Jun 3, 2008 IP
  19. JamieG

    JamieG Banned

    Messages:
    1,825
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    0
    #19
    The most popular doesn't always mean the best, besides I'm glad others can learn from the new kid on the block. :cool: Good post Aubenrey rep given.
     
    JamieG, Jun 3, 2008 IP
  20. swedal

    swedal Notable Member

    Messages:
    3,767
    Likes Received:
    426
    Best Answers:
    0
    Trophy Points:
    230
    #20
    Great mod Mack - I think there are many that could use it.

    I will just continue to reset it myself since it probably takes less time that way than me trying to insert new script. ;)

    Maybe part of being an editor is knowing when to change the clocks ahead... lol.
     
    swedal, Jun 3, 2008 IP