More configurable text and title

eaposztrof - November 9, 2009 - 02:39
Project:Read More link (Drupal 6 and earlier)
Version:6.x-5.0-rc2
Component:Code
Category:feature request
Priority:normal
Assigned:Todd Nienkerk
Status:postponed (maintainer needs more info)
Description

Added more function, like add $node->title, with prefix and suffix to the text or to the title. The hacked pack is attached. Sorry for that, but no comments added, and it's a hurry up! project..

AttachmentSize
ed_readmore-6.x-5.0-rc2-hacked.tar_.gz9.84 KB

#1

Todd Nienkerk - November 10, 2009 - 05:01
Assigned to:Anonymous» Todd Nienkerk
Status:needs work» postponed (maintainer needs more info)

Someone submitted a patch for Token support that I committed earlier today. I'm pretty sure this will do exactly what you want. Can you confirm?

Issue: #465140: Use tokens such as [node-title] for Read More links and link attributes

#2

eaposztrof - November 12, 2009 - 18:13

Uhm.. yes, the yesterday published rc4's tokens the best choice.. but there is an another thing to do..

<?php
function ed_readmore_link_render($node, $display = 'inline') {
...
    if (
variable_get('ed_readmore_strip', TRUE) && is_numeric($link_text_maxlenght)){
      
$link_text = substr(htmlspecialchars($link_text, ENT_NOQUOTES),0,$link_text_maxlenght);
    }
...
  return
theme('ed_readmore_link', $node, $link_text, $link_options, $separator, $display);
}
?>

to strip the "Read more" link text with configured value.

regards.

#3

Todd Nienkerk - November 13, 2009 - 04:07

Can you explain the functionality behind what you've done here? I don't understand what you mean by "strip the 'Read More' link text with configured value." The link text is already fully customizable.

 
 

Drupal is a registered trademark of Dries Buytaert.