Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 07-07-2006, 05:47 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Staff Avatar Background

Split off of this discussion:
https://vborg.vbsupport.ru/showthread.php?t=119470

So what do I mean? Take a look at the admin / mods right here!

The general idea is to enable certain members to have a background for their avatar, like the staff here do. Basing this on usergroups would probably be the easiest way. Keep in mind if someone is part of two or more usergroups that are able to have a special background, the end user and/or staff members need to be able to set which background is appropriate for said user. A hierarchy (e.g. a value for each background) could also be set up (managed by staff of course, with optional overrides) to automate this process.

Some forums may not want their mods to be noted as such when outside of the sub-forums they moderate, and as such may want an option to have them automatically not show the background in certain forums.

The avatar the user chooses preferably should not be modified by the hack, in case of the person being demoted, or the background being used as a contest prize on the forum, etc. The hack could use GD or something to combine the background and the user's avatar into a new one (if needed, I'd recommend storing a copy of the original avatar somewhere in the server or database for backup purposes), but not to replace the avatar direcly within the user's profile. Something like a conditional statement around the avatar block in a post to resolve all of this. Or, a conditional could be used to place the background around the avatar assuming the appropriate conditions are met. No merging of files needed. GD may be used if an optional idea for the hack is used where their name is on the avatar like vB.org, although the name may not necessarily match the user name, akin to here.

A nice add-on to this hack would be an ACP area where a staff member can give someone a background for a limited amount of time to support the contest idea.

Showing all possible avatars within their UserCP and member page would be nice as well.
Reply With Quote
  #2  
Old 07-11-2006, 03:05 AM
Mr. Slugworth's Avatar
Mr. Slugworth Mr. Slugworth is offline
 
Join Date: Oct 2001
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would be great if this could be based on usergroups or post counts, so a member make 5,000 points, they get a special background of frame or something. Great request, been looking for something like this for months.
Reply With Quote
  #3  
Old 07-11-2006, 04:34 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are there hacks where a user is placed into a secondary usergroup if x # of posts has been hit?
Reply With Quote
  #4  
Old 07-11-2006, 02:34 PM
a simple fa?ade a simple fa?ade is offline
 
Join Date: Jun 2006
Location: Atlanta
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't need a hack, just create the usergroup and the promotion for it.
Reply With Quote
  #5  
Old 07-11-2006, 10:35 PM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmmmmmmm

I'll brb



------------



EDIT

hmmmmmmmm

I'll brb


ok I'm back.

Use this to get you started:

Code:
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100" height="100" align="center">
<tr>
<td background="http://probetreffen.de/forum/images/ranks/btn_moderator.gif" nowrap="nowrap" no-repeat><center><img src="$post[avatarurl]" height="50" width="50"</center></td>
</tr>
</table>
<br />
I'm too tired to make this but it's interesting to say the least.

Here's what you do....

Create a 100x100 pixel image you'd like to use as a background. (replace my code http://probetreffen.de/forum/images/ranks/btn_moderator.gif with your background image)


This will give you a 100x100 background and a 50x50 avatar ontop of that, centered.

That's the easy part

Now for the hard part:

You have to set conditionals for usergroups.

If administrator > use this background image and his avatar
if moderator > use this image and avatar etc..

then another conditional where you say if usergroupid != "1" & !="2" etc (all the admin and mod groups)
display normal avatar.

Basically you're saying that if the user is a staff member, the normal avatar won't show up, but instead the background and his avatar will.

And if it's a normal user then just display the avatar.


It's really not that complicated but it's a little work. You should create a plugin and template to hold all the code and then call the variable within the postbit template.

I've attached a quick demo screenshot:

1st is the name, then the user rank, then the background and avatar, then the normal avatar.
Attached Images
File Type: jpg overlap.jpg (99.8 KB, 0 views)
Reply With Quote
  #6  
Old 07-12-2006, 03:34 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SkyCatcher
Now for the hard part:

You have to set conditionals for usergroups.

If administrator > use this background image and his avatar
if moderator > use this image and avatar etc..

then another conditional where you say if usergroupid != "1" & !="2" etc (all the admin and mod groups)
display normal avatar.
something like <if primary / secondary usergroup = number> </if>

that's cake, but the centering (or off centering in the case of vBulletin.org) is the part I'm not sure about.
Reply With Quote
  #7  
Old 07-12-2006, 04:45 AM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can use if conditional usergroup setting on: "badge.png"
- If usergroup 1 user image background "badge.png"
- If usergroup 2 user image background "badge2.png"
- If usergroup 3 user image background "badge3.png"
- If usergroup 4 user image background "badge4.png"


Code:
<table border="0" cellpadding="0" cellspacing="0" width="124" height="82">
  <tr>
    <td width="124" background="badge.png" height="82">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" height="60">
      <tr>
        <td width="50%">&nbsp;</td>
        <td width="50%"><img border="0" src="$post[avatarurl]" width="60" height="60"></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
Attached Images
File Type: png avatar.png (29.6 KB, 0 views)
Reply With Quote
  #8  
Old 07-13-2006, 04:29 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, so I went into the postbit and found:


Code:
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
formatted better:

Code:
<if condition="$show['avatar']">
   <td class="alt2">
      <a href="member.php?$session[sessionurl]u=$post[userid]">
         <img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
      </a>
   </td>
</if>

attempted to replace it with:

Code:
<!-- START - TEST FOR AVATAR HACK -->

<if condition="$show['avatar'] AND is_member_of({$vbulletin->userinfo}, 79)">

   <td class="alt2">
      <a href="member.php?$session[sessionurl]u=$post[userid]">
      <table border="0" cellpadding="0" cellspacing="0" width="200" height="200">
         <tr>
           <td width="200" background="badge.png" height="200">
              <table border="0" cellpadding="0" cellspacing="0" width="100%" height="125">
                <tr>
                  <td width="25%">&nbsp;</td>
                  <td width="50%"><img src="$post[avatarurl]" width="125" height="125" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></td>
                  <td width="25%">&nbsp;</td>
                </tr>
              </table>
           </td>
         </tr>
       </table>
       $vbphrase[xs_avatar]</phrase>" border="0" /></a>
   </td>

</if>


<if condition="$show['avatar'] AND !is_member_of({$vbulletin->userinfo}, 79)">

   <td class="alt2">
      <a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
   </td>

</if>

<!-- END - TEST FOR AVATAR HACK -->
Get this error though:

Code:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, expecting `')'' in C:\Inetpub\wwwroot\houseofhelp\v3\includes\adminfunctions_template.php(3537) : eval()'d code on line 44

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

So, what stupid little thing did I pooch?
Reply With Quote
  #9  
Old 07-13-2006, 07:11 AM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AND is_member_of({$vbulletin->userinfo}, 79)

??????
Reply With Quote
  #10  
Old 07-13-2006, 08:48 AM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="$show['avatar'] AND is_member_of({$vbulletin->userinfo}, 79)">
should be
Code:
<if condition="$show['avatar'] AND is_member_of({$vbulletin->userinfo[usergroupid]}, 79)">
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:22 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.04670 seconds
  • Memory Usage 2,297KB
  • Queries Executed 14 (?)
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
  • (8)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (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
  • 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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete