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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2014, 12:23 AM
DJ-Dez DJ-Dez is offline
 
Join Date: Jun 2010
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Defining Avatars for different user ids for memberinfo

Hey guys,

Merry Christmas everyone.

UPDATE:

Trying a different way. In MEMBERINFO I'm using:

<img src="{vb:raw avatarurl}">

In Plugin Manager I'm using:

Quote:
require_once('./includes/functions_user.php');
$avatarurl = fetch_avatar_url($vbulletin->userinfo['userid']);

vB_Template:reRegister('MEMBERINFO', array('avatarurl' => $avatarurl[0]));
But this only shows my avatar on everyones profile page. How can I define it so when I go to another users profile page it will pick their avatar up and not mine?

Still needing help please!
Reply With Quote
  #2  
Old 12-24-2014, 02:11 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not sure what you mean but did you go into usergroup settings and user registration options?
Reply With Quote
  #3  
Old 12-24-2014, 02:19 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are your avatars stored in your database or in your file system?
Reply With Quote
  #4  
Old 12-24-2014, 03:10 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you mean avatar instead of profile picture or neither of them show up? Did you check use reg options to enable and also usergroup permissions?

Be sure to go into maintenance and update counters after you change settings for the users.
Reply With Quote
Благодарность от:
MarkFL
  #5  
Old 12-24-2014, 03:19 AM
DJ-Dez DJ-Dez is offline
 
Join Date: Jun 2010
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Are your avatars stored in your database or in your file system?
file system.

I need a code to put in MEMBERINFO to take the avatar and not the profile picture, but when it does take the avatar it does it by thumbnail
Reply With Quote
  #6  
Old 12-24-2014, 03:40 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A down and dirty fix would be to go to your "memberinfo_block_ministats" template, and near the bottom locate:

HTML Code:
<img src="{vb:raw prepared.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw prepared.username}}"  {vb:raw prepared.avatarsize} id="user_avatar" />
and replace it with:

HTML Code:
<img src="{vb:raw prepared.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw prepared.username}}" id="user_avatar" onload="this.src = this.src.replace(/\/thumbs/,'');" />
This will replace the src attribute of the avatar with the URL of the full-sized avatar.
Reply With Quote
Благодарность от:
RichieBoy67
  #7  
Old 12-24-2014, 04:33 AM
DJ-Dez DJ-Dez is offline
 
Join Date: Jun 2010
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would I display block ministats in memberinfo?

{vb:raw blocks.ministats}

Thank you Mark and Merry Christmas
Reply With Quote
  #8  
Old 12-24-2014, 04:58 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DJ-Dez View Post
How would I display block ministats in memberinfo?

{vb:raw blocks.ministats}

Thank you Mark and Merry Christmas
I'm not real sure yet exactly what you are trying to do here. It is my understanding that the set of memberinfo templates all work together.

I am under the impression that you want a user's avatar to display on their profile page full size rather than the thumbnail version. A better solution than the one I quickly offered would be to write a plugin to fetch the user's avatar URL, and define a variable to contain it, and then register it in the correct template.

Can you elaborate on exactly what you are wanting to accomplish?
Reply With Quote
  #9  
Old 12-24-2014, 05:19 AM
DJ-Dez DJ-Dez is offline
 
Join Date: Jun 2010
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Trying a different way. In MEMBERINFO I'm using:

<img src="{vb:raw avatarurl}">

In Plugin Manager I'm using:

Quote:
require_once('./includes/functions_user.php');
$avatarurl = fetch_avatar_url($vbulletin->userinfo['userid']);

vB_Template:reRegister('MEMBERINFO', array('avatarurl' => $avatarurl[0]));
But this only shows my avatar on everyones profile page. How can I define it so when I go to another users profile page it will pick their avatar up and not mine?

Thank you
Reply With Quote
  #10  
Old 12-24-2014, 06:30 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I faced a similar issue recently but was able to hack an existing plugin which already had the userids I needed defined.

I will be interested to see how this can be done, as I am still really inexperienced with writing plugins and am trying to learn from the masters here.

One suggestion I would make to aid you in getting help more promptly would be to edit the first post, and change the title so that it briefly describes your question.
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 07:47 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.04009 seconds
  • Memory Usage 2,264KB
  • 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_html
  • (4)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete