teranex weblog


This category contains posts that where imported from my old devblog at dev.budts.be. I used it while I developed on the Nucleus CMS core. It was part of the NUDN (Nucleus Developers Network).

Testing the RTE wysiwyg plugin


Dit is de test

blablabla foobar lqskmjfqsmljf lqkjf qmjfmjioaj mqsdjf mqsqsk jfqsd f

  • listje
  • listjeje

some code: function foobar() { return true; }



Features in 1.2

  • DONE: use doError for errors (while (un)subscribing), and redirects when (un)subscbribing
  • DONE: Provide an admin area to manage the subscription lists
  • DONE: Choose the desired language as a plugin option
  • DONE: plugin(s) to update an installation of MyNewsletter 1.0/1.1 to 1.2

Download: http://prdownloads.sourceforge.net/nucleusplugs/NP_MyNewsletter-v1.2.zip?download

My favorite jEdit features

As reaction on moraes' comment at my post about the PHP Parser plugin for jEdit, I'll try to give a nice list of features and plugins (and macros) of jEdit i really like (obviously this list will change in the feature as a learn to use more features of jEdit)

jEdit PHP Parser Plugin

Yesterday i upgraded my jEdit installation (4.1final) to the latest development release (4.2pre), which will be the last development release before 4.2 becomes the new final and stable release.
4.2 has now nice new features, but what i really really like is the PHP Parser plugin (this plugin requires at least 4.2).
This plugin parses your php files for syntax errors etc everytime you open or save it, and shows the error in a nice list! I you are somebody like me who most of the time forgets the ; this plugin is a dream!
a screenshot:
jEdit PHP Parser plugin


With this plugin you can add a textual or graphical counter to your weblog, which count's the number of visitors, instead of the number of hits.

Plugin homepage


Get the plugin!

Copy the code found at http://wiki.budts.be/NpCounter2/Code into a file called 'NP_Counter2.php' and upload it to your webser


This plugin brings the Swatch Internet Time (.beat) to Nucleus.
Swatch has divided a day into 1000 eqaul beats, so every beat is the equivalent of 86.4 seconds. Also there are no timezones, so wherever you are, it is always the same Internet Time (by example: while i'm writing this it is 12:28+0200 or @478)

Plugin homepage


Get the plugin!

Copy the code found at http://wiki.budts.be/NpInternetTime/Code in a file named 'NP_InternetTime.php' and upload it to your webserver

Considering: NP_Sheduler

Like i said, i'm thinking about writing a plugin that can be used as a tasksheduler: NP_Sheduler.
This is how i plan to do it (please comment! does it make sense at all?):

  • The plugin will execute 'task-scripts' at a certain time. These taskscripts are just php files with a name like task_foobar.php and a function start_task() to start the task. These file will be dropped in the 'tasks'-folder inside the 'sheduler'-folder, so that the plugin can 'scan' this folder to find new taskscripts. Other plugin could then 'drop-in' taskscripts when they are installed (well just unzipped ofcourse), and after that the user will be able to make a task for the new script, by selecting the task-script from the list and plan it
  • The plugin subscribes to the very last event, to check if there are tasks to be done (checks the current timestamp with the calculated 'next-run'-timestamp of every task, if current is > nextrun -> run the task), and if so includes the appropriate task_scripts and calls the start_task()-function.
  • To store the time of the tasks in the database i'll use unix-notation (the one found in CPanel > cronjobs > avanced (unix notation)
  • after a task has been run the plugin computes the timestamp for the next run and stores this in the database (so that it can be compared with the current timestamp in the event).

NP_MyNewsletter: completely customizable newsletter for your blog!

My NP_MyNewsletter is ready, and I can say i'm a bit proud of it :-)

This plugin adds the possibility to Nucleus to send a
daily/weekly/monthly/..., or just manually, newsletter with the latest
X entries of your blog or the entries of today/yesterday. Your
newsletter is completely customizable since it uses a normal Nucleus
Skin to produce the newsletter!

After seeing the newsletters of websites like slashdot and newsforge i
wanted to be able to send such a newsletter using Nucleus. Now it is

The plugin uses a normal Nucleus skin and sends the output as an
e-mail, so you can give your newsletter the exact layout that *you*

When you want to plugin to automatically send the newsletter, by
example everyday, just setup a cronjob at your webserver (everything is
explained in the documentation). (i might write a plugin, NP_Sheduler,
to do this from inside Nucleus in the feature, i'm seriously thinking
about this)

The plugin can also send welcome and 'sorry to see you go'-mails to new
(or leaving) users. These mails are also completely customizable.
It is also possible to let the plugin send notifications mails when a
user subscribes/unsubscribes (ofcourse these e-mails are also
customizable Wink)
The plugin also uses the Nucleus Action Log to log everything it does (sending newsletters etc).

Release testing

While i was testing the Nucleus 3.1 zip file
before it was released, i got the idea that it would be usefull to have
a checklist with tests you should do when testing a RC zip file,
instead of just installing the zip and trying things you think about.
Like Karma said it would even be better to have an automated testing
system, but that's probably a bit overkill for Nucleus.
After searching Google for a second, i found some PHP Unit testing tools:

I don't know if this information is somehow usefull for Nucleus...

CVS Commit

I commited some fixes/changes to CVS:

  • CHANGED: option-metadate are now key/value-pairs, and select-lists must be the first item. From the (updated) plugin api doc:

    As of Nucleus 3.1+CVS, some option types can be limited to only
    accept certain values using option-metadata. This metadata is stored in
    the $typeExtras-field, and is a semicolon-seperated list
    of values. Note: In a select-option, the select list must be the first
    value in $typeExtras.

    key explanation
    numeric If set to 'true', Nucleus will only accept numerical values for this option (available for optiontypes: 'select' and 'text')

    some examples: