![]() |
|
How to get printZenphotoLink() to open in a new window? - 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: How to get printZenphotoLink() to open in a new window? (/thread-4814.html) |
How to get printZenphotoLink() to open in a new window? - ekvernen - 07-03-2009 Hi all, On my theme's index.php page, the function calling the zenphoto credit link is . Is there a way I can make this link open up in a new page without editing the zp-core files? Thanks so much for any advice! How to get printZenphotoLink() to open in a new window? - sbillard - 08-03-2009 No, but it is a pretty simple function, why don't you just copy the code to your theme and modify it? How to get printZenphotoLink() to open in a new window? - ekvernen - 10-03-2009 Thanks so much - delightfully simple, but I didn't think of it! It works now like a charm. How to get printZenphotoLink() to open in a new window? - jrwills - 04-07-2009 For PHP illiterates like me, I will give you the "delightfully simple" solution that I fought with for more than an hour. :-) I went into the zp-core folder, found the "templates-functions.php" file, opened it up in Dreamweaver — yeah, yeah, I know… but I'm 64, give me a break :-) — searched for "printZenphotoLink" and then changed it to read: … href=\"http://www.zenphoto.org\" [b]target=\blank[/b] title=\"A simpler web photo album\ … [b]Note:[/b] the only thing I added was "[i]target=\blank[/i]" I assume that since I haven't figured out where to "copy the code to your theme", I will have to make the change any time there is a version change. I would appreciate it if someone would kindly explain the last piece of this puzzle for me. How to get printZenphotoLink() to open in a new window? - acrylian - 04-07-2009 We recommend not to hack core files like template-functions.php as you will have to do that again with any update. The zenphoto link only links to our website. All themes have the Sidenote: Generally it is best practice to leaeve opening in a new window to the user as he can control that himself with his browser (via context menu or ALT+left click). Especially as most browsers use the more convenient tabs. How to get printZenphotoLink() to open in a new window? - jrwills - 04-07-2009 Thanks. I totally agree with your sidenote. I (finally) made the decision some time ago to leave the matter to users. In some cases, due to the expected audience, it required an explanation of the Shift or Ctrl-click function. I'm not sure how I got in on this except as I was looking for something, I came across this post and it bothered me that, as happens too many times in forums, people who know how to do something assume we all do. So I decided to see if I could figure it out. BTW target=\blank [i]without[/i] the quotes worked. Are the quotes necessary or is it just best practice? Off topic a bit: speaking of hacking core files, is it safe to assume there is no way to implement a custom © without hacking the zp-core/watermarks folder? How to get printZenphotoLink() to open in a new window? - sbillard - 04-07-2009 YOu just make your watermark and place it in that folder. No need to change anything that is already there. THen select your custom copyright image as the watermark. How to get printZenphotoLink() to open in a new window? - jrwills - 05-07-2009 Thanks. Almost too easy :-) |