Sviluppo applicativi Lamp

Textpattern plugin and theme



This plugin allow user insert into in a page some snippets text and manage them directly in frontend or by link to admin side. Now you can use some ‘Zone’ where put your snippet.

Table of contents

  1. List of features
  2. Plugin requirements
  3. Installation
  4. List of Tags and attributes
  5. Global variables
  6. Plugin events
  7. Examples
  8. Textpack
  9. Changelog

List of features

If you need some text, you can use article. But if you wont that article was separated from static text, you can use snippets text.
A simple tag, <txp:mck_snippet /> allow you to show a static text wherever you want. There is no differet between pages or forms. There are no categories, no tags, no associated images. Only text.

  • New tab on Admin->Content
  • Write snippet text
  • Put snippet wherever you want
  • Create snippet zone
  • Create new snippet by zone directly from front-end
  • Sort snippet in single zone
  • Edit snippet in place on frontend
  • Manage snippet directly from front-end
  • Parse each snippet with Textile or Use only Brake at Newline ot unthouch the text
  • Parse each snippet with own form

Plugin requirements

mck_snippets 1.7 minimum requirements:

  • Textpattern 4.5
  • Plugin dependency: > mck_login 2.0 if use script
  • Jquery > 1.5.1


The general behavior stands: paste plugin code to the plugin installer textarea and run the automatic setup. Then just activate the plugin and you are ready to use new tags that plugin includes like others.
p. In Snippet page you can create new snippet, edit or delete one that already exist.

List of Tags and attributes

<txp:mck_snippet />

Show single Snippet. Form was grab from Misc forms

  • id: unique ID of snippet
  • title: unique TITLE of snippet
  • wraptag: HTML wraptag
  • wrap_id: wraptag’s HTML id
  • class: wraptag’s HTML class
  • form: HTML form output
  • editable: allow edit in place the snippet
<txp:mck_snippet_zone />

Display list of snippet in defined div, order by snipOrder (you can sort in admin tab). Form was grab from Misc forms

  • name: Zone name
  • wraptag: HTML wraptag
  • wrap_id: wraptag’s HTML id
  • class: wraptag’s HTML class
  • form: HTML form output
  • break: HTML break
  • breakclass: HTML break class
  • empty: set if show ‘add new’ text or leave it empty
  • editable: allow edit in place the snippet
<txp:mck_snippet_body />

Show Snippet body

<txp:mck_snippet_title />

Show Snippet’s title

  • no_widow: Control widows and overrule widows setting in Advanced Preferences (like txp:title)
<txp:mck_snippet_script />

Print needed js and css link if user logged in

Global variables


This array is set during mck_snippet and mck_snippet_zone and inlcude all db field.

Plugin events


This event is called when admin form was build and extend it


<txp:mck_snippet title='test' form="myform"/>
<txp:mck_snippet_zone zone='left' form="zoneform"/>


I have pre-installed english and Italian textpack.
If you want send me your textpack, email me at

#@language en-gb
mck_snippet_tab => Snippets
mck_snippet_markup => Snippet Markup
mck_snippet_add => Add new Snippet
mck_snippet_code => Snippet Code
mck_snippet_no => No registred snippets
mck_snippet_zone => Zone
mck_snippet_no_zone => No zone selected
mck_snippet_need => Snippet need at last title or id
mck_snippet_add_content => Add some content


  • 1.7.2 Fix global variable issue in mck_snippet_title and mck_snippet_body
  • 1.7.1 Add Franch language pack Pat64
  • 1.7 Add mck_snippet_zone, mck_snippet_script and managment on admin side.
  • 1.6 Redesign HTML for TXP 4.5, add user privs
  • 1.5 Fix snippet murkup selected option and add textpack value in help. Help in english and italiano.
  • 1.4 Add Status change property and add doTag() function on return data
  • 1.3 Solved some issuse on mysql query
  • 1.2 Add Create New in Edito Method
  • 1.1 First Release


Look at this topic and ask to inclune that solution for form!!!


Download Compressed Download Uncompressed


Find mck_snippet support on Textpattern forum

Altri Plugin

© 2011 :: Sito web realizzato da Marco Casalegno

TXP | Admin | Home | Back to Top

Tutte le informazioni e le immagini sono rilasciate sotto licenza secondo la Creative Commons License 2.0.