vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   vbCMS comments displaying profile picture not the avatar (https://vborg.vbsupport.ru/showthread.php?t=262075)

kinhell 04-15-2011 11:07 PM

vbCMS comments displaying profile picture not the avatar
 
Anyone know how I can change this so it displays the users avatar not their profile picture please?

Lynne 04-16-2011 02:53 AM

The comments show the avatar, not the profile picture. So, do you mean you want to switch it to show the profile picture instead? What version vB are you running?

kinhell 04-16-2011 12:29 PM

Hi Lynne thanks for the reply

On our site the comments show the profile picture (tried in default style and our current style)

Id like it to show the avatar as intended

Version is 4.1.3

Not sure how this has happened?

Lynne 04-16-2011 04:43 PM

It only shows the profile picture if the user doesn't have an avatar. If the user has an avatar, then it should show the avatar.

If you want to change the code for this, edit packages/vbcms/comments.php around line 644

kinhell 04-16-2011 05:58 PM

Strange as we all have avatars but it still shows the profile picture, Ill look at the code.

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

What would I need to change?

PHP Code:

if (!$post['hascustomavatar']) 
            { 
                if (
$post['profilepic']) 
                { 
                    
$post['hascustomavatar'] = 1
                    
$post['avatarid'] = true
                    
$post['avatarpath'] = "image.php?"  vB::$vbulletin->session->vars['sessionurl'] . "u=" $post['userid']  . "&dateline=" $post['profilepicdateline'] . "&type=profile"
                    
$post['avwidth'] = $post['ppwidth']; 
                    
$post['avheight'] = $post['ppheight']; 
                } 
                else 
                { 
                    
$post['hascustomavatar'] = 1
                    
$post['avatarid'] = true
                    
// explicity setting avatarurl to allow guests comments to show unknown avatar 
                    
$post['avatarurl'] = $post['avatarpath'] = vB_Template_Runtime::fetchStyleVar('imgdir_misc') . '/unknown.gif'
                    
$post['avwidth'] = 60
                    
$post['avheight'] = 60
                } 
            } 


Shuurajou 04-16-2011 06:20 PM

Worth noting that when you view the comments forum the posts have avatars showing, just on the CMS page it's showing the profile pics.

Lynne 04-16-2011 07:58 PM

Disable all Products except the vBulletin Blog and vBulletin CMS (Admin CP -> Plugins & Products -> Manage Products -> Disable) AND uncheck all the plugins except those related to the vBulletin Blog and vBulletin CMS by (Admin CP -> Plugins & Products -> Plugin Manager). You must do BOTH of those steps in order to disable all non vBulletin Modifications. Then see if the profile image is still showing instead of the avatars (you will need to do a force refesh to check).

kinhell 04-16-2011 10:45 PM

Done what you said above, but it had no effect. The comments still showed the profile picture and not the avatar. If I copy the profile image URL on the comments page it links to http://www.mysite.com/image.php?u=15...7&type=profile for example.

Lynne 04-16-2011 11:24 PM

And you have the usergroups set to be allowed to upload their own custom avatars?

Have you modified that template at all?

kinhell 04-16-2011 11:53 PM

Usergroups are currently set to not be able to upload custom avatars, avatars are chosen from a list of preuploaded ones

Does that make a difference?

Not modified the template.

Lynne 04-17-2011 02:39 AM

Yes, that makes a difference if you look at the code (and the code above there that defines hascustomavatar if the user has a customavatar). If custom avatar - custom avatar is shown. If they don't have a custom avatar - the profile image is shown. Otherwise, the unknown.gif is shown.

kinhell 04-17-2011 02:51 PM

So it wont show avatars that have been selected from our forum selection?

Lynne 04-17-2011 03:52 PM

Correct.

kinhell 04-17-2011 09:26 PM

Ok thanks, sorted then.


All times are GMT. The time now is 03:28 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.00997 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete