Port to drupal 6.0

reikiman - February 16, 2008 - 18:15
Project:quicktags
Version:5.x-3.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:patch (reviewed & tested by the community)
Description

I ran the coder (code review) module and it led me through some changes that got close to it working on drupal 6.

Remaining issues are:

Line 116: new hook_theme() function is required to register theme_ functions (Drupal Docs http://drupal.org/node/114774#theme_registry)
function theme_quicktags_textfield($element) {

severity: criticalLine 47: The menu system has been completely over-hauled in 6.x. (Drupal Docs http://drupal.org/node/102338)
  if ($may_cache) {

severity: criticalLine 48: The menu system has been completely over-hauled in 6.x. (Drupal Docs http://drupal.org/node/102338)
    $items[] = array(

severity: criticalLine 54: The menu system has been completely over-hauled in 6.x. (Drupal Docs http://drupal.org/node/102338)
    $items[] = array(

AttachmentSize
quicktags.diff7.05 KB

#1

tcblack - February 25, 2008 - 19:08
Category:bug report» task

Moving from bug to task since needing a 6.x version is not exactly a bug.

#2

nbz - March 8, 2008 - 21:31

subscribing.

#3

nbz - April 3, 2008 - 21:09

Attached is a patch without the coder style fixes. It should be more or less complete.

however, it does not work - an additional textarea is shown instead of the buttons. I think this may be a javascript error.

AttachmentSize
quicktags_drupal6.patch2.86 KB

#4

nbz - April 3, 2008 - 21:09
Status:active» patch (code needs work)

#5

quicksketch - April 30, 2008 - 01:00
Status:patch (code needs work)» patch (code needs review)

Looks like the new way Drupal handles JavaScript doesn't agree with Quicktags' dynamic JavaScript file. We need to explicitly tell it not to try to aggregate the JavaScript or errors will go crazy.

Also, looks like the new drupal_get_js() will no longer take a query string like "?q=quicktags" as a valid JavaScript location. I removed the "?q=" for now (meaning you need a server that supports clean URLs). A cleaner solution would be to either add inline JavaScript, or save a physical file into the files directory that the aggregater can agree with.

However, this patch is fully working and changes as little code as possible. The fix needed to cleanly add the dynamic JavaScript file should be done in both the 5 and 6 version in a later patch.

AttachmentSize
quicktags_drupal6.patch3.77 KB

#6

heirecka - June 11, 2008 - 15:11
Status:patch (code needs review)» patch (reviewed & tested by the community)

I can confirm the patch is working, although there are two remaining issues:

  • Firebug tells me about two errors on sites without the quicktags toolbar: edCanvas and edToolbar are not defined. Don't know whether this could be avoided.
  • the patch fails on the *.info files

#7

paddes - June 27, 2008 - 02:22

Hello,
could somebody please upload a patched version of the module?
I am desperately trying to get this running on drupal 6 :)

thanks a lot,
paddes

#8

nbz - June 27, 2008 - 02:53

You may wanna try the markitup module. It and this module are very similar when it comes to the end user.

http://drupal.org/project/markitup

#9

paddes - July 1, 2008 - 21:54

thanks a lot, but I found something better. The BUeditor.
http://drupal.org/project/bueditor

 
 

Drupal is a registered trademark of Dries Buytaert.