I took a go at updating it, see attached patch. It takes out the _help hook entirely, took out an if block (that's why the patch looks so drastic), and some other changes as per node type settings changes page.

Comments

sillygwailo’s picture

StatusFileSize
new153 bytes

Attaching the .info file.

sillygwailo’s picture

Category: task » feature
sillygwailo’s picture

StatusFileSize
new3.26 KB

Second attempt at a patch. For some reason an empty teaser doesn't cause the module to use node_teaser to autogenerate a teaser as per the help text.

sillygwailo’s picture

StatusFileSize
new3.26 KB

A third try, this time replacing $node->teaser with $form['#node']->teaser (for the edit page).

sillygwailo’s picture

StatusFileSize
new3.34 KB

A fourth try, making it work for the new post page as well as the edit page.

sillygwailo’s picture

Status: Active » Needs review
anantagati’s picture

StatusFileSize
new3.54 KB

When teaser is empty generate teaser from body.

peterx’s picture

The changes work in RC2. I manually applied your changes from the patch file as I already had a change in Excerpt.

You remove the trim() around the teaser. I tried typing a space into teaser and it was accepted. The teaser did not display and the body was not substituted. I add back the trim.

amedjones’s picture

this is probably a dump question, but do we apply the patch? what files do we copy it into and do we overwrite anything?

also im very curious an anxiously waiting for the official update, anyone know if the maintainers are working on it?

thanks

amedjones’s picture

ok I think I figured out where to put the patch, i just overwrote everything from the excerpt.module and remove the "+" signs
but now I see the option to enable this module, nor do i see any option to configure it

any idea? what am i doing wrong?

thanks in advance

amedjones’s picture

StatusFileSize
new3.58 KB

ok hopefully this is my last post for tonight
i figured out why I couldn't see the module on the site, it was because I was missing the excerpt.info, I tried to save Richard's version but i got an access denied error message
- also thank you petrex for updating the script, there was a small error on line 28, basically it was missing an extra curly bracket. I also extended the teaser to 6 rows so if you have the fckeditor installed it will replace it the text with this module.

I attached both files to this post so feel free to installed and comment on, just make sure the two files are on the same folder (i.e modules/excerpt/..

amedjones’s picture

StatusFileSize
new238 bytes

here is excerpt.info

smazsyr’s picture

That link for excerpt.info seems unavialable.

SemperFideles’s picture

Looks like all the .info files don't have permissions set to be able to download. Any way to get a copy of this?

SemperFideles’s picture

Recommend anyone who has a valid excerpt.info file to post the proper code inside code tags so we can copy and paste into an .info file. I've noticed the same problem that Drupal seems to have a problem with .info attachments.

anantagati’s picture

StatusFileSize
new88 bytes

Here is content of excerpt.info:

; $Id$
name = Excerpt
description = Allows users to enter a separate excerpt for nodes.
Boletus’s picture

I would be nice if someone could point which files are the once to use, and how.

The patch file at the top of this project issue, is that the one to use? What about the info-file? What am I supposed to do with it? I can't find any relevant information about that when I search the handbooks.

Boletus’s picture

Hello again
Being a total noob when it comes to applying patches. I would much appreciate if somebody could point me in the right direction. How do I patch the 4.7 excerpt module to 5.0?

mjohnq3’s picture

You don't need to patch it just download excerpt.module from item #11 above and excerpt.info.txt from item #16. Rename excerpt.info.txt to excerpt.info and place both files in a folder named excerpt under .../drupal/modules/ and then goto the Drupal Modules page and activate the Excerpt Module. The Teaser text box will now appear for every node type.

Boletus’s picture

Thanks a billion! :) How simple things are when you know them, and how completely annoying they are when you spend hours to try to enlighten yourself to no avail.

Works great. I am indebted. :)

stefano73’s picture

StatusFileSize
new3.01 KB

Some code clean up. This patch is against the cvs version.

Christoph C. Cemper’s picture

would be cool to have this in the DRUPAL-5 branch

mr700’s picture

I'd like to see this too (subscribing).

ximo’s picture

Ditto

SemperFideles’s picture

StatusFileSize
new3.43 KB

I've attached a working version of the module based stefano's patch file. I've got it working fine on Drupal 5.1.

For your excerpt.info file you can copy and paste this text:

; $Id: excerpt.info$
name = Excerpt
description = "Create excerpts in node form for teasers."
package = Core - optional
version = VERSION

; Information added by drupal.org packaging script on 2007-01-15
version = "5.0"
project = "drupal"
robotjox’s picture

Hi,

does anyone know how to hide the excerpt teaser from certain node types?

I have the weblink module installed and I don't need teasers for links.

thanks!

hesco’s picture

I can report that the code made available in Post #25 by Semper Fideles a few days ago, "works for me" in our environment. Thank you kindly. You were right on time.

redsky’s picture

I can verify that the code from Post #25 by Semper Fideles works for me as well in Drupal 5.1 using PostgreSQL, thanks. But like Post #26 by robotjox I can not see the "Excerpt" section under the Content Type page that in 4.7 used to let you specify whether a Teaser "Auto-generated" or "Manual excerpt".

jjeff’s picture

This "patch" does not work correctly for me. After changing the content-type settings to "Auto-generated" teasers, a teaser field still appears on the node edit page.

jjeff’s picture

StatusFileSize
new3.73 KB

Okay, here's a patch against the current HEAD version that should work correctly. Additionally I've added a "weight" option so that you can choose where the teaser textarea shows up on the node editing page.

somes’s picture

Getting failed hunk where did you get the current head verison from

shipal’s picture

Status: Needs review » Active

Subscribing.

somes’s picture

Yep found the download of the CVS and applied the patch(file 5) seems to fix the problems described above,

Had problems getting drupal to detect it - clearing the cache on the third attempt seemed to do it.

havent come across any other issues

druvision’s picture

+1 for Patch 5 - it works for me.

Unlike the new 'Node teaser' module, this module saves the teasers of previous versions.

pz’s picture

StatusFileSize
new2.39 KB

To add to the general confusion of this thread -- here is another version of the module. No patch, complete module in txt-format, just another alternative for people too choose from.

I have only tested it on my test-site but it seems to work for me, but no guarantees.

One added feature, excerpt is shown in a (collapsed) fieldset to make it less annoying if not using it.

Still need a info file, see above or something like this

; $Id$
name = "Excerpt"
description = "Adds teaser (update of contrib/excerpt 4.7)"
genx’s picture

StatusFileSize
new4.09 KB

Combining excerpt-5.patch, which works fine for me, with the result of a diff -N (that assumes that none existing files are blank), generates a patch file that will both

  • patch excerpts.module.
  • create excerpts.info.

I'm uploading it as excerpt-6.patch. I hope I'm not just adding to the confusion here, and that some people might actually find it usefull :-)

P.S. This will be my very first submitted patch to Drupal, so I hope I'm doing it right :-p

Andrzej7’s picture

StatusFileSize
new3.34 KB

Strange situation

I have the vercsion of the module made from patch (attached)

It works with Drupal 5.1 dev from 7-03-2207 and doesn't work with the version from 18-04-2007. What I mean - whatever I assign in settings (manual or automatic) it makes it automatic.

Very confusing siuation with a very, VERY important module :-(

Couldn't it be taken to core? Sorry, I'm not a coder - I can't help.

Andrzej

Andrzej7’s picture

Additionally:

the same with
// $Id: excerpt.module,v 1.7 2007/04/05 20:02:48 hayesr Exp $

It generates teasers (on displayed pages like example.com/blog or front page) automaticaly, even if they are not in the database!!!

The attached version from patch - makes the same things.

hayesr’s picture

Status: Active » Closed (fixed)