Not a very fancy hack / addon , but useful. Useful for blogs too. http://www.lobolinks.com/blog/auto-update-your-copyright-for-phpld/
"Just too simple" is marvellous - thank you. This makes things so so easy and you no longer need worry that you may forget. .
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
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.
oh sorry, © YourDomain.com 2007 - {$smarty.now|date_format:"%Y"} All Rights Reserved Code (markup):
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
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
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.
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
eSyndiCat uses smarty and this is what is used in the footer.tpl <div class="copyright">© {$smarty.server.REQUEST_TIME|date_format:"%Y"} Powered by<br /><a href="http://www.esyndicat.com/">eSyndiCat Directory Software</a></div> Code (markup):
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 It's funny how the most popular script has such few, low-level features
The most popular doesn't always mean the best, besides I'm glad others can learn from the new kid on the block. Good post Aubenrey rep given.
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.