##################################################################################
#  - EXTBOARD v1.2 - (feb. 2009)
# Instruction Manual for updating standard Fusion (v6.01.xx)
# Based on GPL2, copyright by ZOC, 2007-2009
#
# This package is a cooperation from:
# alcazar, silvermoon, weedorbeat, wibix, silvermoon and (go)ZOC
# the new version 1.2 is generally programmed by silvermoon and ZOC
# Thanks goes to beta-testers, emblinux and firemike for graphical assistance.
#
# THE ExtBoard IS FOR ADVANCED USERS AND USERS WITH PHP-KNOWLEDGE ONLY !!
# Any normal update is not possible, due to the changes in code and database. 
# First thing to do is making a full backup (files and db) !!
# so, lets go .... and you must be logged in as superadmin !!!
##################################################################################

#
#-----[ COPY ]-----------------------------------------
#
Copy the folders and files from the archive to your webspace overwriting existing files.
(Even the files from the previously installed aw_forum_panel)

#
#++++++[ UPGRADE ] +++++++++++++++++++++++++++++++++++++++++++++++++
#

### If you use the Extboard v.1.1 , please use the UPGRADE_1.1_1.2.txt ###

Do you have the extboard 1.0 ?? please renew ONLY this maincore part
in maincore.php:

#
#-----[ FIND ]------------------------------------------
#
define("IMAGES_R", IMAGES."ranks/");
(or other defines ....)

#
#-----[ AFTER, ADD ]------------------------------------
#

// zusatz silvermoon
function strip_umlaute ($text) {
	$search = array("","","","","","","","");
	$replace = array("&auml;","&ouml;","&uuml;","&Auml;","&Ouml;","&Uuml;","&szlig;","&euro;");
	$text = str_replace($search, $replace, $text);
	return $text;
}


THIS NEXT SECTION, please paste it on the END of maincore.php:

// silvermoon
if ($settings['maintenance'] != "1") {
	$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
	$result = dbquery("SELECT online_user,online_ip,online_lastactive FROM ".$db_prefix."online WHERE online_user=".$cond." LIMIT 1"); //Limit eingefgt by Sascha
	if (dbrows($result) != 0) {
		$result = mysql_unbuffered_query("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond."");
	} else {
		$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
		$result = mysql_unbuffered_query("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('$name', '".USER_IP."', '".time()."')");
	}
	$result = mysql_unbuffered_query("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
}
// ende


#
#---- FIND function parsesmileys and CHANGE the function with this:
#

function parsesmileys($message,$reverse=false) 
{
	$query = mysql_query("SELECT smile_url,code FROM ".DB_PREFIX."smilies") or die(mysql_error());
	while($row = mysql_fetch_object($query))
	{
		if(!$reverse) {
		$img="<img src='".IMAGES."smiley/".$row->smile_url."' alt=''>";
		$message =str_replace($row->code,$img,$message);
		} else {
		$img="<img src='".IMAGES."smiley/".$row->smile_url."' alt=''>";
		$message =str_replace($img,$row->code,$message);	
		$message =str_replace($row->code,$row->code,$message);	
		}
	}
	return $message;
}


Now, run the script
/update/upgrade.php as superadmin
You can ignore the other next install steps ...
It could be a good idea to use the original parseubb function.

# ---- Execute this little script in a NEW PANEL, ONLY with preview -----
# (its updating your version number)

$result = dbquery(UPDATE .DB_PREFIX.extboard_settings SET `version` = '1.2');
echo "Version aktualisiert - version is updated ...";

# ---- you may remove the follow files from /includes:
#
/geshi - folder
automatic_linking_include.php
geshi.php
geshi_bbcode_include.php

READY !!

#
#++++++[ UPGRADE READY ] +++++++++++++++++++++++++++++++++++++++++++


#
#----- NEW INSTALLATION -------------------------------------------------

#
#-----[ REQUIREMENTS / ADD ONS]------------------------------------------
#

* aw_forum_panel
Make sure you have installed the aw_forum_panel from wibix! (www.wibix.de)
If not, download and infuse it, it has many special functions.

* forum poll (from xandra)
please install this as infusion ... and have a look in the configuration

* forum ignore (from DwB)
please install this as infusion ... its for ignoring users and the posts in forum

* similar threads (from pirdani)
please install this as infusion ... show you, when existing, similar threads in viewthread.php

* included the highslide feature from http://highslide.com
* included geshi from http://qbnz.com/highlighter/
* included the new parser from Erik Bakker (ubbparser-class)
* included the boxover from Oliver Bryant

# FILE-EDIT
#
#-----[ OPEN ]------------------------------------------
#
maincore.php

#
#-----[ FIND ]------------------------------------------
#
define("THEMES", BASEDIR."themes/");

#
#-----[ AFTER, ADD ]------------------------------------------
#
define("IMAGES_R", IMAGES."ranks/");

// zusatz silvermoon
function strip_umlaute ($text) {
	$search = array("","","","","","","","");
	$replace = array("&auml;","&ouml;","&uuml;","&Auml;","&Ouml;","&Uuml;","&szlig;","&euro;");
	$text = str_replace($search, $replace, $text);
	return $text;
}

// silvermoon
if ($settings['maintenance'] != "1") {
	$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
	$result = dbquery("SELECT online_user,online_ip,online_lastactive FROM ".$db_prefix."online WHERE online_user=".$cond." LIMIT 1");
	if (dbrows($result) != 0) {
		$result = mysql_unbuffered_query("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond."");
	} else {
		$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
		$result = mysql_unbuffered_query("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('$name', '".USER_IP."', '".time()."')");
	}
	$result = mysql_unbuffered_query("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
}
// ende


#
#---- FIND function parsesmileys and CHANGE the function with this:
#

function parsesmileys($message,$reverse=false) 
{
	$query = mysql_query("SELECT smile_url,code FROM ".DB_PREFIX."smilies") or die(mysql_error());
	while($row = mysql_fetch_object($query))
	{
		if(!$reverse) {
		$img="<img src='".IMAGES."smiley/".$row->smile_url."' alt=''>";
		$message =str_replace($row->code,$img,$message);
		} else {
		$img="<img src='".IMAGES."smiley/".$row->smile_url."' alt=''>";
		$message =str_replace($img,$row->code,$message);	
		$message =str_replace($row->code,$row->code,$message);	
		}
	}
	return $message;
}


#
#-----[ FIND ]------------------------------------------
#
function displaysmileys($textarea) {
        $smiles = "";
        $smileys = array (
                ":)" => "smile.gif",
                ";)" => "wink.gif",
                ":|" => "frown.gif",
                ":(" => "sad.gif",
                ":o" => "shock.gif",
                ":p" => "pfft.gif",
                "B)" => "cool.gif",
                ":D" => "grin.gif",
                ":@" => "angry.gif"
        );
        foreach($smileys as $key=>$smiley) $smiles .= "<img src='".IMAGES."smiley/$smiley' alt='smiley' onClick=\"insertText('$textarea', '$key');\">\n";
        return $smiles;
}

#
#-----[ REPLACE WITH ]------------------------------------------
#
function displaysmileys($textarea) {
    $querya = mysql_query("select * from ".DB_PREFIX."smilies WHERE view='1' LIMIT 0,10") or die(mysql_error());
        while($rowa = mysql_fetch_object($querya)){
        $smiles="$smiles <img src='".IMAGES."smiley/$rowa->smile_url' onClick=\"insertText('$textarea', '$rowa->code '); overlayclose('smiley'); \">\n";
        }
    return $smiles;
}

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Show more smiley icons
function displaysmileys_more($textarea) {
    $querya = mysql_query("select * from ".DB_PREFIX."smilies WHERE view='1' LIMIT 10,99") or die(mysql_error());
        while($rowa = mysql_fetch_object($querya)){
        $smiles="$smiles <img src='".IMAGES."smiley/$rowa->smile_url' onClick=\"insertText('$textarea', '$rowa->code ');\">\n";
        }
    return $smiles;
}


#
#-----[ FIND ]------------------------------------------
#
search for the function descript

$text = preg_replace('#(<[^>]+[\\"\'\s])(onmouseover|onmousedown|onmouseup|onmouseout|onmousemove|onclick|ondblclick|onload|xmlns)[^>]*>#iU', ">", $text);

and DELETE the "|onclick"

#
#-----[ CLOSE FILE maincore.php ]------------------------------------------
#


#
#-----[ db-update SQL ]---------------------------------------
#

!! If you have the standard-forum hast, use update/INSTALL.PHP  !!

!! If you have an Extboard (1.0) yet, use update/UPGRADE.PHP !!

If all OK, delete the file and proceed.
If not, retry or report to support forum.


##################################################################################
# NOTES
##################################################################################

* Some other important functions for the forum area are in the file "forum_functions_include.php"

* Themes and graphics:
  ExtBoard comes with 3 themes, some graphics used are in these only.
  If you want to use it in your theme copy the files delete.gif, left.gif, right.gif to your theme.

  
# if you wish:
# Displaying Global Moderators in profile
#
#-----[ OPEN ]------------------------------------------
#
profile.php

#
#-----[ FIND ]------------------------------------------
#
<td align='right' class='tbl2'>".getuserlevel($data['user_level'])."</td>

#
#-----[ REPLACE WITH ]------------------------------------------
#
<td align='right' class='tbl2'>".getuserlevel($data['user_level']);
if($data['user_global_mod'] == '1') echo " (Global Moderator)";
echo "</td>

#
#-----[ CLOSE FILE ]------------------------------------------
#

#
# little D O C ######################################################################
#

----------------------------------------------------------------
FORENADMINISTRATION:

You can only assign users as Forum Moderators if they have access to the forum and can either post or reply
else there are no settings.
Forum Administration has been extended and has partly its own logic and "intelligence".
Please take your time to get used to it.
In the Forum Overview you can see who is moderator and the rights for the Forum.
 
Groups:
If you set the Forum Rights to "Group", then only the specified groups (and Superadmins) are granted these rights.
Group rights are set via the "Group Rights" menu (execept "Moderator" you can set only those rights that are set to "group")
 
Important Change!! 
The general and all other forum configuration, is now under Content-Admin -> Forums
Here you can enable and set the color groups for the user_levels Moderator, Global Moderator, Admin, Superadmin. 
They're predefined colors, you can change them to your need.
And there are SOME other and new functions, which are can activate or modify.

 
GlobalMods:
Global Moderators are set via the member admin (editing the user over administration).

--------------------------------------------------------------------------------
There is a new parser function (parser-class) for codes and images !!

The video-links should work with the usual URLs.
Especially at Clipfish, where some links are not correct. Please check this.
Example for working links:

Youtube: http://www.youtube.com/watch?v=FClmtowd6XE
GoogleVideo: http://video.google.com/videoplay?docid=-3389980029353435416
MyVideo: http://www.myvideo.de/watch/1244115
Clipfish: http://www.clipfish.de/player.php?videoid=MjYxMnwyMg%3D%3D&cat=1

ATTENTION:
If you dont see a quick reply, please check for the function opentablex() in your used theme.php.
Alternatively you should use opensidex() instead.


Have fun with the new ExtBoard v1.2,
ZOC and Silvermoon
