Login Form Login Form
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Login Form

Started by will, June 29, 2006, 06:03:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

will

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

Stramm

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

Stramm

oh, I forgot to say that this of course will suck some resources and isn't recommended for busy sites

will

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

Stramm

move that block up one bracket
means add it before
}
  return $loginFormHtml;


will

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 ???

Stramm

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

will