![]() |
|
Custom functions? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Custom functions? (/thread-2400.html) |
Custom functions? - optimiced - 2008-03-11 Hello, Still new here, learning how Zen gallery works A quick question: I'd like to over-ride a function which shows the RSS link+icon in the footer of the gallery. One way (I guess), is to 'hack'
Other would be to place a some kind of functions.php file in the current THEME dir and there create and modify the RSS part. Thus, when I make an upgrade, my customized 'RSS icon' part won't be deleted... My question would be: How'd I do it? And is it easy? :-) Thanks in advance for pointing me out in the correct direction! :-) Custom functions? - acrylian - 2008-03-11 You don't need to hack the function for that, the icon is an option: http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintRSSLink Custom functions? - optimiced - 2008-03-12 OK, I agree: Let's say, I change this line to: ...still, I would do this by editing directly the file 'template-functions.php'. Next time I make an upgrade, the file will be over-written by a newer version, right? (or maybe I'm wrong or missing something?) I think, in WordPress, each theme can have its own custom functions, or override core WP functions, if a function is specified in the 'functions' file in the theme directory. Maybe Zen Gallery has a similar approach? Or different one? I'm not very good in programming, and still trying to understand the way Zen works, please forgive me if I asked a stupid question... Custom functions? - BertSimons - 2008-03-12 zenphoto has this too... just put an customfunctions.php file in your theme directory and put a: what I do myself if I change a function like getalbumLinkURL() is renaming it in my customfunctions. php to getAlbumLinkURLCustomized() so I now when working on my theme pages that not the original function is used Custom functions? - acrylian - 2008-03-12 optimiced: The forum is for asking questions...:-) Yes, as Bert said, you can have customfunction, but you don't need one in this case. Custom functions? - optimiced - 2008-03-12 @BertSimons, @acrylian: Thank you very much for these detailed answers! Now off me go testing the proposed solutions ;-) |