vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Remove Users Awaiting Moderation from who's online (https://vborg.vbsupport.ru/showthread.php?t=262043)

stevo_s 04-15-2011 12:32 PM

Remove Users Awaiting Moderation from who's online
 
is it possible to remove Users Awaiting Moderation from the list of who's online on forum footer? (3.8)

I get spammers creating offensive usernames but don't want to remove the feature entirely.

Code:

<!-- logged-in users -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
                        <a href="online.php$session[sessionurl_q]">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
        <tr>
                <td class="alt2"><a href="online.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
                <td class="alt1" width="100%">
                        <div class="smallfont">
                                <div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
                                <div>$activeusers</div>
                        </div>
                </td>
        </tr>
</tbody>
<!-- end logged-in users -->


kh99 04-15-2011 03:47 PM

You could create a plugin using hook forumhome_loggedinuser and this code:

Code:

$loggedin['lastactivity'] = 0;
The users will still show up in the count of users online but the name won't appear. If that bothers you you could probably change $loggedin[musername] instead so that a user would show up but something else in place of the user name.

This works for the forumhome page, but if the users online is showing anywhere else you'll have to address those separately.

BTW - was this objectionable user name by any chance someone who seems to have a problem with paying taxes? We had one of those a couple days ago.

stevo_s 04-15-2011 05:13 PM

No - just offensive against the website itself or expletives.

I'm not really sure how to create a plugin unfortunately.

kh99 04-15-2011 05:26 PM

It's pretty easy to create a plugin. Just go to 'Add New Plugin' under "Plugins & Products' and fill out the form.

- You can leave product as vBulletin (or at least I do if I'm not creating a product)
- Select the hook location from the drop-down
- Type in a title. This will appear in the plugin manager, so type something that will let you remember what this one does
- You can leave the execution order as 5
- Paste your code in the big box
- Click on the 'Yes' radio button to set it to active

Press 'Save' and you're done.


All times are GMT. The time now is 10:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00958 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete