Welcome to Geeklog, Anonymous Monday, October 14 2024 @ 04:18 pm 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"
$numReg = DB_numRows ($result);
$result = DB_query ("SELECT DISTINCT uid,remote_ip FROM {$_TABLES['sessions']} WHERE uid = 1"
$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
22
9
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.
5
7
Quote
All times are EDT. The time is now 04:18 pm.
- 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