Author Topic: Refreshing Whos online? in control panel  (Read 6011 times)

0 Members and 1 Guest are viewing this topic.

Offline MetallicAchu

  • Newbie
  • *
  • Posts: 19
    • View Profile
Refreshing Whos online? in control panel
« on: May 22, 2006, 08:08:11 PM »
Hi.

I have a pretty massive gallery, so it takes about 5-6 seconds to access the control panel (I guess it's because the statistics there).
I wanted to know if there's a way to refresh the "Whos online?" part alone in the control panel and no the whole page.

Thanks in advance,
Shachar.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Refreshing Whos online? in control panel
« Reply #1 on: May 23, 2006, 03:08:29 AM »
just 5-6 seconds and you complaining?! ;)

Since 4images does not use separate frames for whois online part, it would require pretty much havy modifications admin/home.php file...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline MetallicAchu

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Refreshing Whos online? in control panel
« Reply #2 on: May 23, 2006, 06:15:55 AM »
You got more and you live with it?  8O

I though of an idea... I should somehow isolate the "USER_INTEGRATION" part in home.php to a seperate function, even a seperate .php page, and add a link that somehow calls to that function from the admin's control panel.
Am I in the right track or way off it? :)

Thanks.


BTW, I put this question in the modification request forum, but it has been moved here.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Refreshing Whos online? in control panel
« Reply #3 on: May 23, 2006, 07:48:01 AM »
1) do you really need all these site statistics (TOP by hits, etc)? If you dont, you can remove it by doing this:
in home.php find first line:
Code: [Select]
show_table_footer();Insert below:
Code: [Select]
/*Then find second line:
Code: [Select]
show_table_footer();Insert above:
Code: [Select]
*/
2) if your server is on linux and SAFE MODE is off (or atleast if you can use exec() function, then you can try modify get_dir_size() function in admin_functions.php so instead calculating directory size by scanning each file one-by-one, you can execute a server side command that returns the directory size much faster. So you  can try this:
find:
Code: [Select]
$size = 0;Insert above:
Code: [Select]
  $size = explode(" ", @exec("du -csb \"".$dir."\""));
  $size = $size[0];
  return $size;
Or, you can simply disable showing media and thumbnails folder sizes by inserting this instead of the three lines above:
Code: [Select]
return;
These modifications increased speed my ACP from 10+ secs to 1 secs :D
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline MetallicAchu

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Refreshing Whos online? in control panel
« Reply #4 on: May 23, 2006, 07:59:46 AM »
Do I need al these site statistics? Blasphemy! :)

I tried using the 2.1 method you showed there, and I got a funny thing:
The media directroy returned it's size, but the thumbnail directory did not (uh, and it didn't reload any faster).

But, I tried disabling does functions, and it really cut it to 1 second!

Thanks a lot! :)