Harlequin
2013-02-01T02:45:16Z
Is it possible to pull a DNN users avatar image from YAF and have it display in another module by editing the template of that other module? If so what code in the template do I need to add? Thanks for any help!
Sponsor
Harlequin
2013-02-04T20:32:43Z
Any dev? I'd love to know if this is possible.
tha_watcha
2013-02-05T10:08:26Z
Originally Posted by: Harlequin 

Is it possible to pull a DNN users avatar image from YAF and have it display in another module by editing the template of that other module? If so what code in the template do I need to add? Thanks for any help!



It depends in which module you want to add it and how.

By default if the Profile Synchronizer in the DNN YAF Module is enabled, the avatar of the yaf user is synced to the dnn user photo. So all you need is use the Dnn Photo.

In Dnn there are various Tokens which you can use. But i dont know which Modules support them. For example if you turn on the Token Replacement Feature in the html Module you can do...

<img alt="avatar" src="http://yourdomain.com[Profile:Photo]" />

To show the avatar of the current user. Or do you want to show the avatar of a specific user and not the current one? That would be only possible if you know the user id.

UserPostedImage
Harlequin
2013-02-05T16:47:31Z
I am using DigArticle for my front page news, it has the option to display the users DNN profile avatar when they post a comment or submit a article next to their display name. I would rather it pull the users YAF avatar instead, and was hoping that would be possible. From what you are saying however if I set it to pull the DNN profile avatar it should still pull the YAF avatar?

The YAF Profile Synchronizer is automatically installed and started or is there something I need to do to get it to run?
Harlequin
2013-02-05T22:21:14Z
I talked to the dev of digarticle, I explained to him what I am trying to do, this is what he posted in reply about his module pulling the the YAF avatar info:

" If you get the "linking" information, where the avatar data is stored in the db. I can put something so you can do something like [author:yafid] "

Looks like he wants to add a token to his module template to his module to link to your avatar. If you could post what he is asking for I'll relay it to him, thanks!
Harlequin
2013-02-08T14:56:53Z
Watcha, just wanted to bump this so you can see it. I am not sure what he is asking for.
Harlequin
2013-02-16T20:24:32Z
daveburke
2013-02-16T21:00:15Z
Harlequin,

We did this in the Sueetie Community platform where we feature YetAnotherForum.NET and use a site-wide avatar originating from the user's YAF Avatar.

http://sueetie.com 

In a nutshell, we added our own logic to YAF's avatar upload and storage, supporting full YAF usage as well as usage outside of YAF. You would do that in the YAF Profile Avatar Edit page, then you can do anything with the image you want. We saved a separate image for our purposes which we use in a Sueetie UserAvatar Control that we can drop anywhere we wish, but your logic can be anything that works for you. Just hang your logic on the YAF Profile Avatar Edit page so whenever someone adds an avatar or modifies their avatar you capture it at that one location.

This wiki document explains the UserAvatar Control a bit.

http://sueetie.com/wiki/...nsUserAvatarControl.ashx 

The UserAvatar Control and the modifications we made to the YAF Profile Avatar Edit page is available in the Sueetie Source.

-Dave
Harlequin
2013-02-22T17:52:45Z
Thank you for the reply, but without editing the YAF source code, there isn't a simple slice of code one can put into the module to pull the YAF avatar?

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved