File Download Counter Blogengine Extension

I like the idea of tracking how many times files have been downloaded from the site.  There is a sence of achievement as you see the count increase over a period of time.
Over the past couple of years I have come across a few good file download extensions written for blogengine.

Al Nyveldt – SimpleDownloadCounter

Ruslan Tur – DownloadCounter

Chris Blakenship - FileDownloadCounter

The extension by Chris has been installed on my site for the last year or two and it has worked very well.  I have recently come to a point where I need, or rather want, more features than the extension provides.  I had two options, to write my own from scratch, or enhance an already written extension to include the features I require.  I decided stick with the filedownloadcounter by Chris Blakenship as it was already integrated in to the site and it would be a good foundation to start from.

The features I decided to build into to extension are:

  • Record the date the file was last downloaded.
  • The ability to add a description for the file.
  • The ability to assign the file to a category e.g. theme, extension, application.
  • When a file is uploaded it goes into a sub folder off of the standard files folder.  The sub folder is constructed from the current year and month, e.g. yourdomain.com/files/2010/5. I wanted a way to record this location for each file.

To accomodate for these changes the xml file structure has chanded:

   1:  <?xml version="1.0" encoding="utf-8" standalone="yes"?>
   2:  <files>
   3:      <file name="archive.zip" 
   4:          path="2008/3/archive.zip" dateadded="03/03/2008 18:33:30" 
   5:          description="This extension displays a random quote." 
   6:          lastdownload="5/31/2010 5:37:28 PM" 
   7:          category="Blogengine Extensions" 
   8:          ipaddress="10.10.10.10">
   9:       207
  10:   </file>
  11:  </files>

Installation

  1. Copy the files from admin-pages folder to your site admin/pages folder.
  2. Copy the files from app_code-controls folder to your site app_code/controls folder.
  3. Copy the files from app_code-extensions folder to our site app_code/extensions folder.
  4. Copy the usercontrol from the user controls folder to your site User Controls folder.

The admin page allows you to edit the the description and the category, the latter not being case sensitive. The admin page also has a file upload facility with an option where you can choose whether or not to create an entry in the xml file.

Dislpaying the Download Count

There are two ways to display the download count.  This is the first way;

   1:  <div class="box">
   2:      <h1>File Downloads</h1>
   3:      <blog:DownloadedFileStats ID="DownloadedFileStats" runat="server"  />
   4:  </div>

The second way is to use the usercontrol in a blogengine page, standard aspx page or similar by usercontrol injection.
NOTE: do not include any spces.

[ usercontrol: ~/user controls/downloadedfilestats.ascx ]

the results are displayed in a table which has classes assigned to its elements for styling.

CountFileDownloadsTable - table level
CountFileDownloadsTableTH - Table header
CountFileDownloadsTableTR - Table row
CountFileDownloadsTableTD - Table data
CountFileDownloadsTableCategory - Category row

 as I have done here;

The Download File Counter can be downloaded from here DownloadedFileCounter.zip (10.07 kb)
and my download page.


site and blogengine upgrade

I haven't been very active with blogging for a while, as you can probably tell from the lack of posts.  I plan to be more active, so to give things a kick start the site has had a small facelift.  I was running the Leaves theme unmodified.  To spruce things up I have:

  • Added some colour, mainly to the haeder. 
  • The theme also now supports multiple widgetzones, one on the left sidebar and one on the right sidebar.
  • The site menu has been moved from the left sidebarto the header.

I have also upgraded the blogengine to version 1.6.1.0.  the upgrade went straight forward.  I am working on updating the randomquotes extension and a modified version of the filedownloadcounter extension. This brings me on to a request and would really appreciate you doing the following.

  • If you have downloaded and are using any of the themes or extensions from this site please let us know, we will be creating a directory of sites users.
  • Also, if you have any suggestions for extensions or enhancements to the current extensions please let us know, it will help us to help you.

Thats it for now.


BlogEngine 1.5 Release Candidate

A couple of weeks ago the BlogEngine team announced the release of version 1.5 RC (Release Candidate).  This motivated me to do a number of things

  1. Download and install run 1.5 RC locally to see what has changed.
  2. Document the changes I have made to this site, extension installations, page modifications etc.
  3. Install these modifications to 1.5 RC to check their compatability in preparation for a future upgrade to 1.5 when the final version is released.
  4. Finally the main reason for playing with this newest release was to test the themes and extensions I have written that you have downloaded.  At the moment that is only the Greenway theme and Randomquote extension.

I am glad to report that RandomQuote version 1.2 still works fine and is compatible with 1.5 RC.  Hopefully nothing will change between the RC and Final versions to change that. 

Unfortunately there does seem to be a little bug, or should I call it a special feature, in the Greenway theme on some browsers.  The theme displays as expected in IE7

Greenway Theme in IE 7 
The calendar and RandomQuote extension are nicely positioned under the menu bar. 
Now compare that with how it looks in FireFox 3.0.9 

Greenway Theme in Firefox 3.0.9

You can clearly see the difference in the position of the calendar and RandomQuote extension.  I don't believe this is a direct affect of version 1.5, this bug has probably always been there.  Due to its nature I am not going to urgently look into fixing it, sorry guys, personal commitments prevent me from spending the necessary time on it.  I know what you are thinking, you can spend time writing about it so why not spend some of that time fixing it.  Fair argument I suppose.  If any of you have found a way to resolve the issue feel free to get in touch.

For more information regarding 1.5 see the announcement on the official BlogEngine site

As usual you can get all the up to date downloads from the downloads page.


RandomQuote 1.2 Update

As promised the RandomQuote extension to DNBE is complete and has been uploaded to this site.
The current version is RandomQuote 1.2.
I do not plan on any major changes or updates to the extension, that is unless someone finds a major bug.

There were a couple of bugs fixed, nothing big.  As usual you can get the updated files from my downloads page.
Thankyou all for taking the time to use this extension. 
If you have any comments or suggestions please get in touch, I would be very intrested to hear if you are using RandomQuote and what you think of it.


DotnetBlogEngine 1.4 Update

I have upgraded this site with the  DNBE 1.4 release.

The good news for those who have downloaded the Greenway theme from my downloads page is that, thankfully, it will work fine.
The not so good news is for those of you who have downloaded the RandomQuote extension is that there are a couple of bugs in it, mainly relating to null references.  I am currently working on these and hope to have an update out to you withing the next 24 hours or so.

As always, feel free to leave any comments or suggestions regarding these themes and extensions.


Robinsonweb has been hacked

Those of you who frequent this site will notice the blog looking a bit of a mess recently.  Someone managed to hack into my site and change the style of the site and a few other settings which meant it looked a bit of a mess.  It's really disheartening when this happen, fortunately they were not totally malicious and did not totally destroy the site.  All the content was still here, just the presentation was changed.

Thankfully now everything is updated and back to normal.  Hopefully it won't happen again.


RandomQuote Extension Update version 1.1

RandomQuote is now at version 1.1

I have done a minor update to the admin Quote.aspx page.  You can now edit a quote in the grid.  This saves you having to delete the quote and then add it again as a new entry.

I have achieved this by using a DataList control and storing in an the XML file as before.  The rest of the extension is unchanged.

The updated extension is available from the download page.

All you have to do to update any previous version is to overwrite the admin page ( Quote.aspx , Quote.aspx.cs).  Everything else is the same.


Greenway DotNetBlogEngine theme

The thing I love about the internet is you can get a lot of things for free, and legally too.  I wanted to create a theme for DNBE but I did not want to create the whole site template myself, images, styles etc.   So I turned to the internet, as I often do in these situations and found this Greenway template on free CSS templates.  I adapted this free template  for use as a theme on the blog. 

Click for a live preview.  (This preview has the RandomQuote extension that I created)

You can downlaod the theme from here Greenway.zip (32.99 kb) or from my Downloads page


RandomQuote extension

** This extension has been updated **
** Go to Random Quote Extension Update **

I have created an extension for DNBE.   For installation instructions see the README.TXT file included in the downloadable zip. 

The extension is "RandomQuote", and does pretty much what it says on the tin. RandomQuote allows you to display a quote on a page, randomly selected from those you have entered via the admin page.  You record two pieces of information, a quote and a reference, i.e. author, date and time or place of the quote.

Any quotes you have entered will be displayed in the list.

When the control that renders, there are three style sheet classes specified.  You can use these classes to style the look of the control using CSS.  The three classes are 'quotemain', 'quotetext' and 'quoteref'.  The rendreed HTML will look like this:

<div class="quotemain">
    <div class="quotetext"> Some quote text here </div>
    <div class="quoteref"> Some reference here </div>
</div> 

a simple style sheet may look like:
/****************************************
Random Quotes
***************************************/
.quotemain{ /* Specify style here */} 
.quotetext{ font-weight:bold;}  
.quoteref{ font-style:italic ;} 


You can download it from here or from my downloads page.

version 1.0, 17th February 2008.

Please feel free to contact me if you have any feedback, suggestions for improvements or if you find any bugs.


BlogEngine Installation on GoDaddy

Godaddy do offer a free installation of the dotnetblogengine when you buy hosting with them.  Despite that, I decided to manually install the blog myself.  I did have a couple of problems which I managed to solve, though it would have helped if I had found this post on donnefelker.com before I attempted the install.  Read this post if you wish to install blogengine on godaddy.