forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: aliveinindy on August 26, 2008, 11:58:09 pm

Title: PM and Friends
Post by: aliveinindy on August 26, 2008, 11:58:09 pm
I am wondering how to make the private messages show up to the left or right of friends instead of on top like it is shown on the attached image.

Thank you :)
Title: Re: PM and Friends
Post by: Stramm on August 28, 2008, 09:23:37 am
copy function loginForm() from include/themes.inc.php to the theme.php (eg. themes/classic/theme.php) you're actually using and modify it to your needs

This is just for this function. Usually you find the functions you savely can modify in themes/sample/theme.php and copy it from there to your theme.php
Title: Re: PM and Friends
Post by: aliveinindy on September 02, 2008, 12:30:19 am
Sorry, still a little confused.  Is this what you meant by the function loginForm?

Code: [Select]
if (!function_exists('loginForm')) {
function loginForm($logged=1) {

global $CONFIG, $lang_loginform, $REFERER;

//if (!$CONFIG['enable_loginform']) return $loginFormHtml = "";

if (!USER_ID && $CONFIG['enable_loginform']) {
  $loginFormHtml = <<<EOT
<ins>
    <form action="login.php?referer=$REFERER" method="post" name="loginbox" style="margin:0; padding:0;">
        <table cellpadding="0" cellspacing="3" border="0">
        <tr>
            <td><input type="text" class="textinput" name="username" size="10" /></td>
            <td><input type="password" class="textinput" name="password" size="10" /></td>
            <td><input name="submitted" type="submit" value="Login" />
            <input name="remember_me" type="hidden" class="checkbox" value="1" checked="checked" /></td>
        </tr>
        <tr>
        <td class="smallfont">$lang_loginform[user]</td>
        <td class="smallfont">$lang_loginform[pass]</td>
        <td></td>
</tr>
        </table>
        </form>
</ins>
EOT;
}

if (USER_ID) {

$loginFormHtml = "<div align=\"right\" class=\"smallfont\">".$lang_loginform['welcome']." <strong>".(USER_NAME)."</strong><br />";

if ($CONFIG['display_pms_status']){
$result = cpg_db_query("SELECT count(*) FROM  {$CONFIG['TABLE_PMS']} WHERE owner=".(USER_ID));
list($tot_all_messages) = @mysql_fetch_array($result);
mysql_free_result($result);
$result = cpg_db_query("SELECT count(*) FROM  {$CONFIG['TABLE_PMS']} WHERE owner=".(USER_ID)." AND showed='0'");
list($tot_new_messages) = @mysql_fetch_array($result);
mysql_free_result($result);

if ($CONFIG['pms_enabled']) {
$loginFormHtml .= "<a href='pms.php'>".$lang_loginform['pms']."</a> ".$tot_new_messages.$lang_loginform['unread_total'].$tot_all_messages."</div>";
}
}

if ($CONFIG['display_buddy_status']){
// get some buddy data
$result = cpg_db_query("SELECT count(*) FROM  {$CONFIG['TABLE_BUDDY']} WHERE user_id=".(USER_ID));
list($tot_all_buddies) = @mysql_fetch_array($result);
mysql_free_result($result);
$result = cpg_db_query("SELECT count(*) FROM  {$CONFIG['TABLE_BUDDY_REQ']} WHERE buddy_to=".(USER_ID));
list($tot_new_buddies) = @mysql_fetch_array($result);
mysql_free_result($result);

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>";
}
}

}
  return $loginFormHtml;
}
}


Again, thanks for the help
 :)
Title: Re: PM and Friends
Post by: Stramm on September 02, 2008, 11:26:43 am
without the first and last line, yes