Hi all
Since installing Stramm's Mod Pack I've added the {LOGIN_FORM} to my custom theme but now I want to add the pic count to the {LOGIN_FORM} for every indiviual member.
I have transfered the loginForm function from theme.inc.php to my theme.php but just want to add this inditional info.
Any help will be great
Thanks, will
before
return $loginFormHtml;
add
$result = cpg_db_query("SELECT count(pid) FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = '" . USER_ID . "'");
$count = mysql_result($result,0);
mysql_free_result($result);
$loginFormHtml .= $count;
of course you'll need to do some formatting
oh, I forgot to say that this of course will suck some resources and isn't recommended for busy sites
Thanks Stramm, got it to work.
The following info I formatted is: Covers Uploaded: 8271
The above is what I see when I login but if I logout I see: Covers Uploaded: 0
I turned off in config: Display login form
So when I logout without the info I have added I see nothing but since I have added this above info I see: Covers Uploaded: 0
So every member will see this even tho they have logged out ???
Is there anyway of removing this with the pm & buddys when the members logout ???
Any help will be great
Thanks, will ;D
move that block up one bracket
means add it before
}
return $loginFormHtml;
Hi Stramm
What I have is:
}
return $loginFormHtml;
}
?>
This is after the added info.
With that added I get: Parse error: parse error, unexpected '}' in /home/content/w/i/l/willtaka05/html/gallery/themes/cdcover/theme.php on line 125 ???
lol, OK, after
if ($CONFIG['enable_buddy']){
$loginFormHtml .= "<div align=\"right\" class=\"smallfont\"><a href='buddy_manage.php'>".$lang_loginform['friends'].":</a> ".$tot_new_buddies." ".$lang_loginform['request'].", ".$lang_loginform['active']." ".$tot_all_buddies."</div>";
}
}
add
$result = cpg_db_query("SELECT count(pid) FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = '" . USER_ID . "'");
$count = mysql_result($result,0);
mysql_free_result($result);
($count==0) ? $count = '' : $count = "<div align=\"right\" class=\"smallfont\">You have uploaded $count pics</div";
$loginFormHtml .= $count;
it's now already formatted... you can see where I hope. If a user hasn't uploads $count is set to display nothing. Only if a user is logged in and has already uploaded pics it gets displayed
Thanks Stramm ;D ;D ;D