If any one interested, attached is port of Syntaxhighlighter to D7. It works well. We are using it all the time for our blog posts at www.touchnoc.com

Comments

twiik’s picture

I refuse to believe you are using that port all the time in its current form. :)

Because it didn't work at all for me until I made these changes according to this http://drupal.org/node/224333#drupal_add_js_options :

  drupal_add_css($styles_path .'shCore.css', 'module'); # line 57
  drupal_add_css($styles_path . $theme, 'module'); # line 59

Removed , 'module':

  drupal_add_css($styles_path .'shCore.css'); # line 57
  drupal_add_css($styles_path . $theme); # line 59

Before I removed 'module' no styles were added and I received no syntax highlighting. Now it works perfectly.

Great port btw. :)

ao2’s picture

subscribe

scw’s picture

thx it works...
had to remove line #322

tanc’s picture

StatusFileSize
new1.03 KB

Thanks for the port atchijov. It works great with the modifications in #1 and #3. Attached is a patch with both the changes. I found the module worked fine with css aggregation off but when it was turned on the styles weren't being added. #1 fixes that particular issue. #3 fixes compatibility with Drupal 7 beta 1, although I don't know if there are implications with removing file_directory_path() in line 322 (not sure what it does).

Everything seems to be working nicely now. Any chance of pushing out a 7.x-1.x-dev release?

kostajh’s picture

StatusFileSize
new26.06 KB

I applied the patch from #4 to the original files in this thread and it works fine. The zip file attached here includes the patch from #4. Seems like it is ready for a dev release.

teiko’s picture

Does someone adopted this Module, or is it allready stopped here ?

Greetings Chris

mattyoung’s picture

The port to D7 involve more than just changing the call to drupal_add_js(). Several other things need changing like the file api, file_scan_directory(), javascript behaviors etc. I would help me a lot if you make any change, make it against cvs head and give me patch file instead of zip file.

mattyoung’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Fixed

D7 port is released

Status: Fixed » Closed (fixed)

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