Teaser in drupal - let's talk

konrad1811 - September 27, 2009 - 09:30

I've found there already have been some talks about teasers like http://drupal.org/node/133702 .
Current solution is not a perfect one I think. I don't really have the control about teaser, especially the image in teaser. Of course I've found some modules to handle the image (imagecache serves thumbnails image and teaser_thumbnail makes even more - put thumbnail with chosen alignment and links the thumbnail to the article node.
Perfect? - Almost.
It's working with rich-text editors, maybe with other module - but not allways.
Maybe it's possible to set everything using templates and coding - but hey! is't drupal done to allow people that don't really now how to code set a website. Even I (C/C++, Java [amatour] programmer ) have some problems to get use to drupal code and work out all the structures, how modules connect, which variables I can use? There are plenty of modules handling images, some are making their own thumbnail - how on earth a person building site that is not a top-coder may find which variable to use?

I have a couple suggestions I will propose here.

1. Two types of teaser should be allowed:
a) Teaser separeted from the body (that may or may not show again in full node - depending on editors choice)
b) Teaser cut off from body (for example 200 characters

These settings I think should be set in specific content type or in generall for all content types - administrtor could set this.

2. Image handling - to make it clear I suggest just to allow 1 "thumbnail image field" where a user/editor may put a thumbnail chosen from server directory (like thumb_dir/) The thumbnail would show only in teaser (if any chosen) and should have ability to set some alignemnt.
[BTW some visual browser like img_assist - showing images by taxonomy is great thing! ]
So here user just don't care about inserting image into specific place in text using richtext editor - he just "attach" thumbnail image, sais how to align it, and just cares about the full size image in body text that won't show in teaser as teaser is set separately.

I think these to points actually solves the whole problem. If I'm wrong please correct me!

Obviously everything may be done by coding, but I don't think drupal was made to force web comunities learn php - rather to allow creation on top level and allow to focus on primary aims - not coding.
I'm just preparing newspaper site for 2 months in Drupal. Before I touched Typolight, but drupal seems more flexible and powerfull. However I wish I won't have to fight with code and solve my problems using modules...

_

WorldFallz - September 27, 2009 - 14:29

#1 is already the way teasers work, just not by content type (but there is a contrib to make it by content type)

#2 can be done with a cck imagefield

There's also quite a few modules to enhance teasers: http://drupal.org/project/modules?filters=drupal_core%3A87&text=teaser

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

So I missed some options?

konrad1811 - September 27, 2009 - 14:41

ad #1 I've only found where to set how many words are for teasers (http://localhost/?q=admin/content/node-settings "teaser length") - that's all I see in D6

ad #2 I've used Teaser Thumbnail module, but it's not working with image from image_node inserted by Image Assist module...
But thanks- I'll try other from the list You have suggested.

However Teaser Thumbnail does not give oportunity to just insert chosen thumbnail separately from full-node image. It just works by itself... so it's not so elastic like it would be when U insert a thumbnail and preview images on Your own in chosen places in article

hello drupal world!

_

WorldFallz - September 27, 2009 - 15:43

The settings at admin/content/node-settings are 'characters' not words.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Yes

konrad1811 - September 28, 2009 - 09:18

You're right... I've just mistaken the word "word" with charachter...
However beside that Drupal not allow the teaser handling like I've described this in #1 and #2.

ad #1)
In intereface there should be a checkbox with option "separate teaser" that creates separate text area before body for teaser, that won't appear in full node. Of course it would depend on user if to check it in. If not Teaser would be just made from first N characters.

but
#2) I think if this was build into drupal core (or at leaset separate module) would be much better than Teaser Thumbnail. First of all this would give full controll on teaser using interface (to remind: user should choose his own thumbnail separately then preview photo - there should be separate filed on that. There should be option with alignment of thumbnail too [like in teaser thumbnail]. Second - original photo - should be chosen bo user again, and with alignment and maybe some description).
Difference: this way photo in teaser is not just left for module to scale and choose small version of photo, which may sometimes not work (like with images from image_node).
This would give full controll on image view to editor/user through, and as I see it would be quite simple. Of course this may look like "bothering" about inserting to images (ne thumbnail and one original) however this coud give warranty that this must be ok - don't jus counting on some module to do it right way.
Right now the simplest and worst way is using some browser with richtext aditor - those browser does not use image_nodes so they don't allow filtering on taxnomy, so when having greate image database searching an appropriate photo would take a lot of time.

And btw image_filed is not allways good. Is just don't allow some nice browser to reuse the photos (like image_assist browser allows filtering photos by taxonomy).
Reusing photos may be somteimes very needed option.

hello drupal world!

_

WorldFallz - September 28, 2009 - 12:24

I'm not sure I understand, for #1 it's button and a checkbox, not just a checkbox, but that's how it works.

For #2, image, imagefield, and imagecache will be in core for d7. But for now they work fine in d6 as contribs. You can select what you wish to appear in the teaser and node views on the 'display fields' tab. If you want the user to select different image derivatives you can use one of several contribs (img_assist, filefield_insert, etc).

Keep in mind drupal is a much a framework as it is an app-- if not more. It needs to be able to account for many use cases-- not just yours.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

>> "I'm not sure I

konrad1811 - September 28, 2009 - 14:39

>> "I'm not sure I understand, for #1 it's button and a checkbox, not just a checkbox, but that's how it works."

Ok I don't really know where is button and checkbox You're talking about. In admin/content/node-settings I can only set number of characters in teaser... Or maybe I need some excerpt module to see it?

However I think I'll do like this:
2 additional fields in CCK in my article-node. In first field I'll put ImageNode thumbnail, in second full ImageNode. (Article body will have totally separate field - just for text) Than I'll use node.tpl to set a nice view of this. In display settings I'll set to show only thumbnail image (from the first additional field) in teaser and the other additional field with full image-node in full node.... I hope this will work... I was really trying everything to use image-nodes... After all image_assist seems to be perfect but it has some bugs still with image sizes and thumbnail-teser...

PS
As far as I know imagefield does not allow to reuse images from server that were uploaded previously... And it just don't use image-nodes... Or am I wrong?

hello drupal world!

_

WorldFallz - September 28, 2009 - 22:02

Ok I don't really know where is button and checkbox You're talking about.

By default, it's actually per node, not per content type-- the button is on an individual node edit form. There's a number of modules that can customize teaser behavior:

For image handling, I've just stumbled across this-- http://mustardseedmedia.com/podcast/episode29. very slick. And no, afaik, imagefield doesn't handle reusing images, though it seems this is being addressed with the http://drupal.org/project/filefield_sources module.

The good news is most of this will be much much improved by core image handling in d7. ;-)

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Thanks for wide answear! I'll

konrad1811 - September 29, 2009 - 09:04

Thanks for wide answear!
I'll try my new idea with node_reference - I just found it has great options, but if it fails I'll try this modules above.
However someone others may find this helpfull too.

hello drupal world!

 
 

Drupal is a registered trademark of Dries Buytaert.