gymnasticsmedia
 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 Posts:70

 |
|
leesykes DNN Creative Staff
 Nuke Master III Posts:3351
 |
|
gymnasticsmedia
 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 Posts:3351
 |
|
nolazabal
 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 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 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 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 Posts:2
 |
| 25 Nov 2006 5:20 AM |
|
>>Ken, <<
BIG OOPPPSSSS.. Sorry I meant to write Kirk...  -- Regards, Steve
|
|
|
|
|
gymnasticsmedia
 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 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 Posts:3351
 |
|