Zef Hemel
Advisor
YaBB God
Posts: 1182
Me too
|
|
How to write a mod
« on: December 18, 2001, 10:00:20 AM » |
|
How to pack your mod into a YaBB Package- Create a directory on your harddisk for example called mymod.
- In there create a directory called Packages
- In there you put your modification.mod, modification.txt and modification.php files (the .txt and .php ones are optional)
- If additional files/images have to be uploaded to the board (additional images, sources) put them in the same directory with the standard YaBB directory structure
- Your directory structure should look something like this now:
mymod/Packages/modification.mod mymod/Packages/modification.txt mymod/YaBBImages/additional.gif mymod/Sources/superlib.php - Now with ftp create a folder in your YaBB SE directory, for example in your Packages folder: Packages/mymod and upload all the files in your local Packages folder you just created in there.
- Go to your board to the Admin > Package Manager > Create a new package
- In "Directory to pack" put the location of your "mymod" directory relative to your YaBB SE path. So in the example we gave that would be: mymod
- In "Root directory" put the same as you put in "Directory to pack"
- Choose the filename of the package you want to create, but make sure it's extention is .mod.yp
- Click "Go!", your package will be created right now
- If everything went alright you can download the package from your Packages directory now
How to create a modPackages/modification.modThe modification.mod file looks much like the boardmod mods. To set the file you're currently modding you put in a <file> and </file> tag, for example: <file> index.php </file>
or <file> Sources/BoardIndex.php </file>
after that you can search for a sequence of characters/lines: <search> /* ### Version Info ### */ $YaBBversion = 'YaBB SE'; $YaBBplver = 'YaBB SE'; </search>
and either replace it or add text after it: <replace> /* ### Version Info ### */ $YaBBversion = 'YaBB SE Zef Edition :P'; $YaBBplver = 'YaBB SE ZEF'; </replace>
or <add> echo "Zef was here"; // Not very useful but who cares </add>
The mod file consits of this multiple times typically. You can put several <search>es per file, just put in the <file> tag if you want to switch to another file. Packages/modification.php (optional) In the modification.php file you can put additional php commands (for instance for editing the database etc.) you can assume the database connection has already been created, so you can use mysql_query directly. Also the settings are loaded. Packages/modification.txt (optional) This is a normal text file with additional instructions, warnings, credits etc.
|
|
« Last Edit: December 24, 2001, 11:45:48 AM by Zef Hemel »
|
Logged
|
|
|
|
|
|
|
|
|
alexrolko
Guest
|
|
Re:How to write a mod
« Reply #6 on: December 21, 2001, 02:13:44 AM » |
|
some people to though are used to the BoardMod program and some people never change. And yes i was aware of the built in boardmod.
|
|
|
Logged
|
|
|
|
|
|
|
|
dOCda S
Noobie
Posts: 15
Gimme my sun back!
|
|
Re:How to write a mod
« Reply #11 on: December 24, 2001, 01:25:01 AM » |
|
could it be possible that IIS 5.1 can't install the packages through the packages manager? he gives me always a success message but there are no changes in the files. if someone want's to try my mod here's the link. It's the own moderators column from YaBB SP1. Dunno if it works because i can't add it to my board.
|
|
|
Logged
|
Wanna have a nice Signature!
|
|
|
|
|
|