vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Only Show IP:Logged if user is admin or supermod, and disable Post report by user (https://vborg.vbsupport.ru/showthread.php?t=41084)

Fallout2man 07-14-2002 10:00 PM

Only Show IP:Logged if user is admin or supermod, and disable Post report by user
 
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.

Smoothie 07-15-2002 03:57 AM

Can you post a text file also?

Velocd 07-15-2002 04:01 AM

Cool, although if I were you and that guy disobayed my warning and continued to be a jackass--man, I sure wouldn't want to be in his shoes ;)

Good hack ^_^
I did you the pleasure of making a text file for it:

Fallout2man 07-15-2002 04:03 AM

Thanks, and the main reason I did this was because one of the supermods demanded the entire feature be removed. I decided to meet him halfway and make a hack. Plus this is a good way to test the PHP I've learned over the past six months. A demo of this hack can be found at Anime Rebirth

Fallout2man 07-15-2002 04:07 AM

Uh-oh, that text file generated some uneccesary slashes on the template and SQL query. I hate it how vBhacker sometimes does that. Here's the correct code

Code:

+-------------------------------------------------------------------------------------------------+
| Create a new template named "postbit_report" with this:                                        |
+-------------------------------------------------------------------------------------------------+
<a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a>
+-------------------------------------------------------------------------------------------------+

                                                +
                                                +++
                                                +

+-------------------------------------------------------------------------------------------------+
| In the "postbit" template, replace this code:                                                  |
+-------------------------------------------------------------------------------------------------+
<a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]
+-------------------------------------------------------------------------------------------------+

+-------------------------------------------------------------------------------------------------+
| With this code:                                                                                |
+-------------------------------------------------------------------------------------------------+
$post[ipreport]
+-------------------------------------------------------------------------------------------------+

                                                +
                                                +++
                                                +

+-------------------------------------------------------------------------------------------------+
| Run this query:                                                                                |
+-------------------------------------------------------------------------------------------------+
alter table user add column canreportposts smallint(6) DEFAULT '1' NOT NULL;
+-------------------------------------------------------------------------------------------------+


Brainmaster 07-15-2002 04:28 AM

THX, I've got just befor you post this a problem with the SQL Syntax ;)

Boofo 07-15-2002 05:33 AM

I guess I don't understnad this hack. Isn't that what "report this post to moderator" is for? If the admins and mods are the only ones to see it, who are they supposed to report the post to? :)

Velocd 07-15-2002 06:19 AM

heh, it always seems like Boofo is the one confused, j/k :)

This hack basically allows you to disable certain members, who say abuse the rights, to using the report-a-thread-to-moderator link.

The hiding part doesn't hide the "report-a-thread-to-moderator" part, it just hides the IP:Logged part, since only admins/mods are suppose to see that anyway. It only hides the "report-a-thread-to-moderator" link if the option for it in the admincp is enabled, as I explained above.

Boofo 07-15-2002 06:36 AM

I'm not confused (hard to believe, I know :)), I just think that by having to disable the report this post to moderator option because of one person puts the Admin at a disadvantage by letting the users force him/her to have to make changes to his board because of one user. That's what banning is for. If a user doesn't want to follow the rules and do what they are asked, then they need to be gone, IMHO. If you're going to diable it (even for one user), why not just take it out of the postbit altogether? :)

As far as hiding the IP logged feature, that has already been done. :)

Quote:

Originally posted by Velocd
heh, it always seems like Boofo is the one confused, j/k :)

This hack basically allows you to disable certain members, who say abuse the rights, to using the report-a-thread-to-moderator link.

The hiding part doesn't hide the "report-a-thread-to-moderator" part, it just hides the IP:Logged part, since only admins/mods are suppose to see that anyway. It only hides the "report-a-thread-to-moderator" link if the option for it in the admincp is enabled, as I explained above.


Fallout2man 07-15-2002 06:49 AM

The idea of disabling it is because the administration at that particular board is very leniant on bannings. This way we can take away the problem without me having to rally for a ban and get the other two admins to agree with me. It easily removes the itch, and since this user was a problem to begin with (repeatedly banned and unbanned by the other admins) I figured this was a just punishment since banning was not an option.

Edit: As well I should point out that it is disabled per user, so not everyone was affected, only this one person. You might believe this to be a waste of code, but the only other option was alltogether removing it, and that I see as way too harsh a thing to do. So I wrote my own hack to solve the problem and at the same time test my knowledge of PHP.


All times are GMT. The time now is 08:40 PM.

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.01100 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete