Developer Ramblings
Tips and Traps in Web Development

XM Radio Gadget for Windows Vista Sidebar

December 21, 2008 09:26 by viperguynaz

*** NEW VERSION ***

I've just finished modifying my XM Radio Gadget for Windows Vista Sidebar.  Works with the new XM/SIRIUS player. Use your XM Radio Online account to listen right from your sidebar.

You can download it here.  *** NEW VERSION 12/27/2008 *** xmradio.zip (35.21 kb)

Rename the extension to gadget - then double click to install it.  Go to Settings, enter your XM login info - USE YOUR FULL EMAIL ADDRESS FOR YOUR LOGIN.  Once logged in, click "channel" to get the channel flyout and select a channel.





Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , , ,
Categories:
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

How to set DOCTYPE on DotNetNuke 4.4.x or greater

January 24, 2008 14:15 by viperguynaz

Recently, I was experimenting with LightWindow in a DotNetNuke portal.  The scripts work great in Firefox, but were giving me fits in IE7.  I checked out the LightWindo forums and discovered the fix was setting the DOCTYPE to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

So, from there my quandry was how to set the DOCTYPE in a DNN Portal.  Well, In 4.4 and above, you are able to define the xhtml mode as a part of the skin by adding an xml file that that is named [SKINNAME].doctype.xml. Within this xml file you should declare one node SkinDocType. Then, within a CDATA tag, you add the doctype declaration to be used for this skin.  For example, if your page uses Portal.ascx as the skin, you would create Portal.doctype.xml in the same directory.  Be careful though, changing the DOCTYPE might have nasty side effects on some skins.  The xml file should have the following content:

<SkinDocType><![CDATA[<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]></SkinDocType>
 
 

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Multiple Edit Controls in DotNetNuke (DNN)

January 14, 2008 22:26 by viperguynaz

I've developed several custom DNN modules, but none required more than the single view, edit and settings controls that are created with the starter kit.  Well for my current project, I needed two edit controls.  Creating the controls is easy if you follow any of the instructions you can find by googling "create custom dnn module".   

 What I wanted though was similar to the Events Project module that had multiple edit controls on the dropdown and on the links (bottom left corner of most module containers).  Copying the Starter Kit example proved easy to add a second edit control, but it only showed on the Module Menu DropDown, not in the list of action links at the bottom of the module.

Here's the code I started with:

public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions
        {
            get
            {
                //create a new action to add an item, this will be added to the controls
                //dropdown menu
                ModuleActionCollection actions = new ModuleActionCollection();
                actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.AddContent, LocalResourceFile),
                    ModuleActionType.AddContent, "", "", EditUrl("Edit"), false, DotNetNuke.Security.SecurityAccessLevel.Edit,
                     true, false);
                actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.EditContent, LocalResourceFile),
                    ModuleActionType.EditContent, "", "", EditUrl("EditSlides"), false, DotNetNuke.Security.SecurityAccessLevel.Edit,
                     true, false);
                return actions;
            }
        }

This code did not add the second action item "EditSlides" to the Action link list at the bottom of the page.  After lotsss of trial and error and looking at other modules (plus reviewing the docs at http://www.dotnetnuke.com/), I finally reached the answer, putting the correct ModuleActionType - AddContent in the third parameter of AddAction.  When I switched the code to:

        public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions
        {
            get
            {
                //create a new action to add an item, this will be added to the controls
                //dropdown menu
                ModuleActionCollection actions = new ModuleActionCollection();
                actions.Add(GetNextActionID(), Localization.GetString("EditAlbums", LocalResourceFile),
                    ModuleActionType.AddContent, "", "", EditUrl("Edit"), false, DotNetNuke.Security.SecurityAccessLevel.Edit,
                     true, false);
                actions.Add(GetNextActionID(), Localization.GetString("EditSlides", LocalResourceFile),
                    ModuleActionType.AddContent, "", "", EditUrl("EditSlides"), false, DotNetNuke.Security.SecurityAccessLevel.Edit,
                     true, false);
                return actions;
            }
        }

Then I got both the action items on the link list at the bottom of the module.  Also note that the first parameter of Localization.GetString was change to a string that coorelates to a StringName.Text entry in the resource file.  For example, EditSlides.Text = "Edit Slides" in the resource file.

And the results...two edit controls in the link list at the bottom of the module control.

 

Cheers...Don


Currently rated 4.3 by 3 people

  • Currently 4.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Scrolling Text Areas in a Web Page

December 18, 2007 16:08 by viperguynaz

Today, my designer handed me a fixed height design for a web page and was adamant that a text area have a vertical scroll bar.  I hate scroll embedded scroll bars but I sought out a solution and found a rather elegant one.

.containerContentScroll
{
 overflow: auto;
 height: 500px;
 scrollbar-base-color: #963;
}

 

It is really that easy - set a height for your container (textarea, div, etc...) and set the overflow to auto.  You can also color the scrollbars (not in FireFox).

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Welcome

December 6, 2007 22:52 by viperguynaz
just getting setup! thanks for stopping by!  So, to answer the first FAQ...why the title?  Well, for anyone familiar with C/C++ you should understand easily...it's a geek joke.  But in any case, I enjoy wine.  Anyone have a C#, VB, Perl or ROR translation?  Please add your comment.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed