.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ======================= RF Code Snippet Manager ======================= :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Ralf Freit :Changed: 2012-02-17T21:35:46 :Classification: EXT: rf_snippets :Keywords: forEditors, forBeginners, forAdmins :Author: Ralf Freit :Email: ralf@freit.de :Language: en |img-1| |img-2| RF Code Snippet Manager - EXT: rf\_snippets .. _RF-Code-Snippet-Manager: RF Code Snippet Manager ======================= Extension Key: EXT: rf\_snippets Language: en Copyright 2012, Ralf Freit, This document is published underthe Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.org .. _Table-of-Contents: Table of Contents ----------------- `RF Code Snippet Manager 1 <#__RefHeading__6954_1606080306>`_ **`Introduction 3 <#__RefHeading__6956_1606080306>`_** `What does it do? 3 <#__RefHeading__13172_1606080306>`_ `Features 3 <#__RefHeading__13174_1606080306>`_ `Live Demo 3 <#__RefHeading__13174_16060803061>`_ `Screenshots 3 <#__RefHeading__11647_348596268>`_ **`Administration 6 <#__RefHeading__940_377938794>`_** `Installation 6 <#__RefHeading__6970_1606080306>`_ `Settings: TypoScript example 6 <#__RefHeading__10452_1843422657>`_ **`Configuration / Options 8 <#__RefHeading__3420_1871875012>`_** `TypoScript 8 <#__RefHeading__6978_1606080306>`_ **`Autoren 10 <#__RefHeading__1392_1836741660>`_** `Authors of the code involved 10 <#__RefHeading__3010_861791930>`_ `Authors of the languages used in the SyntaxHighlighter 10 <#__RefHeading__3012_861791930>`_ **`FAQ 11 <#__RefHeading__10458_1843422657>`_** `You have to ask? 11 <#__RefHeading__3064_861791930>`_ **`To-Do list 12 <#__RefHeading__6990_1606080306>`_** **`ChangeLog 13 <#__RefHeading__6992_1606080306>`_** **List of Figures** Figure 1: Category Overview 3 Figure 2: Category View (all closed) 3 Figure 3: Category View (open) 4 Figure 4: Single View 4 Figure 5: Search result for all fields 5 .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ With this extension it is possible to create a public or even internal area to display own code snippets and/or also to allow users to insert their own code snippets to their database. All code snippets can be provided with supplementary notes and tags which can be browsed later. .. _Features: Features """""""" - Every view of the code snippet manager has its own page, which serves to have fully content control, and this allows the editor to deposit different additional information to the every single view. - SyntaxHighlighter integrated with more than 25 languages - It supports the following languages: ActionScript 3, Bash/shell, ColdFusion, C#, C++, CSS, Delphi, Diff, Erlang, Groovy, JavaScript, Java, JavaFX, Perl, PHP, PlainText, PowerShell, Python, Ruby, Scala, SQL, TypoScript, VisualBasic, XML - Full configuration is possible by combining control and direct configuration from TypoScript and Plugin - Extensive configuration to ensure maximum flexibility .. _Live-Demo: Live Demo """"""""" h `ttp://www.disegio.de/ `_ .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-3| *Figure 2: Category View (all closed)* |img-4| *Figure 1: Category Overview* |img-5| *Figure 3: Category View (open)* |img-6| *Figure 4: Single View* |img-7| *Figure 5: Search result for Tags* |img-8| *Figure 5: Search result for all fields* .. _Administration: Administration -------------- .. _Installation: Installation ^^^^^^^^^^^^ - Install the extension via extension manager. - Create 6 Pages and 2 Storage folder - Pages: Category overview, Category view, Single view, Search result, Page for Snippet Add Form, Thank You Page - Storage Folder: Data storage for the Snippets, User storage for the fe\_users - Create a new Extension Template an add your configuration in it .. _Settings-TypoScript-example: Settings: TypoScript example ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: plugin.tx_rfsnippets_pi1 { ##### ------------------- ## ####### General settings ### ##### ------------------- ## ## Location for the records storage = 210 ## Location for the fe_user userStorage = 50 ## Template File templateFile = EXT:rf_snippets/lib/tpl/template.html ## If disableCSS is set to 1 then the frontend issued any CSS file. disableCSS = 0 ## If disableTabby is set to 1 then the frontend issued the Tabby jQuery file. disableTabby = 0 ## RTE is Experimental enableRTE = 0 ## Here you can specify which view should be represented in the current plugin ## Option: catoverview => Category Overview ## catview => Category View ## single => Single View pluginView = catoverview ## Date formatting for the entire system dateFormat = %d.%m.%Y ## Wenn Sie jQuery im noConflictMode nutzen dies aktivieren. jqueryNoConflict = 1 ## Welches Feld aus der fe_users soll als Display name erscheinen? showname = username ## Welchen Namen soll angezeigt werden wenn der Usernicht verfügbar ist showguestname = Unbekannt ## Welche Blockzeit in ms soll ein Hit geblickt werden counterbarrier = 10ms ## Leere Kategorien anzeigen showEmptyCat = 1 ## Leere Code gruppen anzeigen showEmptyGroup = 1 ## Suchfeld anzeigen wenn direkt aufruf showSearchOnDirect = 0 ##### ------------------- ## ###### Single View ### ##### ------------------- ## single { ## Page to display the code snippet pid = 207 } ##### ------------------- ## ###### Category Overview ### ##### ------------------- ## catoverview { ## Page for the category summary pid = 205 } ##### ------------------- ## ###### Category View ### ##### ------------------- ## catview { ## Page for the category view pid = 206 ## Category View Item Wrap item { wrap =
|
} } ##### ------------------- ## ###### Add Form ### ##### ------------------- ## addform { ## Page to display the add Form pid = 209 ## Page ID for the Thank-You Page thxPid = 211 error{ ## Additional Error CLass addErr = error ## Wrap for the Error Information addErrWrap = '
|
'; } } ##### ------------------- ## ###### Searchresult ### ##### ------------------- ## searchresult { ## Page to display the serarchresult pid = 208 } ## Here SyntaxHighlighter Configration sh { ## SyntaxHighlighter deaktivieren disable = 0 ## At what line will be started to count first-line = 1 ## Pads line numbers. Possible values are: ## false - don't pad line numbers. ## true - automaticaly pad numbers with minimum required number of leading zeroes. ## [int] - length up to which pad line numbers. pad-line-numbers = true ## Lines to highlight. highlight = 0 ## Title to be displayed above the code block. title = Hint: Doubleklick to mark all ## Enables or disables smart tabs. smart-tabs = 1 ## Gets or sets tab size. tab-size = 4 ## Enables or disables gutter. gutter = 1 ## Enables or disables toolbar. toolbar = 1 ## Enables quick code copy and paste from double click. quick-code = 1 ## Forces code view to be collapsed. collapse = 0 ## Themeswitcher: ## Default shThemeDefault.css ## Django shThemeDjango.css ## Eclipse shThemeEclipse.css ## Emacs shThemeEmacs.css ## FadeToGrey shThemeFadeToGrey.css ## Midnight shThemeMidnight.css ## RDark shThemeRDark.css themes = Default } } .. _Configuration-Options: Configuration / Options ----------------------- .. _TypoScript: TypoScript ^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _storage: storage """"""" .. container:: table-row Property storage Data type Int Description Location for the records Default .. _userStorage: userStorage """"""""""" .. container:: table-row Property userStorage Data type Int Description Location for the fe\_user Default .. _templateFile: templateFile """""""""""" .. container:: table-row Property templateFile Data type String Description Template File Default EXT:rf\_snippets/lib/tpl/template.html .. _disableCSS: disableCSS """""""""" .. container:: table-row Property disableCSS Data type Boolean Description If disableCSS is set to 1 then the frontend issues any CSS file. Default .. _pluginView: pluginView """""""""" .. container:: table-row Property pluginView Data type String Description Here you can specify which view should be represented in the current plugin .. ### BEGIN~OF~TABLE ### .. container:: table-row a **available options** .. container:: table-row a catoverview b Category overview .. container:: table-row a catview b Category view .. container:: table-row a single b Single view .. container:: table-row a result b Search result view .. container:: table-row a addform b Add form view .. container:: table-row a searchform b Search form .. container:: table-row a abcblock b ABC block .. ###### END~OF~TABLE ###### Default catoverview .. _dateFormat: dateFormat """""""""" .. container:: table-row Property dateFormat Data type String Description Date formating for the entire system ( `more Information here `_ ) Default %d.%m.%Y .. _jqueryNoConflict: jqueryNoConflict """""""""""""""" .. container:: table-row Property jqueryNoConflict Data type Boolean Description Wenn Sie jQuery im noConflictMode nutzen dies aktivieren. Default 1 .. _showname: showname """""""" .. container:: table-row Property showname Data type String Description Welches Feld aus der fe\_users soll als Display Namen erscheinen? Default username .. _showguestname: showguestname """"""""""""" .. container:: table-row Property showguestname Data type String Description Welcher Name soll angezeigt werden wenn der user nicht verfügbar ist Default Unbekannt .. _counterbarrier: counterbarrier """""""""""""" .. container:: table-row Property counterbarrier Data type Int Description Welche Blockzeit in ms soll ein Hit geblickt werden Default 3600 .. _showEmptyCat: showEmptyCat """""""""""" .. container:: table-row Property showEmptyCat Data type Boolean Description Leere Kategorien anzeigen Default 1 .. _showEmptyGroup: showEmptyGroup """""""""""""" .. container:: table-row Property showEmptyGroup Data type Boolean Description Leere Codegruppen anzeigen Default 1 .. _showSearchOnDirect: showSearchOnDirect """""""""""""""""" .. container:: table-row Property showSearchOnDirect Data type Boolean Description Suchfeld anzeigen wenn Direktaufruf Default 0 .. _single-pid: single.pid """""""""" .. container:: table-row Property single.pid Data type Int Description Page to display the code snippet Default .. _catoverview-pid: catoverview.pid """"""""""""""" .. container:: table-row Property catoverview.pid Data type Int Description Page for the category summary Default .. _catview-pid: catview.pid """"""""""" .. container:: table-row Property catview.pid Data type Int Description Page for the category view Default .. _Catview-item-wrap: Catview.item.wrap """"""""""""""""" .. container:: table-row Property Catview.item.wrap Data type String Description Category view item wrap Default
\|
.. _addform-pid: addform.pid """"""""""" .. container:: table-row Property addform.pid Data type Int Description Page to display the add form Default .. _addform-thxPid: addform.thxPid """""""""""""" .. container:: table-row Property addform.thxPid Data type Int Description Page ID for the Thank-You-page Default .. _addform-error-addErr: addform.error.addErr """""""""""""""""""" .. container:: table-row Property addform.error.addErr Data type String Description Additional error class Default error .. _addform-error-addErrWrap: addform.error.addErrWrap """""""""""""""""""""""" .. container:: table-row Property addform.error.addErrWrap Data type String Description Wrap for the error information Default
\|
.. _Searchresult-pid: Searchresult.pid """""""""""""""" .. container:: table-row Property Searchresult.pid Data type Int Description Page to display the search result Default .. _sh-disable: sh.disable """""""""" .. container:: table-row Property sh.disable Data type Description SyntaxHighlighter deaktivieren Default 0 .. _sh-first-line: sh.first-line """"""""""""" .. container:: table-row Property sh.first-line Data type Description At what line will be started to count Default 1 .. _sh-pad-line-numbers: sh.pad-line-numbers """"""""""""""""""" .. container:: table-row Property sh.pad-line-numbers Data type Int / Boolean Description Pads line numbers. Possible values are: .. ### BEGIN~OF~TABLE ### .. container:: table-row a **available options** .. container:: table-row a false b don't pad line numbers. .. container:: table-row a true b automatically pad numbers with minimum required number of leading zeroes. .. container:: table-row a int b length up to which pad line numbers. .. ###### END~OF~TABLE ###### Default true .. _sh-highlight: sh.highlight """""""""""" .. container:: table-row Property sh.highlight Data type Int Description Lines to highlight. Default .. _sh-title: sh.title """""""" .. container:: table-row Property sh.title Data type String Description Title to be displayed above the code block. Default Hint: Doubleklick to mark all .. _sh-smart-tabs: sh.smart-tabs """"""""""""" .. container:: table-row Property sh.smart-tabs Data type Boolean Description Enables or disables smart tabs. Default 1 .. _sh-tab-size: sh.tab-size """"""""""" .. container:: table-row Property sh.tab-size Data type Int Description Gets or sets tab size. Default 4 .. _sh-gutter: sh.gutter """"""""" .. container:: table-row Property sh.gutter Data type Boolean Description Enables or disables gutter. Default 1 .. _sh-toolbar: sh.toolbar """""""""" .. container:: table-row Property sh.toolbar Data type Boolean Description Enables or disables toolbar. Default 1 .. _sh-quick-code: sh.quick-code """"""""""""" .. container:: table-row Property sh.quick-code Data type Boolean Description Enables quick code copy and paste from double click. Default 1 .. _sh-collapse: sh.collapse """"""""""" .. container:: table-row Property sh.collapse Data type Boolean Description Forces code view to be collapsed. Default 0 .. _sh-themes: sh.themes """"""""" .. container:: table-row Property sh.themes Data type String Description Du kannst die Styles anpassen oder verändern, du findest sie alle unter EXT:rf\_snippets/lib/sh/styles/ .. ### BEGIN~OF~TABLE ### .. container:: table-row a **available options** b .. container:: table-row a Default b shThemeDefault.css .. container:: table-row a Django b shThemeDjango.css .. container:: table-row a Eclipse b shThemeEclipse.css .. container:: table-row a Emacs b shThemeEmacs.css .. container:: table-row a FadeToGrey b shThemeFadeToGrey.css .. container:: table-row a Midnight b shThemeMidnight.css .. container:: table-row a RDark b shThemeRDark.css .. ###### END~OF~TABLE ###### Default Default .. ###### END~OF~TABLE ###### [tsref:plugin.tx\_rfsnippets\_pi1] .. _Autoren: Autoren ------- .. _Authors-of-the-code-involved: Authors of the code involved ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _Name: **Name** """""""" .. container:: table-row a **Name** b **Typ** c **Autor** .. _Syntax-Highlighter-v3: Syntax Highlighter v3 """"""""""""""""""""" .. container:: table-row a Syntax Highlighter v3 b Main JavaScript Code c Alex Gorbatchev ( `Link `_ ) .. _Jquery: Jquery """""" .. container:: table-row a Jquery b Jquery JavaScript Library c Jquery Project ( `Link `_ ) .. ###### END~OF~TABLE ###### .. _Authors-of-the-languages-used-in-the-SyntaxHighlighter: Authors of the languages used in the SyntaxHighlighter ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _Name: **Name** """""""" .. container:: table-row a **Name** b **Autor** c **Link** .. _AppleScript: AppleScript """"""""""" .. container:: table-row a AppleScript b David Chambers c http://davidchambersdesign.com .. _ActionScript-3: ActionScript 3 """""""""""""" .. container:: table-row a ActionScript 3 b Peter Atoria c http://iAtoria.com .. _Bash-shell: Bash/shell """""""""" .. container:: table-row a Bash/shell b c .. _ColdFusion: ColdFusion """""""""" .. container:: table-row a ColdFusion b Jen c http://www.jensbits.com/2009/05/14/coldfusion-brush-for- syntaxhighlighter-plus .. _C: C# "" .. container:: table-row a C# b c .. _C: C++ """ .. container:: table-row a C++ b YoungJin c .. _CSS: CSS """ .. container:: table-row a CSS b c .. _Delphi: Delphi """""" .. container:: table-row a Delphi b c .. _Diff: Diff """" .. container:: table-row a Diff b c .. _Erlang: Erlang """""" .. container:: table-row a Erlang b Jean-Lou Dupont c http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html .. _Groovy: Groovy """""" .. container:: table-row a Groovy b Andres Almiray c http://jroller.com/aalmiray/entry/nice\_source\_code\_syntax\_highligh ter .. _JavaScript: JavaScript """""""""" .. container:: table-row a JavaScript b c .. _Java: Java """" .. container:: table-row a Java b c .. _JavaFX: JavaFX """""" .. container:: table-row a JavaFX b Patrick Webster c http://patrickwebster.blogspot.com/2009/04/javafx-brush-for- syntaxhighlighter.html .. _Perl: Perl """" .. container:: table-row a Perl b David Simmons-Duffin and Marty Kube c .. _PHP: PHP """ .. container:: table-row a PHP b c .. _PlainText: PlainText """"""""" .. container:: table-row a PlainText b c .. _PowerShell: PowerShell """""""""" .. container:: table-row a PowerShell b B.v.Zanten, Getronics c http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro .. _Python: Python """""" .. container:: table-row a Python b Gheorghe Milas and Ahmad Sherif c .. _Ruby: Ruby """" .. container:: table-row a Ruby b Erik Peterson. c .. _Scala: Scala """"" .. container:: table-row a Scala b Yegor Jbanov and David Bernard. c .. _SQL: SQL """ .. container:: table-row a SQL b c .. _TypoScript: TypoScript """""""""" .. container:: table-row a TypoScript b Felix Nagel c http://www.felixnagel.com .. _VisualBasic: VisualBasic """"""""""" .. container:: table-row a VisualBasic b c .. _XML: XML """ .. container:: table-row a XML b c .. ###### END~OF~TABLE ###### .. _FAQ: FAQ --- .. _You-have-to-ask: You have to ask? ^^^^^^^^^^^^^^^^ Visit my Website: `http://www.disegio.de `_ .. _To-Do-list: To-Do list ---------- Please see EXT:rf\_snippets/README.txt .. _ChangeLog: ChangeLog --------- Please see EXT:rf\_snippets/ChangeLog 14 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :name: Category View (all closed) .. :width: 100% .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :name: Category Overview .. :width: 100% .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :id: Grafik3 .. :name: Grafik3 .. :width: 100% .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :id: Grafik1 .. :name: Grafik1 .. :width: 100% .. |img-7| image:: img-7.png .. :align: left .. :border: 0 .. :id: Grafik4 .. :name: Grafik4 .. :width: 100% .. |img-8| image:: img-8.png .. :align: left .. :border: 0 .. :id: Grafik5 .. :name: Grafik5 .. :width: 100%