
Navigation
Home Community News Search Projekte

Wer ist wo

Languages

Design
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.

Downloads (Top)
|
Forum 9.x > > Dragonfly CMS 9.x > > HowTo & Allgemeine Fragen > > Info Box verkleinern?
Info Box verkleinern?Fragen und Diskussionen zur aktuellen Version
| View previous topic :: View next topic |
| Author |
Message |
Blubi Investigator


Joined: Oct 19, 2006 Posts: 15
|
Posted: 25.10.2006 14:14 Post subject: Info Box verkleinern? |
|
Hallo !
Ich würde gerne die Info-Box nur auf den Login beschränken... also ohne Benutzer,Anwesende usw...
Geht sowas? wenn ja wie?
Vielen Dank im vorraus...
MfG Blubi
PS: Gibt es sowas wie ein ganz normalen counter?
[Moderatoren]: Blubi trage unter Profil >> Sonstiges deine Serverdaten ein! |
|
| Back to top |
|
 |
Blubi Investigator


Joined: Oct 19, 2006 Posts: 15
|
|
| Back to top |
|
 |
Poldi Moderator


Joined: Nov 14, 2004 Posts: 705
|
Posted: 26.10.2006 21:06 Post subject: Re: Info Box verkleinern? |
|
| Blubi wrote: |
Gibt es sowas nicht?  |
Eine kleinere Version der Userinfo ist ja bereits dabei, wenn dir die immernoch zu groß ist, mußt du halt den Code des Blocks verkleinern ...
so etwa :
| Code:: |
<?php
if (!defined('CPG_NUKE')) { exit; }
global $prefix, $user_prefix, $db, $sec_code, $userinfo, $MAIN_CFG;
$content = '';
// number online
$result = $db->sql_query('SELECT COUNT(*), guest FROM '.$prefix.'_session GROUP BY guest ORDER BY guest',false,__FILE__,__LINE__);
$online_num = array(0, 0, 0, 0);
while ($row = $db->sql_fetchrow($result)) {
$online_num[$row[1]] = intval($row[0]);
}
$db->sql_freeresult($result);
// number of members
list($numusers) = $db->sql_ufetchrow('SELECT COUNT(*) FROM '.$user_prefix."_users WHERE user_id > 1 AND user_level >= 0",SQL_NUM,__FILE__,__LINE__);
// users registered today
list($userCount[0]) = $db->sql_ufetchrow('SELECT COUNT(*) FROM '.$user_prefix."_users WHERE user_regdate='".date("M d, Y", gmtime())."'",SQL_NUM,__FILE__,__LINE__);
// users registered yesterday
list($userCount[1]) = $db->sql_ufetchrow('SELECT COUNT(*) FROM '.$user_prefix."_users WHERE user_regdate='".date("M d, Y", gmtime()-86400)."'",SQL_NUM,__FILE__,__LINE__);
// latest member
list($lastuser) = $db->sql_ufetchrow('SELECT username FROM '.$user_prefix.'_users WHERE user_active = 1 AND user_level > 0 ORDER BY user_id DESC LIMIT 0,1',SQL_NUM,__FILE__,__LINE__);
if(is_user()) {
$content .= '<center>';
if ($userinfo['user_avatar_type'] == 1) {
$avatar = $MAIN_CFG['avatar']['path'].'/'.$userinfo['user_avatar'];
} else if ($userinfo['user_avatar_type'] == 2) {
$avatar = $userinfo['user_avatar'];
} else if ($userinfo['user_avatar_type'] == 3) {
$avatar = $MAIN_CFG['avatar']['gallery_path'].'/'.$userinfo['user_avatar'];
} else {
$avatar = 'images/blocks/no_avatar.gif';
}
$content .= "<img src=\"$avatar\" alt=\"\" />";
$content .= '<br />'._BWEL." <b>$userinfo[username]</b><br /><img src=\"images/spacer.gif\" height=\"8\" alt=\"\" /></center>\n";
if (is_active('Private_Messages')) {
$pm = $userinfo['user_new_privmsg']+$userinfo['user_unread_privmsg'];
$content .= ' <a title="'._READSEND.'" href="'.getlink('Private_Messages').'"><img src="images/blocks/email.gif" alt="" border="0" /></a> <a title="'._READSEND.'" href="'.getlink('Private_Messages').'">'._INBOX.'</a>';
$content .= ' '._NEW.": <b>$pm</b><br />\n";
}
$content .= '<a title="'._ACCOUNTOPTIONS.'" href="'.getlink('Your_Account').'"><img src="images/blocks/logout.gif" alt="" border="0" /></a> <a title="'._ACCOUNTOPTIONS.'" href="'.getlink('Your_Account').'">'._Your_AccountLANG.'</a><br />
<a title="'._LOGOUTACCT.'" href="'.getlink('Your_Account&op=logout&redirect', false).'"><img src="images/blocks/login.gif" alt="" border="0" /></a> <a title="'._LOGOUTACCT.'" href="'.getlink('Your_Account&op=logout&redirect', false).'">'._LOGOUT.'</a><br />';
} else {
$content .= '<center><img src="images/blocks/no_avatar.gif" alt="" /><br />'._BWEL.' <b>'._ANONYMOUS.'</b></center>
<hr /><form action="'.get_uri().'" method="post" enctype="multipart/form-data" accept-charset="utf-8"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td>'._NICKNAME.'</td><td align="right"><input type="text" name="ulogin" size="10" maxlength="25" /></td></tr>
<tr><td>'._PASSWORD.'</td><td align="right"><input type="password" name="user_password" size="10" maxlength="20" /></td></tr>
<tr><td>';
if ($sec_code & 2) {
$content .= _SECURITYCODE.'</td><td>'.generate_secimg().'</td></tr>
<tr><td>'._TYPESECCODE.'</td><td align="right"><input type="text" name="gfx_check" size="10" maxlength="8" /></td></tr>
<tr><td>';
}
// don't show register link unless allowuserreg is yes
$content .= ($MAIN_CFG['member']['allowuserreg'] ? '(<a href="'.getlink('Your_Account&file=register').'">'._BREG.'</a>)' : '').'</td>
<td align="right"><input type="submit" value="'._LOGIN.'" />
</td></tr></table></form>
';
}
if (is_admin()) {
$content .= '<a title="'._LOGOUTADMINACCT.'" href="'.adminlink('logout').'"><img src="images/blocks/login.gif" alt="" border="0" /></a> <a title="'._LOGOUTADMINACCT.'" href="'.adminlink('logout').'">'._ADMIN.' '._LOGOUT."</a><br />\n";
}
$db->sql_freeresult($result); |
(Ich weiß, da kann man noch die SQL-Abfragen rauswerfen ..  )
_________________ gG,
Poldi
www.green-dragon.de (Dragonfly 9.2.1)
www.tampones.de (Dragonfly 9.2.1)
www.bfg-deggendorf.de (Dragonfly 9.2.1)
www.sexy-goths.de (Dragonfly 9.1.2.1)
www.gig-hunter.de (deceased)
www.green-dragon.net (Dragonfly CVS ... Testseite)
Poldi's Serverdaten - verwendete Vers. (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/1.3.37/4.0.27-5.0.18/4.4.9-5.2.1/9.1.0.0-9.2.1 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|