Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Only Show IP:Logged if user is admin or supermod, and disable Post report by user Details »»
Only Show IP:Logged if user is admin or supermod, and disable Post report by user
Version: 1.00, by Fallout2man Fallout2man is offline
Developer Last Online: Mar 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-14-2002 Last Update: Never Installs: 9
 
No support by the author.

At one of my boards, we had a paticular problem with one user. He kept reporting bogus posts just to try and get people he didn't like banned. I warned him but he didn't stop. So I instituted a hack that allows admins, via the admin user editor, to disable a user's ability to report posts. While I was at it today, I had a spurt of inspiration and decided to add another part that disables the "IP:logged" part of the post from showing to any groups other then admins and supermods (the only groups at that board allowed to view IPs).

So here it is, all in one nice, neat little vBhacker package.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 07-15-2002, 08:25 PM
Fallout2man Fallout2man is offline
 
Join Date: Dec 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O_o;; wow, you don't hang around vb.org for a while and look what happens. Before anyone asks this hack was entirely hand coded, while apparently my variables may be the same I did not steal code from anyone.

anyway Boofo just change firefly's first line of code from

Code:
if ($post[userid]==$bbuserinfo[userid] or ($bbuserinfo[usergroupid]=="5" or $bbuserinfo[usergroupid]=="6" or $bbuserinfo[usergroupid]=="7")) {
to

Code:
if ($post[userid]==$bbuserinfo[userid] or $bbuserinfo[canreportposts]==0 or ($bbuserinfo[usergroupid]=="5" or $bbuserinfo[usergroupid]=="6" or $bbuserinfo[usergroupid]=="7")) {
Reply With Quote
  #23  
Old 07-15-2002, 08:35 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shouldn't there be an "or" between these?

PHP Code:
$bbuserinfo[canreportposts]==($bbuserinfo[usergroupid]=="5" 
Reply With Quote
  #24  
Old 07-15-2002, 08:37 PM
Fallout2man Fallout2man is offline
 
Join Date: Dec 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I'm making quick edits to my post because I realized I originally left an and statement and have been trying to correct my mistakes. One moment while I edit....again
Reply With Quote
  #25  
Old 07-15-2002, 08:41 PM
Fallout2man Fallout2man is offline
 
Join Date: Dec 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As for my code, yes just remove if if you're going with firefly's. Since they both aim to define the same variable.
Reply With Quote
  #26  
Old 07-15-2002, 09:35 PM
Remi Remi is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Fallout2man

Can I temporarily disable the a post been reported more than twice

Thanks
Reply With Quote
  #27  
Old 07-15-2002, 09:44 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you gave me didn't work. I finally figured it out though. Here's what I put to make it work the way it should (by using Firefly's code, too). The line "and $bbuserinfo[canreportposts]==1" needed to go in the second part of the code, not the first.

PHP Code:
if ($post[userid]==$bbuserinfo[userid] or ($bbuserinfo[usergroupid]=="5" or $bbuserinfo[usergroupid]=="6" or $bbuserinfo[usergroupid]=="7")) {
            eval(
"\$post[editpost] = \"".gettemplate("postbit_editpost")."\";");
        } else {
            
$post[editpost]="";
        }

        if (
$post[userid]!=$bbuserinfo[userid] and $bbuserinfo[canreportposts]==1) {
            eval(
"\$post[report] = \"".gettemplate("postbit_report")."\";");
        } else {
            
$post[report]="";
        } 
Reply With Quote
  #28  
Old 07-17-2002, 12:35 AM
Fallout2man Fallout2man is offline
 
Join Date: Dec 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Remi
Thanks Fallout2man

Can I temporarily disable the a post been reported more than twice

Thanks

Yes, but I'd have to modify the hack and add a table to the database for reported posts. If you really want me to I'll work on it.
Reply With Quote
  #29  
Old 07-17-2002, 06:36 AM
Remi Remi is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes Fallout2man, I realy need it

So if you have the time, I will be more than grateful
Reply With Quote
  #30  
Old 07-24-2002, 02:26 AM
DrkFusion's Avatar
DrkFusion DrkFusion is offline
 
Join Date: Nov 2001
Posts: 1,926
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey Fallout2man, sup, its me You know who I am
Nice, as my new forums become popular I might be needing, just tested it, works good.

Drk
Reply With Quote
  #31  
Old 07-24-2002, 12:05 PM
Fallout2man Fallout2man is offline
 
Join Date: Dec 2001
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well hopefully this hack will be upgraded soon, I've been working on the extra feature that guy wanted, and maybe a little something else I thought up, just been busy with server work lately so I haven't had a chance to perfect the next stuff yet.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05120 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete