| General Plugin info | |
|---|---|
| Author: | Anand |
| Current Version: | 0.3 |
| Download: | np_macros_v0.3.zip |
| Code: | macroscode and MacrosAdmin |
| Demo: | - |
| Forum Thread: | here |
Really brief documentation :
Go to your plugins page and click on the admin page against the Macros plugin. Alternatively, you will see that at the bottom of the new quick menu you will see the plugin admin URL listed.
This plugin doesn't update the database like the earlier macro plugin. Instead, just before an item is displayed, the plugin modifies it to show the changed text.
Construct proper well formed regular expressions. Remember, any macros you create will be applied to every item. Any mistake you make in a macro will result in every item being displayed wrongly. But since no database updates are made, you are safe from any data corruption.
Read the ereg and preg function pages on php.net on how to create proper regular expressions.
For all simple patterns, use Ereg pattern. Although slower, it is much easier to create a ereg pattern than a preg.
Every preg pattern has to be encapsulated like this, if anand is your pattern, then it should be /anand/
You should not escape your preg replace strings.
Pattern String: ilsv Replace String: I like silly videos
Every time you write ilsv in your item it will be replaced with I like silly videos.
Preg Pattern to replace text links to proper href links,
Pattern /(?<!<a href=\")((http|ftp)+(s)?:\/\/[^<>\s]+)/i Replace String <a href="\0">\0</a>
NP_Macros version 0.3 works with Nucleus CMS version 3.31 - 2007-11-15 kg