When a node has some CCK fields and they get shown in the teaser for that node, the CCK fields always appear below the 'read more' link. Have a look at an event on http://tt.org.nz for an example

<div class="content"><div class="event-nodeapi">
    <div title="2008-10-05T06:30:00Z" class="event-start dtstart"><label>Start: </label>5 Oct 2008 - 7:30pm</div></div>
<p><b>Money as Debt</b> Paul Grignon's 47-minute animated presentation of "Money as Debt" tells in very simple graphic terms what money is and how it is created.  Money has become the drug of our societies. Confronted with this phenomenon, citizens all over the world are inventing complementary currencies for social ends and are opening the debate: What is money for?</p>
<span class="read-more"><a href="/node/686"><strong>»  Read more</strong></a></span><div class="field field-type-text field-field-venue">
      <div class="field-label">Location / Venue: </div>
    <div class="field-items">
                  <div class="field-item">
                                Earthsong Eco-Neighbourhood Common House, 457 Swanson Rd Ranui              </div>
        </div>
</div>
</div>
CommentFileSizeAuthor
#13 ed_readmore_297010_13.patch1.32 KBkdebaas

Comments

rimu’s picture

Oh I should add that changing the $marker_to_insert_at = "</p>"; line to $marker_to_insert_at = "</div>"; didn't help. I get the impression that CCK might be adding it's fields in AFTER this module is.

mcurry’s picture

Category: bug » feature

I realize that this may seem strange, but I consider CCK compatibility (or indeed, compatibility with any non-core module) to be a feature request, not a bug. (Last time I checked, CCK was not part of core... or have I missed something?)

If someone can submit a patch that will allow reliable CCK compatibilty, by all means, please submit the patch. I doubt I'll have time to work on this anytime soon.

mcurry’s picture

You could try adjusting the modules' relative weights in the system table - make ed_readmore 'heaviery' than CCK and the CCK field modules... (this all seems so familiar -- I think that there have been issues filed against ed_readmore in the past, and the system table weights may be a way to fix this.)

mimhakkuh’s picture

I'd also think that CCK Compatibility would be a most important feature. Using cck text fields for all my drupal site's teasers ...

Is this feature actually beeing considered for future versions of Read More Tweak?

todd nienkerk’s picture

Title: incompatible with CCK fields » Incompatible with CCK fields

For reference, the following issues are duplicates of this one:

todd nienkerk’s picture

The solutions outlined in the following bugs have fixed this problem:

I will commit the code shortly.

todd nienkerk’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

kdebaas’s picture

Status: Closed (fixed) » Active

I am re-opening this issue as I believe that the expected behaviour could be open to discussion. I also have a teaser listing of events, where the event content type consists of a tilte, a body text and cck fields for venue and dates. However, I do expect to have the Read more link displayed inline with the teaser field, before the actual cck fields, when I select the inline option, even if I have chosen to display those cck fields in my teaser displays.

todd nienkerk’s picture

kdebaas: Can you verify that the behavior you describe in #10 does not occur as desired in the 6.x-5.0-RC1 release? The 5.0-RC1 release is a bit newer than 3.x-dev, which is itself completely different than 3.0.

kdebaas’s picture

Title: Incompatible with CCK fields » Inline placement of read more link in teaser with CCK fields
Version: 6.x-3.x-dev » 6.x-5.x-dev

Yes, the described behaviour occurs in the 6.x-5.0-RC1 release, which I started using since I liked very much the move from hook_nodeapi to template_preprocess_node.

I saw in your code that ed_readmore_link_place() works on the teaser as provided by $variables['content'] as in $variables['content'] = ed_readmore_link_place($variables['content'], $variables['node'], $display); which obviously already contains the CCK fields that were set to display in the teaser.

I had thought that the CCK fields could be circumvented by working instead on $variables['node']->teaser but I didn't manage to get that to work yet. What do you think?

kdebaas’s picture

Status: Active » Needs review
StatusFileSize
new1.32 KB

Attached patch inserts the read more link inline with the teaser field, above cck fields that are set to display below the teaser.

Choosing the option 'after' for placement of the read more link places it at the end of the teaser, below the cck fields.

todd nienkerk’s picture

Assigned: Unassigned » todd nienkerk
Status: Needs review » Postponed (maintainer needs more info)

kdebaas: I've been trying to replicate this behavior, but so far, the Read More link reliably appears before any CCK fields added to the teaser. (I'm using CCK 6.x-2.5.) It seems the behavior you want is already built into the module. Just for kicks, I compared your $insert_point value with $match[0][1] and found they were the same each time.

Would you mind checking the latest 6.x-5.x-dev snapshot and let me know exactly how I can replicate an instance in which the Read More link appears after any CCK fields?

todd nienkerk’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I'm pretty sure this has been fixed here:#629990: Read More link not inserted properly when CCK fields are displayed before node body. Marking as a duplicate.