Posts: 2,094
Threads: 54
Joined: Jan 2011
2011-06-22, 06:16:45
(This post was last modified: 2013-01-06, 02:43:52 by mvlcek.)
Theme Highlighter performs syntax highlighting when you edit the theme or the components in the administration and simplifies editing: - suggests GetSimple functions, plugin functions and common PHP functions, when you press Ctrl-Space (version 0.8+)
- shows a color preview, when moving the mouse over a CSS color (version 0.9+)
- shows a color picker, when you press Ctrl-Space (version 0.9+)
- suggests CSS property names, when you press Ctrl-Space elsewhere during CSS editing (version 0.8+)
- maximizes the editor, when you press F11 (version 0.9+)
Installation
Unzip the plugin ( http://get-simple.info/extend/plugin/the...ghter/186/) to your plugins directory.
If you want a dark theme, you can replace plugins/theme_highlighter/css/default.css with dark.css.
Usage
Go to Theme/Edit Theme or Theme/Edit Components in the administration. The text in the text areas should be colored.
- Press F11 to maximize the editor
- Press Ctrl-Space on PHP code, CSS code or CSS colors to get suggestions or the color picker.
- Select a suggestion with Enter or close the suggestions with ESC
- Select a color by clicking elsewhere or pressing Enter, abort with ESC
Posts: 1,247
Threads: 82
Joined: Feb 2011
Nice.
When I upload the zip-file to my webpage and unzip it there (using cpanel), I see that the file and folder permissions are all 777. For most other plugins this is (by default) 644 for files and 755 for folders. This seems to be the case with all your plugins and this new one is no exception. I hope you might want to fix this for future releases.
Posts: 346
Threads: 27
Joined: Sep 2010
Works like I am editing in a code-friendly text editor, now with the ability to see line numbers. No problems.
In a word: perfect.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Very useful plugin! Thanks for sharing it.
Posts: 2,094
Threads: 54
Joined: Jan 2011
Theme Highlighter version 0.8: - Improved parsing - recognizes PHP within HTML tag attributes, CSS and Javascript
- Highlight GetSimple functions (core and selected plugins)
- Autocompletion in PHP files - press Ctrl-Space to get suggestions in PHP (some important PHP functions, GetSimple theme functions and public functions of selected plugins)
You can add and/or correct functions (for highlighting and autocompletion) in theme_highlighter/ac_php_*.txt. Standard PHP functions can be found in theme_highlighter/ac_php.txt - it is intentional that only functions important for templates and components are listed.
Please post all additions/corrections in this topic. I will include them in the next release.
Posts: 2,094
Threads: 54
Joined: Jan 2011
Theme Highlighter version 0.9: - Maximize editor with F11
- Show CSS color previews on mouse-over
- Show color picker, when pressing Ctrl-Space on a CSS color
Posts: 346
Threads: 27
Joined: Sep 2010
The maximizing works, as do the CSS colour previews. However the 'While editing press Ctrl-Space for suggestions, F11 for fullscreen.' message appears on all pages, and no suggestions appear when I press Ctrl-Space.
Posts: 2,094
Threads: 54
Joined: Jan 2011
Angryboy Wrote:The maximizing works, as do the CSS colour previews. However the 'While editing press Ctrl-Space for suggestions, F11 for fullscreen.' message appears on all pages, and no suggestions appear when I press Ctrl-Space.
Suggestions will only be shown in CSS files and in the CSS and PHP fragments of template files and components.
Posts: 346
Threads: 27
Joined: Sep 2010
That is what I mean. I tried it when editing my template files and nothing happened. And when I say 'all pages' for that message, I mean literally all back-end pages, from the main 'Pages' page to the 'Settings' page.
Posts: 2,094
Threads: 54
Joined: Jan 2011
Angryboy Wrote:That is what I mean. I tried it when editing my template files and nothing happened. And when I say 'all pages' for that message, I mean literally all back-end pages, from the main 'Pages' page to the 'Settings' page.
The message is fixed in Theme Highlighter version 0.9.2.
Which browser are you using? I tested on Firefox and Chrome.
Do you get any Javascript errors?
Can you save the page as "Complete web page", zip it and send it to me via PM?
Posts: 346
Threads: 27
Joined: Sep 2010
Nevermind. I'd been performing the Ctrl-Space input in the wrong place. Works fine xD
Thanks for fixing the page messages now. Everything seems to be in tip-top shape.
Posts: 6,266
Threads: 181
Joined: Sep 2011
This plugin is awesome.
Can it be extended to the page editor ?
Has anyone tweaked this for fullscreen and syntax in the normal page editor ?
Posts: 2,928
Threads: 195
Joined: Feb 2011
we use syntax highlighter in the ckeditor at www.get-simple.de
it is working well
you have to install the syntax highlight JS + the syntax highlighter plugin for CKEDITOR
I did not describe that in the wiki because I cannot describe ALL Ckeditor-options ;=)
Posts: 661
Threads: 52
Joined: Feb 2011
Connie Wrote:we use syntax highlighter in the ckeditor at www.get-simple.de
it is working well
you have to install the syntax highlight JS + the syntax highlighter plugin for CKEDITOR
I did not describe that in the wiki because I cannot describe ALL Ckeditor-options ;=)
Thanks for the suggestion Connie.. I have it implemented in a much more (pointlessly) complicated mannor.
Posts: 3
Threads: 1
Joined: Nov 2011
Connie Wrote:we use syntax highlighter in the ckeditor at www.get-simple.de
it is working well
you have to install the syntax highlight JS + the syntax highlighter plugin for CKEDITOR
I did not describe that in the wiki because I cannot describe ALL Ckeditor-options ;=)
Is there any chance that you could add that to the wiki? I have tried to do what you describe, but so far, I'm not having any success.
Thanks!
Posts: 2,928
Threads: 195
Joined: Feb 2011
apatheticresistance Wrote:Is there any chance that you could add that to the wiki? I have tried to do what you describe, but so far, I'm not having any success.
Thanks!
There is a chance, but unfortunately I have no time in the moment ;=(
sorry, I will put it on my todo-list
PS: I added it to the WIKI, see here: http://get-simple.info/wiki/how_to:edito...how_to_use
Posts: 2,094
Threads: 54
Joined: Jan 2011
Posts: 2,094
Threads: 54
Joined: Jan 2011
Theme Highlighter version 1.0: - compatible with GetSimple 3.1 (beta)
I bumped the version to 1.0, as there have been no bugs reported for a long time.
Posts: 24
Threads: 4
Joined: Feb 2012
(getsimple 3.1 / Theme Highlighter plugin 1.0)
In firebug in firefox 3.6.26 displays this error when you install the plugin Theme Highlighter:
CodeMirror.newFoldFunction is not a function
[Stop when the error] var foldFunc = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder);
theme-edit.php (line 201)
Posts: 2,094
Threads: 54
Joined: Jan 2011
Superbobo Wrote:(getsimple 3.1 / Theme Highlighter plugin 1.0)
In firebug in firefox 3.6.26 displays this error when you install the plugin Theme Highlighter:
CodeMirror.newFoldFunction is not a function
[Stop when the error] var foldFunc = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder);
theme-edit.php (line 201)
I didn't find neither foldFunc nor newFoldFunction in the plugin's code. This must be an error message of Firebug - maybe it's using CodeMirror, too.
Posts: 1,108
Threads: 70
Joined: Aug 2009
Would this be due to GS3.1 using codemirror for theme editing, it has foldFunc included...
Posts: 3,491
Threads: 106
Joined: Mar 2010
@mvlcek
# comments in php are not coloured as such (brown).
/* ... */ and // however are ok.
E.g. edit Innovation's template.php and see lines 11 and 12.
Or may I have something wrong? Tested plugin version 1.0 with GS 3.0 and 3.1.
Posts: 16
Threads: 2
Joined: Jun 2010
When the HTML editor disabled in GS settings, why Syntax Highlighting not working with page editor?
Posts: 28
Threads: 4
Joined: Sep 2011
This plugin is fully awesome - many thanks.
Only slight niggle is the auto-completion seems less perfect than it might be. If I'm typing CSS, and start with "fon" then hit Ctrl+Space, I rightly get all the possible CSS properties starting with "fon...". However, when I select a suggestion (either with return, space or double mouse click) the suggestion gets added to what I was already typing - eg, "fonfont-variant".
I don't know if there's anything that can be done about this, as I guess it depends on third-party libraries? It seems to make the auto-suggestion thing a bit useless except as a memory-jogger on occasions.
My browser is Chromium 15.
Posts: 2,094
Threads: 54
Joined: Jan 2011
Theme Highlighter version 1.0.1: - recognizes # comments in PHP code (@Carlos)
- replaces the current word, when a suggestion is suggested (@Mark Nielsen)
@Eugene: the plugin does not work with the page editor, even if the CKEditor is switched off.
|