============================================================================================================================
Modification Title: Listening To Changer On Index

Version: 1.0

Author: WormHole

Description: This modification allows you to change your Listening To text via the index page of your forum without going to the control panel / options to edit what you're Listening To.

Note: You must have the Listening To modificationk installed in order to use this modification.

Supported Version: XMB 1.9.5 SP1

Installation Note: Before adding this modification to your forum, you should back up all files related to this modification.

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

Author Note:
For security purposes, Please Check: http://www.xmbgarage.com for the latest version of this modification.
Downloading this modification from other sites could cause malicious code to enter into your XMB Forum software.
As such, XMB Garage.com will not offer support for modifications not offered at our web site.
============================================================================================================================
=======
Step 1.
=======
================
Edit File: index.php
================
============
Find Code:
============

eval('echo "'.template('header').'";');

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

// Listening To Changer Mod Begin
if (X_MEMBER) {
    if (isset($listeningtochangersubmit)) {
        $listeningto = addslashes($listeningtochange);
        $db->query("UPDATE $table_members SET listeningto = '$listeningto' WHERE username = '$xmbuser'"); 
        $listeningtochanger = "<tr class=\"tablerow\" bgcolor=\"$altbg1\"><td align=\"center\" colspan=\"3\">$lang[listeningtochanged] </td></tr>"; 
    } else { 
        $listeningtochanger = "<script language='JavaScript'> 
        function clearForm() { 
            if (document.listeningtoChangeForm.listeningtochange.value=='$self[listeningto]') { 
                document.listeningtoChangeForm.listeningtochange.value=''; 
            } 
        } 
        </script>"; 
        $listeningto['listeningto'] = stripslashes($listeningto['listeningto']); 
        $listeningtochanger .= "<form name=\"listeningtoChangeForm\" method=\"post\" action=\"index.php\"><tr class=\"tablerow\" bgcolor=\"$altbg1\"><td align=\"center\" colspan=\"3\">$lang[newlisteningto] <input type=\"text\" name=\"listeningtochange\" class=\"listeningtochangercss\" size=\"30\" maxlength=\"30\" value=\"$self[listeningto]\" onFocus='clearForm();' /> <input type=\"submit\" class=\"listeningtochangercss\" name=\"listeningtochangersubmit\" value=\"Submit\" /></td></tr></form>";
    }
}
// Listening To Changer Mod End

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

// Listening To Changer Mod Begin
$lang['listeningtochanged'] = "Thank you! What you're listening to has been updated.";
$lang['newlisteningto'] = "Currently Listening To:";
// Listening To Changer Mod End

============================================================================================================================
=======
Step 3.
=======
===============================
Go To Administration Panel --> Templates
===============================
=============================
Edit Template: index_welcome_member
=============================
==========
Find Code:
==========

<td align="center" width="33%"><a href="#" onclick="Popup('buddy.php', 'Window', 450, 400);"><strong>$lang[launchbuddylist]</strong></a></td>
</tr>

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

$listeningtochanger

============================================================================================================================
=======
Step 4.
=======
===============================
Go To Administration Panel --> Templates
===============================
===============
Edit Template: css
===============
==========
Find Code:
==========

/*]]>*/
</style>

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

.listeningtochangercss { 
    font-family: Verdana, arial, helvetica, sans-serif; 
    font-size: 10px; 
    font-weight: normal; 
    background-color: $altbg1; 
    color: $tabletext; 
}

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