Download Counter Extension

15. January 2008 23:50 by rtur.net in BlogEngine  //  Tags:   //   Comments (21)

Last two weeks I’ve been nailed to my workstation almost 24x7 as we were on the finish line going live with large (6+ month in development) project. It’s over – I’m a free man again! That means, hopefully, that I’ll be able to spend a lot more time working on BlogEngine and blogging about .NET, BlogeEngine, extensions and all stuff related.

In the previous post I touched on new extension I’ve been putting together, it is basically my old download counter extension with admin panel and few small changes. You can download it using link below. Working on this extension I ran into well known limitation that Extension Manager has – it can have only one set of parameters (settings) that has to be either arrays of values (“tabular” settings) or single values (“scalar” settings). I new in advance that lot of scenarios will require both, and this extension could certainly benefit having two sets of settings, one for changing parameters like type or names of files to watch and another for showing logged data as tabular settings. Definitely something that needs to be addressed in future releases of extension manager. But, even limited as it is, you can surely benefit from this extension if you have downloadable content on you blog. Simply copy files in corresponding location and, when anybody downloads files from your blog, you’ll be able to see it in the admin panel.

DownloadCounter.zip (2.95 kb)

Comments (21) -

Sam MacDonald
Sam MacDonald
2/6/2008 6:42:27 PM #

Hey great work on the download counter extension.  Will definitely be adding it to my collection of extensions both on my site for usage as well as on my site for other people to find you and download it.

CLIPER
CLIPER
5/14/2008 5:30:35 PM #

Nice work! very impressive. I've been using this extension for my blog. Thanks Rtur!

kabonfootprint
kabonfootprint
9/8/2008 9:02:43 AM #

Good site more power.
<a href="http://alaminos.net"> Kabonfootprint </a>

giorgi
giorgi
9/15/2008 10:26:24 AM #

Hello,
When I install you extension I'm getting this exception:
The process cannot access the file 'H:\www\App_Data\datastore\extensions\BBCode.xml' because it is being used by another process.

ExtensionManager.SaveToStorage() in h:\www\App_Code\ExtensionManager\Manager.cs:383
   ExtensionManager.SetAdminPage(String extension, String url)
in h:\www\App_Code\ExtensionManager\Manager.cs:125
   DownloadCounter..ctor()
in h:\www\App_Code\Extensions\DownloadCounter.cs:31

rtur.net
rtur.net
9/15/2008 8:58:37 PM #

@giorgi - this actually due to bug in BE 1.4.5.0 that was fixed in latest build, it's not related to extension but rather to resetting application after extension was installed. If you have access to IIS you can manually reset it and error should go away, or you can download and upgrade to latest source code from CodePlex with this issue fixed.

giorgi
giorgi
10/2/2008 12:21:07 PM #

Hello,
I have the version that is available on codeplex. It's version 1.4.5.0 released on Aug 1. Where do I get later version so that your extension works?

rtur.net
rtur.net
10/2/2008 1:28:47 PM #

You need to download the latest source code:

http://www.codeplex.com/blogengine/SourceControl/ListDownloadableCommits.aspx

and build it. Let me know if you not a developer - I'll send you compiled project then.

guorgi
guorgi
10/3/2008 3:47:37 AM #

It would be very nice from you :)
Thank you in advance

giorgi
giorgi
10/6/2008 12:50:53 PM #

I am still getting the same error :(

mike
mike
11/11/2008 1:53:47 PM #

I have the same problem like giorgi. I've downloaded the latest version, recompiled BlegEngine.Core and the same error. If I comment ExtensionManager.SaveSettings it works though.

Oh and the methods, I think , they should be static (It had other errors not being static).

Alojaweb
Alojaweb
11/11/2008 7:27:12 PM #

I have the same problem, it will be?

Busby Seo Test
Busby Seo Test
11/12/2008 12:39:26 AM #

If you have same problem I think you can tweak or change some line on it..

mike
mike
11/12/2008 10:37:04 AM #

OK I've finally got it. I don't know why I thought the bug was in blogengine.core when it was in blogengine.web . I've updated to the latest source and now it works properly.

Geert van Horrik
Geert van Horrik
1/1/2009 5:45:07 PM #

Hi,

I have created a new Detailed Download Counter, based on your counter. If you are interested, you can download it on my blog:

http://blog.catenalogic.com/post/2009/01/01/BlogEngineNET-extension-Detailed-Download-Counter.aspx

Max
Max
1/8/2009 11:13:03 AM #

Hi,

I have installed it but I got a System.NullReferenceException when I try to get into the extension at line 32:
Line 30:     private void BindGrid()
Line 31:     {
Line 32:         grid.DataSource = ExtensionManager.GetSettings("DownloadCounter").GetDataTable();
Line 33:         grid.DataBind();
Line 34:     }

I'm using BlogEngine.NET 1.4.5.0. Have you experienced that exception?

Thanks

rtur.net
rtur.net
1/8/2009 11:22:55 PM #

Max, you might want to check your data directory if you are using XML provider, may be it is set for read only. Look if you have XML file in the app_data/datastore/extensions for this extension.

rtur air jordan
rtur air jordan
1/16/2009 6:36:18 AM #

we can us google anylytics, that works well

John Holliday
John Holliday
2/5/2009 2:49:41 PM #

I installed your extension and I see the settings page, but there are no statistics.  I've downloaded a few files.  Is anything else required?  Also, does it work for ALL files, or just .zip files?  Is there a way to specify which file types to track?

rtur.net
rtur.net
2/5/2009 11:21:41 PM #

John, it is only looking for zip files. You'll need to modify "if" statement in the extension to include types you want to track. If you don't see stats - take a look at the file where counts are stored (if you are using xml provider; otherwise you'll have to look at the record in DB). The file to check is:  ~/app_data/datastore/extensions/downloadcounter.xml

cod4 hacks
cod4 hacks
2/9/2009 3:16:35 AM #

Hey thanks for the exencion!

Jim
Jim
2/18/2009 9:03:18 AM #

Hey, thanks for the extension, but after adding it to my blog, I can't seem to get it to work.  Download of files do not show.  I am using LiveWriter to publish and highlight a word in the post and then set it as a link to a file giving full URL path to the file.

Also, after adding this extension, Picasa extension stopped working.  Is there a bug in either extension or in BlogEnginge?

Please help.

Pingbacks and trackbacks (3)+

Comments are closed

Recent Comments

Comment RSS