Welcome, Guest. Please Login or Register.
November 21, 2017, 03:22:37 AM
Home Help Search Login Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Topic: How to write a mod « previous next »
Pages: [1] 2 3 4 Reply Ignore Print
Author Topic: How to write a mod  (Read 43786 times)
Zef Hemel
Advisor
YaBB God
*****
Posts: 1182


Me too


WWW
How to write a mod
« on: December 18, 2001, 05:00:20 AM »
Reply with quote

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 mod

Packages/modification.mod
The 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:
Code: [Select]
<file>
index.php
</file>
or
Code: [Select]
<file>
Sources/BoardIndex.php
</file>
after that you can search for a sequence of characters/lines:
Code: [Select]
<search>
/* ### Version Info ### */
$YaBBversion = 'YaBB SE';
$YaBBplver = 'YaBB SE';
</search>
and either replace it or add text after it:
Code: [Select]
<replace>
/* ### Version Info ### */
$YaBBversion = 'YaBB SE Zef Edition :P';
$YaBBplver = 'YaBB SE ZEF';
</replace>
or
Code: [Select]
<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, 06:45:48 AM by Zef Hemel » Logged

Shoeb Omar
Disciple of Joe
YaBB God
*****
Posts: 1420


The shrub demands war. I don't. The world doesn't.


WWW
Re:How to write a mod
« Reply #1 on: December 20, 2001, 06:00:50 PM »
Reply with quote

does <before> and <replace> work?
Logged

"If we all practice an eye for an eye, pretty soon the whole world will be blind" - Gandhi

We need to start listening to advocates of peace in oder to advance society. We have not grown from the prehistoric barbarians we once were.  Will society ever mature?
Shoeb Omar
Disciple of Joe
YaBB God
*****
Posts: 1420


The shrub demands war. I don't. The world doesn't.


WWW
Re:How to write a mod
« Reply #2 on: December 20, 2001, 07:00:33 PM »
Reply with quote

and i hope we will be using boardmod as the community for mods still  :-\ we better at least!
Logged

"If we all practice an eye for an eye, pretty soon the whole world will be blind" - Gandhi

We need to start listening to advocates of peace in oder to advance society. We have not grown from the prehistoric barbarians we once were.  Will society ever mature?
alexrolko
Guest
Re:How to write a mod
« Reply #3 on: December 20, 2001, 07:05:52 PM »
Reply with quote


and i hope we will be using boardmod as the community for mods still  :-\ we better at least!


depends if [CV]XXL will make a boardmod program for YaBB SE
Logged
Shoeb Omar
Disciple of Joe
YaBB God
*****
Posts: 1420


The shrub demands war. I don't. The world doesn't.


WWW
Re:How to write a mod
« Reply #4 on: December 20, 2001, 08:05:08 PM »
Reply with quote

alex - read this post <- seems SE has one ;)

thing is, and i quote ehre my im to jeff:

Quote
i love boardmod and its "the open source project for yabb board modifications". sure it isnt gonna be used with boardmod (it referring to SE) but boardmod's modding community is essential for yabb se. For yabb se, boardmod, and yabb.xnull to be seperate is a crime - u need boardmod!


well im dicussing this with jeff and its not in boardmod's favor right now  :-[
Logged

"If we all practice an eye for an eye, pretty soon the whole world will be blind" - Gandhi

We need to start listening to advocates of peace in oder to advance society. We have not grown from the prehistoric barbarians we once were.  Will society ever mature?
Jeff Lewis
Global Moderator
YaBB God
*****
Posts: 10149


I'm a llama!


WWW
Re:How to write a mod
« Reply #5 on: December 20, 2001, 08:41:47 PM »
Reply with quote

Hehe I wouldn't say that.  I had already started talking to Michael about this and we will talk more.  I just wasn't impressed with your "SE needs Boardmod talk".  We have a "built-in" boardmod basically but like I said to Michael, we can see how it all fits together.
Logged

alexrolko
Guest
Re:How to write a mod
« Reply #6 on: December 20, 2001, 09:13:44 PM »
Reply with quote

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
Shoeb Omar
Disciple of Joe
YaBB God
*****
Posts: 1420


The shrub demands war. I don't. The world doesn't.


WWW
Re:How to write a mod
« Reply #7 on: December 20, 2001, 09:35:36 PM »
Reply with quote

good :)

i say you need the modding community :)

anywayz, i ws just wondering why alex isnt as proud as usual  :-\
Logged

"If we all practice an eye for an eye, pretty soon the whole world will be blind" - Gandhi

We need to start listening to advocates of peace in oder to advance society. We have not grown from the prehistoric barbarians we once were.  Will society ever mature?
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]


Re:How to write a mod
« Reply #8 on: December 20, 2001, 10:14:19 PM »
Reply with quote

where does <add> will add the new lines?
before or after the <search> lines?
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Zef Hemel
Advisor
YaBB God
*****
Posts: 1182


Me too


WWW
Re:How to write a mod
« Reply #9 on: December 21, 2001, 05:30:45 AM »
Reply with quote


where does <add> will add the new lines?
before or after the <search> lines?

After.

And if people want a <addbefore> tag I'm sure I can add it to a future release.
Logged

Dave
Sr. Member
****
Posts: 269


I just got one question...


Re:How to write a mod
« Reply #10 on: December 21, 2001, 10:18:29 AM »
Reply with quote

Naturally, you can always do

<search>
line1
</search>

<replace>
line2
line1
</replace>

To kinda spoof an 'add before', but I'd still like to see <add before> and <add after> tags sometime.
Logged
dOCda S
Noobie
*
Posts: 15


Gimme my sun back!


Re:How to write a mod
« Reply #11 on: December 23, 2001, 08:25:01 PM »
Reply with quote

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! :P
Matt Siegman
Super Duper Developer
YaBB God
*****
Posts: 927


Red Hot!


WWW
Re:How to write a mod
« Reply #12 on: December 23, 2001, 08:36:57 PM »
Reply with quote

are you trying to use an SP1 mod on you board? or have you converted it?
Logged

Meriadoc
Rice Dancer
YaBB SE Developer
Sr. Member
****
Posts: 361



WWW
Re:How to write a mod
« Reply #13 on: December 24, 2001, 03:17:47 AM »
Reply with quote

i have to use a .php to modify the db, what if i blow something up? :o
Logged

It is directions garbage other than this building, and forbid! A fine is obtained when illegal abandonment is carried out!!

It's nice to be a watermelon pig.
We can eat watermelon as much ass. we want. Because we live in watermelon hills.
Dave Smulders
YaBB SE Developer
YaBB God
*****
Posts: 608



WWW
Re:How to write a mod
« Reply #14 on: December 24, 2001, 09:09:35 AM »
Reply with quote

Make sure you have made a backup I guess :)
Logged

Pages: [1] 2 3 4 Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Topic: How to write a mod « previous next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.0.12 | SMF © 2016, Simple Machines
Valid XHTML 1.0! Valid CSS!
Page created in 0.223 seconds with 19 queries.