> Forums > Active Social > Themes and Templates > How to add picture and display name to summary?
Last Post 24 Sep 2010 05:46 PM by R1ckJon3z. 16 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
mmoney
Customers
mmoney
Post Count:150

--
20 Jul 2010 01:22 PM
    Hi,

    A version before the most recent, I had code working that displayed the picture and display name at the top of my social summary for a given user. It doesn't seem to work anymore. I noticed that there is new code posted (which includes registering a control) that is suppose to do this, but I can't get it to work either. Does anyone have a summary that includes the user's picture and display name that still works so I can figure out what has changed?

    thanks


    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    21 Jul 2010 02:09 PM
    I would also like to know what happened. Here is a backround thread for this issue: http://www.activemodules.com/Commun...fault.aspx


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    21 Jul 2010 02:14 PM
    I really need to see a template of how you had this working before. I believe what happened is that the way you were using the tokens in the template before wasn't actually intended. There was another thread about this as well where I believe I even questioned how it was actually working. If someone could post the template that was working before we can probably provide another solution.


    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    21 Jul 2010 02:57 PM
    Will,

    Here is the code snippet that I was using to display the profile picture before. I think you are right about the tokens. They were not documented anywhere that I could find, but I came across them in another template and did some experimenting until I got it to work:

    <a href="[AS:SOCIALUSER:USERURL]"><active:ProfilePicture ProfileUserId='[AS:SOCIALUSER:USERID]' ImageAlt='[AS:SOCIALUSER:DISPLAYNAME]' LinkToProfile='False' PicSize='md' runat='server'/>a>

    I have attached the summary template that I was using, but this the profile picture is the only part that stopped working. I'm still using the same template in 1.7.3 minus the profile pic and edit link. Thanks.

    JournalSummaryTemp.txt

    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    27 Jul 2010 03:01 PM
    any ideas on this?


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    mmoney
    Customers
    mmoney
    Post Count:150

    --
    09 Aug 2010 08:20 PM
    The code posted by R1ckJon3z is the same one I was using. He had kindly posted it in answer to someone else s question about how to do this and when I tried it, it worked. Now it doesn't seem to.


    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    20 Sep 2010 03:45 PM
    Does anyone have a suggestion about this? I still haven't figured this out.....


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    21 Sep 2010 07:45 AM
    I tried just taking the snippet from the profile view that displays the user's picture and it doesn't display anything. Why wouldn't that work?


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    mmoney
    Customers
    mmoney
    Post Count:150

    --
    21 Sep 2010 08:48 AM
    I've tried the same thing and can't get it to work either.


    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    21 Sep 2010 08:52 AM
    You can try...
    
    <img src="/desktopmodules/activesocial/profilepic.ashx?portalid=0&amp;uid=[AS:SOCIALUSER:USERID]&amp;h=18&amp;w=18" />
    


    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    21 Sep 2010 09:11 AM
    The only thing I can't get working is the token to get the userid. It works if I hardcode it in, so I know we are on the right track. This is also the code that Rod from Poker DIY uses on his site, but I'm not sure why that token is not working. I have tried a couple different ones and no luck so far.


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    21 Sep 2010 09:32 AM
    Try using [DNN:PROFILE:UserId] or [DNN:PROFILE:USERID].


    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    21 Sep 2010 09:42 AM
    Will,

    I tried those (found them in the profile template), but they are not working either. I am using [AS:PORTALSETTINGS:PORTALID] to get the portal ID and it is working. [AS:SOCIALUSER:USERID] was what I was using before. Can I make my own token to retrieve the user ID?


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    21 Sep 2010 11:48 AM
    Will,

    I am a little confused as to why the token [DNN:PROFILE:USERID] works on the profile view template but doesn't seem to work on the journal summary template. Any thoughts on this?


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    21 Sep 2010 11:51 AM
    Well, the profile view template is a profile view control where it has proper context of a user. A journal summary template doesn't need user context to render which means it was never intended to parse profile tokens.


    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    21 Sep 2010 11:56 AM
    Ok, that makes sense. So does that mean that there is no way to get the userid from the summary template? Some tokens are working, just not the one I want!! (laughing)


    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    R1ckJon3z
    Customers
    R1ckJon3z
    Post Count:116

    --
    24 Sep 2010 05:46 PM
    Ok, since the userId doesn't seemed to be able to be exposed by token anymore, there is a work-around for anyone looking to have the profile picture/edit profile link on the journal summary page. Page Blaster from Snapsis, has a great token replacement feature that can be used to retrieve the userID from DNN and used with the code that Will posted above can be used to accomplish the goal. I am posting the code I am using below as well as a screen shot of my journal summary.




    ProfilePic.txt

    Poker Sharkz
    Ricky Jones | PokerSharkz.net | Social Networking For Poker Players
    You are not authorized to post a reply.
    > Forums > Active Social > Themes and Templates > How to add picture and display name to summary?
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy