I came up with this idea so people who are wanting a single mod (for now, I will build on this so it can handle more than one mod, or add the ability to modify a version that has already been modded) can grab a "mod pack" and head over to the site, and run the pack, and get a compressed ready-to-go version of roundcube with the desired mod in place.
The syntax is simple enough.
<rcmod><rcmod>
This merely declares that this is a rcmod package
VERSION NUMBER
This is the RCMML version. This tells the system which markup language to use. I plan to add extensibility to the system later (soon), but this is only day 3 of the code being in existence, and day 1 of it working.
VERSION NUMBER
The RoundCube version your mod is for. For example:
roundcubemail-0.1-rc1 would be 0.1-rc1
roundcubemail-trunk-20070728 would be trunk-20070728
This declares the beginning the modification of a file
FILE NAME
This is the actual filename, relative to the location in the directory tree.
Example:
/roundcube/program/include/main.inc
would be
program/include/main.inc
This declares that you are beginning a modification on a line.
ACTION
You place the action to be taken here. You have 3 choices:
- addbefore
- addafter
- replaceline
These are relative to the line number, so you must know line numbers. Furthermore, if this mod is not the first mod to the file, you must take in to account the lines you've added already, and add those lines to the line number. a good example would be a file that contained this data:
phpinfo();
?>
If I were to add a line after line 2 (phpinfo), that line would become line 3, and the ?> would become line 4, so if I wanted to add another line, after my last mod, I would need to take into account the placement change. The easiest solution would be to start the mod from the bottom of the page, and work up from there. You would essentially bypass the whole miscount issue.
NUMBER
This has already been covered, but to review, this is the line number that you are modifying (or a reference point if you are adding before this line or after it)
This is where you put the data for the new line(s).
For now, I ask that you escape your characters (\$ instead of $ and \" instead of " , for example). It's not an exploit, I just haven't created a handler for un-escaped data yet.
You can add multiple lines to modify per file, and multiple files per mod pack. I am hoping on having a better version by this time next week (or 2 or 3 better versions), but in order to do so, I will need feedback.