My Account|My Cart   Login | Register Normal layoutMedium LayoutLarge Layout  
 

DotNetNuke Skinning Forums

Subject: SignIn SkinObject
Prev Next
You are not authorized to post a reply.

Author Messages
Nina Meiers
Posts:193


12 Nov 2006 1:18 AM  
Questions, comments, snippets, examples & information regarding the the SignIn SkinObject in this thread.

There are more than 9 ways to skin a cat...
Tony Harper
Posts:12


16 Jan 2007 3:27 PM  
Is there any way to change the text that is displayed for the [LOGIN] token or possibly even substitute it with graphical button?
Chuck Rizzio
Posts:29


18 Jan 2007 2:38 PM  

Tony,

Changing the text is the easiest as far as I know.  Jump down to the HOW-TO: section to dive right in.  The text displayed for most of the core features is defined as entries in a resource file (*.resx).  There is even a nice way to edit them right from within DNN.  When you edit them using the built in editor it makes the change specific to the Portal that you are logged in under so If you are in a multi-portal environment you can change one without affecting others.  This is a really nice touch.

When it comes to the core, finding where a particular entry is stores can be challenging though.  Most of them are stored somewhere under the "Admin" folder.  It just so happens that I needed to change the text for both the "Login" and the "Register" link.  Below

HOW-TO:

  • Login as a user with administrator privileges.
  • From the "Admin" menu select "Languages"
  • In the Language module click the "Language Editor" link in the bottom left.  This will open the Language Editor and load the Global Resource File.
  • In the TreeView in the left side of the display navigate to the following...

LocalResources / Admin / Security / App_LocalResources

  • Click in the Signin.ascx file. This will load all of the entries in the resource file Signin.ascx.resx.
  • Now, in the list on the right scroll down and find the entry with "Resource Name: cmdLogin.Text" 
  • This is the entry that contains the text displayed as the "Login" link.
  • Change it to whatever you desire.

The entry for the "Registration" is "cmdRegister.Text".

I hope this helps,

Chuck R.

 

Tony Harper
Posts:12


18 Jan 2007 4:21 PM  
Chuck,

That helped me out a lot. I have never looked around in that area of DNN. The path you provided changed the text of the button on the login page, but your direction inspired me to dig a little more and I found what I was looking for in the same area under:

LocalResources / Admin / Skins / App_LocalResources

I was able to alter the "Login.ascx" and "Logout.ascx" values to get what I wanted.

I love learning new things ... especially if I am not breaking them in the process! I am not sure about previous versions, but it looks like DNN 4.4 allows you to edit directly in FTB so an image button should not be too difficult either.

Thanks,
Tony
Chuck Rizzio
Posts:29


21 Jan 2007 3:53 AM  

Tony,

I'm glad the info was useful.  This type of exchange of information is one of things I like most about the DNN community.  As people find solutions to problems they are very willing to share their findings.  Having a resource like this (Skincovered) is invaluable as a central point for the community (thanks Nina, Armand & John!).

One more point on the resource files and the DNN Language Editor... one a project I'm working on I needed to add some custom "Profile Properties".  Naturally after adding my custom "Profile Properties" the first thing I wanted to do is add the resource file entries.  I discovered that the DNN Language Editor does not provide a way to add new entries -at least I couldn't find how.  Someone please correct me if I an wrong.

What you have to do is manually add your new entries using a text editor.  This requires file-level-access to your portal.  It's not a problem for me because the websites we work on we host.  Now, some importing things to know about how DNN uses the resource files...

Resource File NamesTypically, the file name of the resource file is the name of the user control that uses it.  For example, the user control "Profile.ascx" is the control used to edit Profile Properties.  The resource file associated with this user control is "Profile.ascx.resx".  Most of the time this makes it easy to know where to find the resource entries for a particular user control or module. 

Global Resource Files:  This resource file is "Global" meaning that all portals within the DNN install use the entries in this file. 

Portal-Specific Resource Files:  DNN also makes use of what I call "portal-specific" resource files.  When you are logged on to a given portal and you change an entry(ies) DNN creates a new resource file containing only the changed entries.  The filename is basically the same as the original with "Portal-x" injected into the name (x represents the Portal ID of the portal you are logged on to).  So, "Profile.ascx.resx" becomes "Profile.ascx.Portal-3.resx".  When you look at the APP_LocalResources directory you will see both files.

When load a resource file in the DNN Language Editor it first loads the global file ("Profile.ascx.resx") then loads the portal-specific file ("Profile.ascx.Portal-3.resx") if there is one, overwritting any of the global entries withe portal-specific ones.  This allows for localization of global entries at the portal level. 

Because of this, in my scenario above with my custom Profile Properties I did not want to add the entries into the global resource file ("Profile.ascx.resx") because these new entries were custom to one portal only.  Since it's typically an administrator that would be using the Language Editor ti wouldn't have caused a problem as far as the website users but I didn't want to clutter up the resource file for all portals.

So, what I did was manually create "Profile.ascx.Portal-3.resx" by copying "Profile.ascx.Portal-3.resx".  Then,using a text editor I removed all the standard entries and created entries for the Profile Proerties I created.  Take special care not to delete the header section that contains a bunch of "...xsd" entries.  Remove only the blocks.  Also the last line in the file must contain . 

Also of note, when dealing with resource files for most modules you will notice the entries are usually the field name or control name (i.e. PageSettings.Text or cmdEdit.Text).  With Profile Properties, the entries are the field name with a prefix of "ProfileProperties_" (i.e. ProfileProperties_FirstName.Text). 

Enjoy,

Chuck

Rick Shellenberger
Posts:1

19 Apr 2007 8:27 AM  

We are trying to edit the "register" page to read "red arrow" instead of "asterisk." We have followed your instructions for uising the language editor. We have edited the text in the language editor and clicked update but the revised text does not get to the page on our web portal.

Any suggestions would be most appreciated...

Rick

Tony Harper
Posts:12


19 Apr 2007 10:23 AM  

Rick,

If you are using DNN 4.4 - 4.5, I have become pretty consistent about clearing the cache after every change I make that doesn't give me the results I expect.  If you haven't already, you might give it a try.

Tony

Dush Abe
Posts:1

01 Mar 2009 10:08 PM  
How do I change the colour of the following 3 items in DNN 4.9.2:
Search, web and site text (all in the search box)
You are not authorized to post a reply.



ActiveForums 3.7
Code to put in Code Snippets in Forum Maximize
 
 
   
 

Powered by XD Design Inc. | © 1999 -2009 XDGlobal Inc | Terms Of Use | Privacy StatementSnapsis