Its one of the most important features on our site
If you can do a Drupal 6.x version, we will be forever grateful :)

Comments

matt b’s picture

Same here - is this being worked on?

Vlad M’s picture

in Drupal 6.x teaser and body are separate fields, so it makes no sense to use a special module for that ;)

matt b’s picture

That's great, but I'm upgrading my site from 5.x to 6.x, how do I get the teaser information for 700+ nodes into the new teaser field?
Also on my upgraded test site where I am running the TinyMCE editor, I cannot see the 'split summary at cursor' button. I need TinyMCE editor or a similar editor that allows me to paste formatted text in, and I need to be able to create seperate teasers....

matt b’s picture

So I figure I need to try a different HTML editor, but also write some SQL to update the teaser field in node_revisions table with the data in the nodeteaser table. Anyone written this SQL already?

gabble’s picture

Subscribe the SQL script request! I have drupal 5.9 with thousands of nodeteasers! :-(

matt b’s picture

Component: Code » Documentation

Running the following in phpmyadmin worked fine for me:

UPDATE node_revisions SET node_revisions.teaser = ( SELECT nodeteaser.teaser
FROM nodeteaser
WHERE node_revisions.nid = nodeteaser.nid
AND nodeteaser.teaser <> "" )
WHERE EXISTS (
	SELECT 1
	FROM nodeteaser
	WHERE node_revisions.nid = nodeteaser.nid
)

I'd appreciate confirmation / testing of the above. Also, I've found that FCKEditor works with the split summary functionality in Drupal 6.

andrewoke’s picture

I've been working on a 6.x version of the node teaser. I'd like to release it here when it's finished.

Update:

I've completed porting the 6.x version of node teaser. Does anyone know if I could take over maintaining? I'd like to start contributing back to the community. I'll be testing for the next day or so and I'll have a release than.

mshepherd’s picture

Hey, I'd be really interested in getting hold of your teaser module for D6. Although it seems that the body and teasers are separate fields in the database, I, like some of the other commenters, use TinyMCE, and I lose the split at cursor functionality.

myka’s picture

I also use TINY MCE...is there a way to get the split functionality back with it?

matt b’s picture

Myka - I migrated from Tinymce to FCKEditor. It supports the split functionality, and seems to do everything tinymce can.

panji’s picture

subscribe

myka’s picture

Thanks Matt, I'll check it out.

nancydru’s picture

@andrew1056: Dealing with abandoned projects
I encourage you to follow this process. It may seem excruciatingly slow, but it works.

ideaoforder’s picture

Andrewn,

Sorry for the immense delay--if you're still interested, you're welcome to take over the module. Let me know and I'll get you CVS access, then you can contact the Drupal team to initiate the transfer.

Cheers!

nancydru’s picture

916Designs’s picture

Hey SQL in #6 worked great... thank you so much for posting it...

Had to modify the syntax slightly:

UPDATE node_revisions SET node_revisions.teaser = ( SELECT nodeteaser.teaser
FROM nodeteaser
WHERE node_revisions.nid = nodeteaser.nid
AND nodeteaser.teaser IS NOT NULL )
WHERE EXISTS (
SELECT 1
FROM nodeteaser
WHERE node_revisions.nid = nodeteaser.nid
)

There is no reason to upgrade this module to D6... if you are doing a D5 to D6 upgrade just run this query, then its safe to drop the nodeteaser table.

grendzy’s picture

Status: Active » Closed (duplicate)
Kat_Sweden’s picture

Thanks for the sql - here is a version for Postgres:

UPDATE node_revisions SET teaser=nt.teaser FROM nodeteaser nt WHERE nt.nid=node_revisions.nid AND nt.teaser IS NOT NULL

Harald’s picture

If you want to inserts nodeteaser from d5 teaser module into ONLY latest noderevision of every node with a corresponding teaser from the nodeteaser module, this script will do. This also inserts the

tag in for the "split summary at cursor"

REPLACE INTO node_revisions

SELECT 
	NR.nid, 
	NR.vid, 
	NR.uid, 
	NR.title, 
	CONCAT(NT.teaser, "\n<!--break-->\n", NR.body) AS body, # different operator in pg 
	NT.teaser AS teaser, 
	NR.log, 
	NR.timestamp, 
	NR.format
FROM node_revisions NR
INNER JOIN nodeteaser NT ON (NT.nid = NR.nid)
INNER JOIN (SELECT nid, MAX(vid) AS vid FROM node_revisions GROUP BY nid) NRMAX ON (NR.vid = NRMAX.vid)
AND NT.teaser IS NOT NULL AND NT.teaser <> '' # only nodes having nonempty teasers  
;
steveOR’s picture

Thank you #19 h@r@ld this works great, excellent script!

An additional option here... if you change one line (just the CONCAT function) it now causes the inserted teasers NOT to appear in the full views. Its the equivalent of taking your old nodeteaser records and inserting them with the 'show summary in full view' UNCHECKED.

CONCAT("<!--break-->\n", NR.body) AS body,

Steve Or http://stevenread.com