Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 11:52 am EDT

Geeklog Forums

problem with anon who's online block


DarkG

Anonymous
I am trying to use the anonymous who's online block but my problem is that when the person viewing the block isnt logged it, it doesnt show them anything meaning that for some reason they have no access to : $_CONF, $_TABLES, $LANG01 & $_USER these 4 lines of code for some reason do not return anything, when they should.. maybe i am doing soemthing wrong: $result = DB_query ("SELECT DISTINCT {$_TABLES['sessions']}.uid FROM {$_TABLES['sessions']},{$_TABLES['users']} WHERE {$_TABLES['users']}.uid = {$_TABLES['sessions']}.uid AND start_time >= $expire_time AND {$_TABLES['sessions']}.uid <> 1"Wink; $numReg = DB_numRows ($result); $result = DB_query ("SELECT DISTINCT uid,remote_ip FROM {$_TABLES['sessions']} WHERE uid = 1"Wink; $numAnon = DB_numRows ($result); ::so if i am not logged it $numAnon should atleast be 1 but it always is 0.. can anyone tell me how to fix this? DarkG
 Quote

Anonymous

Anonymous
I tried out this block, and it works fine for me. You have to place this code inside your lib-custom.php file. When you create a new block in the block editor, pick php block and insert phpblock_anon_whosonline.
 Quote

Status: offline

mikesee

Forum User
Newbie
Registered: 01/26/03
Posts: 7
I've tried creating a new Block and editing the original who's online block and have the same issue as DarkG. When logged in I can see whoe's online but when logged out I get nothing.
 Quote

All times are EDT. The time is now 11:52 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content