Extension:MediaWiki Bulletin Board Modifications

MWBB Mods are modifications for MediaWiki Bulletin Board, a message board or forum extension for MediaWiki software. MWBB itself is released under GNU GPL 2.0 and is editable, distributable by anyone. The modification rights are below.

Requirements

 * Perl 5 or above
 * MWBB 0.2 + PM (0.1 will not work)

Modification List

 * Avatars
 * Different font for labels
 * User_profile to User
 * Quote button to edit toolbar
 * Fixed MWBB link

Recommended Wiki Extensions

 * Emoticons

Installation
Let's fix the MWBB link first. Go to Special:Allmessages and search "powered_by". Click on powered_by and put in the following code:

Forums Powered by MWBB

That should fix the broken MWBB link. Let's move on to a quote button so people can quote things. Go to MediaWiki:Common.js and go to the edit page. Copy and paste this in the article (at the bottom if you have already added things to tihs page).

/* Quote button */

var button = { "imageFile": "QUOTE IMAGE URL HERE", //image to be shown on the button (may be a full URL too), 22x22 pixels "speedTip": "Quote",   //text shown in a tooltip when hovering the mouse over the button "tagOpen": " ",       //the text to use to mark the beginning of the block "tagClose": " ",     //the text to use to mark the end of the block (if any) "sampleText": "Insert quote here"  //the sample text to place inside the block }; mwCustomEditButtons.push(button);

/* End of Quote button */

Insert a quote image url at the designated location. If you do not want to create one, you can use mine. Save the page.

Now it's time to be adding three things at once: changing User_profile: to User:, changing the label font, and adding avatars. Open /extensions/mwbb/topic.php and replace everything from //skin function to return $html; }

//Modifications: User_profile to User + Avatars + Label Mod //Modded by The TattleTale Strangler //skin function function showtopic(&$data,&$skin,&$topic_data) { global $wgUser,$wgOut, $wgScriptPath; $html=' '; for($i=0;$igetGroups; if(count($groups)>0) $groups=implode(',',$groups); else $groups=''; $userlink=$skin->MakeKnownLink('User:'.$data[$i]['user_name'],$data[$i]['user_name']); $html.=' '; } return $html; } //End modifications.

What I have done is changed the label font, added the image placement for avatars, and changed links to User:. Now it's time for the fun part: the script for avatars.

The code you had recently put in made it so every post would have an image labeled as "Username.jpeg", with "username" changing to the user's username, respectively. In the root directory, create a /avatars/ subdirectory to store the avatars (you'll need this later). Then, download this file and edit $folder and $redirect in the file. $folder should have your exact link to the avatars (/avatars/), and $redirect is the direct link to upload1.html, which you'll download in the next paragraph. You may want to edit $domain for security. Also, .jpg is disabled by default. If you want to enable .jpg, go to @types and type "jpg" below "jpeg." Once finished, upload to the root directory in ASCII mode. Putting it in with your wiki files will only produce errors with the avatar system. If this page only comes up with a 500 error, CHMOD the file to 755.

Do the same with this file and this file but you don't have to use ASCII mode again. Be sure that these two files are in the same directory as upload.cgi. You should now be able to go to upload.html and upload images. You may also notice that there are things you have to follow with avatars.

How this avatar system works is that you upload a .jpeg or .jpg file with the filename as your username (e.g. if you are Iamcool662, then the image you upload should be "Iamcool662.jpeg" or "Iamcool622.jpg") Then, it gets displayed under your username using an image html code. You can display upload.html by IFrame using HTMLets on an article or on a topic or by creating your own special page.

Hope everything turns out alright. I made it as simple as I could and I hope you enjoy my modifications. :)

Rights
These modifications are available to the public, however, you cannot redistribute them without my permission. If you want someone to use these modifications, show them this article. You can, however, add modifications to this article, just as long as you don't credit other modifications as your own, I am fine.

Bugs/help
If you need help or have bugs, talk on the Discussion page.