> Forums > Active Forums > Community Support > Displaying AVATAR "What's New" module
Last Post 31 Mar 2010 12:40 AM by Will Morgenweck. 17 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Nader K
Customers
Nader K
Post Count:21

--
29 Mar 2010 05:51 PM
    Is it possible to display the author's avatar on the the "Active Forum What's New" module? If not, does anyone have a suggestion on how I might be able to customize it so that it does?

    Thanks!
    Will Sugg
    Customers
    Will Sugg
    Post Count:534

    --
    30 Mar 2010 04:51 PM
    Hi Nader,

    Go through this thread

    http://www.activemodules.com/Commun...aspx#28255

    I have it working well on www.mofga.net - I also used WebHarpoon to bring that module and Newest Members over to another site - www.mofga.org.

    thanks,

    Will
    Nader K
    Customers
    Nader K
    Post Count:21

    --
    30 Mar 2010 05:28 PM
    Thanks Will. The page that you have linked to seems to have something wrong with its content. I see AF template tokens. But I don't see anything about author's avatar or any explanation.
    Ray Dixon
    Customers
    Ray Dixon
    Post Count:199

    --
    30 Mar 2010 05:35 PM
    Try starting at the beginning of the topic here: http://www.activemodules.com/commun...fault.aspx
    Nader K
    Customers
    Nader K
    Post Count:21

    --
    30 Mar 2010 05:43 PM
    Thank you Ray. I will check it out tomorrow.
    Ray Dixon
    Customers
    Ray Dixon
    Post Count:199

    --
    30 Mar 2010 05:45 PM
    You're welcome. Do you have ActiveSocial?
    Nader K
    Customers
    Nader K
    Post Count:21

    --
    30 Mar 2010 06:52 PM
    Yeah, we bought Active Social. But right now, we are using just the Active Forums.
    Ray Dixon
    Customers
    Ray Dixon
    Post Count:199

    --
    30 Mar 2010 10:41 PM
    I asked because including the user's profile picture in the What's New template is pretty easy. But, it won't help you if you're not using it.
    Nader K
    Customers
    Nader K
    Post Count:21

    --
    31 Mar 2010 12:04 AM
    Thank you for your input Ray. I tried using the the [AS:PROFILE:PICTURE] and [AVATAR]. Neither worked with the "What's new" template. I managed to display the author image using a hard coded URL as suggested by using [AUTHORID] token on this post: http://www.activemodules.com/Commun...aspx#15403

    I generally try to avoid hardcoding URLs. But this is the only way it seems to work with What's New module.
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7666

    --
    31 Mar 2010 12:06 AM
    You could also use the profilepic handler. Take a look at the Who's Online custom view sample.
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Ray Dixon
    Customers
    Ray Dixon
    Post Count:199

    --
    31 Mar 2010 12:10 AM
    I am not a fan of hard coded URLs, either. However, if they stay the same across installations, I'm OK with it. I have been using the profile image handler in my templates (including some third party templates, like Ventrian News Articles and Property Agent). Here's an example of how I'm using it:

    /DesktopModules/ActiveSocial/profilepic.ashx?PortalId=0&uid=[USERID]&h=25&w=25

    I replace [USERID] with whatever provides the ID of the user in the context in which I'm using the template. Since ActiveSocial always installs to the same place, this works out OK.
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7666

    --
    31 Mar 2010 12:14 AM

    Posted By Ray Dixon on 31 Mar 2010 12:10 AM
    I am not a fan of hard coded URLs, either. However, if they stay the same across installations, I'm OK with it. I have been using the profile image handler in my templates (including some third party templates, like Ventrian News Articles and Property Agent). Here's an example of how I'm using it:

    /DesktopModules/ActiveSocial/profilepic.ashx?PortalId=0&uid=[USERID]&h=25&w=25

    I replace [USERID] with whatever provides the ID of the user in the context in which I'm using the template. Since ActiveSocial always installs to the same place, this works out OK.

    Very good example Ray!



    There is a difference between a url in a template versus the url in the content. I wouldn't consider the url in your custom template to be "hardcoded".
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Ray Dixon
    Customers
    Ray Dixon
    Post Count:199

    --
    31 Mar 2010 12:17 AM
    Thanks, Will. I don't really consider it fully hard coded, either. Maybe just half baked? It not as dynamic as something like AS:PROFILE:PICTURE but it doesn't include any site specific page names or IDs, either.
    Nader K
    Customers
    Nader K
    Post Count:21

    --
    31 Mar 2010 12:17 AM
    Will, thanks for suggesting the handler code. It gave me ideas for using similar code for a few other customizations that I need to do.

    As for hard coded URL, I'm actually not specifying the domain name. This is what I have: . I have already used this code on different servers without having to change anything.
    Nader K
    Customers
    Nader K
    Post Count:21

    --
    31 Mar 2010 12:25 AM
    Looks like my code got truncated. I'm putting it up again with code tags around it:

     <img src="/PortalName/Portals/0/ActiveForums_Avatars/Avatar_[AUTHORID].jpg" border="0" style="width: 100px; height: 100px;" />


    I had initially hardcoded the full URL when I first posted this topic. But with above code, stays the same across different installations.
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7666

    --
    31 Mar 2010 12:30 AM
    The method above will show a broken image if the user doesn't have an avatar. The profilepic handler will at least display a default avatar for you.
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    Nader K
    Customers
    Nader K
    Post Count:21

    --
    31 Mar 2010 12:38 AM
    Good point. I thought about that. All of our users will have an avatar when they come on our site. Their accounts are auto-created by my custom DNN authentication provider. I pull their profile info, including image from one of our other sites. If the user doesn't have an image there, I set the default avatar image for him or her. But still, to be safe, I'm definitely going to implement the profilepic handler when I get a chance. I'm swamped with work right now and not even getting paid overtime.
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7666

    --
    31 Mar 2010 12:40 AM
    I'm swamped with work right now and not even getting paid overtime.

    Same here
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    You are not authorized to post a reply.
    > Forums > Active Forums > Community Support > Displaying AVATAR "What's New" module
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy