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

Forum

Subject: hiding login link
Prev Next
You are not authorized to post a reply.

Page 2 of 2 << < 12
Author Messages
hanleyhansen
Nuker
Nuker
Posts:17

26 Jan 2010 1:45 PM  
Posted By Joseph Craig on 31 Jan 2009 11:11 AM
Yes.  You are absolutely correct.  I should have had a cup this morning before answering.

If you want to completely remove the login link, you can remove that skin object from within your skin file.  If you are working with an html version of the skin, you for "[LOGIN]" in the skin file, and just remove it.  If you want to remove the user skin object, that is "[USER]"

The USER skin object displays "Register" (if permitted) to non-logged in users and the Display name to logged in users.

The LOGIN skin object displays "Login" or "Logout"

If you are working with .ascx skin files, then you'll want to look for and remove:

           < dnn:USER  runat="server" id="dnnUSER" / >
          < dnn:LOGIN runat="server" id="dnnLOGIN" / >


Even if you don't want to display a login link to visitors, you might want to display the display name and a logout link once people have logged in.  John Mitchell (Snapsis.com) is the source of this code:

            < %  If DotNetNuke.Security.PortalSecurity.IsInRole("Registered Users")  Then% >
                    < div id="LoginUserContainer" >
                        < dnn:User cssclass="BannerLinks" runat="server" id="dnnUser" url="" / >  
                          | 
                        < dnn:Login runat="server" cssclass="BannerLinks" id="dnnLogin" / >                       
                    < /div >     
             < % End If % >

(note that I've added some spaces to that the html tags won't be interpreted as such when this message is posted - remove them to use it.)

If you add the conditional stuff around the USER and LOGIN skin objects, they will only be displayed to registered users.  YOu can change the role if you want to do this only for Administrators, for instance.

Visit Snapsis' DotNetNuke support forums and you'll find a thread that has other uses for conditional code in skin files.

I left out another way to login.  Either of these should work, provided that you haven't altered the default login page:

           http://mysite.com/login.aspx
           http://mysite.com/?ctl=login

There are also logoff.aspx and ?ctl=logoff.


This is exactly what I'm looking for. However, I'm fairly new to DNN so where do I have to add all this stuff in? Where do I put the conditionals?
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


26 Jan 2010 8:29 PM  
Those go in your ascx skin.

Take a look at the recent tutorials on skinning:

Don't let the work "professional" scare you off as these are all quite accessible.


Joe Craig
DNN Creative Support
Subscribe to the website
hanleyhansen
Nuker
Nuker
Posts:17

27 Jan 2010 6:04 AM  
Thank you! I will definitely take a look at that.
hanleyhansen
Nuker
Nuker
Posts:17

27 Jan 2010 12:02 PM  
What part of the ascx file does the conditional go in?
hanleyhansen
Nuker
Nuker
Posts:17

27 Jan 2010 12:03 PM  
Also, I made my skin in Artisteer so I have to ascx files, page.ascx and page-admin.ascx. Do i have to put it in both? Or how does that work?
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


27 Jan 2010 12:58 PM  
I haven't used Artisteer, but I assume that you actually have two skin files.  One if for normal pages and one for admin type pages.

I'd probably only put the conditional stuff on normal page skin.  The admin type pages will only be seen to logged in admins or in special situations.

Joe Craig
DNN Creative Support
Subscribe to the website
hanleyhansen
Nuker
Nuker
Posts:17

27 Jan 2010 1:02 PM  
Makes sense. What part of the ascx file do I put it in? I would really appreciate your help because I have to get this done and it also serves me good for future ascx editing. Thank you.
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


27 Jan 2010 1:08 PM  
I strongly recommend that you view the tutorials, as things may make a lot more sense.

The short answer is that you need to find where the skin objects are located in the page, and then wrap the conditional code around them.

Joe Craig
DNN Creative Support
Subscribe to the website
hanleyhansen
Nuker
Nuker
Posts:17

27 Jan 2010 1:12 PM  
The tutorials you sent me require a subscription. I'm assuming that the skin objects are defined here:

<%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Register TagPrefix="dnn" TagName="LOGO" Src="~/Admin/Skins/logo.ascx" %>
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/login.ascx" %>
<%@ Register TagPrefix="dnn" TagName="BREADCRUMB" Src="~/Admin/Skins/breadcrumb.ascx" %>
<%@ Register TagPrefix="dnn" TagName="ARTMENU" Src="~/DesktopModules/ArtMenuSO/ArtMenuSO.ascx" %>
<%@ Register TagPrefix="dnn" TagName="STYLES" Src="~/Admin/Skins/Styles.ascx" %>
<%@ Register TagPrefix="dnn" TagName="COPYRIGHT" Src="~/admin/Skins/copyright.ascx" %>
<%@ Register TagPrefix="dnn" TagName="TERMS" Src="~/admin/Skins/terms.ascx" %>
<%@ Register TagPrefix="dnn" TagName="PRIVACY" Src="~/admin/Skins/privacy.ascx" %>
<%@ Register TagPrefix="dnn" TagName="TEXT" Src="~/admin/Skins/Text.ascx" %>

So could I put the conditional under that?
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


27 Jan 2010 1:14 PM  
No, you need to put the conditional code in the part of the skin where the LOGIN skin object is actually used.

Joe Craig
DNN Creative Support
Subscribe to the website
hanleyhansen
Nuker
Nuker
Posts:17

27 Jan 2010 1:17 PM  
Ok, I see. Well the LOGIN skin object is called in this line:

dnn:ARTMENU ID="ArtMenu1" ShowHiddenTabs="False" ShowAdminTabs="True" ShowDeletedTabs="False" ShowLoginTab="True" ShowUserTab="True" runat="server"

So I can place it under there? Or am I misunderstanding?
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


27 Jan 2010 1:24 PM  
Wrap that line with the conditional code.

Joe Craig
DNN Creative Support
Subscribe to the website
hanleyhansen
Nuker
Nuker
Posts:17

27 Jan 2010 1:26 PM  
Got it, thank you very much!
You are not authorized to post a reply.
Page 2 of 2 << < 12

Forums > Users Lounge > Membership > hiding login link



ActiveForums 3.7

Latest Forum Posts

More AWeber / Dynamic Forms by ollep
Good Sunday Morning to you all.SE Queensland is very calm, a bit overcast, but a very nice Sunday mo...
Query On Dynamic Form Module by prithviraj
The source element with id dnn$ctr407$DynamicForms$imgMove_48b21a63-ca5a-425d-90ca-599a6e7d51e6 does...
RE: Folder permissions by saintX
Thanks for your answer Rashid! May you please kindly let me know - Which folders - AND for whom...
DNN with Javascript Disabled by aptrivedi
Hi All,I have found my self in bit of trouble.As per my application requriement, i need to handle th...
RE: Change Registration Redirect? by ollep
Well, that sounds good Lee.But I just spent $150.00 and a few days learning the Dynamic Forms  - bec...
RE: Folder permissions by Kazi
Hello FW, The easiest way to set permissions is your control panel, Log in to your CP, click on y...
Folder permissions by saintX
Hello, Can I set the folder permissions on the remote server myself using DW or WVD? If possi...
RE: How to do links? by Guy..L
It's really hard to tell quite how awesome DNN Nav v2 is given the documentation and search results ...
Regarding Editor by prithviraj
Pls let me know whar folders we need to upload when we are changing editors. Suppose i have cute edi...
RE: Change Registration Redirect? by leesykes
It would be best to use Dynamic Registration to avoid 2 registrations.With Dynamic Registration you ...
Indexing DNN pages by Google by Jake Vizner
I have two different DNN web sites. Using Google Webmaster Tools I can see the Google indexed 12 out...
Query Regarding RAD EDitor by prithviraj
Hi, I'm using R.A.D editor in my site. At the time of adding images through the editor I'm unabl...
RE: while installing bulk emailer module in my website by jncraig
Yes, this definitely is a file permissions issue. The default ASP.NET worker task needs to have ful...
RE: Background Music by jncraig
That will work.
RE: Auto create pages and content by dhassall
Hi Joe DNN Out of the box version 4.9 Login as Host with Firefox to create and IE8 to monitor, CTR...
RE: while installing bulk emailer module in my website by dub
Agiline, We have seen this problem before. It is caused by the Security on IIS. Please have a loo...
RE: Change Registration Redirect? by ollep
Probably still want to do it with Dynamic Forms now.My reason for changing (except from getting Aweb...
RE: Change Registration Redirect? by ollep
YES!http://www.dnncreative.com/Subscribe/tabid/81/Default.aspx
RE: Change Registration Redirect? by ollep
Yes I noticed that we where talking about 2 different Modules as soon as I dug into the tutorials.Ab...
RE: Change Registration Redirect? by leesykes
If you are check out the links that I have placed in there:http://www.dnncreative.com/Subscribe/tabi...
DNN Creative Subscribe
RSS Feeds