Auto add image to node listing from node body field | DRUPAL - image

Hi I have news content type, where are fields Title(textbox), Body(text with CKeditor) and Summary Image(multimedia asset). Is it possible to automatically add first image from Body to summary image field on form save?

Probably not or at least not so easy. You will need a custom parser here and a preproccess function.
Why not using an extra img field that will display only on the teaser display (I say Teaser instead of Summary since it is used more in Drupal like this) or just use the first image of the Summary Image (multimedia asset) field using image_delta_formatter module?

Related

How to render text only data inserted from WYSIWYG editor?

I am using admin lte summer note. There is a image upload option as well. I have uploaded a image at the very beginning of the blog. But in landing page where i have to show blog (image, title, and little bit of description) in description part it renders image but i want to render text only.
My recommendation is to add new field to the blog database and name it prefix where you put small description about your blog, anyhow you can skip html tags by using this helper
{{ strip_tags($yourString) }}
but yet the prefix field method is better

How to automatically place image from node to Image field? (Drupal)

It's useful to use Image field from Drupal Views module blocks.
But it's very unuseful to place pictures into this field.
The more convinient way for me is to insert images right in node Body.
How to make first image from Body to place to Image field automatically?
Or from Summary?
Or learn Views module to access first image directly from node?
Or... maybe I misunderstand some simple things?
UPD: I'm using WYSIWYG editor. All images are uploaded.

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 add descriptions under uploaded images

I have created an image field in a content-type called "Products", but there is no description box option as it is shown in a file field. Is there any ways to add product descriptions under every product photos?
I know this isn't the optimal solution, but you could use field_collection to achive this.
Install the module and then add a new field of type field_collection to your content-type, then under admin/structure/field-collections you can add both an image and a textarea field. Now you should have the ability to add an image and a corresponding description to your node.
Try the Image Field Caption module for Drupal 7.
It adds an extra text area to image fields. It is similar to the alt/title text fields already available with an image field, except it is a text area that accepts long string or html content.
Download the module
Enable the module
Add a content type with an image field, or use an existing content type with an image field
Add or edit a node with an image field
Enter text or html into the image field caption text area
Save the node and view it to see the caption displayed below the image field
To override the way the caption is displayed, take a copy of the image_field_caption.tpl.php file and place it in your theme's directory, for example:
sites/all/themes/MY_THEME/image_field_caption.tpl.php
Now modify the html to meet your needs.
This has been identified as an issue - the integration of imagefield into core from D6 to D7 saw the unfortunate loss of the option for a description field in addition to alt and title.
Try this patch:
http://drupal.org/node/1067620#comment-5958190

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.

Resources