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....
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?
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.
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.
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.
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.
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.
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
;
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.
Comments
Comment #1
matt bSame here - is this being worked on?
Comment #2
Vlad M commentedin Drupal 6.x teaser and body are separate fields, so it makes no sense to use a special module for that ;)
Comment #3
matt bThat'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....
Comment #4
matt bSo 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?
Comment #5
gabble commentedSubscribe the SQL script request! I have drupal 5.9 with thousands of nodeteasers! :-(
Comment #6
matt bRunning the following in phpmyadmin worked fine for me:
I'd appreciate confirmation / testing of the above. Also, I've found that FCKEditor works with the split summary functionality in Drupal 6.
Comment #7
andrewoke commentedI'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.
Comment #8
mshepherd commentedHey, 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.
Comment #9
myka commentedI also use TINY MCE...is there a way to get the split functionality back with it?
Comment #10
matt bMyka - I migrated from Tinymce to FCKEditor. It supports the split functionality, and seems to do everything tinymce can.
Comment #11
panji commentedsubscribe
Comment #12
myka commentedThanks Matt, I'll check it out.
Comment #13
nancydru@andrew1056: Dealing with abandoned projects
I encourage you to follow this process. It may seem excruciatingly slow, but it works.
Comment #14
ideaoforder commentedAndrewn,
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!
Comment #15
nancydruSee #296833: Offering to co-maintain Node Teaser for a maintainer
Comment #16
916Designs commentedHey SQL in #6 worked great... thank you so much for posting it...
Had to modify the syntax slightly:
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.
Comment #17
grendzy commented#249111: Drupal 6 version
Comment #18
Kat_Sweden commentedThanks 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
Comment #19
Harald commentedIf 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"
Comment #20
steveOR commentedThank 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.
Steve Or http://stevenread.com