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)
 * The KeepYourHandsToYourself extension (for signatures)

Modification List
From newest to oldest: Recommended Wiki Extensions
 * Signatures
 * Search
 * Avatars
 * Different font for labels
 * User_profile to User
 * Quote button to edit toolbar
 * Fixed MWBB link
 * Emoticons



Installation - Fixed MWBB Link
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.



Installation - Quote Button
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 this 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.



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

//Modifications: User_profile to User + Avatars + Staff Label Mod + Signatures //Modded by The TattleTale Strangler //skin function $html.=' '; 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, added signatures, and changed links to User:.



Installation - Avatars part 2
Now it's time for the fun part: the script for avatars.

---
 * Download these files and put them in your root directory:
 * File 1
 * File 2
 * File 3 (Requires ASCII Mode when uploading!)
 * If this page only comes up with a 500 error, CHMOD the file to 755.

---

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).
 * On File 3 (Upload.cgi), edit $folder and $redirect. $folder should have your exact link to the avatars (/avatars/), and $redirect will need the direct link to upload1.html, which you have just uploaded. 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."

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.



Installation - Signatures part 2
This one is not quite as long as the avatars part 2 and is quite simple. Just copy and paste this code below and save it as signature.js in your MediaWiki directory. (e.g. /wiki/)

var rootdomain="http://"+window.location.hostname

function ajaxinclude(url) { var page_request = false if (window.XMLHttpRequest) // if Mozilla, Safari etc page_request = new XMLHttpRequest else if (window.ActiveXObject){ // if IE try { page_request = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ page_request = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){} } } else return false page_request.open('GET', url, false) //get page synchronously page_request.send(null) writecontent(page_request) }

function writecontent(page_request){ if (window.location.href.indexOf("http")==-1 || page_request.status==200) document.write(page_request.responseText) } You're done! Test it out. :) If you do not like the error message being there, edit MediaWiki:Noarticletext‎ with the message that you want.



Installation - Search
This one is actually pretty easy. First, go to this page. Fill out the page, except for "sites to search," put in  http://www.domain.com/wiki/index.php?title=Special:Topic/*  or  http://www.domain.com/wiki/Special:Topic/*  if you have the short url, with your domain name, respectively. Go with the Standard Edition without checking the box underneath it. Agree to it and click next. When prompt, allow confirmation, as it will give you a very important url. Once you have sent the confirmation, go to your email and copy and paste the url below "To incorporate your search engine into your site or blog, you can find the necessary code at..." Once there, select overlay and put in the direct link to the forum's main page. Generate and copy the code. On your wiki, go to the MediaWiki:Powered_by page and paste the code at the top. There you go, your very own search for your forum! Feel free to tweak around with the code.



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



MediaWiki 1.12 Fix
There has been some "errors" shown whenever someone tries to post in a topic, or make one. This is MediaWiki's fault, and can be fixed by just changing a line in a file.

To fix it, all you have to do is just go to /includes/EditPage.php, and then search for the line:

$this->mTitle = $article->getTitle; Now, just change that line to:

global $wgTitle; $this->mTitle =& $wgTitle;

It's as simple as that!

Updates
If you want to subscribe to updates, then watch this page.

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.