Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Click On Avatar In Viewtopic 
 
Hi

I was wondering if anyone knew if it was possible to click on a users avatar in viewtopic and the image will show on a new page...

I tried coding this in viewtopc.php

Code: [Download] [Hide] [Select]
'AVATAR_IMGA' => $board_config['avatar_path'] . '/',


and in viewtopic.tpl

Code: [Download] [Hide] [Select]
<span class="post-images"><a href="{AVATAR_IMGA}">{postrow.POSTER_AVATAR}</a></span>


but so far it just shows the avatar folder and not the image of the user...

Thanks for reading and any help.

 
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Click On Avatar In Viewtopic 
 
I think what you are doing will only work for an uploaded avatar. You need more php code to check for remote, default avatars, or one selected from the avatar gallery.

That said.... try this

Code: [Download] [Hide] [Select]
'AVATAR_IMGA' => $board_config['avatar_path'] . '/' . $postrow[$i]['user_avatar'],


Code: [Download] [Hide] [Select]
<span class="post-images"><a href="{postrow.AVATAR_IMGA}">{postrow.POSTER_AVATAR}</a></span>

 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click On Avatar In Viewtopic 
 
Thank you so much ....

Worked exactly as I would like...

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click On Avatar In Viewtopic 
 
Or you can just edit this function by adding the ANCHOR in the generated code... so it will be applied not only in viewtopic, but in every page where an avatar is...

Code: [Download] [Hide] [Select]
function user_get_avatar($user_id, $user_avatar, $user_avatar_type, $user_allow_avatar, $path_prefix = '')
{
    global $board_config;
    $user_avatar_link = '';
    if ($user_avatar_type && ($user_id != ANONYMOUS) && $user_allow_avatar)
    {
        switch($user_avatar_type)
        {
            case USER_AVATAR_UPLOAD:
                $user_avatar_link = ($board_config['allow_avatar_upload']) ? '<img src="' . $path_prefix . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />' : '';
                break;
            case USER_AVATAR_REMOTE:
                $user_avatar_link = resize_avatar($user_avatar);
                break;
            case USER_AVATAR_GALLERY:
                $user_avatar_link = ($board_config['allow_avatar_local']) ? '<img src="' . $path_prefix . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />' : '';
                break;
            case USER_GRAVATAR:
                $user_avatar_link = ($board_config['enable_gravatars']) ? '<img src="' . get_gravatar($user_avatar) . '" alt="" />' : '';
                break;
            default:
                $user_avatar_link = '';
        }
    }

    if ($user_avatar_link == '')
    {
        $user_avatar_link = get_default_avatar($user_id, $path_prefix);
    }

    return $user_avatar_link;
}

 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click On Avatar In Viewtopic 
 
wow very nice thanks very much

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events