Closed (fixed)
Project:
Zoomify
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
10 Feb 2009 at 00:01 UTC
Updated:
5 Oct 2009 at 18:51 UTC
Hello, thanks for a marvellous module.
Is it possible to set Zoomify as the default node view for Image node type anyway?
I mean not just redirecting but all bells and whistles might be intact on page including comments. This may be very versatile instead of just another bare page with zoomify applet, which user "may" click if tab "is not" overlooked.
Even inline images can gain this functionality :)
We are using Image/Image Assist combination on Drupal 6.9 by the way. Any workaround will also be greatly appreciated.
Thanks in advance.
Comments
Comment #1
infojunkieThis is something that's been on my mind for a while, but it requires careful design to integrate smoothly with the tons of image modules that exist already. So don't hold your breath :-) In the meantime, as a workaround, here's what you can do:
* In your node lists, views, etc., make sure the node links point to the zoomify version (i.e. /node/%nid/zoomify)
* Modify theme_zoomify to include the "bells and whistles" that you need
Hope this helps!
Comment #2
chawl commentedI love themable functions :)
Thank you very much.
Comment #3
chawl commentedAnyway, it is impossible to rewrite all links dynamically to zoomify view properly and path_auto is another major problem as well.
I used another workaround for "Image" module and used the code below in "node-image.tpl.php"
Can there be any problem with this API like method? I would be glad if someone can comment.
Tx in advance.
Comment #4
sgriffin commentedThanks chawl, Works great. Then you can comment out lines 23-31 in zoomify.module to remove the tab, and run update.php
Comment #5
infojunkieThanks chawl for documenting your workaround. I will post that on the module's project page.
Comment #6
jcdarwin commentedChawl's comment above about the workaround checking
zoomify_load($node->nid)for a true value was working fine for me with the previous vesion of the zoomify module (version 6.x-1.1), but now that I've installed the latest version (6.x-1.2),print zoomify_display($node, 0)works fine, but only if I comment outif (zoomify_load($node->nid)).Everything else works fine with this module -- image tiles are being created, and I can zoomify the image in question as long as I don't refer to
if (zoomify_load($node->nid))Comment #7
infojunkie@jcdarwin, what happens when you call zoomify_load in the template? And how did you manage to determine if the node can be zoomified or not?
Comment #8
jcdarwin commentedHad a look and found that line 33 of zoomify_load (
if (!variable_get('zoomify_showtab', TRUE)) return FALSE;) is returning FALSE because zoomify_showtab is 0.I've checked off "Show tab" in the Zoomify settings, as I need to show the zoomify image directly in the node template.
The relevant piece of my node-image-tpl.php looks like:
I'm probably implementing Zoomify in a non-standard way, as I'm displaying a zoomified image outside of the zoomify tab, so maybe this behaviour is to be expected?
Comment #9
infojunkie@jcdarwin, the way you're implementing zoomify is what this thread is all about! I've modified the FAQ entry on the module page to mention the "Show tab" setting.
Comment #10
chawl commentedHello kratib,
On the newest dev version, if "Show Tab" is disabled, zoomify applet is also disabled for default view. Therefore, my original workaround (tx for crediting my name) does not work anymore. Probably zoomify_load($node->nid) returns false.
Any ideas?
Tx in advance.
Comment #11
infojunkie@chawl & everyone,
I am very sorry for the confusion I've caused you. Indeed, zoomify_load() could not work if 'zoomify_showtab' was OFF.
I fixed this by creating a new function
zoomify_check($node)that you should call instead ofzoomify_load($nid)in your template file. So the simplest form of the template would now look like:Please try it (12 hours from now) and let me know if that works. If it does, I will create a new release of Zoomify and update the documentation on the module page.
Thanks for your patience!
Comment #12
chawl commentedYesss, I confirm that the new solution works perfectly.
Thank you for your (very) fast consideration :)
Comment #13
jcdarwin commentedUnfortunately now my theme overrides don't work.
I notice that previously (zoomify-6.x-1.2) you had:
but now (in zoomify-6.x-1.3) you have:
I.E. you seem to be hard-coding the calls to those in zoomify.module, rather than let be overriden by theming. Previously (in zoomify-6.x-1.2), my phptemplate_zoomify function would allow me to override the behaviour in zoomify.module, as I wanted to use the yui-resize bar to allow the user to be able to resize the zoomify window to suit their screen (therefore I needed to put class="yui-resize" in the div surrounding the zoomfiy object).
I think I'm right in saying that you've now made the zoomify code (now in theme_zoomify_page and theme_zoomify) non-themeable, whereas previously it was themeable?
Comment #14
infojunkieWhat an omission! Sorry about that, I restored proper theming in the latest dev.
Comment #16
davidhk commentedI tried the approach in #11, but even when using the full node.tpl.php, I couldn't see some CCK fields that I'd added to the image node type. So instead I override the function from the image module that displays an image in the body of a node.
In image.module you'll find this:
In my theme's template.php I added:
Then any image node that has been zoomified now automatically shows the zoomify image viewer in the default node view. Plus the rest of the node (taxonomy, comments, CCK fields, etc) displays as normal.
Comment #17
infojunkieThanks for the info! I updated the relevant FAQ on the module's page.