Tuesday, April 05, 2005
by Nik Kalyani
Tuesday, April 05, 2005 12:31:46 AM (Pacific Standard Time, UTC-08:00)
Haven’t blogged in a few days because I have been busy preparing the latest version of one of Speerio’s most popular products File Manager Pro for release. The DotNetNuke module has now been released and soon we’ll release the ASP.Net version of the product. Can’t wait…
 Monday, March 21, 2005
by Nik Kalyani
Monday, March 21, 2005 8:38:07 PM (Pacific Standard Time, UTC-08:00)

The April 2005 issue of Wired Magazine has interesting subject matter on the “infoporn” page. “The Outsourcing Myth”  provides information on the state of outsourcing. As people who go by facts probably already know, U.S. companies import more jobs than they export — $18 billion worth in 2003 ($43.5B outsourced; $61.4B insourced). Most of the jobs insourced in the U.S. are corporate legal and accounting jobs according to the article.

Some other numbers;

           Outsourced   Insourced
           ==========   =========
U.S.           $43.5B      $61.4B
U.K.           $19.7B      $41.2B
Germany        $41.4B      $26.5B
France         $23.2B      $23.1B
Netherlands    $21.0B      $20.1B
India          $11.8B      $18.6B
Japan          $24.7B      $17.4B
Austria        $16.6B      $13.8B
Singapore       $9.2B      $13.0B
China           $8.0B      $10.4B

#    Comments [0] - Trackback    

 Sunday, March 20, 2005
by Nik Kalyani
Sunday, March 20, 2005 12:49:43 PM (Pacific Standard Time, UTC-08:00)

The DotNetNuke Control Panel is generally positioned at the top of a page (although it can be positioned anywhere). It is displayed if a user has administrative rights to a page. After the initial layout of a page, the Control Panel is not often needed, but it continues to take up valuable screen real-estate. I saw a recent discussion on this issue in the ASP.net forums, and decided that it presents an interesting U.I. challenge. (Turns out it really isn’t much of a challenge.)

At Bryan Andrews’ suggestion, I had actually developed a script modeled after the Windows Terminal Services Client collapsible admin bar some months back. The bar is visible at the top, but rolls up after a few seconds. I posted the script to the Core Team forum, but unfortunately, there was no interest.

Anyway, getting back to the Control Panel solution. I like the Terminal Services client concept and modeled my solution after it. One of my design goals was to keep things really simple and not require any external images or the like.

My solution works as follows:

1) My script block needs to be inserted into any DNN skin, replacing the existing element with id=”ControlPanel”

2) It renders the Control Panel at the top of the page (coordinates 0,0). The Control Panel is initially hidden and is represented by a 5px tall red bar.

3) Move your mouse over the bar and the Control Panel is displayed over page content. This is an important difference from the standard Control Panel as the page content remains in place and does not scroll down.

4) When the mouse cursors is moved over the red bar one more time, the Control Panel smoothly rolls up.

Here is the code. Just paste it into a DNN skin ascx file, taking care to replace the element with id=”ControlPanel” that should already be present in the file.

<!-- Begin collapsible Control panel code -->

<script language="Javascript">

var rollUp = false;
function collapseElement(objId)
{
   o = document.getElementById(objId);
   h = parseInt(o.style.height);
   if (h > 6)
       {
           h--;
           o.style.height= h + "px";
           window.setTimeout("collapseElement('" + objId + "')",5);
       }
   else
       rollUp = false;
}


function displayElement(height)
{
    obj = document.getElementById("<%= ControlPanel.ClientID %>");

    if (rollUp)
       collapseElement("<%= ControlPanel.ClientID %>");
    else
    {
       rollUp = true;   
         obj.style.height = height;
    }
}
</script>

<style>

.ControlPanelHeader
{
        height:5px;
        width:100%;
        background-color:#cc0000;
        padding-top:5px;
        overflow:hidden
}

.RollUpControlPanel
{
         position:absolute;
        top:0px;
        left:0px;
        z-Index:1000;
        height:5px;
        width:100%;

        overflow: hidden;
}

</style>

<div class="RollUpControlPanel" id="ControlPanel" runat="server">
<div class="ControlPanelHeader" onmouseover="displayElement('110px')">&nbsp;</div>
</div>

<!-- End collapsible control panel code -->

 

 Sunday, March 13, 2005
by Nik Kalyani
Sunday, March 13, 2005 1:23:21 PM (Pacific Standard Time, UTC-08:00)

nokiko asks:

I am working on some new containers and dnn enhancements. I want to know in my container which moduleid is loaded so lets say i have an ascx container and in there i have the following:

<div id=''mod_<% functiontogetmoduleidhere'">rest of container ...</div>

Is there a function or another way that in an ascx container I would know which moduleid is loaded in there.

So that way lets say i have 2 modules one one page and i want the ascx container to render

<div id="mod_36">content here</div>
<div id="mod_37">content here</div>

i would need this to imge replace techniques on my h3 tags for instance

#mod_36 h3 { background:url(announcements.gif) }
#mod_37 h3 { background:url(events.gif)}

Nik’s answer:

That’s an excellent question nokiko. In DotNetNuke 3.x, the Container class has a public, static method called GetPortalModuleBase(). This method requires one parameter — a usercontrol that is present in the container. With this knowledge, it is easy to figure out a solution. For example, most of the default DNN containers have a title defined using: <dnn:TITLE runat="server" id="dnnTITLE" />. In any of these containers, you can add the following line to display the ModuleId of the module present in the container:

<%= DotNetNuke.UI.Containers.Container.GetPortalModuleBase(dnnTitle).ModuleId.ToString() %>

You can also use the same technique to display any other Portal, Tab, Module or User property to customize the appearance of containers dynamically:

<%= DotNetNuke.UI.Containers.Container.GetPortalModuleBase(dnnTitle).PortalSettings.PortalName %>
<%= DotNetNuke.UI.Containers.Container.GetPortalModuleBase(dnnTitle).PortalSettings.ActiveTab.TabName %>
<%= DotNetNuke.UI.Containers.Container.GetPortalModuleBase(dnnTitle).ModuleConfiguration.ModuleTitle %>
<%= DotNetNuke.UI.Containers.Container.GetPortalModuleBase(dnnTitle).UserInfo.FirstName %>

If you don’t have a need for the DNN Title control in your container, that’s OK. You can add it anyway with an attribute of “Visible=false”. It is possible to achieve this result without using any skin control, however it requires a little more code and is not worth the effort in most situations.

 

 Thursday, March 10, 2005
by Nik Kalyani
Thursday, March 10, 2005 11:26:34 AM (Pacific Standard Time, UTC-08:00)

I have been a user of Groove products since its early beta. Mostly because of my Lotus Notes roots and my firm belief that Ray Ozzie is one of the few true visionaries in the software industry. It was a pleasant surprise when an MSN SMS a few minutes ago notified me that Microsoft is going to acquire Groove Networks (story).

This is fantastic news. Groove has always been strong on collaboration, and now I expect there will be better integration with .Net. I love it when my favorite technologies converge.

#    Comments [0] - Trackback    

RSS feed
Search and Links
Bling

View Nik Kalyani's profile on LinkedIn

Contact me: nik*kalyani.com (replace "*")

TechBubble
www.flickr.com
This is a Flickr badge showing public photos from techbubble. Make your own badge here.
Statistics
Total Posts: 214
This Year: 32
This Month: 0
This Week: 0
Comments: 238
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Nik Kalyani
Sign In
All Content © 2008, Nik Kalyani