Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-09-2011, 08:50 AM
danyxxx danyxxx is offline
 
Join Date: Oct 2010
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [SOVED]Banned Group Avatar ( modification based on groupid ) 3.8.x

Hello,

I need a modification that will put a single image to all users that are banned maybe the modification can be made for the usergroupd id .. or something like that ( 3.8.x ) .

Kind Regards !
Reply With Quote
  #2  
Old 09-09-2011, 03:25 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could make a plugin in Plugin Manager-> Add A New Plugin

hook: postbit_display_complete

Give it a name, leave execution order as 5.

php code:
PHP Code:
if (is_member_of($vbulletin->userinfo8))
{
  
$this->post['avatarurl'] = "/forums/images/misc/noavatar.gif";
  
$this->post['avwidth']  = 'width="120"';
  
$this->post['avheight'] = 'height="120"';


Assuming 8 is your banned usergroup... Change the file name to the avatar and height and width to your needs.
Reply With Quote
Благодарность от:
danyxxx
  #3  
Old 09-09-2011, 03:29 PM
danyxxx danyxxx is offline
 
Join Date: Oct 2010
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, thanks a lot, I will try that
Reply With Quote
  #4  
Old 09-13-2011, 06:42 AM
danyxxx danyxxx is offline
 
Join Date: Oct 2010
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hei... doesn't work man
Reply With Quote
  #5  
Old 09-13-2011, 10:59 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by danyxxx View Post
Hei... doesn't work man
Did you set the plugin as Active? Does anything happen at all?
Reply With Quote
  #6  
Old 09-14-2011, 07:18 AM
danyxxx danyxxx is offline
 
Join Date: Oct 2010
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes ...
But I use another modification for the users with no avatar .. maybe because that?
Reply With Quote
  #7  
Old 09-14-2011, 12:34 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Possible... try changing the execution order from 5 to 8.... if nothing change it from 8 to 2, see if either helps.
Reply With Quote
  #8  
Old 09-14-2011, 01:10 PM
danyxxx danyxxx is offline
 
Join Date: Oct 2010
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

aaa , I will try this , I return with reply

--------------- Added [DATE]1316009592[/DATE] at [TIME]1316009592[/TIME] ---------------

Nothing happens.. I try with 2, 8, 1, 10 ... doesn't work .
I have this modification:
PHP Code:
                        <if condition="$bbuserinfo[showavatars]">
                                <
div class="smallfont">
                                        &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="/forum/images/noavatar.png" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </
div>
            </if> 
I need the condition for usergroupid

I try this way -->

PHP Code:
                       <if condition="$bbuserinfo[showavatars]">
                       <if 
condition="is_member_of($bbuserinfo, array(123))">

                                <
div class="smallfont">
                                        &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="/forum/images/banned.png" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </
div>
            </if>
            </if> 
An this way -->

PHP Code:
                       <if condition="$bbuserinfo[showavatars]">
                       <if 
condition="$bbuserinfo['usergroupid'] ==123">  

                                <
div class="smallfont">
                                        &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="/forum/images/banned.png" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </
div>
            </if>
            </if> 
Before the:

PHP Code:
                        <if condition="$bbuserinfo[showavatars]">
                                <
div class="smallfont">
                                        &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="/forum/images/noavatar.png" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </
div>
            </if> 
I try that inside the above code .. nothing happens

I try this way to -->
PHP Code:
                        <if condition="$bbuserinfo[showavatars]">
                                <
div class="smallfont">
                                        &
nbsp;<br /><if condition="is_member_of($bbuserinfo, array(123))"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="/forum/images/banned.png" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></if><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="/forum/images/noavatar.png" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </
div>
            </if> 
Doesn't work
Reply With Quote
  #9  
Old 09-14-2011, 03:51 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know what you are doing with:

Code:
<if condition="is_member_of($bbuserinfo, array(123))">
It would be;

Code:
<if condition="is_member_of($bbuserinfo, 1, 2, 3)">
If you wanted usergroups 1, 2, and 3.

Banned usergroup is usually 8.
Reply With Quote
  #10  
Old 09-14-2011, 03:53 PM
danyxxx danyxxx is offline
 
Join Date: Oct 2010
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My banned groupid is 123
But not that is the problem ...

--------------- Added [DATE]1316020189[/DATE] at [TIME]1316020189[/TIME] ---------------

Yuhuuuuu , I make the modification succesfully .
Was pretty simple, look :

I search in postbit_legacy for <if condition="$show['avatar']">
And I find:
PHP Code:
            <if condition="$show['avatar']">
                <
div class="smallfont">
                    &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                </
div>
                        </if> 
The modification that must be added, is:

PHP Code:
                        <if condition="$post[usergroupid] == 123">
                          <
img src="/forum/images/banned.png" alt="" border="0" />
                        <else /> 
But, you must put this above the $show_avatar thing, and after the </if> of $show_avatar thing, you must put another </if> , LIKE THIS :

PHP Code:
                        <if condition="$post[usergroupid] == 123">
                          <
img src="/forum/images/banned.png" alt="" border="0" />
                        <else />
            <if 
condition="$show['avatar']">
                <
div class="smallfont">
                    &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                </
div>
                        </if>
                        </if> 
You can replace /forum/images/banned.png with your image url .
You can replace 123 with your banned groupid , usually 8 .

ENJOY ( for who's looking after this modification )
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 05:55 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.06723 seconds
  • Memory Usage 2,329KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (9)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete