MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Jul 05, 2009, 09:09 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search via SMF
or Google:
modx forums
all of modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Read what MODx Developers say:
MODx Dev. Blogs
MODx Community Forums
»
Development & Coding
»
In Development
»
[Plugin] CodePress Snippet Syntax Highlighter
Pages: [
1
]
2
3
4
Go Down
« Previous topic
Next topic »
Print
Author
Topic: [Plugin] CodePress Snippet Syntax Highlighter (Read 16074 times)
0 Members and 1 Guest are viewing this topic.
netnoise
Coding Team
Posts: 213
[Plugin] CodePress Snippet Syntax Highlighter
«
on:
Oct 17, 2006, 10:54 AM »
This
experimental
Plugin replaces the standard textarea for editing snippets with
CodePress
. To use it, extract archive to plugins folder, create a new plugin with the code from codepress.plugin.php and toggle 'OnSnipFormRender' event.
Edit: Don't use this version, it has been obsoleted.
Try 0.2 instead.
codepress_screenshot.png
(78.35 KB, 881x791 - viewed 755 times.)
codepress-0.1.tar.gz
(60.13 KB - downloaded 489 times.)
«
Last Edit: Jun 21, 2007, 03:17 AM by netnoise
»
Logged
Write secure snippets!
Lock down your server!
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #1 on:
Oct 17, 2006, 10:58 AM »
There was already something to that effect, but it was not a *live* syntax highlighting... this is awesome !
I have been dreaming about this for a long time... Off to install this baby
It this works fine, I say we bundle this plugin with the MODx distribution...
Edit : Just wondering... how difficult would it be to add this for template editing ?
It would be nice having html with syntax highlighting... and modules, plugins and possibly other content too...
«
Last Edit: Oct 17, 2006, 11:06 AM by davidm
»
Logged
.:
nodeo.net
: Pour un web libre, moderne et ouvert ! ::
david-molliere.net
:
Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web
:.
***
Forums modxcms.fr
Participez à l'élaboration du site MODx francophone !
***
! Nouveau !
En live, ne manquez pas les news de modxcms.fr sur Twitter
! Nouveau !
MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.
Config :
Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)
Réalisations sous MODx :
|
pargade-notaires.fr
|
soleil.info
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
jocelyne-violet.net
netnoise
Coding Team
Posts: 213
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #2 on:
Oct 17, 2006, 11:38 AM »
The CodePress editor already supports HTML/CSS highlighting among PHP and others, too. It seems to be quite easy to make that work for template editing, chunks, and so. Will do it by time if nobody else does
Logged
Write secure snippets!
Lock down your server!
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #3 on:
Oct 17, 2006, 11:42 AM »
Yeah well, too bad I can't help there, my php training is planned in december...
Anyway, thanks
Logged
.:
nodeo.net
: Pour un web libre, moderne et ouvert ! ::
david-molliere.net
:
Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web
:.
***
Forums modxcms.fr
Participez à l'élaboration du site MODx francophone !
***
! Nouveau !
En live, ne manquez pas les news de modxcms.fr sur Twitter
! Nouveau !
MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.
Config :
Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)
Réalisations sous MODx :
|
pargade-notaires.fr
|
soleil.info
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
jocelyne-violet.net
Gildas
Full Member
Posts: 172
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #4 on:
Oct 18, 2006, 02:09 AM »
This is a GREAT tool
Exactly what I'am looking for... Now I have a replacement for all my [[Include]]
David
, I have made some tests and it works fine with Chunks and Templates...
Logged
Ackwa
| [Plugin] EditArea :
Download
/
Support
OncleBen31
Sr. Member
Posts: 283
I believe in MODx!
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #5 on:
Oct 18, 2006, 02:53 AM »
Waow
!!!
I dream of something like that. This Plugin is a must have. it's work well and it's easy to use it with template, chunk, plugin and module editing. Just replace the line
Code:
if($e->name=='OnSnipFormRender') {
by
Code:
if($e->name=='OnSnipFormRender' || $e->name=='OnChunkFormRender' || $e->name=='OnPluginFormRender' || $e->name=='OnModFormRender' || $e->name=='OnTempFormRender') {
And add the following events : OnChunkFormRender, OnPluginFormRender, OnModFormRender, OnTempFormRender
For the moment I don't succed in using it with document editing. Any idea ?
Logged
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #6 on:
Oct 18, 2006, 04:41 AM »
Thanks guys !
@OncleBen31 : I'll try this code !
I imagine what you tried and didn't get to work for documents is add
$e->name=='OnDocFormRender'
to the list.
I am no dev as you know, but when you tried it, did you turn off WYSIWYG ? If WYSIWYG is on, it is logical since it's not a textarea but a richtext area.
Plus, if there are several plugin which listen to the same event, that could also be the cause of it... There is a new feature in 0.9.5 which allows to control the execution ordrer of plugins, maybe look in that direction...
Logged
.:
nodeo.net
: Pour un web libre, moderne et ouvert ! ::
david-molliere.net
:
Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web
:.
***
Forums modxcms.fr
Participez à l'élaboration du site MODx francophone !
***
! Nouveau !
En live, ne manquez pas les news de modxcms.fr sur Twitter
! Nouveau !
MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.
Config :
Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)
Réalisations sous MODx :
|
pargade-notaires.fr
|
soleil.info
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
jocelyne-violet.net
OncleBen31
Sr. Member
Posts: 283
I believe in MODx!
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #7 on:
Oct 18, 2006, 04:57 AM »
I've already test without the Rich Text Editor : still doesn't work. And I've test to change the order execution with Button Botom Bar... and no change.
Logged
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #8 on:
Oct 18, 2006, 05:04 AM »
Ok... thanks.
Maybe someone from the dev team could help us here
Logged
.:
nodeo.net
: Pour un web libre, moderne et ouvert ! ::
david-molliere.net
:
Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web
:.
***
Forums modxcms.fr
Participez à l'élaboration du site MODx francophone !
***
! Nouveau !
En live, ne manquez pas les news de modxcms.fr sur Twitter
! Nouveau !
MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.
Config :
Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)
Réalisations sous MODx :
|
pargade-notaires.fr
|
soleil.info
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
jocelyne-violet.net
OncleBen31
Sr. Member
Posts: 283
I believe in MODx!
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #9 on:
Oct 18, 2006, 05:35 AM »
Quote from: davidm on Oct 18, 2006, 05:04 AM
Maybe someone from the dev team could help us here
Please
If there is RegExp master, I think it will be easy for him to add some code in the javascript to add the MODx tag for highlighting.
Logged
TobyL
Coding Team
Posts: 1,006
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #10 on:
Oct 18, 2006, 05:55 AM »
Whoa....ha!
MODx is starting to freak me
This is so cool man! Picked up a few typo's in my snippet straight away...
I did notice though that teh highlighting fails if there's a lot of comments at the top of the snippet. I looked at several snippets and each time if it has lot's of comments the code doesn't highlight anymore. Come to think of it this may have to do with (single) quote's in comments. The highlighter colors text in quotes, even in comments I noticed. Offcourse a single - single quote isn't unusual in comments. Hmm,.. I'll take that up with the developer I think.
Logged
eForm
|
eForm support
|
eForm @ wiki
davidm
MODx evangelist
Marketing & Design Team
Posts: 7,026
Software is like sex, it's better when it's free !
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #11 on:
Oct 18, 2006, 06:07 AM »
Did anyone of you have a path problem with the plugin ?
I get this error (with 0.9.5 rev 1732) :
Code:
Not Found
The requested URL /assets/plugins/codepress/codepress.html was not found on this server.
I have checked typing
http://www.mydomain.tld/assets/plugins/codepress/codepress.html
the file is there alright.
I am guessing it's a path problem.
Code:
ta.parentNode.innerHTML+= '<iframe onload="setCode();" style="border:none; margin:0; padding:0; width:100%; height:400px;" id="codepress" src="/assets/plugins/codepress/codepress.html"></iframe><br />';
It seems it's a relative path, might be what's causing this...
Edit :
It's indeed a path problem.
I have harcoded the full url instead of relative path and it's working as expected...
«
Last Edit: Oct 18, 2006, 06:13 AM by davidm
»
Logged
.:
nodeo.net
: Pour un web libre, moderne et ouvert ! ::
david-molliere.net
:
Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web
:.
***
Forums modxcms.fr
Participez à l'élaboration du site MODx francophone !
***
! Nouveau !
En live, ne manquez pas les news de modxcms.fr sur Twitter
! Nouveau !
MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.
Config :
Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)
Réalisations sous MODx :
|
pargade-notaires.fr
|
soleil.info
|
gican.asso.fr
|
michelez-notaires.com
|
amadom.gerondicap.com
|
jocelyne-violet.net
Onesmarthost
Moderators
Posts: 436
I love MODx!
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #12 on:
Oct 18, 2006, 07:24 AM »
This is a great addon
Thanks.,
Logged
Aaron Wardle
http://www.onesmarthost.co.uk/modx-hosting-offer.html
// UK Web Hosting with lots of MODx Love..
Free MODx Install
Free transfer from existing web host!
Perrine
Moderators
Posts: 1,774
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #13 on:
Oct 18, 2006, 07:52 AM »
Very nice ! Thx a lot
Logged
Nouveau sur MODx ?
||
Recherche
Communauté FR
Documentation FR
Réalisations sous MODx
Webolution
Entreprise AGS
J'aurais dû lui dire...
Atelier d'architecture Gambino
Déco'In
: l'idée
deco
qu'il vous faut
HistWar :
jeu de stratégie
napoléonien
Ma config : MODx 0.9.6.2/3 || Apache 2.2.8 || PHP 5.2.6 || MySQL 5.0.45 || Debian 4.0 (Etch)
xwisdom
Foundation
Posts: 1,732
Re: [Plugin] CodePress Snippet Syntax Highlighter
«
Reply #14 on:
Oct 20, 2006, 03:39 PM »
Man I've been looking for something like this for years! Were on earth did you find it?
It's WONDERFUL!!
Bye bye Textarea!
Logged
xWisdom
www.xwisdomhtml.com
The fear of the Lord is the beginning of wisdom:
MODx Co-Founder
- Create and do more with less.
Pages: [
1
]
2
3
4
Go Up
Print
« Previous topic
Next topic »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Important News
=> Security Notices
-----------------------------
Commercial Support
-----------------------------
=> [CS] About Commercial Support
-----------------------------
Development & Coding
-----------------------------
=> Commercial Inquiries & Bounties
=> Core Code
===> MODx Next
===> xPDO
=> Module, Plugin & Snippet Creation and Modification
=> In Development
=> Templates
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder & DropMenu
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> Front-end Document Management
=> Users, Authentication & Personalization
===> WebloginPE
===> WebLogin, WebSignup and WebChangePwd
=> Rich Text Editors & File Browser
===> TinyMCE
===> FCKeditor
===> MCPuck File Browser
=> Forms, Form Processing & Anti-Spam
===> eForm
=> Search
===> AjaxSearch
=> E-business
=> Polls, Calendars, Address Book and Community
=> Third-party integrations
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> Backup & Versioning
===> Doc Finder
===> ManagerManager
===> PHx
=> Templates
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.3
===> 0.9.6.2
===> 0.9.6.1
===> 0.9.6
===> 0.9.5 and earlier
=> General Support
===> MODx 101
===> E-Commerce, E-Marketing, Analytics & SEO
===> Hosting Experiences
===> IIS / Windows Hosting Issues
=> Documentation, Tips & Tricks
===> Documentation Suggestions & Corrections
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Webworker Lounge
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
International Support & Translations
-----------------------------
=> Internationalization
=> Bulgarian
===> Поддръжка
=====> Често задавани въпроси
=====> Инсталация
=====> Модули, Плъгини, Снипети и код
=====> Дизайн и Шаблони
===> Документация, Ръководства и Превод
=====> Документация
=====> Ръководства
=====> Превод
===> Общество
=====> Съобщения
=====> Представете се
=====> Представете сайта си
=====> Дискусии извън MODx
=> Chinese
=> Czech
===> Oznámení
=====> Důležitá oznámení/novinky
=====> Bezpečnost
===> Komunita
=====> Oznámení
=====> Představte se, prosím
=====> Ukázky práce
=====> Různé aneb cokoli co se jinam nehodí
===> Podpora
=====> FAQ (často kladené otázky)
=====> Instalace
=====> Moduly, pluginy, "snippets & code" (šablony zdrojových kódů)
=====> Design & Šablony
===> Dokumentace, tutoriály (návody) a překlady
=====> Dokumentace
=====> Tutoriály (návody)
=====> Překlady (lokalizace)
=> Dutch
===> Ondersteuning
=====> Veel gestelde vragen
=====> Modules, Plugins, Snippets & Code
=====> Design & Templates
===> Documentatie, Tutorials en Vertalingen
=====> Documentatie
=====> Tutorials
=====> Vertalingen
===> Community
=====> Aankondigingen
=====> Stel jezelf voor
=====> Site Showcase
=====> De stamkroeg
=> Filipino
===> Suporta
=====> Kadalasang tanong
=====> Instalasyon
=====> Moduler, Maidadagdag, Karagdagang mga Code
=====> Desenyo at Templates
===> Dokumentasyon, Mga Turo, Mga Salin
=====> Dokumentasyon
=====> Mga Turo
=====> Mga Salin
===> Kumunidad
=====> Anunsyo
=====> Ipakilala ang sarili
=====> Ang Galing ng pinoy
=====> Tsismisan atbp
=> Finnish
===> Tuki
=====> UKK
=====> Asennus
=====> Moduulit, liitännäiset, koodinpätkät
=====> Ulkoasu/Sivustopohjat
===> Dokumentaatio, oppaat ja käännökset
=====> Dokumentaatio
=====> Käännökset
=====> Oppaat
===> Yhteisö
=====> Tiedotteet
=====> Esittele itsesi
=====> MODx sivustosi
=====> Kahvihuone
=> French
===> Support
=====> FAQ
=====> Installation
=====> Module, plugin, snippets
=====> Design/Templates
===> Documentation, Tutoriels et Traductions
=====> Documentation
=====> Traduction
=====> Tutoriels
===> Communauté
=====> Annonces
=====> Présentez vous
=====> Vos sites
=====> Le Bistrot Français
=> German
===> Support (de)
=====> FAQ (de)
=====> Installation (de)
=====> Module, Plugins, Snippets & Code (de)
=====> Design & Templates (de)
===> Dokumentation, Tutorials und Übersetzung
=====> Dokumentation
=====> Tutorials (de)
=====> Übersetzung
===> Community (de)
=====> Ankündigungen
=====> Stellt Euch vor
=====> Beispielseiten
=====> Off Topic / Verschiedenes
=> Hebrew
===> הכרזה
=====> חדשות חשובות
=====> אבטחה
===> תמיכה
=====> התקנה
=====> תיעוד, מדריכים ותרגומים
=====> עיצוב ותבניות
=====> שאלות נפוצות
===> תיעוד, מדריכים ותרגומים
=====> תיעוד
=====> מדריכים
=====> תרגומים
===> קהילה
=====> הודעות
=====> הצג את עצמך
=====> אתרים לדוגמא
=====> כללי
=> Irish
=> Italian
===> Supporto
=====> FAQ
=====> Installazione
=====> Moduli, Plugin, Snippet e altro codice
=====> Web Design e Template
===> Documentazione, Tutorial e Traduzione
=====> Documentazione
=====> Tutorial
=====> Traduzione
===> Comunità
=====> Annunci
=====> Presentazioni
=====> Siti in vetrina
=====> Chiacchiere in libertà
=> Japanese
===> サポート
=====> 良くある質問
=====> インストール
=====> モジュール・プラグイン・スニペット・本体
=====> デザインやテンプレート
===> マニュアル・テュートリアル・翻訳
=====> マニュアル
=====> 事例集、テュートリアル
=====> 日本語化
===> コミュニティ
=====> お知らせ
=====> MODxサイト展示場
=====> 自己紹介
=====> 雑談
=====> 国産リソース
=> Persian - فارسي
===> پشتيباني
=====> راهنما
=====> نصب
=====> ماژول , پلاگین ها , کد ها و جزییات
=====> طراحی و قالب ها
===> مستند سازی , آموزش ها و ترجمه ها
=====> مستند سازی
=====> آموزش ها
=====> ترجمه ها
===> انجمن ها
=====> اخبار
=====> معرفی کردن خود
=====> نمایش دادن سایت ها
=====> بحث های عمومی و سایر موضوعات
=> Polish
===> Wsparcie
=====> FAQ
=====> Instalacja
=====> Moduły, pluginy, snipety i kod
=====> Wygląd i szablony
===> Dokumentacja, tutoriale i tłumaczenie
=====> Dokumentacja
=====> Tutoriale
=====> Tłumaczenie
===> Społeczność
=====> Ogłoszenia
=====> Przedstaw się
=====> Twój serwis WWW
=====> Hyde Park
=> Portuguese
===> Suporte
=====> FAQ - Dúvidas Frequentes
=====> Instalação
=====> Módulos, Plugins, Snippets e Código
=====> Design e Templates
===> Documentação, Guias e Traduções
=====> Documentação
=====> Guias
=====> Traduções
===> Comunidade
=====> Anúncios
=====> Apresente-se!
=====> Bar da esquina (fora de tópico)
=====> Portfólio de Sites
=> Russian
===> Поддержка
=====> ЧАВО (FAQ)
=====> Установка
=====> Модули, плагины, сниппеты и код
=====> Дизайны и шаблоны
===> Документация, Уроки, Перевод
=====> Документация
=====> Уроки
=====> Перевод
===> Сообщество
=====> Объявления
=====> Представьтесь публике
=====> Галерея сайтов
=====> Диван
=> Scandanavian
===> Support
=====> Frågor och svar
=====> Installation
=====> Moduler, plugins, snippets och kod
=====> Design & sidmallar
===> Dokumentation, guider och översättningar
=====> Dokumentation
=====> Guider
=====> Översättningar
===> Webbgemenskap
=====> Meddelanden
=====> Presentera dig själv
=====> Visa upp dina webbsidor
=====> Ordet fritt
=> Slovak
=> Spanish
===> Soporte
=====> FAQ
=====> Instalación
=====> Modulos, Plugins, Snippets & Código
=====> Diseño y plantillas
===> Documentación, Tutoriales y Traducciones
=====> Documentatción
=====> Tutoriales
=====> Traducciones
===> Comunidad
=====> Anuncios
=====> Presentaciones personales
=====> Muestra de sitios
=====> El Café
=> Swedish
=> TÜRKÇE (Turkish)
===> Destek
=====> SSS
=====> Kurulum
=====> Modüller, Pluginler, Snippetlar & Kodlar
=====> Dizayn & Temalar
===> Belgeleme, Eğitmenler ve Çeviri
=====> Belgeleme
=====> Eğitmenler
=====> Çeviri
===> Topluluk
=====> Duyurular
=====> Kendinizi Tanıtın
=====> Site Vitrini
=====> Konu Dışı