Modification Title: Listening To Changer On Index v1.0

Modification Author: WormHole

Modification 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: Must have the Listening To hack installed in order to use this hack.

Supported Version: XMB 1.9.8 SP3

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

License Note: This modification is released under the GPL License.

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 in our available hacks list.

=======================================================================================================================
=====
Step 1.
=====

Edit file index.php

Find:

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


Add Below:

// Listening To Changer Mod Begin
if (X_MEMBER) {
    if (isset($listeningtochangersubmit)) {
        $listeningto = addslashes($listeningtochange);
        $db->query("UPDATE ".X_PREFIX."members SET listeningto = '$listeningto' WHERE username = '$xmbuser'"); 
        $listeningtochanger = "<tr class=\"tablerow\" bgcolor=\"$THEME[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=\"$THEME[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 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'] = "$xmbuser's currently listening to:";
// Listening To Changer Mod End

===============================================================================================================
=====
Step 3.
=====

Edit template index_welcome_member

Find:

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


Add Below:

$listeningtochanger

===============================================================================================================
=====
Step 4.
=====

Edit template css

Find:

/*]]>*/
</style>

Add Above:

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

===============================================================================================================
Upload the edited index.php and English.lang.php files and you're done.

Enjoy!