I have been looking all over for an answer for the way to direct people to see that their avatar needs to be set. Forums in this site fracture the subject all over the place.
What I have picked up was a posting about a redirect for Profile Edit, and it seems to have the best structure for making it work, but I am getting mixed results. The mod was originally by DeeEmm.
In member.php,
[FIND]------------------------------------------------------
function getBlockCode_QuickLinks() {
--[INSERT AFTER]----------------------------------------------
//[START DeeEmm Login Redirect MOD]
global $sNoob;
//[END DeeEmm Login Redirect MOD]
[FIND]------------------------------------------------------
$_page['name_index'] = 150;
$_page['css_name'] = '';
--[INSERT AFTER]---------------------------------------
//[START DeeEmm Login Redirect MOD]
if ( $sNoob == 'yes' ) {
$sUrlRelocate = 'http://yoursitename.com/m/avatar/';
}
____________________________________
Then in inc/profiles.inc.php
[FIND]------------------------------------------------------
function bx_login($iId, $bRememberMe = false) {
--[INSERT AFTER]----------------------------------------------
//[START DeeEmm Login Redirect MOD]
global $sNoob;
//[END DeeEmm Login Redirect MOD]
[FIND]------------------------------------------------------
$_COOKIE['memberPassword'] = $sPassword;
--[INSERT AFTER]----------------------------------------------
//[START DeeEmm Login Redirect MOD]
$sMySQLQuery = mysql_query("SELECT `Avatar` from `Profiles` WHERE `ID` = '$iId' LIMIT 1");
$sResult = mysql_fetch_object($sMySQLQuery);
if ( !$sResult->Avatar || $sResult->Avatar == "0" ) {
$sNoob ='yes';
}
//[END DeeEmm Login Redirect MOD]
________________________________________________
Somehow this does not seem to be consistent in that I can go into a database, delete the value for the avatar in a profile and set to 0. Try and login, and the script gets ignored and dumps the user back to the member.php
Any tips on what might be wrong?