Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Username in SkinUsername in Skin
Previous
 
Next
New Post
6/28/2006 5:28 PM
 

THANKS for the great tip, I was looking for a easy way to insert a DB field into a skin WITHOUT coding a new tag. 

Question:?  I would like the "WebSite" field from the users account instead of the "userid" as you coded above?  Any help here would be GREATLY appriciated. I can't seem to locate the info anywhere...

Thanks

 
New Post
6/29/2006 3:03 AM
 

Dear John

Is it possible when a user login... to say something...

For instance:
Normally you have
Register | Login
When the user have logged in then you have
FirstName Name | Logout

Welcome Firstname | Logout


Vriendelijke groeten
Gilbert Vanden Borre
 
New Post
6/30/2006 4:55 PM
 

 

Prosoft1,

The website field from the profile is a little more code, but it is possible.

Just to be sure, do you want it to be a link to the logged in user's website from their profile?
I'll work on the code, while I'll wait for your answer.

 


DotNetNuke Modules from Snapsis.com
 
New Post
6/30/2006 8:26 PM
 

 

Gilbert,

This is how you could add the word "Welcome" to a link that goes to the user's profile.
This code is for the latest versions of DNN 3.3/4.3.

<asp:hyperlink id="UserRegister" runat="server" cssclass="SkinObject" enableviewstate="False" />
<script runat="server">
  Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If Not Request.IsAuthenticated Then
        UserRegister.Text = "Register"
        UserRegister.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL("Register")
    Else
        Dim oUserInfo As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo
        UserRegister.Text = "Welcome " & oUserInfo.Profile.FirstName
        UserRegister.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "Profile", "UserID=" + oUserInfo.UserID.ToString)
    End if
  End Sub
</script>


DotNetNuke Modules from Snapsis.com
 
New Post
6/30/2006 8:30 PM
 

 

Prosoft1,

The code for using the website name is basically the same.
But you would probably want it to go to the actual website, so I have made that adjustment also.

<asp:hyperlink id="UserRegister" runat="server" cssclass="SkinObject" enableviewstate="False" />
<script runat="server">
  Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If Not Request.IsAuthenticated Then
        UserRegister.Text = "Register"
        UserRegister.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL("Register")
    Else
        Dim oUserInfo As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo
        UserRegister.Text = oUserInfo.Profile.Website
        UserRegister.NavigateUrl = oUserInfo.Profile.Website
    End if
  End Sub
</script>

 


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Username in SkinUsername in Skin


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out