Considering how powerful the new Geshi Filter Drupal Module is now, I thought I'd have my try at recreating a PasteBin web application using Drupal. The outcome was: DrupalBin.
To make it more helpful for Drupal developers, I started work on a Drupal language definition for Geshi syntax highlighting of Drupal code. So far there are only a small group of Drupal functions and constants in there, but it's slowly growing. I think the best example of it in use is at drupalbin.com/4, where you can click on "drupal_site_offline()", and it takes you to the documentation. The language file is attached (drupal.php), which you can just stick into the Geshi language directory. Work will continue on this, and as updates come, I'll re-upload the file here.
As a side note, soxofaan, would you like to help out with DrupalBin?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | drupal.php__1.txt | 55.39 KB | robloach |
| #5 | drupal.php__0.txt | 55.37 KB | robloach |
| #4 | extract-drupal-functions-output.txt | 32.38 KB | soxofaan |
| drupal.php_.txt | 25.85 KB | robloach |
Comments
Comment #1
soxofaan commentedGood Idea,
Would you want me to put it in CVS already?
For example in a directory 'misc' or something?
Comment #2
robloachNot sure where it would go... I've been trying to utilize the API module to automatically output all constants and functions in a comma-separated format, but can't get it.
Comment #3
robloachJust saw this, a script to generate a list of Drupal functions from source.
Comment #4
soxofaan commentedI've written this small Python script to extract function names and "define" constants:
result for Drupal 5.2 in attachment
Comment #5
robloachNice one! The attached is drupal.php, which acts as the Geshi language filter found on DrupalBin.
Mind if we put this in the CVS? I think putting it into
contributions/modules/geshifilter/drupal.php
... would be fine. It's your call. Also, can I have CVS write access so whenever I make a change to this, I can reflect the changes in the CVS?
Comment #6
robloachPut in some installation instructions.
Comment #7
soxofaan commentedMaybe it's better to create a directory 'geshi_extra' where users can put their custom language definitions (and where drupal.php would be by default). Just like one should put contrib drupal modules in "/sites/all/modules" instead of "/modules" to keep the drupal core directories clean.
I think it is possible to make GeSHi also scan extra directories for language definitions. But I'll have to look into this.
Comment #8
wim leersSubscribing. Awesome work guys :)
Comment #9
soxofaan commentedfixed in
http://drupal.org/cvs?commit=91131 : GeSHi filter module now also looks for language definition files in geshi-extra directory, added drupal5 and drupal6 definition files
Comment #10
soxofaan commentedComment #11
Christefano-oldaccount commentedAfter updating to 5.x-2.3 the language cache needed to be flushed but now GeSHi is better than ever. Thanks guys.
Comment #12
soxofaan commentedDid you run update.php?
I added a hook_update_N() function for flushing that cache automatically on the update to 5.x-2.3.
Thanks
Comment #13
Christefano-oldaccount commentedOops, it looks like I missed that. Thanks for the reminder.
Comment #14
robloachI've updated to GeSHi Filter 2.3 on DrupalBin.
Comment #15
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.