============================================================================================================================
Modification Name: Bio Center

Version: 1.0

Author: baquito

Updated for 1.9.5 by: WormHole @ XMB Garage

Description:
This modification will give your board a Bio Center for your members.
It is divided into two parts: 1) Staff Bio Center, and 2) Members Bio Center.
Staff and Members can edit their bios anytime they want to.

Supported Version: XMB 1.9.5 SP1

License Note: This modification is released under the GPL License v3. A copy is provided with this software package.

Notes:
Please backup your files before installing this modification.
Neither XMBGarage nor the author can be held responsible if your board stops functioning properly due to you installing this modification.
============================================================================================================================
=======
Step 1.
=======
====================================
Go To Administration Panel --> Insert Raw SQL
====================================
=========================
Paste Code and Submit Changes:
=========================

CREATE TABLE IF NOT EXISTS `$table_bio` (
  `bid` int(11) NOT NULL auto_increment,
  `bio_username` varchar(250) NOT NULL default '',
  `bio_introduction` text NOT NULL,
  `bio_location` varchar(250) NOT NULL default '',
  `bio_age` int(11) NOT NULL default '0',
  `bio_school` varchar(250) NOT NULL default '',
  `bio_course` varchar(250) NOT NULL default '',
  `bio_years` varchar(250) NOT NULL default '',
  `bio_exp_dream` varchar(250) NOT NULL default '',
  `bio_exp_best` varchar(250) NOT NULL default '',
  `bio_exp_when` varchar(250) NOT NULL default '',
  `bio_exp_future` varchar(250) NOT NULL default '',
  `bio_fav_food` varchar(250) NOT NULL default '',
  `bio_fav_sport` varchar(250) NOT NULL default '',
  `bio_fav_films` varchar(250) NOT NULL default '',
  `bio_fav_music` varchar(250) NOT NULL default '',
  `bio_fav_season` varchar(250) NOT NULL default '',
  `bio_fav_website` varchar(250) NOT NULL default '',
  `bio_fav_things` text NOT NULL,
  `bio_fav_others` text NOT NULL,
  `bio_final` text NOT NULL,
  PRIMARY KEY  (`bid`),
  KEY `title` (`bio_username`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

ALTER TABLE `$table_settings` ADD `biostatus` char(3) default 'on' NOT NULL;

============================================================================================================================
=======
Step 2.
=======
=======================
Edit File: lang/English.lang.php
=======================
========================
Add To End Of File Above  ?>
========================

// Bio Center Mod Begin
$lang['biobio'] = "<strong>Biographies</strong>";
$lang['biousername'] = "<strong>Username:</strong> ";
$lang['biointroduction'] = "<strong>Introduction:</strong> ";
$lang['biobasinfo'] = "<strong>Basic Info:</strong>";
$lang['biolocation'] = "<strong>Location:</strong> ";
$lang['bioage'] = "<strong>Age:</strong> ";
$lang['bioschool'] = "<strong>School or University:</strong> ";
$lang['biocourse'] = "<strong>Course (if applicable):</strong> ";
$lang['bioyearsin'] = "<strong>Degree/Diploma/Certificate (if applicable):</strong> ";
$lang['bioexp'] = "<strong>Expectations:</strong> ";
$lang['biodreams'] = "<strong>Dreams With:</strong> ";
$lang['biobest'] = "<strong>Best Thing In Life:</strong> ";
$lang['biowhen'] = "<strong>What would you like to accomplish before the age of 50:</strong> ";
$lang['biofuture'] = "<strong>Future Expectations of self:</strong> ";
$lang['biofavorites'] = "<strong>Favorites:</strong> ";
$lang['biofood'] = "<strong>Food:</strong> ";
$lang['biosport'] = "<strong>Sports and favorite clubs:</strong> ";
$lang['biofilm'] = "<strong>Films and actors:</strong> ";
$lang['biomembereditpro'] = "Edit My Member Profile";
$lang['biomembereditbio'] = "Edit My Bio Profile";
$lang['biomembers'] = "&raquo; Members Bio Center";
$lang['biomembersname'] = "Enter Member's Username:";
$lang['bioviewmemberbio'] = "View My Bio Profile";
$lang['biomusic'] = "<strong>Music and bands:</strong> ";
$lang['bioseason'] = "<strong>Season of the year:</strong> ";
$lang['biowebsite'] = "<strong>Website:</strong> ";
$lang['biothings'] = "<strong>Things to do:</strong> ";
$lang['biotitle'] = "The Bio Center";
$lang['bioothers'] = "<strong>Others:</strong> ";
$lang['biofinal'] = "<strong>Final Thoughts and Comments:</strong> ";
$lang['bioenteruser'] = "<strong>Enter an username</strong>";
$lang['bioenterintro'] = "<strong>Enter an introduction</strong>";
$lang['bioalreadyexist'] = "<strong>Already exist a biography for that user</strong>";
$lang['bioaddformulary'] = "<strong>Edit Form</strong>";
$lang['bioeditconfgirm'] = "<strong>The Biography has been updated</strong>";
$lang['biowelcome'] = "<strong>Welcome to the $bbname bio center. This is where you can find out about our staff so you know ( in most cases) that they don't bite. So here we go.</strong>";
$lang['bioeditconfirm'] = "<strong>The Biography has been updated</strong>";
$lang['biosystem']= "<strong>System Error</strong>";
$lang['bioeviewprofile'] = "<strong>View Profile</strong>";
$lang['bioeditprofile'] = "<strong>Edit Profile</strong>";
$lang['bionobio'] = "<strong>I haven't done my bio yet... wait for it!</strong>";
$lang['biodelconfirm'] = "<strong>The Biography has been deleted</strong>";
$lang['biostaff'] = "<strong>This function can only be used by Staff and/or Members</strong>";
$lang['biomemberdontexist'] = "<strong>That member does not exist</strong>";
$lang['bioclick'] = "<strong>Click to view  Bio for </strong>: ";
$lang['bioadmin'] = "<strong>This function can only be used by the Super Administrator</strong>";
$lang['bioself'] = "<strong>You can only update your own profile and/or Member does not exist</strong>";
$lang['BiostaffM'] = "Biographies of Staff Members";
$lang['biocenter'] = "Bio Center";
$lang['bioviewing'] = "Viewing Bio Center";
$lang['biostatus'] = "Bio Center Status:";
// Bio Center Mod End

============================================================================================================================
=======
Step 3.
=======
==============
Edit File: cp.php
==============
==========
Find Code:
==========

        $timezone1 = $timezone2 = $timezone3 = $timezone4 = $timezone5 = $timezone6 = false;

===============
Add Code Above:
===============

        // Bio Center Mod Begin
        $biostatuson = $biostatusoff = '';
        switch ($SETTINGS['biostatus']) {
            case 'on':
                $biostatuson = $selHTML;
                break;
            default:
                $biostatusoff = $selHTML;
                break;
        }
        // Bio Center Mod End

==========
Find Code:
==========

        printsetting1($lang['reportpoststatus'], 'reportpostnew', $reportposton, $reportpostoff);

===============
Add Code Below:
===============

        // Bio Center Mod Begin
        printsetting1($lang['biostatus'], 'biostatusnew', $biostatuson, $biostatusoff);
        // Bio Center Mod End

==========
Find Code:
==========

        $resetSigNew = ($resetSigNew == 'on') ? 'on' : 'off';

===============
Add Code Below:
===============

        // Bio Center Mod Begin
        $biostatusnew = ($biostatusnew == 'on') ? 'on' : 'off';
        // Bio Center Mod End

==========
Find Code:
==========

        $db->query("UPDATE $table_settings SET langfile='$newlangfile',

=================================
Add To End Of Statement Just BEFORE  ");
=================================

, biostatus='$biostatusnew'

============================================================================================================================
=======
Step 4.
=======
=================
Edit File: header.php
=================
==========
Find Code:
==========

,'banned','buddys'

================
Replace Code With:
================

,'banned','bio','buddys'

==========
Find Code:
==========

// 'Forum Rules'-link
if ($SETTINGS['bbrules'] == "on") {
    $links[] = "<img src=\"$imgdir/bbrules.gif\" alt=\"$lang[altrules]\" border=\"0\" /> <a href=\"faq.php?page=forumrules\"><font class=\"navtd\">$lang[textbbrules]</font></a>";
}

===============
Add Code Below:
===============

// Bio Center-link
if ($SETTINGS['biostatus'] == 'on') {
    $links[] = '<img src="'.$imgdir.'/bios.gif" alt="'.$lang['BiostaffM'].'" border="0" /> <a href="bio.php"><font class="navtd">'.$lang['biocenter'].'</font></a>';
}

============================================================================================================================
=======
Step 5.
=======
===============
Edit File: misc.php
===============
==========
Find Code:
==========

    } elseif (false !== strpos($url, "/index.php")) {
        $location = $lang['onlineindex'];

===============
Add Code Below:
===============

    // Bio Center Mod Begin
    } elseif (false !== strpos($url, "/bio.php")) {
        $location = $lang['viewingbios'];
    // Bio Center Mod End

============================================================================================================================
=======
Step 6.
=======
===============================
Go To Administration Panel --> Templates
===============================
=====================
Create New Template: bio
=====================
========================
Add Code and Submit Changes:
========================

<table width="$tablewidth" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="$bordercolor">
<tr> 
<td> 
<table border="0" cellspacing="$borderwidth" cellpadding="$tablespace" width="100%"> 
<form method="post" action="bio.php?action=viewpro&member">
<tr> 
<td class="mediumtxt" $catbgcode><strong>$lang[biomembers]</strong></td> 
</tr> 
<tr class="tablerow"> 
<td bgcolor="$altbg1" align="center"><br>$lang[biomembersname] 
<input type="text" name="member" size="30" value="$member"><br><br>

<input type="submit" name="submit" value="Submit"> <input type="reset" value="Clear">
<br><br>[ <img src="$imgdir/star.gif" alt="Edit Profile" border="0"> <a href="bio.php"> $lang[biotitle]</a> <img src="$imgdir/star.gif" alt="Edit Profile" border="0"> <a href="memcp.php?action=profile"> $lang[biomembereditpro]</a> <img src="$imgdir/star.gif" alt="Edit Bio" border="0"> <a href="bio.php?action=edit&member=$self[username]"> $lang[biomembereditbio]</a> <img src="$imgdir/star.gif" alt="View Bio Profile" border="0"> <a href="bio.php?action=viewpro&member=$self[username]"> $lang[bioviewmemberbio]</a> <img src="$imgdir/star.gif" alt="View Bio Profile" border="0"> ] </strong></td><tr>
<td class="mediumtxt" $catbgcode align="center">&nbsp;</td>
</tr>

</form>
</table>
</td> 
</tr> 
</table>
<br>

============================================================================================================================
=======
Step 7.
=======

Upload bio.php to your forum directory.
Upload bios.gif and buddy.gif to all your theme folders.

============================================================================================================================
Enjoy!