Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2013, 07:56 PM
BigJon BigJon is offline
 
Join Date: Jan 2013
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Avatar Modification - Profile

Hello!
[NOTE TO MODS/ADMIN - I MEANT TO POST THIS IN vB4 Programming Discussions - SORRY!]

I have been working on a mod for the vBulletin forum I'm a member of so that members may 'ignore' (hide) the avatar of another user if they choose to for whatever reason. Hiding it replaces it with a stock image that is set in the options of the mod. It works perfectly fine in postbit_display but I have been trying to expand it to the user profile and/or the activity stream with no luck. I've only been working behind the scenes of vBulletin for a few weeks and my php knowledge is limited so I apologize ahead of time if I'm asking the wrong/stupid questions.

I have two questions;

First is can anybody tell me why the following doesn't work? I've tried multiple combinations but I can not get the second condition to validate. If I rewrite it and use actual numbers (ie; 1,2,3) it works fine. The data stored in my custom column is comma separated.
hookname: userprofile_create
PHP Code:
if ($this->registry->options['mymodenabled']){
            if (
in_array($this->prepared['userid'], explode(",",$vbulletin->userinfo['custom_column'])))
            {
            
$this->prepared['avatarurl'] = 'images/avatars/default_ig.png';
}} 
For the above, I've tried using a less permanent
PHP Code:
$this->prepared['avatarurl'] = $vbulletin->options['mymod_url'
but it doesn't seem to like that (I use in postbit_display_complete just fine)

Second is does anybody know how to do something similar to the avatar thumbnails that are in various other places in vBulletin? (Blogs, activity stream, etc) My main goal here was to block avatars in threads and I accomplished that but I would like to extend this everywhere else.

I searched vB.org for a mod that does this and found nothing. If one exists already and I missed it please point it out, otherwise when I am finished polishing and it's working correctly I will post it here (if I am able)

Thank you for your time.
-Jon
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 10:36 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.03122 seconds
  • Memory Usage 2,162KB
  • Queries Executed 11 (?)
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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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_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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete