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...Administration ...Administration ...Add a Logout option to the Admin menuAdd a Logout option to the Admin menu
Previous
 
Next
New Post
2/12/2007 3:35 PM
 
On a couple of projects clients have used DNN as a CMS, and as such didn't have any users logging in or registering. So the login option was removed, easiler done, and the administrator would login using the /ctl/login/default.aspx url trick.

The only problem was since the login option was removed from the skin the option to logout was also missing. So I've created a simple tutorial that shows how to add a Logout option to the admin menu.

Check out the tutorial here http://www.bitethebullet.co.uk/AddingaLogoutOptionToTheAdminMenuinDNN/tabid/80/Default.aspx

Regards

Mark

Visit www.bitethebullet.co.uk for more free DNN modules and tutorials
 
New Post
2/12/2007 6:43 PM
 
what a rubbish. set the registration mode to none to remove the "register" link. Afterwards you can place the login link whereever you want - it will be useless for any visitors. Adding a logout link to the admin menu will provide this option only to members of the Administrators role - and when using DNN as CMS, it is not recommended to grant all users involved in the workflow admin permissions.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
2/13/2007 7:24 AM
 

So you don't like it then? ;)

Oh well, fair comment. But it does work well for the type of sites we have created where there are only two users, administrator (the web site owner) and host (us).
These sites are really simple website where the owner is responsible for all the content, approval and publishing so they would have access the administration menu.

Anyway, that's how you could add the option if you wanted


Visit www.bitethebullet.co.uk for more free DNN modules and tutorials
 
New Post
2/13/2007 10:58 AM
 

'Rubbish' seems a little harsh. I, too, have sites where I do not want a login button/link to appear on the site. I figure why show the casual visitor that logging on is even an option. If my site is say, www.mysitename.com, I set it up so that to get to the login screen, the user goes to edit.mysitename.com. This is how I do it:

  • In the SiteUrls.config, I have this line:

<

<

<

</

  • I add edit.mysitename.com as a portal alias and reister the subdomain with my hosting provider
  • I place this tag on top of my skin.ascx page:

<%

  • And this tag at the bottom of my skin.ascx page:

<

  • Finally, this code shows the logout link if the user is logged in, but does not show the login link if the user is not logged in:

 

Me.dnnLOGIN.Visible = TrueElseMe.dnnLOGIN.Visible = FalseEnd If

 

 

 

This works for me. Visitors do not see an option to login, editors can easily remember the edit.mysitename.com URL to get to the login screen, and the logout link appears after the user logs in.

If Page.User.Identity.IsAuthenticated = True Then
dnn:LOGIN runat="server" id="dnnLOGIN" CssClass="skinuser" />
@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>
RewriterRule>LookFor>http\:\/\/edit\.(.*)</LookFor>SendTo>http://www.$1?ctl=Login</SendTo>RewriterRule>
 
New Post
2/13/2007 11:38 AM
 

WOW. That turned ugly (apparently you should not copy and paste code from VS!). Trying again. I have sites where I do not want a login button/link to appear on the site. I figure why show the casual visitor that logging on is even an option. If my site is say, www.mysitename.com, I set it up so that to get to the login screen, the user goes to edit.mysitename.com. This is how I do it:

In the SiteUrls.config, I have this line:

<RewriterRule>
 <LookFor>http\:\/\/edit\.(.*)</LookFor>
 <SendTo>http://www.$1?ctl=Login</SendTo>
</RewriterRule>

I add edit.mysitename.com as a portal alias and register the subdomain with my hosting provider.
I place this tag on top of my skin.ascx page:

<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>

And this tag at the bottom of my skin.ascx page:
<dnn:LOGIN runat="server" id="dnnLOGIN" CssClass="skinuser" />

Finally, this code shows the logout link if the user is logged in, but does not show the login link if the user is not logged in:
 
If Page.User.Identity.IsAuthenticated = True Then
 Me.dnnLOGIN.Visible = True
Else
 Me.dnnLOGIN.Visible = False
End If

This works for me. Visitors do not see an option to login, editors can easily remember the edit.mysitename.com URL to get to the login screen, and the logout link appears after the user logs in.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Add a Logout option to the Admin menuAdd a Logout option to the Admin menu


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