Drupal gallery with thumbnail made of first picture - image

I have drupal6,cck,views,imagecache.
category_type gallery contain a CCK node reference to a category_type images
and In this Images there is a cck file (image) field.
I know how to create a view which will display a list of galleries.
BUT question is .. HOW can I display a list of galleries with a THUMBNAIL that is made of first image available inside that gallery.
And I don't want to add a extra field for gallery (in category_type) like "preview pic"
Just want then to be displayed by reference.
Example:
If I create a gallery with one picture inside... I want this picture to be my gallery thumbnail.
If I create a gallery without image, there will be no thumbnail ... or default "notavailable" picture.
IF I create a galleyr with many images / remove them /etc.. wanna make sure that first available picture in gallery is gonna be it's thumbnail.
please help ;)

You might be able to do this in a view, but if you want even your basic gallery node to show an image from one of the child nodes you could do something like this in a file called node-gallery.tpl.php where gallery is the content type machine name:
// load the node reference
if ($child = node_load($node->field_nr_child[0]['nid'])):
// ... and just print the image from that child node
print $child->field_image[0]['view'];
endif;
You could also randomize which child you show or show only the most recent child with some foreach fun. You might want to override where the content is displayed so you have more control over formatting but this should get you started.
You can also check out this great screencast I just found looking for something else. I think it does exactly what you want without the custom code: http://www.lullabot.com/articles/photo-galleries-views-attach

In CCK image field you must set Default Image ("notavailable" picture).
After this you can:
1. theme node as Jeremy Heslop sayd - node theming;
2. if you make views of Gallery by row style="Fields', then click link on Theme:Information, select appropriate theming file, add it to theme folder, and theme one field (for example, Title) changing it to thumbnailed and linked image (taked from referenced "Images");
3. In Views add Relationships, that will connect "Gallery" with "Images", and show 1 image in field.

Related

image display in drupal

i would like to create an image gallery on my homepage in drupal. Each image will have been uploaded by the user, and, as i understand it, will be saved in some image directory folder in drupal. My question concerns a recent tip i picked up in response to the general debate whether or not it is good to store images as blob in mysql. The tip was to store the filenames of the images in mysql so you can essentially still sort the files. I was wondering whether this would be possible even if the files url is in drupal so to speak. It should be possible shouldn't it? I new to programming you see and want to the images on my homepage to be periodically refreshed according to a define sorting function. I would greatly appreciate any response to this question. Cheers.
You can using content types and views module for create gallery in Drupal 7.
First create new content type with gallery name(admin/structure/types/add).
Then add a image field to gallery content type and save it.
If you want have thumbnail of image you should create a image style. for example create a image style with thumbnail_custom name and add suitable effect(admin/config/media/image-styles/add). You will use of this image style in views in the next step.
Then create a new view with gallery-view name. uncheck create a page, check create a block, enter block title and item per page you want(admin/structure/views/add).
In Filter criteria from block details add content type gallery.
In Fields add Content image that appears in node:gallery and select and select thumbnail_custom for image style option.
Save view.
This view block appears in Blocks section and you select region for it.
If you want this block appears only in the front page, in configuration of this block in the section pages of visibility settings check "Only the listed pages" option and then enter "<front>" phrase in textarea.

How to create featured article listing with an featured image in joomla?

I am pretty new to joomla. The effect I am trying to achieve is http://www.greenjourneys.nl/individuele-reizen.html this. Notice, there is an featured image for each articles.
Can you tell me how to do this?
Just include the image before the page break.
There are a number of components that will allow you to resize the photo easily (or create tumbnails 'on the fly') which would work great for something like that.
However if you just have small images you want to use - simply include the image into the article before the pagebreak and use CSS to control how it lays out on the front page.
You can decide if you want the intro text to show in the main article or not, if you do - then you won't have to include the image again (it will show by default) but if you do not want the intro text to show, just be aware that the image you choose for the front page won't display in the article when clicked on.
Hope that helps.

Seeing uploaded images in views

using drupal 6.
Modules installed for working with the images:
filefield
image
imageapi
imagefield
imagecache
I made this content type called 'event' where I added the possibility to upload an image.
The preview shows that I successfully filtered the nodes according to type showing the node type and node body just fine.
When I click the '+' next to fields, I'm being given a couple of options about images and the first one seems to be what I'm looking for; image:image.
When I visit the nodes seperately by inserting their path into the address bar, I see the title with the body and the original image below it.
But no matter what I seem to do in views, the list of events won't show any of the images that are part of the nodes. Not even when I set 'image size to show' to orignal.
I figured it out eventually. First, it needed to be an image that is part of the 'content' category under 'fields'. Then I set a thumbnail which I could then select from a dropdown once I've chosen 'content: image'.
Now, something that has to do with the permissions has me floundring again. So that's for a new question I guess.

Have To Render Image Before Title Of Section,Category Article

How can I display a separate image before the title of each section, category and article (image be different)?
I.e. is there a way through admin plugin or some way so that I could render it easily?
I am using Joomla 1.5
Depends on the image. If you mean an icon or small image in front of the saction/category/title then you could do that with CSS and the page class suffix to determine which image displays on which page.
If you mean more like a header image, then you would probably need to do it in a module and assign the module to the page you want to place it in. You'd need a module per image doing it this way.
You could also add the image to the section or category description, then use a template override to place the image where you want it.
On one site we built we have a unique header image on every page. We did it with a module and K2. Again, it depends on what you are trying to do. You would need to give more details to get a specific answer.

Different image sizes in Wordpress

I'm trying to get different image sizes on my wordpress website. For instance, I want the image size "thumbnail" to be displayed in category post list. While image size "Medium" should be displayed on actual post page. Right now, only thumbnail size images get displayed both on post list and on individual post. I realize I need to make some changes in my theme, but exactly what are those?
Look for the template file of your theme that handles the "post page" as you call it- most likely "single.php" (for single posts) and "page.php" (for pages)-unless the theme author has added custom templates- and find where the thumbnail image is being referenced. You should be able to reference the "medium" version of your uploaded image there instead. However, the theme author may be using an automatic thumbnail script to resize your image (such as TimThumb) and not the Wordpress-generated thumbnails as you might be thinking. If this is the case, you will have to swap out the thumbnailing code on the image tag in 'single.php' for a reference to the "medium" image...
Perhaps if you provided the example code in your single.php file where the thumbnailed image is called would help us give you a more specific answer on how you need to changes things.

Resources