I'm new to Drupal, but not to web development. I'm in process of converting a client's dreamweaver-and-fireworks site to a drupal site. I have to keep as close as possible to his existing design, file naming conventions, et cetera.
Here's the original page I'm converting. Here's my development page.
I'm using image, image_gallery, image exact sizes, and img_assist. What I need to do is take out the normal image gallery code and create a way to put it in the left column (blocks, methinks). Can't find it. No worries, I'll search for key words in the php code.
Looking at the output source, I see
<li style="height : 123px; width : 48px;">
<a href="/gallery101.html"><img src="http://quinton.jasonfriesen.ca/files/i/jk_g1_l_v4_0.thumbnail.jpg" alt="Bride and Child" title="Bride and Child" class="image thumbnail" width="48" height="48" /></a><h3><a href="/gallery101.html">Bride and Child</a></h3><div class="author">Posted by: <a href="/user/2" title="View user profile.">jfriesen</a></div>
<div class="date">Tue, 2006-06-13 14:24</div>
</li>
Most of this I know will show up as variables in php, so I ignore them. What should be a hardcoded string in php would be:
<div class="author">Posted by: <a href="
So I fire up Dreamweaver and search my entire development site for that string. Nothing in 800+ files. Okay, try a shorter string.
Posted by:
Huh. Not found in 800+ files. So I look in the modules directory for image_gallery. Nothing! I look in the drupal admin section of my development site for the image_gallery module, there it is... but there is no image_gallery.module. Argh!
In image.module I see some interesting code:
/**
* Implementation of hook_block.
*
* Offers 2 blocks: latest image and random image
*/
The attached code looks like it could be tweaked to create a new code block right there that will do what I need... but the real issue is being able to have these created-galleries appear in the left column instead of on this page... probably in a block.
So. Where is the php that creates these galleries, and how can I create a block for it instead?
Comments
Comment #1
tmj2k7 commentedI looked at your stuff and it looks like you would need to write a custom block with hooks so that it can sense what gallery a given picture node is from and display the rest of the gallery images in the block. I don't see a way of doing it without writing custom code.
For starters: the function that creates the gallery layout is:
function theme_image_gallerywhich is called by
function image_gallery_pageThe first does the layout, the latter determines what images are in a given gallery.
I know there are other image management modules...you may want to check them out, Im only familiar with image and image_gallery.
Good luck.
Comment #2
jfriesen commentedPlease forgive my ignorance; I'm not finding these codes in my files at all. Has this been deprecated from 4.7? Should I be finding this in image.module?
I found this article on Customising the image gallery node layout, but this, too, didn't seem to help...
Comment #3
nevets commentedIf you have the most recent copy of the image module the function is theme_image_gallery and it is in the image_gallery.module file. If you have an earlier 4.7 of the module it should be in image.module.
Comment #4
jfriesen commentedHey, there it is! I'll test this momentarily.
Thank you for your help!
Comment #5
drewish commented