Full Node Body

neyoung - August 30, 2008 - 21:51
Project:Discuss This!
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:spiderman
Status:closed
Description

It would be nice if the new forum topic that is created contained all the text from the initial node. If Token provided this functionality this would be simple. However I think that I read somewhere that the Token maintainers don't want to provide this functionality because it requires to much overhead. Any chance your module could provided a feature like this?

#1

spiderman - October 15, 2008 - 01:21

You are correct, concerns have been expressed in a couple of places about adding this code, though I'm not sure exactly what the "performance concerns" are.

In any case, for the purposes of this smaller module (thus having smaller implications), I've decided to test out greggles' suggested approach which is essentially a localized version of this patch which follows the approach mentioned here. The patch is attached, and I'll commit it shortly (after a tiny bit of testing), to go into the forthcoming 1.0 release if it seems to work ok.

AttachmentSize
discussthis.302045.patch 2.06 KB

#2

spiderman - October 15, 2008 - 04:27
Assigned to:Anonymous» spiderman
Status:active» needs review

#3

spiderman - October 16, 2008 - 01:33

ok here's a slightly more tested (works for me) patch, although in the course of making this work i've realized there's a couple hitches to this approach:

1. the node body is not rendered as it would through node_view, and therefore any _nodeapi hooks etc. don't apply

2. the node access tables do not get checked (though this seems less of an issue, since they could see the original node in order to click the Discuss This link)

basically the only processing i've done on the node as passed to the token module is to strip out any "break" tag in the original body. you have been warned :)

AttachmentSize
discussthis.302045-2.patch 2.39 KB

#4

spiderman - October 16, 2008 - 13:30
Status:needs review» fixed

Committed for inclusion in 1.0 release: http://drupal.org/cvs?commit=146781

#5

Anonymous (not verified) - October 30, 2008 - 13:32
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.