vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Profile Pics Not Displaying? (https://vborg.vbsupport.ru/showthread.php?t=324756)

MarkFL 03-17-2017 06:38 PM

Profile Pics Not Displaying?
 
On one of the sites I help admin, we discovered that a lot of users' profile pics weren't showing up on their profiles. All the permissions were set correctly, and the filesize limitations are quite liberal and not the issue.

Anyway, I couldn't figure out why they weren't being returned in the $prepared array, so I wrote a plugin that I thought others might find helpful.

The Hook Location is "member_build_blocks_start" and the Plugin PHP Code is:

PHP Code:

if (!$prepared['profilepicurl'])
{
    global 
$vbulletin;
    
$ppuserinfo fetch_userinfo($prepared['userid'],8);

    if (
$vbulletin->options['usefileavatar'])
    {
        
$ppuserinfo['profilepicurl'] = $vbulletin->options['profilepicurl'] . '/profilepic' $ppuserinfo['userid'] . '_' $ppuserinfo['profilepicrevision'] . '.gif';

        if (!
file_exists($ppuserinfo['profilepicurl']))
        {
            
$ppuserinfo['profilepicrevision'] = 0;
        }
    }
    else
    {
        
$ppuserinfo['profilepicurl'] = 'image.php?' $vbulletin->session->vars['sessionurl'] . 'u=' $ppuserinfo['userid'] . "&dateline=$ppuserinfo[profilepicdateline]&type=profile";
    }

    if (
$ppuserinfo['profilepicrevision'] OR $ppuserinfo['profilepicdateline'])
    {
        
$prepared['profilepicurl'] = $ppuserinfo['profilepicurl'];
    }



Stratis 03-18-2017 04:19 PM

I was having the same exactly problem for two years, couldn't find what was causing it.
Symptomatic I uninstalled a specific modification and realized that was causing the issue. I am searching about an hour and I can not find the notes I have for this situation. I will try again, hope to find it. :)


All times are GMT. The time now is 03:09 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.01030 seconds
  • Memory Usage 1,719KB
  • 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
  • (2)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