Remove Quote link

nbz - June 25, 2007 - 01:14
Project:BBCode Formatting Bar
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The Quote link does not always work. it only works if the reply box is on the same page.

It also duplicates the functionality of the quote.module.

To remove the link in bbcode_wysiwyg.module, remove:

function bbcode_wysiwyg_link($type, $node = NULL, $teaser = FALSE)  {
  global $user;
  $links = array();
  if (!$teaser && $user->uid)  {
    $body = $node->body ? $node->body : $node->comment;
    $body = check_plain(str_replace("'", "\'", $body));
    $body = str_replace(array("\n", "\r"), array("\\n", "\\r"), $body);
    $name = str_replace(array('[', ']'), array('', ''), $node->name);
    $body = '<a href="javascript:void(null);" onclick="var txt=getTextarea();insertAtCursor(txt,\'[quote='. $name .']'. $body .'[/quote]\');txt.focus()">'. t('Quote') .'</a>';
    // quote this post
    $links[] = array('title' => $body, 'html' => true);
  }
  return $links;
}

from the bottom of the page. This removes the quote link.

 
 

Drupal is a registered trademark of Dries Buytaert.