Kreatore.it

Sviluppo applicativi Lamp

Textpattern plugin and theme

mck_editable

mck_editable

This plugin create a direct link to editable version of article and images

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

  • Direct link to article edit
  • Direct link to image edit
  • Direct link to file edit
  • Direct link to link edit

Plugin requirements

mck_editable minimum requirements:

  • Textpattern 4.5
  • Plugin dependency: > mck_login 2.0
  • Jquery enabled > 1.4.4

Installation

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.

For usage, basically just put <txp:mck_editable_script /> into head tag or into a footer of any page you need. Then wrap each object with <txp:mck_editable> .. </txp:mck_editable>

List of Tags and attributes

<txp:mck_editable />

Show if logged in wrapper whit data attribute of each object to edit
Double click on object to go to admin edit area.

Attributes
  • event: event of object: article,image,link,file Default:article
  • wraptag: HTML wraptag Default:div
  • class: wraptag’s HTML class
  • id: wraptag’s HTML id
<txp:mck_editable_script />

Print necessary js script

Examples

Example 1

A classical article wrapper

<txp:mck_editable wraptag="article">
  <h1><txp:title /></h1>
    <div name="body">
    <txp:body />
    </div>
</txp:mck_editable>
Example 2

Example for an images wrapper

<txp:images category="example">
  <txp:mck_editable event="image" wraptag="figure" class="bigimage">
    <txp:image />
  </txp:mck_editable />
</txp:images>
Example 3

Overwrite class attribute (presume code of 1° example)

article.mck_editableHover{border:2px dotted #f00;background:#ccc;}

Textpack

No textpack in this version

Changelog

  • 0.3 Fix security bug in script
  • 0.2 Add id and atts attribute
  • 0.1 Initial version

Download

Download Compressed Download Uncompressed

Support

Find mck_editable support on Textpattern forum

Altri Plugin

© 2011 Kreatore.it :: 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.