vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Moderators Functions - Disemvowelr? - A new passive-aggressive form of moderation.. (https://vborg.vbsupport.ru/showthread.php?t=210572)

magnus 04-08-2009 10:27 AM

Quote:

Originally Posted by Hugo Holbling (Post 1786426)
Am I reading the coding correctly insofar as this only functions with the default postbit, not postbit legacy?

Correct, the auto-template feature (currently) only modifies postbit, and not postbit_legacy. Edits would need to be made manually.

I'll include postbit in the auto-template edits in a quick update.

Quote:

Originally Posted by Hugo Holbling (Post 1786426)
I agree and think it would be better to replace the postbit text with an icon.

I'm a programmer, not a designer. :) Plus, there are so many different styles out there -- finding an icon that goes well with all of them is a futile task. Hence, text.

I'll have an update with a few customization options. To choose between text or a user-specified icon, postbit or postbit legacy, etc.

imedic 04-08-2009 11:23 AM

Great idea for a mod. I never have enough moderators tools to make my life easier :).

I am too looking forward for a postbit legacy version.

Hugo Holbling 04-08-2009 12:08 PM

Great, thanks magnus. Looking forward to the update and the ability to choose postbit legacy. :)

ericgtr 04-08-2009 07:00 PM

Quote:

Originally Posted by imedic (Post 1786486)
Great idea for a mod. I never have enough moderators tools to make my life easier :).

I am too looking forward for a postbit legacy version.

Quote:

Originally Posted by Hugo Holbling (Post 1786511)
Great, thanks magnus. Looking forward to the update and the ability to choose postbit legacy. :)

Thirded. :)

Installed though.

SoloX 04-08-2009 09:08 PM

I changed postbit to postbit_legacy in the following code to make it work for legacy! :)
PHP Code:

<phpcode><![CDATA[if(isset($vbulletin->templatecache['postbit_legacy']))
{
    
$find '<strong>$post[postcount]</strong></a> &nbsp;") : (""))."';

    
$replace '<strong>$post[postcount]</strong></a> &nbsp;") : (""))."
        ".((can_moderate($thread[\'forumid\'], \'canmoderateposts\')) ? ("
            ".((!$post[disemvowel]) ? ("[&nbsp;<a href=\"disemvowelpost.php?do=disemvowel&p=$post[postid]\" name=\"vB::Disemvowel::$post[postid]\">$vbphrase[disemvowel]</a>&nbsp;]") : ("[&nbsp;<a href=\"disemvowelpost.php?do=revowel&p=$post[postid]\" name=\"vB::Revowel::$post[postid]\">$vbphrase[revowel]</a>&nbsp;]"))."
        ") : (""))."'
;

    
$vbulletin->templatecache['postbit_legacy'] = str_replace($find$replace$vbulletin->templatecache['postbit_legacy']);

    
$find '<!-- message -->';

    
$replace '".(($post[disemvowel]) ? ("
            <div align=\"center\" style=\"color: red; background-color: white; border: 1px solid black; padding:2px\">
                $vbphrase[this_post_has_been_disemvoweled]
            </div>
        ") : (""))."
        <!-- message -->'
;

    
$vbulletin->templatecache['postbit_legacy'] = str_replace($find$replace$vbulletin->templatecache['postbit_legacy']);
}]]></
phpcode


ericgtr 04-08-2009 09:31 PM

Quote:

Originally Posted by SoloX (Post 1786899)
I changed postbit to postbit_legacy in the following code to make it work for legacy! :)
PHP Code:

<phpcode><![CDATA[if(isset($vbulletin->templatecache['postbit_legacy']))
{
    
$find '<strong>$post[postcount]</strong></a> &nbsp;") : (""))."';

    
$replace '<strong>$post[postcount]</strong></a> &nbsp;") : (""))."
        ".((can_moderate($thread[\'forumid\'], \'canmoderateposts\')) ? ("
            ".((!$post[disemvowel]) ? ("[&nbsp;<a href=\"disemvowelpost.php?do=disemvowel&p=$post[postid]\" name=\"vB::Disemvowel::$post[postid]\">$vbphrase[disemvowel]</a>&nbsp;]") : ("[&nbsp;<a href=\"disemvowelpost.php?do=revowel&p=$post[postid]\" name=\"vB::Revowel::$post[postid]\">$vbphrase[revowel]</a>&nbsp;]"))."
        ") : (""))."'
;

    
$vbulletin->templatecache['postbit_legacy'] = str_replace($find$replace$vbulletin->templatecache['postbit_legacy']);

    
$find '<!-- message -->';

    
$replace '".(($post[disemvowel]) ? ("
            <div align=\"center\" style=\"color: red; background-color: white; border: 1px solid black; padding:2px\">
                $vbphrase[this_post_has_been_disemvoweled]
            </div>
        ") : (""))."
        <!-- message -->'
;

    
$vbulletin->templatecache['postbit_legacy'] = str_replace($find$replace$vbulletin->templatecache['postbit_legacy']);
}]]></
phpcode


Didn't work for me. This isn't too hard to figure out but it has to be picked apart so I'll do it when I get home and if magnus doesn't have it up by then I will share it. Many people use legacy so I am surprised it's not added.

imedic 04-08-2009 09:52 PM

Unfortunately does not work.
If I copy paste your code it gives error on product upload. I have manually replace it and still no luck to see the link in postbit.

magnus 04-08-2009 10:08 PM

The above code has been wrapped in <phpcode><![CDATA[ ... ]]></phpcode> tags. Those will need to be removed.

Anyway, I have postbit_legacy support finished .. I had intended to finish the other features before releasing, but since the demand is there, I'll release the minor changes. I'll have it posted tomorrow morning (the code is on my work machine).

magnus 04-09-2009 12:00 PM

As promised, I made v1.1.1 available which will detect which postbit layout you're using and modify accordingly. Nothing else has changed.

Hugo Holbling 04-09-2009 03:16 PM

Thanks, magnus - much appreciated. It works great. :)

I'll try to figure out how to replace the text (Disemvowel/Revowel) with icons; I suggest the famfamfam font_delete and font_add silk icons would work nicely.


All times are GMT. The time now is 04:12 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.01159 seconds
  • Memory Usage 1,762KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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