Extra Small Login Block

Dragonfly issues as they relate to modules discussed here
  
1 Jan '70 Lör Feb 24, 2007 06:38    
layingback
Site Admin  
  •  

Inlägg Extra Small Login Block

The following hack for 9.1.1 will reduce the login block to just the login and registration parts for Anonymous users. Reduce the apparent complexity for newbies, and hide the users on-line info from non-members, bots, etc.

File blocks\block-User_Info.php. Find:

PHP:
if (is_admin()) {
$content .= '<a title="'._LOGOUTADMINACCT.'" href="'.adminlink('logout').'"><img src="images/blocks/login.gif" alt="" border="0" /></a>&nbsp;<a title="'._LOGOUTADMINACCT.'" href="'.adminlink('logout').'">'._ADMIN.' '._LOGOUT."</a><br />\n";
}
$day = L10NTime::tolocal((mktime(0,0,0,date('n'),date('j'),date('Y'))-date('Z')), $userinfo['user_dst'], $userinfo['user_timezone']);



Insert extra line as shown:

PHP:
if (is_admin()) {
$content .= '<a title="'._LOGOUTADMINACCT.'" href="'.adminlink('logout').'"><img src="images/blocks/login.gif" alt="" border="0" /></a>&nbsp;<a title="'._LOGOUTADMINACCT.'" href="'.adminlink('logout').'">'._ADMIN.' '._LOGOUT."</a><br />\n";
}

if (
is_user() || is_admin()) {

$day = L10NTime::tolocal((mktime(0,0,0,date('n'),date('j'),date('Y'))-date('Z')), $userinfo['user_dst'], $userinfo['user_timezone']);



At end of file add:

PHP:
}



Note: An easier and cleaner way is to have a menu item, eg in header, to call Your Account. Then you can restrict the User-Info block to Registered Members only (because you have another way to logon).



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

 
 
 
 
Link  QR 
Share this Utskriftsvänlig sida  facebook   google+   linkedin   twitthis  
Show more ...



Forumrättigheter - Du kan inte skapa nya inlägg i det här forumet
Du kan inte svara på inlägg i det här forumet
Du kan inte ändra dina inlägg i det här forumet
Du kan inte ta bort dina inlägg i det här forumet
Du kan inte rösta i det här forumet
Du kan inte bifoga filer i det här fourmet
Du kan ladda ner filer i detta forum