Déclic Vidéo FX
Nuke Pro Posts:93
|
01/02/2010 10:53 AM |
|
I suppressed in user-a.ascx.vb the line: Response.Redirect(RegisterURL(HttpUtility.UrlEncode(NavigateURL()), Null.NullString), True) I then add an error: (145): error BC30451: Name 'ProfileURL' is not declared. Then I removed the line for "profileURL", and it works, but only for registered user... I can not stay like that, should I revert and remove the file or should I keep it ? DV FX |
|
Déclic Vidéo FX - http://declic-video-fx.com |
|
|
Déclic Vidéo FX
Nuke Pro Posts:93
|
01/02/2010 10:54 AM |
|
Posted By Joseph Craig on 02 Jan 2010 10:51 AM Whoops. I did this for DotNetNuke 5.x. I think that this might not work with Version 4.x. I'll have to make a version for 4.x. Wow, would be wonderful !!!! Give me your address and I will send you some swiss chocolate !!! ;-) DV FX PS: If you do a new version, should I re-install everything or just replace by FTP the .vb file ???
|
|
Déclic Vidéo FX - http://declic-video-fx.com |
|
|
Joseph Craig DNN MVP Posts:11667
|
01/02/2010 11:05 AM |
|
OK, I got a copy of Version 4.x and made the modifications to that one. Use the user-a.ascx.vb file that is attached and use it to replace the one in the zip file I uploaded earlier. Keep the ascx and dnn files. Hopefully this will work. I haven't tested it because I don't have a running 4.9.x system.
Let me know if there are any errors and I'll try to fix them.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Joseph Craig DNN MVP Posts:11667
|
01/02/2010 11:07 AM |
|
Replacing the file with ftp should work!
Don't worry about the chocolate ... but if my daughter moves to Geneva this spring ...
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Déclic Vidéo FX
Nuke Pro Posts:93
|
01/02/2010 11:33 AM |
|
Hello Joe, Are you sure that you uploaded the correct zip ? I still have the same error... I try from the beginning and I will let you know !! But I insist for the swiss chocolate. If our daughter come here, for sure I can give it to her as well !!! DV FX |
|
Déclic Vidéo FX - http://declic-video-fx.com |
|
|
Joseph Craig DNN MVP Posts:11667
|
|
Déclic Vidéo FX
Nuke Pro Posts:93
|
01/02/2010 2:52 PM |
|
IT WORKS PERFECTLLY !!!!!!!!! Thanks so much Joe !!! Does it affect my web performance ?? How could I thank you please, I would like to send chocolates !! DV FX |
|
Déclic Vidéo FX - http://declic-video-fx.com |
|
|
Joseph Craig DNN MVP Posts:11667
|
01/02/2010 3:11 PM |
|
Performance should be almost identical to the original skin object. The only substantial difference is an "If" statement.
As for thanks, recommend DNNCreative to all of your friends. I had fun doing this, and I may have learned some things. That's a nice reward for me.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Déclic Vidéo FX
Nuke Pro Posts:93
|
|
hanleyhansen
Nuker Posts:17
|
|
hanleyhansen
Nuker Posts:17
|
01/26/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=loginThere 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 MVP Posts:11667
|
01/26/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, Patapsco Research Group Complete DNN Support |
|
|
hanleyhansen
Nuker Posts:17
|
01/27/2010 6:04 AM |
|
Thank you! I will definitely take a look at that. |
|
|
|
|
hanleyhansen
Nuker Posts:17
|
01/27/2010 12:02 PM |
|
What part of the ascx file does the conditional go in? |
|
|
|
|
hanleyhansen
Nuker Posts:17
|
01/27/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 MVP Posts:11667
|
01/27/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, Patapsco Research Group Complete DNN Support |
|
|
hanleyhansen
Nuker Posts:17
|
01/27/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 MVP Posts:11667
|
01/27/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, Patapsco Research Group Complete DNN Support |
|
|
hanleyhansen
Nuker Posts:17
|
01/27/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 MVP Posts:11667
|
01/27/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, Patapsco Research Group Complete DNN Support |
|
|