Topic: hide user from userlist

I am the technical administrator of a forum, where the client I'm administrating the forum for is merely a moderator - since we don't want the customer to have admin access and potentially destroy the forum setup wink

Now the problem is, at times, the forum users will see me as "admin" in the userlist, and write to me with questions that I can't or shouldn't answer, because I'm only the technical administrator of the forum.

Thus my request: you currently have three options for privacy:

Display your e-mail address.
Hide your e-mail address but allow form e-mail.
Hide your e-mail address and disallow form e-mail

I would like a fourth option:

Hide your e-mail address, disallow form e-mail, hide from userlist

Or perhaps just a "hide from userlist" switch, separately, not sure what's best...

Re: hide user from userlist

there's an option in 1.2 to have the list of current users online hidden. would that work? i agree that there should be another privacy option tho.

~James
FluxBB - Less is more

Re: hide user from userlist

Gary13579 is making a mod for it - http://punbb.org/forums/viewtopic.php?id=5048 that version only works on the dev version though not the beta i think

Re: hide user from userlist

lol, no, thats not what it does.

that mod would hide you from the online users list. he wants a mod that will hide you on the user list.

i could add this, pretty easily.

i must ask you, do you really want that option, or do you just want to hide yourself? the second would be much easier, and i could tell you how in a couple of seconds. otherwise it could take a few days (weeks?). thats due to my arcade mod that im making

Indocron
$theQuestion = (2*b) || !(2*b);

Re: hide user from userlist

ooohhh sorry, can't you just change your title from admin to user and pretend not to be admin?

Re: hide user from userlist

No, because if you order the list by administrators it will show all the admins.

Indocron
$theQuestion = (2*b) || !(2*b);

Re: hide user from userlist

damn you and your thinkingness

Re: hide user from userlist

Gary13579 wrote:

that mod would hide you from the online users list. he wants a mod that will hide you on the user list.

both, preferably - I want to be completely invisible wink

Re: hide user from userlist

Open index.php

#
#find line 179
#
if ($cur_user_online['user_id'] > 0)


#replace with (switch the letter x with the id of your account. the first account made has an id of 2)
if ($cur_user_online['user_id'] > 0 && $cur_user_online['user_id'] != x)

#save and upload

#open userlist.php
#delete line 66 (   <option value="<?php echo PUN_ADMIN ?>"<?php if ($show_group == PUN_ADMIN) echo ' selected' ?>><?php echo $lang_common['Administrator'] ?></option>   )

#save/upload

that wasnt so hard, now was it wink?

Indocron
$theQuestion = (2*b) || !(2*b);

Re: hide user from userlist

Hmmm....its something like this for the newest version ? yikes

Re: hide user from userlist

No? Welll can't u just change a few codes.... u can congfigerate instead of going into the sql to see if u are a admin or user, to just input user. Then wouldn't u hide it?

Go Canada! - No matter what, except when Stephen Harper is Prime Minster!
NHL is back, GO TORONTO MAPLE LEAFS! even if they lose...
[Firefox Rules!] - [Amazing Race] - [My Site!]

12 (edited by CodeXP 2005-09-06 12:36)

Re: hide user from userlist

Aikimaniac wrote:

Hmmm....its something like this for the newest version ? yikes

No, but here's a little mod I just wrote that lets users hide their online status from the privacy page in their profile:

Run the following query in phpmyadmin, or the db managment plugin:

ALTER TABLE `users` ADD `hide_online` TINYINT( 1 ) DEFAULT '0' AFTER `activate_key` ;

Open ./index.php

Find, line 182:

    $result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

Replace with:

    $result = $db->query('SELECT o.user_id, o.ident, u.hide_online FROM '.$db->prefix.'online AS o LEFT JOIN '.$db->prefix.'users AS u ON o.user_id=u.id WHERE idle=0 AND u.hide_online=0 ORDER BY o.ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

Open ./profile.php

Find, line 802:

            $form = extract_elements(array('email_setting', 'save_pass', 'notify_with_post'));

Replace with:

            $form = extract_elements(array('email_setting', 'save_pass', 'notify_with_post', 'hide_online'));

Find, line 808:

            if (!isset($form['notify_with_post']) || $form['notify_with_post'] != '1') $form['notify_with_post'] = '0';

Add after:

            if (!isset($form['hide_online']) || $form['hide_online'] != '1') $form['hide_online'] = '0';

Find, line 877:

$result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title, u.hide_online FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());

Find, line 1452:

                            <div class="rbox">
                                <label><input type="checkbox" name="form[notify_with_post]" value="1"<?php if ($user['notify_with_post'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Notify full'] ?><br /></label>
                            </div>

Add after:

                            <p>Enabling this setting will hide you from the online users information on the index page</p>
                            <div class="rbox">
                                <label><input type="checkbox" name="form[hide_online]" value="1"<?php if ($user['hide_online'] == '1') echo ' checked="checked"' ?> /><?php echo 'Hide online status?' ?><br /></label>
                            </div>

Open ./viewtopic.php

Find, line 186:

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, u.hide_online, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

Find, line 207:

        $is_online = ($cur_post['is_online'] == $cur_post['poster_id']) ? '<strong>'.$lang_topic['Online'].'</strong>' : $lang_topic['Offline'];

Replace with:

        $is_online = ($cur_post['is_online'] == $cur_post['poster_id'] && $cur_post['hide_online'] == 0) ? '<strong>'.$lang_topic['Online'].'</strong>' : $lang_topic['Offline'];

Save & upload.


Tested on punbb 1.2.7.

Enjoy! smile

EDIT: In case anyone wants it, here's the .patch file: [Right-click & save as...]

How to use:
patch -ul -d <your forum directory> -p1 < online_mod.patch

13 (edited by CodeXP 2005-09-06 10:29)

Re: hide user from userlist

Forgot about viewtopic.php in my prev. post... I've updated my previous post with the instructions for that file as well.