You need to Register for free and Login to post a message in the forum.

Forum

Subject: Select Avatar
Prev Next
You are not authorized to post a reply.

Author Messages
gymnasticsmedia
Nuke Pro
Nuke Pro
Posts:70


07 Oct 2006 8:20 PM  

Should be a simple module... The ablity for a user to select an avatar from images on the portal, and update their forum (Active Forums) profile to link to that avatar.


GymnasticsMeida.com
The Ultimate Portal for the Ultimate Sport
gymnasticsmedia
Nuke Pro
Nuke Pro
Posts:70


20 Oct 2006 7:54 PM  

We created the ability to select an avatar with XMod, and a AJax call to an aspx page that updated the Active Forums tables. If anyone has XMod, and Active Forums... AND would like this functionality, contact me and I'll share the code.

My Avatar @ GymnasticsMedia

http://www.gymnasticsmedia.com/Forums/MyAvatar/tabid/398/Default.aspx

Screenshot since you need to be logged in to "Select an Avatar".

http://www.gymnasticsmedia.com/portals/9/screenshots/screenshot_avatars.jpg

 


GymnasticsMeida.com
The Ultimate Portal for the Ultimate Sport
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

22 Oct 2006 7:02 AM  
Hello,

Perhaps you would be interested in putting together an article on how you implemented it?  We could then publish it on DNN C. for everyone to read as it sounds like a good implementation of active forums and XMod.

Thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
gymnasticsmedia
Nuke Pro
Nuke Pro
Posts:70


22 Oct 2006 5:13 PM  

Lee,

I'm not very good at writing articles, but I gave it a try. I had a hard time with the code, and putting it in HTML, so I created a word doc. Edit it as you see fit.

 


GymnasticsMeida.com
The Ultimate Portal for the Ultimate Sport
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

23 Oct 2006 3:22 AM  
That's great, thanks for taking the time to put it together,

Cheers,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
nolazabal
Nuke Newbie
Nuke Newbie
Posts:1

24 Oct 2006 11:40 AM  
is it possible for the user to upload or maybe use a remote image as an avatar?
gymnasticsmedia
Nuke Pro
Nuke Pro
Posts:70


24 Oct 2006 12:35 PM  

Yes actually you can upload, or point to a remote image via Active Forums "My Profile". BUT I think you made a good point. A link to where the user can edit their profile should be on the same page as the "My Avatar" page.

Thanks for the suggestion!


GymnasticsMeida.com
The Ultimate Portal for the Ultimate Sport
gymnasticsmedia
Nuke Pro
Nuke Pro
Posts:70


24 Oct 2006 12:48 PM  

You can use the {XMOD_UserId} constant to embed the user id into the url to link to the user's "My Profile" page.

Below is what I used to link to the user id.

<CENTER><TABLE>
<TR>
<TD id="dnn_ctr761_NTForums_toolbar_tdMyProfile" nowrap="nowrap"><a id="dnn_ctr761_NTForums_toolbar_hypProfile" class="CommandButton" href="/Forums/tabid/230/view/profile/uid/{XMOD_UserId}/Default.aspx">My Profile</a></TD>
</TR>
</TABLE></CENTER>


GymnasticsMeida.com
The Ultimate Portal for the Ultimate Sport
Recovery1
Nuke Newbie
Nuke Newbie
Posts:2

25 Nov 2006 5:13 AM  
Ken,
I am trying your sample above. I ran into a little snafu.. I have admin, and a security role called Forum Admin, and of course registred users. I set the XMOD permissions so that Admin & Forum Admin can approve and Registred Users can upload. Funny, when I log in as a regular user, I can not added any Records. If I log in as Forum Admin, I can approved/disapprove of images, but can not upload. Only the Admin account current can upload. I am very new to XMOD, but I like your sample, it fills the gap where Active Forums did not add such a feature. Any suggestions on how to fix this. I have been through the configuration set up so many times I'm going blurry eyed.

Thanks in advance for your assistance.

--
Regards,
Steve
Recovery1
Nuke Newbie
Nuke Newbie
Posts:2

25 Nov 2006 5:20 AM  
>>Ken, <<
BIG OOPPPSSSS.. Sorry I meant to write Kirk...

--
Regards,
Steve


gymnasticsmedia
Nuke Pro
Nuke Pro
Posts:70


25 Nov 2006 12:31 PM  

Steve,

Have you added a XMod Form? Only people who added the record,or have permissions to edit/delete records see have the option(s) in a ListView. Do you have a URL, or is this on your local machine?

In the below example on my site I have a list view, and a form view on the same page.

Add Gympedia Entry

 

On this example I have a two list views, with a link to a form is the user has no Swap Meet profile. Users must enter data through a Form View, while Admins can add through the list view, or for view.

Swap Meet

 

Hope this helps...


GymnasticsMeida.com
The Ultimate Portal for the Ultimate Sport
gymnasticsmedia
Nuke Pro
Nuke Pro
Posts:70


17 Jul 2007 4:26 PM  

It's been brought to my attention that the selectavatar.aspx file could be suseptible to SQL injection attacks since the sql statment is not using paramters. Here is the updated code. If you have any questions please contact me.

 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim objConn As New SqlClient.SqlConnection("Server=someserver;Database=somedatabase;uid=someuserid;pwd=somepassword;")

Dim objCommand As New SqlClient.SqlCommand

Dim sql As String

Dim PortalID As String

Dim UserID As String

Dim Avatar As String

Try

PortalID = Request.QueryString("pid")

UserID = Request.QueryString("uid")

Avatar = "/Portals/" & PortalID & "/SystemAvatar/" & Request.QueryString("avatar")

sql = "UPDATE NTForums_UserDetails SET AvatarLink=@Avatar, AvatarFileName='' WHERE PortalID=@PortalID AND UserID=@UserID"

objConn.Open()

objCommand.Connection = objConn

objCommand.CommandText = sql

objCommand.Parameters.Add("@Avatar", Avatar)

objCommand.Parameters.Add("@PortalID", PortalID)

objCommand.Parameters.Add("@UserID", UserID)

objCommand.ExecuteNonQuery()

Catch ex As Exception

Throw ex

Finally

objConn.Close()

objConn.Dispose()

objCommand.Dispose()

End Try

End Sub


GymnasticsMeida.com
The Ultimate Portal for the Ultimate Sport
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

19 Jul 2007 8:20 AM  
The code change has been added to the tutorial:
Using XMod with Active Forums to select Avatars


Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
You are not authorized to post a reply.



ActiveForums 3.7

Latest Forum Posts

RE: (catalook) Itempane changes on product pages ?? by Vilaplana
Hi, I think the problem is been caused by your skin and not by Catalook itself.  In the main page, C...
Yahoo Answers by cdtguru
Hey, i was wondering if anyone knew of a module that would create a similar system to Yahoo Answers...
(catalook) Itempane changes on product pages ?? by Gaz35
Hi , hi , I don’t know if you can help me , here is the site in question http...
RE: Virtual Pc 2007 help by jeff@zina.com
You need to get the Virtual PC's network set up.  Might check the Virtual PC news group: http://www...
DNNCreative Just Keeps Getting Better by jeff@zina.com
Kudos on issue 39, the article on importing large quantities of data was both timely for me and spot...
RE: Videos by clippy
Hello from France My question is about the videos for beginners, and specially n° 3; I'm working...
skinning trouble by derpir
HelloI have uploaded a skin to my DNN-website, but I want to make som changes. I have made some chan...
RE: Column width in UDT by VickySwift
In case anyone else is looking for the answer to this, I have been able to add the headers back in b...
RE: search not working by jncraig
Did you either reindex the site to turn on the scheduled task to do it?
RE: Template Issue by jncraig
No, you need to install your custom modules before you use the template.
RE: error message in registration page by jncraig
I'm not sure that you can avoid them, short of rewriting the module.You might want to investigate Dy...
Template Issue by Bobbyjosephg
Hi,   Today I have come up with a problem with templates.I was successful in exporting a template an...
RE: search not working by sanju_k1421
I checked     host==>admin search  page   that is set both limits min //max  page     still i m n...
RE: error message in registration page by coder247
but how do I avoid the error messages provided by default in dnn?
RE: Style sheet does nothing by andorz
Oh. I was told to do that in my thread at the dotnetnuke.com forum. http://www.dotnetnuke.com/Commun...
RE: Videos by clippy
Thank you to answer so quickly. It's really kind from you. I appreciate
RE: Simple subscribe newsletter module by jncraig
I seem to recall that DataSprings has an "Opt In" module. I haven't used it, though.
RE: Videos by jncraig
No, you can view them in any order.
RE: Skim Question by tlsadler
Wow! Went to Snowcovered and the 50% off Promo more then paid for itself. I actually wound up buying...
Videos by clippy
Hello from FranceJust a little questionIs there any order to respect to look the videos ("issues"). ...
DotNetNuke Modules
RSS Feeds