Results 1 to 13 of 13

Thread: NOAVATAR image not showing up

  1. #1

    Question NOAVATAR image not showing up

    hii,

    I was quite successful in setting up everything except the noavatar image.

    Here is the link to my noavatar image.

    It simply does not display, but the users WITH avatars display just fine.

    When I checked the source code of the page that supposed to contain the noavatar image link, there was simply no link to any noavatar image.

    What could be the problem, where I'm going wrong..The path is absolutely correct !!

    Also, if you View My Profile in MENU, you would see the NOAVATAR image, only my vbadvanced page isn't showing it up.

    Note:- My cmps_index.php page is renamed portal.php

    If you wish, you can login with this test user a/c
    Login at: www.tech555.com
    Username: test
    Password: testing


    thankss

  2. #2
    Join Date
    Feb 2006
    Posts
    164

    Default Re: NOAVATAR image not showing up

    You have the URL set For "No Avatar" Image? In default settings, Welcome Block Options section.

  3. #3

    Default Re: NOAVATAR image not showing up

    oh yes... its already set !! the same link as provided above.. infact its this :-

    {$vbulletin->options[bburl]}/images/misc/noavatar.gif

    i also changed it to direct URL as above, still doesn't work !!
    Last edited by veenuisthebest; 03-26-2008 at 11:05 AM.

  4. #4
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: NOAVATAR image not showing up

    There shouldn't be any reason it wouldn't be displayed if you have that option set. Have you perhaps modified your 'adv_portal_welcomeblock_expanded' template at all?

  5. #5

    Default Re: NOAVATAR image not showing up

    yes.. have modified it but not the avatar part ...

  6. #6

    Default Re: NOAVATAR image not showing up

    here are the first few lines of adv_portal_welcomeblock_expanded:-

    Code:
    <tr>
    	<td class="$bgclass">
    
    		<if condition="!$show['guest']">
    
    			<if condition="$avatarurl"> 
    				<a href="$vboptions[bburl]/profile.php?$session[sessionurl]do=editavatar"><img src="$avatarurl" border="0" alt="$vbphrase[edit_avatar]" /></a>
    				</td>
    				<td class="$altbgclass" valign="top" width="100%">
                 		</if>

  7. #7

    Default Re: NOAVATAR image not showing up

    and I have this set in URL For "No Avatar" Image:-

    {$vbulletin->options[bburl]}/images/misc/noavatar.gif

    I even tried:-
    http://www.tech555.com/forums/images/misc/noavatar.gif still no good..

  8. #8
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: NOAVATAR image not showing up

    There's not really anything else I can think of that would prevent the image from being displayed, but if you would like to submit a support ticket via the Members' Area here I'll be glad to take a look at things for you.

  9. #9

    Default Re: NOAVATAR image not showing up

    Hello sir,

    A strange thing happened.. I was just creating a temp. admin a/c and was about to submit the ticket. Then, I noticed that the noavatar.gif displayed fine for the new admin a/c.

    Actually, it was all an issue of "Can Upload Custom Avatars" setting in Registered Usergroups.

    I initially had it disabled, but when I enabled it, it showed up the noavatar.gif for registered usergroup too..

    BUT I do not want to allow custom avatars instead let users choose from predefined avatars, is there a way to keep it disabled and still show up noavatar.gif ??

    Thanks in advance.. !!

  10. #10
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: NOAVATAR image not showing up

    Ahhh, now I see how that's happening. Looks like there needs to be an additional check that can display the "no avatar" image for those who do not have permission to upload avatars. If you'll look in your modules/welcomeblock.php file for this code:
    PHP Code:
    $lastvisitdate vbdate($mod_options['portal_welcome_lastvisit_date'], $vbulletin->userinfo['lastvisit'], ''''); 
    And add this just Above it:
    PHP Code:
        else if ($vbulletin->options['avatarenabled'])
        {
            eval(
    '$mod_options[\'portal_noavatarurl\'] = "' addslashes($mod_options['portal_noavatarurl']) . '";');
            
    $avatarurl $mod_options['portal_noavatarurl'];
        } 
    Then that should take care of the problem.
    Last edited by Brian; 03-28-2008 at 12:47 PM.

  11. #11

    Default Re: NOAVATAR image not showing up

    hello sir,

    I did what you said, but it still doesnt work !! I disabled "Can upload custom avatars" setting for a specific usergroup, then modified the code for welcomeblock.php. This is how it looks now:-

    PHP Code:
    <?php
    if (!$show['guest'])
    {
        
    $mods['title'] = $vbphrase['user_cp'];
        
    $mods['formcode'] = '';

        
    // Avatar
        
    if ($mod_options['portal_welcome_avatar']
            AND 
    $vbulletin->userinfo['showavatars']
            AND (
    $vbulletin->userinfo['avatarid']
                OR (
    $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canuseavatar'])
                OR 
    $vbulletin->userinfo['adminavatar']
            )
        )
        {
            require_once(
    DIR '/includes/functions_user.php');
            
    $avatarurl fetch_avatar_url($vbulletin->userinfo['userid']);

            if (
    $avatarurl[0])
            {
                
    $avatarurl $vbulletin->options['bburl'] . '/' $avatarurl[0];
            }
            else if (
    $mod_options['portal_noavatarurl'])
            {
                eval(
    '$mod_options[\'portal_noavatarurl\'] = "' addslashes($mod_options['portal_noavatarurl']) . '";');
                
    $avatarurl $mod_options['portal_noavatarurl'];
            }
        }
        else if (
    $vbulletin->options['avatarenabled'])
        {
            eval(
    '$mod_options[\'portal_noavatarurl\'] = "' addslashes($mod_options['portal_noavatarurl']) . '";');
        }  
        
    $lastvisitdate vbdate($mod_options['portal_welcome_lastvisit_date'], $vbulletin->userinfo['lastvisit'], '''');
        
    $lastvisittime vbdate($mod_options['portal_welcome_lastvisit_time'], $vbulletin->userinfo['lastvisit'], '''');

        
    // Reputation
        
    if ($mod_options['portal_welcome_rep'])
        {
            require_once(
    DIR '/includes/functions_reputation.php');
            
    fetch_reputation_image($vbulletin->userinfo$permissions);
            
    $reppower vb_number_format(fetch_reppower($vbulletin->userinfo$permissions));
        }

        if (
    $mod_options['portal_welcome_rank'])
        {
            
    $vbulletin->userinfo['rank'] = str_replace('src="''src="' $vbulletin->options['bburl'] . '/'$vbulletin->userinfo['rank']);
        }

        
    // New posts
        
    if ($mod_options['portal_welcome_newposts'])
        {
            if (
    strlen($vbulletin->session->vars['newposts']) > AND !$vbulletin->options['threadmarking'])
            {
                
    $newposts number_format($vbulletin->session->vars['newposts']);
            }
            else
            {
                
    $getnewposts $db->query_first("
                    SELECT COUNT(*) AS count
                    FROM " 
    TABLE_PREFIX "post AS post
                    " 
    iif($vbulletin->options['threadmarking'],
                        
    'LEFT JOIN ' TABLE_PREFIX 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' $vbulletin->userinfo['userid'] . ')') . "
                    WHERE dateline >= " 
    $vbulletin->userinfo['lastvisit'] .
                        
    iif($vbulletin->options['threadmarking'],
                            
    ' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)') . "
                        AND visible = 1
                "
    );

                if (!
    $vbulletin->options['threadmarking'])
                {
                    
    $db->query_write("UPDATE " TABLE_PREFIX "session SET newposts = '$getnewposts[count]' WHERE userid = " $vbulletin->userinfo['userid']);
                }

                
    $newposts vb_number_format($getnewposts['count']);
            }
        }

        
    $vbulletin->userinfo['pmtotal'] = vb_number_format($vbulletin->userinfo['pmtotal']);
        
    $permissions['pmquota'] = vb_number_format($permissions['pmquota']);
        
    $vbulletin->userinfo['pmunread'] = vb_number_format($vbulletin->userinfo['pmunread']);
    }
    else
    {
        
    $mods['title'] = $vbphrase['log_in'];
        
    $mods['link'] = '';
    }

    $welcome_tempname = ($mod_options['portal_welcome_expanded'] == OR ($mod_options['portal_welcome_expanded'] == AND $vba_colwidths[$vba_modcols[$modcol]] >= 300)) ? 'expanded' 'lean';

    (
    $hook vBulletinHook::fetch_hook('vba_cmps_module_welcomeblock')) ? eval($hook) : false;

    eval(
    '$home["$mods[modid]"][\'content\'] = "' fetch_template('adv_portal_welcomeblock_' $welcome_tempname) . '";');
    ?>

  12. #12
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: NOAVATAR image not showing up

    Bleh, sorry about that. Looks like I missed a line in the code. Try this instead:
    PHP Code:
    <?php 
    if (!$show['guest']) 

        
    $mods['title'] = $vbphrase['user_cp']; 
        
    $mods['formcode'] = ''

        
    // Avatar 
        
    if ($mod_options['portal_welcome_avatar'
            AND 
    $vbulletin->userinfo['showavatars'
            AND (
    $vbulletin->userinfo['avatarid'
                OR (
    $vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canuseavatar']) 
                OR 
    $vbulletin->userinfo['adminavatar'
            ) 
        ) 
        { 
            require_once(
    DIR '/includes/functions_user.php'); 
            
    $avatarurl fetch_avatar_url($vbulletin->userinfo['userid']); 

            if (
    $avatarurl[0]) 
            { 
                
    $avatarurl $vbulletin->options['bburl'] . '/' $avatarurl[0]; 
            } 
            else if (
    $mod_options['portal_noavatarurl']) 
            { 
                eval(
    '$mod_options[\'portal_noavatarurl\'] = "' addslashes($mod_options['portal_noavatarurl']) . '";'); 
                
    $avatarurl $mod_options['portal_noavatarurl']; 
            } 
        } 
        else if (
    $vbulletin->options['avatarenabled']) 
        { 
            eval(
    '$mod_options[\'portal_noavatarurl\'] = "' addslashes($mod_options['portal_noavatarurl']) . '";');
            
    $avatarurl $mod_options['portal_noavatarurl'];
        }   
        
    $lastvisitdate vbdate($mod_options['portal_welcome_lastvisit_date'], $vbulletin->userinfo['lastvisit'], ''''); 
        
    $lastvisittime vbdate($mod_options['portal_welcome_lastvisit_time'], $vbulletin->userinfo['lastvisit'], ''''); 

        
    // Reputation 
        
    if ($mod_options['portal_welcome_rep']) 
        { 
            require_once(
    DIR '/includes/functions_reputation.php'); 
            
    fetch_reputation_image($vbulletin->userinfo$permissions); 
            
    $reppower vb_number_format(fetch_reppower($vbulletin->userinfo$permissions)); 
        } 

        if (
    $mod_options['portal_welcome_rank']) 
        { 
            
    $vbulletin->userinfo['rank'] = str_replace('src="''src="' $vbulletin->options['bburl'] . '/'$vbulletin->userinfo['rank']); 
        } 

        
    // New posts 
        
    if ($mod_options['portal_welcome_newposts']) 
        { 
            if (
    strlen($vbulletin->session->vars['newposts']) > AND !$vbulletin->options['threadmarking']) 
            { 
                
    $newposts number_format($vbulletin->session->vars['newposts']); 
            } 
            else 
            { 
                
    $getnewposts $db->query_first(
                    SELECT COUNT(*) AS count 
                    FROM " 
    TABLE_PREFIX "post AS post 
                    " 
    iif($vbulletin->options['threadmarking'], 
                        
    'LEFT JOIN ' TABLE_PREFIX 'threadread AS threadread ON (threadread.threadid = post.threadid AND threadread.userid = ' $vbulletin->userinfo['userid'] . ')') . 
                    WHERE dateline >= " 
    $vbulletin->userinfo['lastvisit'] . 
                        
    iif($vbulletin->options['threadmarking'], 
                            
    ' AND dateline > IF(threadread.readtime IS NULL, ' . (TIMENOW - ($vbulletin->options['markinglimit'] * 86400)) . ', threadread.readtime)') . 
                        AND visible = 1 
                "
    ); 

                if (!
    $vbulletin->options['threadmarking']) 
                { 
                    
    $db->query_write("UPDATE " TABLE_PREFIX "session SET newposts = '$getnewposts[count]' WHERE userid = " $vbulletin->userinfo['userid']); 
                } 

                
    $newposts vb_number_format($getnewposts['count']); 
            } 
        } 

        
    $vbulletin->userinfo['pmtotal'] = vb_number_format($vbulletin->userinfo['pmtotal']); 
        
    $permissions['pmquota'] = vb_number_format($permissions['pmquota']); 
        
    $vbulletin->userinfo['pmunread'] = vb_number_format($vbulletin->userinfo['pmunread']); 

    else 

        
    $mods['title'] = $vbphrase['log_in']; 
        
    $mods['link'] = ''


    $welcome_tempname = ($mod_options['portal_welcome_expanded'] == OR ($mod_options['portal_welcome_expanded'] == AND $vba_colwidths[$vba_modcols[$modcol]] >= 300)) ? 'expanded' 'lean'

    (
    $hook vBulletinHook::fetch_hook('vba_cmps_module_welcomeblock')) ? eval($hook) : false

    eval(
    '$home["$mods[modid]"][\'content\'] = "' fetch_template('adv_portal_welcomeblock_' $welcome_tempname) . '";'); 
    ?>

  13. #13

    Default Re: NOAVATAR image not showing up

    its perfect now .....

    thanks a lot !!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Header image no longer showing up
    By Grandamguru in forum Troubleshooting & Problems
    Replies: 1
    Last Post: 09-20-2006, 01:06 PM
  2. Body Image not showing up in CMPS
    By Cebby in forum "How Do I..." Questions
    Replies: 1
    Last Post: 05-03-2006, 06:44 PM
  3. image not showing
    By hani in forum Troubleshooting & Problems
    Replies: 3
    Last Post: 09-06-2005, 12:27 PM
  4. How do I change the noavatar.gif to a .jpg?
    By michaelsilvia in forum "How Do I..." Questions
    Replies: 4
    Last Post: 09-01-2005, 11:30 AM
  5. icon image not showing up
    By Morgalis in forum Troubleshooting / "How do I..." Questions
    Replies: 5
    Last Post: 10-01-2004, 03:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •