[ OK ] color in last visit

This mod will register when the user last logged in, allong with the info about how meny users have visited the board

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Postby Gael on Sat 03. Jan, 2004 19:25

it' s "add color in who is online", i fond it here => http://forum.phpbb.biz/viewtopic.php?t=91&highlight=color

it's for the rank "developper" but it's the same installation for all rank :D
Gael
Poster
Poster
 
Posts: 8
Joined: Sun 23. Nov, 2003 23:01

Postby Gael on Mon 12. Jan, 2004 23:14

It's works...i used this installation => http://www.aide4web.com/forum/index.php ... f=2&t=1489:

:lol:

thank for your help :)
Gael
Poster
Poster
 
Posts: 8
Joined: Sun 23. Nov, 2003 23:01

Postby umiya on Sat 24. Apr, 2004 23:57

i am trying to get color_groups hack to work with the last visit hack can anyone help me here?
umiya
Poster
Poster
 
Posts: 2
Joined: Sat 24. Apr, 2004 22:25

Postby umiya on Mon 26. Apr, 2004 19:26

bump
umiya
Poster
Poster
 
Posts: 2
Joined: Sat 24. Apr, 2004 22:25

Postby DivErTido on Sun 20. Jun, 2004 19:53

I´m look for this too... color groups with this hack
anyone to help us?
DivErTido
Poster
Poster
 
Posts: 35
Joined: Sun 27. Apr, 2003 20:28

Postby kooky on Mon 21. Jun, 2004 03:52

Maybe ask this user by PM
http://mods.db9.dk/viewtopic.php?p=18851#18851
but as i said in this Topic, be careful with Color Groups Hack :?
this mod isn't designed for small bandswitch or a host with slow ressources :wink:
kooky wrote:simply do the same thing for birthday, colorize...($user_birthday_user_id) :roll:

but keep in mind that the Color Groups Mod increases x2 your queries on index page
i wrote a subject about that to warn users and to compare 2 MODs which do the same thing
after this, you could not say, i didn't know that :lol:
-> http://perso.edeign.com/kooky/viewtopic.php?p=530#530
kooky
brilliant supporter
 
Posts: 1329
Joined: Tue 31. Dec, 2002 17:52
Location: Au pays des rêves

Postby comhit on Tue 08. Feb, 2005 18:02

How to get this to work with username color?
So the users added to a color group, gets the color also in "Visit" on index.
comhit
Poster
Poster
 
Posts: 1
Joined: Tue 08. Feb, 2005 16:22

Postby cane_cc72 on Wed 09. Feb, 2005 03:21

If you are using Color Groups v1.2.0 by Nivisec then use the below code for the edit to index.php instead of the one given in the install for last visit

Code: Select all
// Start add - Last visit MOD
   $time_now=time();
   $time1Hour=$time_now-3600;
   $minutes = date('is', $time_now);
   $hour_now = $time_now - (60*($minutes[0].$minutes[1])) - ($minutes[2].$minutes[3]);
   $dato=create_date('H', $time_now,$board_config['board_timezone']);
   $timetoday = $hour_now - (3600*$dato);
   $sql = 'SELECT session_ip, MAX(session_time) as session_time FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" AND session_time >= '.$timetoday.' AND session_time< '.($timetoday+86399).' GROUP BY session_ip';
   if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve guest user today data", "", __LINE__, __FILE__, $sql);
   while( $guest_list = $db->sql_fetchrow($result))
   {
      if ($guest_list['session_time'] >$time1Hour) $users_lasthour++;
   }
   $guests_today = $db->sql_numrows($result);
   $sql = 'SELECT user_id,username,user_allow_viewonline,user_level,user_lastlogon FROM ' . USERS_TABLE . ' WHERE user_id!="'.ANONYMOUS.'" AND user_session_time >= '.$timetoday.' AND user_session_time< '.($timetoday+86399).' ORDER BY username';
   if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve user today data", "", __LINE__, __FILE__, $sql);
   while( $todayrow = $db->sql_fetchrow($result))
   {
      $style_color = "";
      if ($todayrow['user_lastlogon']>=$time1Hour)
      {
         $users_lasthour++;
      }
      $style_color = color_group_colorize_name($todayrow['user_id'],true);
      $users_today_list.=( $todayrow['user_allow_viewonline'])?' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $todayrow['user_id']) . '" class="gensmall">' . $style_color . '</a>,' : (($userdata[user_level]==ADMIN) ? ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $todayrow['user_id']) . '" class="gensmall"><i>' . $style_color .'</i></a>,' : '');
      if (!$todayrow['user_allow_viewonline']) $logged_hidden_today++;
      else $logged_visible_today++;
   }
   if ($users_today_list)
   {
      $users_today_list[ strlen( $users_today_list)-1] = ' ';
   }
   else
   {
      $users_today_list = $lang['None'];
   }
   $total_users_today = $db->sql_numrows($result)+$guests_today;

   $users_today_list = $lang['Registered_users'].' ' . $users_today_list;
   $l_today_user_s = ($total_users_today) ? ( ( $total_users_today == 1 )? $lang['User_today_total'] : $lang['Users_today_total'] ) : $lang['Users_today_zero_total'];
   $l_today_r_user_s = ($logged_visible_today) ? ( ( $logged_visible_today == 1 ) ? $lang['Reg_user_total'] : $lang['Reg_users_total'] ) : $lang['Reg_users_zero_total'];
   $l_today_h_user_s = ($logged_hidden_today) ? (($logged_hidden_today == 1) ? $lang['Hidden_user_total'] : $lang['Hidden_users_total'] ) : $lang['Hidden_users_zero_total'];
   $l_today_g_user_s = ($guests_today) ? (($guests_today == 1) ? $lang['Guest_user_total'] : $lang['Guest_users_total']) : $lang['Guest_users_zero_total'];
   $l_today_users = sprintf($l_today_user_s, $total_users_today);
   $l_today_users .= sprintf($l_today_r_user_s, $logged_visible_today);
   $l_today_users .= sprintf($l_today_h_user_s, $logged_hidden_today);
   $l_today_users .= sprintf($l_today_g_user_s, $guests_today);
// End add - Last visit MOD
cane_cc72
Poster
Poster
 
Posts: 1
Joined: Fri 03. Sep, 2004 04:04

Previous

Return to Last visit [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron