Shorter teasers

asak - September 9, 2008 - 18:02
Project:Teaser by Content Type
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

This is very simple to implement, but it would be nice if it was default:

Teasers of 50 chars / 100 chars.

Sometimes, that's enough ;)

#1

chadcross - October 14, 2008 - 00:09

I would love to see this too. 50 would be perfect for a project I am working on right now.

#2

asak - October 14, 2008 - 10:08

just change the numbers in the module file...

#3

joachim - October 16, 2008 - 21:05

I'm a little reluctant to add this feature, as my goal for this module was solely to have identical teaser behaviour as in core Drupal, just split up per module type.
I think it's a change that would be better made in core, or something another module could provide. There would be issues getting it to work with teaserbytype if you wanted both functionalities, but that could be figured out.

Like asak says, you can just alter the numbers in the module file :)

#4

chadcross - October 24, 2008 - 18:43

Okay. Thanks. I have done that.

#5

bellkiss - December 19, 2008 - 18:29

Can the module be altered so that the teaser cuts off after a word (i.e. a space occurrence)?? Right now, obviously, it just cuts after say 100 characters regardless of spliting a word in half.

Thx.

#6

joachim - December 19, 2008 - 19:38

The module uses Drupal core's teaser generating function. AFAIK that shouldn't cut words. Do you get the same problem if you disable this module and set all teasers to 100 characters?

#7

bellkiss - December 19, 2008 - 21:03

Sorry, but what module do you want me to disable? If you mean disabling your custom TxCT then how do I set all teasers to 100 in the core teaser function? In admin/settings/node-settings the lowest option is 200 characters?

#8

bellkiss - December 19, 2008 - 21:07

OK, I set it to Unlimited to disable the core teaser function and it appears to be working now.... I will add some more content and see what happens. I'll keep you posted. Thanks!

#9

bellkiss - December 31, 2008 - 01:24

No luck with this. Any thoughts?

#10

joachim - April 22, 2009 - 17:21
Status:active» needs review

I've just committed a change that gets the list of lengths straight from core.

Try the dev version of this module (when the bot rolls it), along with the attached module.

AttachmentSize
teaserlengths.zip 742 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.