To implement it, you have to:
1. Decompress the attached helene.zip into your manager/media/ directory (this should create the directory manager/media/helene/ with 5 files.
2. Change the "<textarea...>" line at the bottom of "manager/actions/dynamic/mutate_snippet.dynamic.action.php" and insert the Helene lines after it as indicated below:
...
 </table>
 <textarea name="post" style="width:100%; height: 80px;" onChange='documentDirty=true;'><?php echo htmlspecialchars($content['snippet']); ?></textarea><br />
 <!-- Start of Helene PHP syntax highlighter -->
 <input type="button" name="clear" value="Clear" onClick="editor.setContents('');">
 <input type="button" name="save" value="Save to Textarea" onClick="mutate.post.value = editor.getContents().replace(/\<\?/,'').replace(/\?\>/,'');">
 <input type="button" name="load" value="Load from Textarea" onClick="editor.setContents('\<\?'+mutate.post.value+'\?\>');">
 <script src="./media/helene/highlight.js"></script>
 <script src="./media/helene/editor.js"></script>
 <iframe name="editor" src="./media/helene/editor.html" style="width: 100%; height: 270px;"></iframe>
 <!-- End of Helene PHP syntax highlighter -->
 <input type="submit" name="save" style="display:none">
 </div>
</form>Now you will have two textareas, one small one being the original one and a bigger one for editing. With the buttons in between you can copy the text between the two areas. I have unfortunately not yet found a more comfortable way to integrate Helene (especially not just replacing the original textarea with a syntax highlighted one), but will post here, if I find one.
Disclaimer: Only tested on Firefox so far.
PS: I have seen the "Syntax-Highlighting in Resources" thread, but I don't understand how his suggestions are supposed to work. It didn't work for me, and since there was no more activity in that thread, I guess it doesn't?
Attached Files
Edited by hugelmopf, 27 August 2005 - 05:53 PM.












