CornerPixel Blog RSS 2.0

# Thursday, August 06, 2009

You may not be aware, but I started a semi personal semi professional blog and website based on the handle or username I use in most places on the web.  MikePixel is how many of my professional contacts and friends know me by.  I decided to do the blog part of the site in BlogEngine.NET.  I use DasBlog here and have enjoyed it, but I wanted to try something different.

I have enjoyed BlogEngine.NET a bunch, so I will be posting some small helps and hints on how to skin BE. 

Today I will go over the date box I have on the right hand side of the title.  The first thing is to open your PostView.ascx file in the themes directory under the theme you are using for your new skin.

My markup is as follows, with the markup used for the Date Box in red.

<%@ Control Language="C#" AutoEventWireup="true" EnableViewState="false" Inherits="BlogEngine.Core.Web.Controls.PostViewBase" %>

<div class="post xfolkentry" id="post<%=Index %>">
  <span class="pubDate">
      <span class="month"><%=Post.DateCreated.ToString("MMM") %></span>
      <span class="day"><%=Post.DateCreated.ToString("dd") %></span>
      <span class="year"><%=Post.DateCreated.ToString("yyyy") %></span>
  </span>

  <h1><a href="<%=Post.RelativeLink %>" class="taggedlink"><%=Server.HtmlEncode(Post.Title) %></a></h1>
  <span class="author">by <a href="<%=VirtualPathUtility.ToAbsolute("~/") + "author/" + Server.UrlEncode(Post.Author) %>.aspx"><%=Post.AuthorProfile != null ? Post.AuthorProfile.DisplayName : Post.Author %></a></span>
  <div class="text"><asp:PlaceHolder ID="BodyContent" runat="server" /></div>
  <div class="bottom">
    <%=Rating %>
    <p class="tags">Tags: <%=TagLinks(", ") %></p>
    <p class="categories"><%=CategoryLinks(" | ") %></p>
  </div>

  <div class="footer">   
    <div class="bookmarks">
      <a rel="nofollow" title="Index <%=Index %>" target="_blank" href="http://www.dotnetkicks.com/submit?url=<%=Server.UrlEncode(Post.AbsoluteLink.ToString()) %>&amp;title=<%=Server.UrlEncode(Post.Title) %>">Submit to DotNetKicks</a> |
      <a rel="nofollow" href="mailto:?subject=<%=Server.UrlEncode(Post.Title) %>&amp;body=Thought you might like this: <%=Post.AbsoluteLink.ToString() %>">E-mail</a>
    </div>
    <%=AdminLinks %>
    <a rel="bookmark" href="<%=Post.PermaLink %>" title="<%=Server.HtmlEncode(Post.Title) %>">Permalink</a> |
    <a rel="nofollow" href="<%=Post.RelativeLink %>#comment"><%=Resources.labels.comments %> (<%=Post.ApprovedComments.Count %>)</a>
  </div>
</div>

blogEngine-dateboxAs you notice I have the Post.DateCreated seperated into three different classes.  One for each line of the date box. MMM displays the three letter abbreviation for the month.  dd displays the two digit number day, and yyyy displays the 4 digit year.

Next you will create the CSS that will make the box and float it to the right of the title.

.post .pubDate
{
    background:#BCAFA3 none repeat scroll 0 0;
    border:1px solid #ccc;
    color:#FFFFFF;
    display:block;
    float:right;
    line-height:1;
    margin:0 0 10px 10px;
    padding:5px;
    text-align:center;
    width:40px;
}

.post .pubDate .month,
.post .pubDate .year
{
    display:block;
}

.post .pubDate .day
{
    display:block;
    font-size:20px;
}

.post .pubDate .year
{
    display:block;
}

As a side note, I have text throughout the blog set at 12px. 

body
{
    font-size: 12px;
{

This will make the top and bottom line 12px, and the .post .pubDate .day attribute you see in the CSS code above will set the two digit day to 20px.

You should also set the .post h1 (or what ever header you are using for your blog titles) to be a specific length so that it doesn’t run into the date box.  I have mine set as follows.

.post h1
{
    border-color:#999999;
    border-style:solid;
    border-width:0 0 1px;
    width:450px;
    margin: 5px 0 5px;
    padding: 0px 0px 2px;
}
.text
{
    margin: 15px 0px 0px;
}

You will also notice that I give the blog content a top margin of 15px so that you don’t get text wrap around your date box.  The text of your post will just run under the date box.  The class used for the div with your post’s textual content is “Text”

Conclusion

That is about it.  Have fun skinning your BlogEngine.NET.  They have done a good job of making things easy as far as skinning goes, so make your blog look however you want.  Let’s those creative juices flow!

Thursday, August 06, 2009 2:14:39 AM (Pacific Standard Time, UTC-08:00)

#       Comments [1] - Trackback

BlogEngine.NET | Skinning

# Tuesday, April 28, 2009

Today I was working on implementing search on a customers website I am doing in the DotNetNuke CMS.  At first I thought this would be automatic and mostly set up.  I instead found that I needed to adjust some thing, so I have put together a small blog entry to help other out who may be having similar issue setting up their blogs.

I have below the three biggest keys to search success on your DotNetNuke site and in your DNN skins.

First, Skinning to include Search

The first thing to do is to include the Register TagPrefix at the top of your .ascx skin file as shown below.

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

Second, Add the control to your skin.

Figure out where you want the search bar to be and place the following code inside your html markup.

<dnn:SEARCH runat="server" id="dnnSEARCH"  CssClass="dnn_search" UseDropDownList="true" Submit="<img src=&quot;images/search.png&quot; border=&quot;0&quot; alt=&quot;Search&quot; /&gt;" />

Attributes explained

  • CssClass  (is used in the CSS style sheet to style your search box)
  • UseDropDownList  (used if you want a dropdown web/site pick menu within the search box)
    • If you don’t want a drop down menu just don’t include this attribute
  • Submit  (is used to replace the words submit with an image)
  • ShowWeb (false or true)(used to hide web from search options)(default true)
  • ShowSite (false or true)(used to hide or show site from search options)(default true)

Third, Make sure the Search Results module is on the Search Results page.

This seems like a no brainer and it is usually set up for you.  If you are not getting any search results, go to your admin menu and select pages.  Once on your pages list go to the Search Results page and make sure to add the Search Result module just like you would any module to the content area you want the search results to display in.

That is about it.  It is not overly hard to add search to your skins in DotNetNuke.

Tuesday, April 28, 2009 9:57:38 PM (Pacific Standard Time, UTC-08:00)

#       Comments [1] - Trackback

CMS | DotNetNuke | Skinning

# Wednesday, April 15, 2009

A week ago I got a little tired of dealing with the Core menus offered with DotNetNuke.  I decided I needed something better.  I am a web standards guy and I really wanted something that would spit out unordered lists of my menus, so I could style them however I wanted with CSS.

I looked around and there were two possibilities that I could find and that were recommended.  HouseMenu by House of Nuke and CSS NavMenu by Snapsis.

I checked out House of Nuke first mainly because I had heard of it in the DNN community more than Snapsis.   After cruising their website for a few minutes, and I realized that if I was using DNN 5.01, I might have an issue with HouseMenu.  The reason I say this is that there is a forum post that has been unanswered from three months ago in regards to whether or not anyone has gotten HouseMenu to work with DNN 5.

I am not saying anything bad about House of Nuke.  They have done some great things from what I have heard.  It just looks like they are a bit behind in updates.

My next step was to check out Snapsis.  I cruised their site and they had a lot of examples and demos.  This was great to run against Firebug so I see what was really happening behind the scenes.  This provided me with the ability to see what markup was going to be used and let me figure out what my limitations might be with CSS styling. (if any)

After about an hour of research I decided to buy.

Today I was very glad I bought the CSS NavMenu.  It is very simple to use and allows for some great options.  I can even choose (via different properties to the Snapsis:NavMenu control in the skin) what exact parts I want to display on my menu.   This was great for the menu I was doing today. 

My customer wanted me to create a vertical list menu that only displayed the children of a certain top level menu item. (Services)  By adding the IncludeTabs property and then the ShowType=”ChildrenOnly” property I could do exactly that.

<Snapsis:NavMenu id="SellNav" Level="1-1" CacheTabs="False"
                            NavType="Tabs"
                            IncludeTabs="Services" ShowType="ChildrenOnly" runat="server" />

Then all I had to do was style the list and viola, it was done.

So all in all I have been very impressed with Snapsis and their menus.  Some day I will do some tutorials on this site for those who want to do some more complicated menus.

Wednesday, April 15, 2009 7:05:29 AM (Pacific Standard Time, UTC-08:00)

#       Comments [2] - Trackback

CMS | DotNetNuke | Skinning

# Saturday, February 28, 2009

This weekend I am on cloud 9.  On Friday I was asked if I wanted to do a "Guest Blog" at mindtouch.com.  I was very honored and happy to do it.  I spent some time to formulate my opinions and late Friday my blog post was live.

Basically I went into the reasons I like Deki Wiki's skinning model.  Oh well, I don't have much to say here except for I am happy. 

~MikePixel (Michael Silva)

Saturday, February 28, 2009 8:38:46 PM (Pacific Standard Time, UTC-08:00)

#       Comments [2] - Trackback

Deki Wiki | Skinning

# Saturday, February 21, 2009

The Pixel-Season Deki Wiki skins are now available for download and to view at deki.cornerpixel.net.  These skins are available for the popular Deki Wiki web application made by MindTouch. 

MindTouch has an awesome product in their Deki Wiki.  I have enjoyed using it and am very happy to be able to provide the community with some extra skin options. 

pixel-fall-bgbitepixel-spring-bgbitepixel-summer-bgbitepixel-winter-bgbite

Once at CornerPixel’s Deki Wiki site, you can view the Pixel-Season skins which come in Spring, Summer, Fall and Winter.  You can view alternate backgrounds and templates there too.

Have fun with the skins, used them for free, and if you like them, or even hate them, please email me at admin@cornerpixel.net or comment to this blog post.

Thanks,
MikePixel  (Michael Silva)

Saturday, February 21, 2009 3:44:10 PM (Pacific Standard Time, UTC-08:00)

#       Comments [0] - Trackback

Deki Wiki | Skinning

# Saturday, February 14, 2009

I have been working here and there on some new Deki Wiki skins and they can be seen in action at deki.cornerpixel.net.  It took a little troubleshooting, but I figured out how to allow the user to view all my skins on one Deki Wiki site and allow the user to click through backgrounds. 

Viewing different skins on separate pages.

The first thing I did was to create an administrator page that included a link to the CSS sheet for the skin I wanted to display.  I created a new page under the administrators account with the following markup.

<h1>PixelFall</h1>
<link href="/skins/fiesta/Pixel-Plus/pixel-fall/style.css" type="text/css" rel="stylesheet" />

When I hit save and came back my source looked like this.

<h1>PixelFall</h1>
<p>&nbsp;</p><p> <link href="/skins/fiesta/Pixel-Plus/pixel-fall/style.css" type="text/css" rel="stylesheet" /></p>

This will cause a blank paragraph in the custom area I put this in, but I will show you how to take care of that in a minute.

Then I went to the page I wanted to use the different skin on.  I edited the page and place this extension on the page.

{{ wiki.template("User:Administrator/PixelFall", nil, "customarea1") }}

What this did was placed the administrator page I created earlier into Custom Area 1.  It isn’t valid to put link tags in the body of your html, but I used this just for the purpose of displaying my skins to users without having to create 4 different Deki Wiki sites.

Lastly there is the issue of the blank paragraph tags.  In order to get rid of those I just added this CSS to the stylesheet I linked to.

.custom1 p { display: none; }

That was how I managed to put multiple skins on my MindTouch Deki wiki website.  There might be a better way, and I am always up for criticism, but this is how I did it.

~MikePixel (Michael Silva)

Saturday, February 14, 2009 5:38:43 PM (Pacific Standard Time, UTC-08:00)

#       Comments [0] - Trackback

Deki Wiki | Skinning

# Wednesday, February 04, 2009

I have been working on skinning MindTouch Deki Wiki on and off for the last two weeks, maybe more, and I’ve gotten to a point where I have one of my skins packaged and ready for download.

I based the 4 skins I am working on, (to include Pixel-Spring) on the already popular Fiesta skin that comes with MindTouch Deki Wiki.  Some day in the near, maybe distant future I will create some skins that are a family of their own, but at the moment I just wanted to play around with the skinning process of Deki Wiki.  I’ve been quite happy with how easy it is to change the look and feel of Deki Wiki.

I also made it a point not to change any of the php files and only change the style.css sheet.  If I needed to over-ride anything in the _content.css sheet I included it at the bottom of the style.css sheet with an !important attribute attached.  The style.css sheet is commented so the user can see what any extra CSS is for.  In doing this, I hope it will allow the Pixel Skins to be used for a long time to come.  Basically as long as the fiesta skin is used.

Another thing I allowed for was multiple background choices.  I added seven background images and CSS for the user to place in the control panel’s custom CSS page.  The background images come with the skin package the user will find instructions on implementing them in the !NOTES.txt file.  I am planning on making several more alternate backgrounds in the near future, but first I need to get all four skins out and packaged.  (Before the end of the week)

templateBoxExample Last but not least, I included two extra templates in the !NOTES.txt file for the user to add to their Deki Wiki website for a little more pizzazz.  The image to the right is and example of the template box included in the Pixel-Spring skin.  It is simple but adds an extra area for the user to have extra “Stuff”.

There is a five step process to adding the templates, and the steps are easy to follow.  You can find the instructions in the !NOTES.txt file. 

I also have some instructional videos to help the users.  The quality of the videos could be better, but I think they will help.

 

I guess that’s all to blog for now.  I hope to have all four of the Pixel skins packaged as soon as possible, but for now feel free to download and use the Pixel-Spring Skin.  If you have any questions about the skin, or how to do something, feel free to email me.  admin@cornerpixel.net  I can’t promise I will respond same day, but I will try.

~MikePixel

Wednesday, February 04, 2009 12:17:35 PM (Pacific Standard Time, UTC-08:00)

#       Comments [2] - Trackback

CSS | Deki Wiki | Skinning

Archive

<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Email Subscription

Sign up to get the CornerPixel Blog delivered to your email.

About the Author

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

Sign In

Statistics

Total Posts: 51
This Year: 2
This Month: 0
This Week: 0
Comments: 26