addcustomtext

NP_AddCustomTEXT

This plugin provides a menu to add external custom text in your item. This can be usefull when you often insert the same piece of text (eg: HTML code) in your articles.

General Plugin info
Current Version: V 0.4.1 10-sep-2005
Download: rbnet.it Nucleus Plugins in zip. rar and tar.gz formats
Code: N/A
Demo: N/A
Forum Thread: http://forum.nucleuscms.org/viewtopic.php?t=8500

Note: A copy of this plugin was archived in the the sourceforge archive at version 0.4.1 on 08/03/06 -Matt

Installing

  1. Untar the file and upload the contents to your plugin directory.
  2. Install the plugin.
  3. Go to add/edit item page and use the menu labeled Add External Content in the Extra Plugin Options section.
  4. Define your model-text-files if you wish.

How to use the plugin

The plugin read all the text-files in /path/to/addcustomtext/collection/ directory and makes available their content by a menu in the admin add/edit item page of admin session. Adding a model-file is simple: create a text file and upload it in the path/to/addcustomtext/collection/ directory and the content of the file willbe immediately available to the user after a page refresh/reload.

All the contents of the model-files are loaded in a js script on the head of the HTML page, so you should limit to create little/light text-files to avoid excessive page weight. NP_AddCustomTEXT escapes the single quote character () if it is present in the models-file to make the plugin’s output JavaScript friendly: if you want to use other characters that need escaping you must code the replacement in the php code, or you can pre-escape characters directly in the text-files.

Options

The plugin is multilanguage (english and italian for now): during installation it stores its option in the DB, using the default language of the Nucleus Installation. Once installed it’s possible to set two options:

  • Remove new lines: to remove linebreaks from preloaded model files to avoid broken layout if you use linebreaks convertion of NucleusCMS;
  • Replace extra spaces, to replace multiple spaces with 1 space and remove initial and ending spaces;

Important: NP_AddCustomTEXT should be used with the NucleusCMS Convert Linebreaks option switched OFF, or your item layout could break; if you can’t, you should switch ON the plugin option Remove new lines?. This option forces the plugin to remove any newlines from the used text-files.

Bugs

* the javascript doesn’t works in Konqueror

History

  • v0.1 [19-aug-2005]- initial release: static hardcoded content
  • v0.2 [31-aug-2005]- added loading of the external files
  • v0.3 [01-sep-2005]- major bug fixes and addes user options
  • v0.4 [03-sep-2005]- rewrite and first public release
  • v0.4.1 [03-sep-2005]- bug fix

Roberto "rbnet" Bollirbnet.it

Plugin Review

NP_AddCustomTEXT version 0.4 works with Nucleus CMS 3.31 - 2007-10-26 kg

 
addcustomtext.txt · Last modified: 2008/06/24 01:27 by kg