NP_Random

The NP_Random plugin displays a random line of text from a text file.

General Plugin info
Authors: Mark Fulton (www.slashbomb.com), Edmond Hui (admun), Kai Greve (kgblog.de)
Current Version: 1.3
Download: np_random_v13.zip [2kb with 2 file]
Code: code from NP_Random
Demo: -
Forum Thread: Related forum thread

What does it do?

Displays a random text from a file by using <%Random()> or <%Random(random.txt)>. Be sure to upload a text file called “random.txt” to your nucleus plugin directory in the subfolder random. Each line of the text file is considered as an entry.

Note: You MUST Capitalize the R in random, as show above, or you will get a denied message on your blog.~Joshg678

Install instructions

Download the zip file, extract it and upload it to your plugin directory. Then install the plugin with the Nucleus Plugin Manager.

Insert the SkinVar <%Random()> or <%Random(random.txt)> to your skin at the place where the random entry should appear.

Edit the file 'random.txt' for your purposes. The file must be a textfile.

Each line of the text file is considered an entry.

Options

  • File with the entries to randomize (Default:'random.txt'): If you are using the skin var <%Random()%> you can change the filename in this option.
  • Ignore empty lines (Default: 'yes'): If you have empty lines in your text file they are ignored by default. If you set the option to 'no' empty lines are displayed (e.g. you have to lines with text and to empty lines: only every second refresh of the page something is shown).

Available SkinVars and/or TemplateVars

You can specify the filename with <%Random(filename)%>.

For example:

  • <%Random(random.txt)%>
  • <%Random(random2.txt)%>
  • <%Random(imagenames.txt)%>

You can use multiple instances of this plugin simply by using different files (e.g. random.txt and random2.txt) and puting the skinvars on different places of your template.

Related plugins

Plugin review

NP_Random version 1.3 works with Nucleus CMS 3.31 - 2007-10-28 Armon

:: Plugins ::

random.txt · Last modified: 2007/10/28 16:44 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki