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)

Boofo 07-15-2002 06:59 AM

Ok, I understand now. I thought it was for disabling it for ALL users. Sorry for the misunderstanding. :)

Banning is ALWAYS an option, as far as I am concerned. In most situations, it is the ONLY option. But, that is just my 3.5 cents worth (inflation, you know). :)

Is there a way to install this without doing the IP logged disable, since I already have that one done? :)

Quote:

Originally posted by Fallout2man
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.


Fallout2man 07-15-2002 07:04 AM

Yes, simply don't do this for the PHP

Code:

+-------------------------------------------------------------------------------------------------+
| In admin/functions.php, replace this code:                                                      |
+-------------------------------------------------------------------------------------------------+
        //highlight words for search engine
+-------------------------------------------------------------------------------------------------+

+-------------------------------------------------------------------------------------------------+
| With this code:                                                                                |
+-------------------------------------------------------------------------------------------------+
// Display IP logged or Report post if applicable
 if (($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6) and $bbuserinfo[canreportposts]==1) {
    $post[ipreport] = "$post[report] | $post[iplogged]";
    } elseif (($bbuserinfo[usergroupid]==5 or $bbuserinfo[usergroupid]==6) and $bbuserinfo[canreportposts]==0) {
    $post[ipreport] = "$post[iplogged]";
    } elseif (($bbuserinfo[usergroupid]!=5 or $bbuserinfo[usergroupid]!=6) and $bbuserinfo[canreportposts]==1) {
    $post[ipreport] = "$post[report]";
    } else {
    $post[ipreport] = "";
}

        //highlight words for search engine
+-------------------------------------------------------------------------------------------------+

and you'll have to edit the postbit template manually to add the $post[report] variable that checks whether or not a user can report the posts then either displays a link or not.

Boofo 07-15-2002 07:11 AM

So, I still need to run the vbhacker file then? For the admin cp stuff?

Fallout2man 07-15-2002 07:35 AM

I'd reccomend just using the text file since you're selectively installing PHP.

Boofo 07-15-2002 07:45 AM

But don't I have to use the vbhacker file to make the text file? I didn't see anything about the admin cp in the code listed in the thread. :) If I am missing something, I apologize.

Fallout2man 07-15-2002 09:57 AM

Quote:

Originally posted by Boofo
But don't I have to use the vbhacker file to make the text file? I didn't see anything about the admin cp in the code listed in the thread. :) If I am missing something, I apologize.
Velocd posted the text file from vBhacker already, I just fixed some errors in it and posted the corrected code. The rest of the edits are in his text file.

Boofo 07-15-2002 11:17 AM

Thanks for a great hack! With your instructions and help, it worked like a charm. I might be able to use this after all (eventually). :)

lordnet 07-15-2002 01:32 PM

great hack ;)

my best wish... :)

LORD :smoke:

Unknown553 07-15-2002 04:03 PM

Isn't this just a combination of two hacks, or am I missing something?

https://vborg.vbsupport.ru/showthrea...threadid=31934
https://vborg.vbsupport.ru/showthrea...676#post200676

Boofo 07-15-2002 07:56 PM

How do I get the report this post to moderator to not show up if it is the users own post (when you have it turned on in the admin CP) and still not show up anywhere when it is turned off?

Can I just edit this code or do I need to make another piece of code to handle not showing up in the users own post?

I'm trying to merge this hack with the hack in the link below and I'm getting confused. (Surprise, surprise, I know. :))

https://vborg.vbsupport.ru/showthrea...676#post200676

PHP Code:

  // Report Post Disable Hack
  
if ($bbuserinfo[canreportposts]==1) {
eval(
"\$post[report] .= \"".gettemplate("postbit_report")."\";");
         } else {
    
$post[report] = "";
    } 



All times are GMT. The time now is 11:57 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.01298 seconds
  • Memory Usage 1,746KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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