Automate BSNL Broadband using Broadband Scheduler

By Mayank Raichura at November 05, 2009 18:56
Filed Under: Download

Warning: It has come to my notice that the current version has a bug when used on Laptops. The application will create tasks with condition "Start the task only if the computer is on AC power" checked by default. So, if you are running your downloads while on batteries, the tasks won't run.

Workaround: I've already resolved the bug but I need to test it before uploading. Please modify this condition manually. Click here for a step-by-step guide on how to do that.

2009/12/27 - Resolved
The updated version has been uploaded and is now available for download. Also, I've added reconnection feature that will let you reconnect if an existing connection is going on. Also, it will perform up to 5 connection attempts if an error occurs during these tries. So, now party all night without the worry of your download ;). Wish you a very very Happy New Year.

You might have already visited my older blog posts BSNL Broadband Automation and BSNL Broadband Automation for Vista that dealt with using Task Scheduler (1.0 for XP and 2.0 for Vista) to schedule your tasks. While I tried to keep the process as easy as I can, working with Task Scheduler is sometimes hard. So, for long time I had been thinking to create a program that would ease the process of scheduling tasks on behalf of you and give you peace of mind. And at last I found time (and necessary resources) to work on this idea. And here it is, Broadband Scheduler client that eases your work by creating scheduled tasks on behalf of you. It uses an open-source Task Scheduler Managed Wrapper that should allow you to use client on both the operating systems (not confirmed for XP).

 

Details

The program is capable of scheduling 4 kind of tasks which, I guess, should be sufficient. The tasks are named as follows

  • Connect
  • Applications
  • Disconnect
  • Shutdown

Connect, Disconnect & Shutdown – Used for Connecting, Disconnecting and Shutting down the system respectively.

Applications – To launch multiple applications at a given time.

 

Screen Shots

 Broadbadn-Automation-Scheduler-001-General-Interface
Broadbadn-Automation-Scheduler-002-Connection-List
Broadbadn-Automation-Scheduler-003-Application-Selection
Broadbadn-Automation-Scheduler-004-Settings-Saved

Requirement

.Net Framework 2.0


Download

The application is in BETA mode. So please use it at your own risk and provide feedback in comments, should you encounter any problem while using it. I’ll be glad to resolve your issues.

 

Download BBScheduler

BlogEngine.Net Widget – Article Info

By Mayank Raichura at September 08, 2009 02:51
Filed Under: Download, Download

aricle info I recently visited Karl Francisco Fernandes’s blog mesonprojekt with awesome design. There, while reading one of his blog entries, I saw this small widget on the right called “ABOUT THIS ARTICLE” and my heart just said – I want one.

Well that’s it. I tried(I swear I did) to search for it on internet for a while but soon ended up deciding to write my own. 

So since, I was going to write one for my own, I decided to write down my requirements (greyed out features are yet to be implemented.)

  1. To display well formatted information of currently viewed post.  
  2. To add support for date, author, categories and tags.
  3. To display well formatted information regarding comments.
  4. Link to Comments
  5. To add support for editable title.
  6. To add support for editable information format.
  7. To make the Widget visible on when a blog post is being displayed.
  8. To display the widget irrespective of the page/post the user is visiting, if the user is an Administrator.

Now that the requirements have been decided, I created blank templates for the widget and boom…..the first problem came in it’s way. How to access the current blog entry (Post in BlogEngine.Net) information from a widget? It’s pretty easy to do this from an extension, but Widgets that inherit from WidgetBase don’t have any methods to access the current Post. So, I went to the BlogEngine.Net codeplex site and searched for it on the forum. But there was no information there and so I ended up creating the thread of my own.

Soon Ben answered to the query and after couple of posts, I had all the information I needed to build my own post.

So based on Ben’s suggestions, I modified the WidgetBase.cs to include properties that allowed direct access to current Post/Page being served.

Here is what I added to WidgetBase.cs

#region Custom Properties
    /// <summary>
    /// Gets the current Page being served.
    /// </summary>
    /// <value>Current <c>Page</c> object if a Page is being served; otherwise <c>null</c>.</value>
    public BlogEngine.Core.Page CurrentPage
    {
        get { return GetCurrentPage(); }
    }

    /// <summary>
    /// Gets the current <c>Post</c> being served.
    /// </summary>
    /// <value>Current <c>Post</c> object if a Post is being served; otherwise <c>null</c>.</value>
    public BlogEngine.Core.Post CurrentPost
    {
        get { return GetCurrentPost(); }
    }

    private bool _DisplayWidget = true;

    /// <summary>
    /// Gets or Sets the visibility of Widget
    /// </summary>
    public bool DisplayWidget
    {
        get { return _DisplayWidget; }
        set { _DisplayWidget = value; }
    }
    #endregion

along with this functions (thanks to Ben)

#region additional Methods

    /// <summary>
    /// Function retreive the Current Post. Credit for this function 
    /// goes to Ben Amada (http://allben.net/)
    /// </summary>
    /// <returns></returns>
    private Post GetCurrentPost()
    {
        string currentPage = System.IO.Path.GetFileName(HttpContext.Current.Request.PhysicalPath);
        string id = Request.QueryString["id"];
        if (!string.IsNullOrEmpty(id) && id.Length == 36)
        {
            Guid itemId = new Guid(id);
            if (currentPage.Equals("post.aspx", StringComparison.OrdinalIgnoreCase))
            {
                return BlogEngine.Core.Post.GetPost(itemId);
            }
            else return null;
        }
        else return null;
    }
    
    /// <summary>
    /// Function retreive the Current Page. Credit for this function 
    /// goes to Ben Amada (http://allben.net/)
    /// </summary>
    /// <returns></returns>
    private BlogEngine.Core.Page GetCurrentPage()
    {
        string currentPage = System.IO.Path.GetFileName(HttpContext.Current.Request.PhysicalPath);
        string id = Request.QueryString["id"];
        if (!string.IsNullOrEmpty(id) && id.Length == 36)
        {
            Guid itemId = new Guid(id);
            if (currentPage.Equals("page.aspx", StringComparison.OrdinalIgnoreCase))
            {
                return BlogEngine.Core.Page.GetPage(itemId);
            }
            else return null;
        }
        else return null;
    }

    #endregion

So, as you can see, apart from CurrentPost & CurrentPage, there is an extra property called DisplayWidget. Well, this part certainly wasn’t my idea but the happened to ask about this feature in my thread and it was exactly what I needed ;). So, this property lets BlogEngine.Net decide which Widgets are to be diplayed. But how will BlogEngine.Net decide that. Well, tha’s where we need to modify WidgetZone.cs file. Here you need to replace

this.Controls.Add(control);

with

//Added: Implementing DisplayWidget property
 if (!control.DisplayWidget)
{
	if (Page.User.Identity.IsAuthenticated && Roles.IsUserInRole(BlogEngine.Core.BlogSettings.Instance.AdministratorRole))
	{
		this.Controls.Add(control);
	}
}
else this.Controls.Add(control);

That’s it. Now, we have three properties at our disposal when we inherit from WidgetBase.

  1. CurrentPost – Gets a Post object if a blog entry is being served; otherwise null;
  2. CurrentPage – Gets a Page object if a page is being served; otherwise null;
  3. DisplayWidget – Gets or Sets the visibility of the Widget. If set to false, the widget won’t be displayed. The property has not effect when the user has logged in as Administrator.

So, here is the code for widget.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="widget.ascx.cs" Inherits="widgets_articleinfo_widget" %>
<asp:Label ID="articleInfo" runat="server"></asp:Label>
<div id="commentLinks" runat="server">
<asp:HyperLink runat="server" ID="hlViewComment">View Comments</asp:HyperLink>
</div>

and widget.ascx.cs

#region Using

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Caching;
using System.Xml;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using BlogEngine.Core;
using System.Globalization;

#endregion

public partial class widgets_articleinfo_widget : WidgetBase
{
    /// <summary>
    /// (1) Title, (2) Author, (3) DateCreated, (4) Categories
    /// </summary>
    string POSTINFO = "You are reading <b>\"{0}\"</b>, an entry posted by {1} on {2} and categorized under {3}.";
    //string PAGEINFO = "You are currently on \"{0}\" page.";

    string TAGLIST = "The following tags are associated with this article: {0}";

    string NOCOMMENTS = "There are no comments for this article.";
    string SINGLECOMMENTS = "There is only 1 comment for this article.";
    string MULTIPLECOMMENTS = "There are {0} comments for this article.";
    
	public override string Name
	{
		get { return "Article Info"; }
	}

	public override bool IsEditable
	{
		get { return true; }
	}
    
	public override void LoadWidget()
	{
        if (this.CurrentPost == null)
        {
            this.DisplayWidget = false;
            return;
        }

        Post curPost = this.CurrentPost;
        StringBuilder sb = new StringBuilder();

        sb.AppendLine("<div>");
        sb.AppendFormat(this.POSTINFO, curPost.Title.ToString(), curPost.Author.ToString(), curPost.DateCreated.ToString("MMMM dd, yyyy"), this.CategoryLinks(curPost,", "));

        if (curPost.Tags.Count != 0)
        {
            sb.Append("<br /><br />");
            sb.AppendFormat(this.TAGLIST,this.TagLinks(curPost,", "));
        }

        sb.Append("<br /><br />");

        int CommentCount = curPost.ApprovedComments.Count;

        if(CommentCount  == 0)
        {
            sb.Append(this.NOCOMMENTS);
        }else if(CommentCount == 1){
            sb.Append(this.SINGLECOMMENTS);
        }else sb.AppendFormat(this.MULTIPLECOMMENTS,CommentCount);

        sb.AppendLine("</div>");

        this.articleInfo.Text = sb.ToString();

        this.hlViewComment.NavigateUrl = curPost.RelativeLink + "#comment";

    }

    #region Methods from PostViewBase
    protected virtual string CategoryLinks(Post curPost, string separator)
    {
        string[] keywords = new string[curPost.Categories.Count];
        string link = "<a href=\"{0}{1}.aspx\">{2}</a>";
        string path = VirtualPathUtility.ToAbsolute("~/category/");
        for (int i = 0; i < curPost.Categories.Count; i++)
        {
            if (Category.Categories.Contains((Category)curPost.Categories[i]))
            {
                string category = Category.GetCategory(curPost.Categories[i].Id).Title;
                keywords[i] = string.Format(CultureInfo.InvariantCulture, link, path, Utils.RemoveIllegalCharacters(category), category);
            }
        }


        return string.Join(separator, keywords);
    }

    /// <summary>
    /// Displays the Post's tags seperated by the specified string.
    /// </summary>
    protected virtual string TagLinks(Post post, string separator)
    {
        if (post.Tags.Count == 0)
            return null;

        string[] tags = new string[post.Tags.Count];
        string link = "<a href=\"{0}/{1}\" rel=\"tag\">{2}</a>";
        string path = Utils.RelativeWebRoot + "?tag=";
        for (int i = 0; i < post.Tags.Count; i++)
        {
            string tag = post.Tags[i];
            tags[i] = string.Format(CultureInfo.InvariantCulture, link, path, HttpUtility.UrlEncode(tag), HttpUtility.HtmlEncode(tag));
        }

        return string.Join(separator, tags);
    }
    #endregion
}

As you can see, I’ve left IsEditable to true and added an empty edit.ascx to use the inbuilt Widget Title Editing feature. You can watch the working demo on the side-bar. Do tell me if you like it.

Also, I would like to Ben for his codes and suggestions. They were the valuable piece of information for this Widget.

 

 

How to install the Widget?

  • Download the widget from the download link given below.
  • Extract the files to your local folder
  • As you can see, the files are already in structure they need to be copied.
  • Copy WidgetBase.cs and WidgetZone.cs from App_Code\Controls to yours servers ~/App_Code/Controls folder
  • Also copy the Article Info folder from widgets to your servers’ ~/widgets folder.
  • And you are done.
  • You can add your widget by selecting it from the drop-down list of your WidgetZone.

Note: This widget will work on themes that support Widgets.

 

 

So. Do you want one?

Download Article Info

USB Lock – A simple utility to block usage of USB Storage Drives on Windows System

By Mayank Raichura at September 03, 2009 08:51
Filed Under: Download

usb-lock-icon While scouring through my old archives, I came across a very simple utility, that I had created back in 2005 for my dad’s office to protect the data stored on it, called USB Lock.

This small utility blocks usage of USB drives on a computer so that data/files can neither be imported nor exported. It was written in VB6 and uses a simple registry tweak to enable & disable USB Storage Devices on that computer.

What is the benefit of blocking USB Storage Drives?

There might be many benefits of blocking USB Storage Drives but let me tell you two of them.

  • Data Security as data cannot be exported to external USB Drives.
  • System Security as USB Drives are one of the major hosts of viral transmission and blocking them reduces the rate of infection.

usb-lock How does USB Lock blocks USB Storage Drives?

Instead of writing a lengthy description, please read this thread(and there are many others but am too lazy to find one).

And if you are lazy like me and don’t want to visit any thread then here it is..

All it does is modify the following registry

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR

Yes. That’s it. Full Stop.

Under that modifying the value of DWORD Start will enable or disable USB Drives. Here are the possible values.

  • 3 to Enable
  • 4 to Disable

So what? Anyone can modify this registry values and re-enable the USB Storage drives.

True. But not everyone. You need to be smart enough to know the exact registry key to modify which wasn’t the case with my Dad’s office staff. But eventually, if the need arise, with good management of access permissions(like only allowing a specific user to modify registry key) over registry key should fulfil your need. Please note that if you restrict registry modification to a specific user, the application can work only for that user.

Okay, let me give it a try.

Warning: This application modifies registry. It would be best in your interest to create a restore point or at least make a backup of your registry before installing/using this application.

Download USBLock

If you like this application please support by clicking other the sponsored link on the right.

Stylish Font Writer

By Mayank Raichura at July 16, 2009 18:56
Filed Under: Download

Have you ever wished, while using Orkut, to write scraps and your profiles in different font styles without any third party application that shamelessly accesses your friends list and manipulates your updates???? or without logging into  third party sites that are totally not reliable in the first place???

 

Well, even I used to ask the same question to myself. But hey, I can create a client application on my own. All I need is different font styles. And after scouring internet for few hours, I settled with 15 different styles. And I created this small application that writes in your chosen style, on the fly i.e. as you type. Isn't that something? Also, it allows you to copy the whole text to your keyboard while you type, all along, keeping your application window on top. So no more window switching and no more Select All-Ctrl+C or Select All+Right Click+Copy. Just focus on what you have to say and leave styling part to this little application.

Stylish Font Writer for Orkut & My Space

Using Stylish Font Writer with Orkut Scraps

Requirements

  • .Net Framework 3.5 Runtime. Click here to get it.

A Request

I would really love to add more styles to this application. But, for that, I’ll need help from you, yes, the users. If you know of a good font style, please let me know by either leaving the URL as comment or by creating a format string for that font style.

 

To create a format string, all you need to do is create a styled string of A to Z in lower case. For example, for style number 2 in the this application…. I formatted this string

abcdefghijklmnopqrstuvwxyz

into this

αв¢∂єƒgнιנкℓмησρqяѕтυνωχソz

So, next time you come across a new style that you want to be included in this application, please leave the link or formatted string in the comment. I’ll try to include it in my next release.

 

Download

Download Stylish Font Writer

Web Service & Client Software to monitor downloads in BlogEngine.Net using Al Nyveldt’s Simple Download Counter Extension (Updated)

By Mayank Raichura at June 30, 2009 00:33
Filed Under: Flagged, Download

It’s been quite a while that I actually wrote a good content but trust me, I was busy for good. Recently, I wanted to monitor downloads(not total monitoring, I’ll leave that to Google Analytics and StatCounter, but just how many files get downloaded everyday) of files I posted on the blog. For this, I’ve been using Al Nyveldt’s Simple Download Counter extension for couple of months. I just loved its simplicity and as it’s name suggests, it was pure vanilla simple extension.

But, due to its simplicity, I had to visit each page to check the download counts. Since, the extension used quite a simple XML file, I thought, maybe I could consume the file in a web service and allow a remote client to connect to it and get its local content synched with the server. And Eureka, it was a great idea(maybe just for me but yeah….it saves my time and is comfortable to use :D).

So I created the web service and a client to consume it. To add little bit of security, I’ve included a plain text passphrase authentication that should give you sufficient enough security(in my initial idea, it wasn’t even there).

Now if that’s enough, why don’t you test the client and provide me feedbacks or bugs that you may encounter during your use and if you like it, just leave your thanks :).

 

Feature List

  • Allows you to monitor downloads of files posted on your BlogEngine.Net Blog without visiting your blog.
  • Provides a simple list of files that are downloaded and how many times they are downloaded.
  • Monitors old and new download values and highlights files that are downloaded since last save.
  • Stores copy of each website locally so that it can load last statistics when that site is monitored. Helpful when you are running multiple instances of BlogEngine.Net
  • Uses a single password for the purpose of security. Uses BlogEngine.Net’s Membership Provider interface to authenticate web service request.
  • Resides in Tray when minimized. Shows a balloon tool tip when a file is(or files are) downloaded.

 

Requirements

  • A working instance of Al Nyveldt’s Simple Download Counter extension which can be downloaded here on the server.
  • .Net Framework 2.0 for the client application.

 

Installation Steps

  • Download the Web Service & Client setup from the below link.
  • Extract it to your favourite location.
  • You will find “downloadstats.cs” under “wwwroot\App_Code”. Open it in your favourite text editor(try Notepad++)
  • Goto line 23 & change  the value of default_hash to your own password. You will need it when you connect using the client application.
  • Upload the files in given structure i.e. “downloadstats.asmx” to your blog root and “downloadstats.cs” as well as “downloadedfile.cs” to your App_Code folder.
  • Install the client application on the client computer.

Usage

Download Stats by Noise De Silence

  • The client application is very simple. You need to provide two three attributes for the application to work.
  • First one is Site URL. You need to enter your complete site URL that you use to access your blog. For example, mine is http://www.mayankraichura.com/. The application appends the web service file name(“/downloadstats.asmx”) to the link you provide. So the final link would look like http://www.mayankraichura.com/downloadstats.asmx.
  • Password is the value you entered in the downloadstats.cs file. Make sure the password you enter and the default_hash value are same. Otherwise, the application won’t work. The web service uses the default Membership Provider to authenticate user. Therefore, you need to provide the username & password to request your download statistics. You can change your password through Users in Admin section of your blog.
  • The default(and the only duration) of update is 1 minute. Once you press the Start button, the client will keep updating the table every 1 minute by querying the web service.
  • The client also compares new values with old values and if there is increase in a value, that record will be highlighted with yellow colour.

Download Stats by Noise De Silence Highlighted


That should be enough for now. Don’t forget to leave your suggestions, comments, bug reports and,if et al, your valuable compliments.

 

Download Link

Simple Download Counter Stats Client.zip

 

 

Regards,

Mayank Raichura

BlogEngine.Net Extension Base Class Generator

By Mayank Raichura at May 14, 2009 13:36
Filed Under: Download, Flagged

 

As I had already hinted in my previous post, I was creating a program that would ease the process of creating extension for BlogEngine.Net. The advantage of this program is that you don’t really have to know everything about BlogEngine.Net Core. Most of the work is done by the program. The program automatically generates the code for settings including initializing it.

 

Please note that this program is not totally complete. The program generates very limited code and therefore I cannot say that it’s a complete solution. But as far as my needs were concerned, it did fulfil it.

 

So let me show you how this program works by showing you how to create an extension using this program. Before you start following the steps, let me tell you what the extension will do.

 

The extension will insert the HTML, you provide through settings page, at the bottom of the posts. So let me show you how to use this program by showing you to create a basic extension.

 

  • Download the program from the below given link and extract the exe to the desired location.
  • Run the program from that location.
  • As you can see, the program is divided into three sections.

Empty

  • Basic Info, Setting Details & Settings List
  • Add the Basic Info as depicted in picture below

Basic_Info

  • Also add the Setting Details as given below.

Signature_Text

  • Now press Add button. The setting should get listed in the table given on the right.
  • Again enter the Setting Details as given in the image below and press Add

Restrict to single post

  • Now you should have basic information about your extension plus the settings you need for the extension listed on the right grid.

Full

  • That’s it. Now go to Action menu and click on Build Code.

Build Code

  • A window will open the core code which is given below.
#region Using

using System;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
using BlogEngine.Core;
using BlogEngine.Core.Web.Controls;

#endregion


[Extension(&quot;Adds a signature text at the end of the post.&quot;, &quot;1.0&quot;, &quot;Mayank Raichura&quot;)]
class Signature
{
    #region Declarations.
    private static ExtensionSettings settings;
    private static Post post;
    #endregion

    public Signature()
    {
        InitSettings();
        Post.Serving += new EventHandler&lt;ServingEventArgs&gt;(Post_Serving);
    }
    private void Post_Serving(object sender, ServingEventArgs e)
    {
        post = (Post)sender;
        if (post == null)
            return;
        settings = ExtensionManager.GetSettings(GetType().Name);
        //Settings should be retrieved after this...
        string sigSignature_Text = settings.GetSingleValue(&quot;Signature_Text&quot;).ToLower();
        bool sigRestrict_to_single_post = bool.Parse(settings.GetSingleValue(&quot;Restrict_to_single_post&quot;).ToLower());

        //End Settings Retrieval
        e.Body += &quot;\n&lt;!-- Signature extension by Mayank Raichura --&gt;\n&quot;;
        e.Body += BuildHTML(sigSignature_Text, sigRestrict_to_single_post);
    }
    string BuildHTML(string sigSignature_Text, bool sigRestrict_to_single_post)
    {
    }

    private void InitSettings()
    {
        {
            ExtensionSettings initialSettings = new ExtensionSettings(GetType().Name);
            initialSettings.IsScalar = true;

            string htmlHelp =
            &quot;&lt;strong&gt;Signature Text:&lt;/strong&gt; The HTML that will be injected at the bottom of the post. You can even insert javascript.&lt;br /&gt;&quot;
            + &quot;&lt;strong&gt;Restrict to single post:&lt;/strong&gt; Check this if you want to restrict signatures to full post view only.&lt;br /&gt;&quot;
            ;


            initialSettings.AddParameter(&quot;Signature_Text&quot;, &quot;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Signature Text&lt;/strong&gt;&quot;, 50);
            initialSettings.AddParameter(&quot;Restrict_to_single_post&quot;, &quot;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Restrict to single post&lt;/strong&gt;&quot;, 50);


            initialSettings.AddValue(&quot;Signature_Text&quot;, &quot;Regards&lt;br /&gt;Mayank Raichura&quot;);
            initialSettings.AddValue(&quot;Restrict_to_single_post&quot;, true);

            ExtensionManager.ImportSettings(initialSettings);
        }
    }

}

  • Please observe that all the major work has been done by the program. In normal case, the only code you will need to modify will be the BuilHTML function which is currently empty. Ofcourse you can write other functions and call them in BuildHTML. But what’s best is that you don’t have to go through the API for the extension.
  • Now to maintain brevity I’m not going into how to implement the Restrict to full post feature but will directly to insert the signature to the post. Infact, it’s a piece of cake in here.
string BuildHTML(string sigSignature_Text, bool sigRestrict_to_single_post)
{
	return sigSignature_Text;
}
  • You are done. Copy the code to a text file, save it as a .cs file and copy it to your extensions directory in ~/AppCode/Extensions/ and your extension should be visible in the extensions page.


Possible Enhancements

  • Add support for DataTable (Non-Scalar) Settings
  • Add support for other events like Page.Serving, Comment.Serving and many more
  • Save/Load project.


 

A/N: This extension is no where near a full-blown program to create extensions of all kind. But I’ll keep updating it as and when I find time to add extra features.

 

BlogEngine Extension Base Class Creator.zip

 

Your comments & reviews are always welcome…..:)

Google Friend Connect Social Bar Extension for BlogEngine.Net

By Mayank Raichura at May 11, 2009 00:58
Filed Under: Download, Featured

friendconnect-logo Before, you start wondering what is Google Friend Connect, I suggest you to visit this site. Once, you are through with the knowledge of what is Google Friend Connect, you should be knowing about what Social Bar is. Yes, it’s a widget that can be installed onto your site and then lets you create your own site community without the headache of programming, registering and managing user and all that.

 

So what you up to this time, eh?

Well, I have created an extension that further eases the installation of this Social Bar. All you have to do is register your site with Google Friend Connect and get yourself a Site ID. After that, once the extension is installed, it will show the Social Bar whenever a full post is served. Combined with the Google’s Commenting feature, your blog will become a breathing community.


The Social Bar


demo-image

 

 

 

 

 Comment Widget


Comments GFC-Comments

 

 

Community List


member-list GFC-Members

Join/Login


Join-Unjoin GFC-Login

 

 


So what does this extension exactly do?

As this extension was created for my personal needs, it may not be totally useful to you and you may not agree with me on how I use Google Friend Connect’s Social Bar. Now that we have an understanding let me tell you what this extension does. This extension inserts the Social Bar code into each post(single post only) served i.e. when you are viewing the full version of the post. Currently, the Social Bar is shown at the bottom of the page because that’s how I like it. As, the Social Bar implements the commenting feature (isolated to the page currently being visited), it eliminates the need of internal commenting system.

 

How to insall this extension?

  • Download the extension from the bottom of this post.
  • Extract the GFCSB.cs and upload it to your BlogEngine.Net’s ~/App_Code/Extensions folder. If your blog isn’t hosted on root, please change the path as needed.
  • Also, you can install the rpc_relay.html and canvas.html to the root(~/) of your site or you can download and install them when you setup your site with Google Friend Connect.
  • Goto Settings and select Extensions tab.
  • Look for Google_Friend_Connect_Social_Bar under the Name column and click on Edit link on the same row. 
  • In the next page, change the Site UD to your own Google Friend Connect’s Site ID. Please note that if your code is not valid, an empty bar will appear but I cannot guarantee what will happen on your site.

SB-Extension-Setting1 SB-Extension-Setting-Help

  • You can also change the Div Tag ID. Since, IMO, it’s used just to differentiate one div tag from other  div tags, when multiple Google Friend Connet’s widgets are used, if you are only using this extension i.e. no other widgets installed, you won’t need to change it(at least worked for me:)).
  • Allow Anonymous Post. as it’s name suggests that you can decide if you want to allow only people who join your community to comment or any one who visits your site(they don’t have to join your site to post comment).


Possible Updates

  • Allow you to change the position of the Social Bar(Top or Bottom).
  • Change the text of the default text ( “- Let me know about your thoughts –“)
  • Possibly allow the poster to post YouTube links

All this features are actually supported by Google Friend Connect and if you are good at playing with C# files, it shouldn’t be too hard to modify the code to suit your needs. I’ll just provide this facilities who don’t know anything about programming yet want to use it.


Download here

GFCSB.zip

Hint for next post: Have you ever thought of a program that makes creation of BlogEngine.Net’s extension, a piece of cake?

BSNL Broadband Automation for Vista

By Mayank Raichura at May 04, 2009 15:32
Filed Under: Download, Featured

Update: I'm currently working on a program that would ease the process of scheduling tasks for you. The details of the program is available here. If you want any new features, now is the time to ask for it. Just leave your feature request as a comment or send me a message with “Feature Request: Broadband Scheduler” as subject via Contact and I'll let you know if it would be possible for me to do it or not.

 


 

This post in actually extension to my previous post and therefore I’ve included only steps you need to follow.

 bsnl-broadband-vista

Previously, I didn’t have Windows VistaTM so I didn’t knew how to work with it. But my Dell Studio 1555 came preloaded with Vista Home Premium and so I had a go wit it.

 

Windows Vista uses Task Scheduler 2.0 which is far more better than the older 1.0 which came with Windows XP. While, there are lots of blogs and websites that enlist the features of Task Scheduler 2.0, the best I liked is the ability to change your Windows Account password without affecting your scheduled tasks.The reason I like this is because last month, when I was using Windows XP, I’d scheduled my tasks to run at different times. As you very well know, in Windows XP Task Scheduler(even if you don’t know just accept it), you need to provide your account password while setting up a task. If you change your Windows Account password, the password saved by Task Scheduler will eventually cause Bad Authentication and thus the tasks won’t start. This is not the case in Task Scheduler 2.0. Here, it Credentials Manager to store passwords and so there is no need to change password for each task. Secondly, it uses XML based Job Files that helps sharing of tasks across computers, that’s what I’ve done.

 

Now, as we have some preliminary information of Task Manager 2.0, we are going to use it’s Import Task feature. Please follow the steps as below

  • Download the zip file and extract it to a safe location.
  • Go to the directory where you extracted files using Windows Explorer
  • Open Connect 2 Internet.xml in any text-editor(I prefer Notepad++)

Notepadpp-Edit

  • Go to Line 47 and you will find three space-separated values enclosed between <Arguments></Arguments> tag.
  • Replace the connectionname with your Dial Up connection name(mine is BSNL), username with your BSNL username and password with your BSNL password.
  • Save the file and close the editor.
  • Open Task Scheduler from Start / Control Panel / System and Maintenance / Administrative Tools

Control-Panel Control-Panel-Administrative-Tools

CP-AT-Task-Scheduler

  • Select Task Scheduler Library from the left pane and click on New Folder on the right pane.

TaskSched-Left-Pane TaskSched-Actions

  • Enter “BSNL Broadband” (you can choose different name or even skip this and previous step) and press OK.TaskSched-NewFolder
  • Now select the newly created folder from left pane and click on Import Task from the right pane.

TaskSched-Left-Pane-Newly-Created-Folder

  • Navigate to the folder where you extracted the task files, select one of the task files and then press Open.

TaskSched-Import-Task-Open

  • A Create Task will be created, pre-loaded with task details from the Job File. Unless you want to play around with it, just press OK.

TaskSched-Import-Task-Create-Task

  • Your task is created successfully.
  • Repeat the above 3 steps for all the downloaded files.

TaskSched-List

  • Please note that I’ve only provided tasks for Connecting, Disconnecting and Shutdown as the software needs will be different for each user.
  • But if you wish to learn, there is abundant information available on Internet on how to Create Task in Task Scheduler 2.0. All you have to do is Google :p

BSNL Broadband Automation in Vista

BSNL Broadband Automation

By Mayank Raichura at April 15, 2009 15:11
Filed Under: Download, Featured

Update: I'm currently working on a program that would ease the process of scheduling tasks for you. The details of the program is available here. If you want any new features, now is the time to ask for it. Just leave your feature request as a comment or send me a message with “Feature Request: Broadband Scheduler” as subject via Contact and I'll let you know if it would be possible for me to do it or not.

 

It seems that my last post was inadequate to make you understand how to use this batch files. So let me explain you how to do it in a step by step process.

 

Prerequisites: You should have basic knowledge of DOS prompt and how to use DOS commands.

  1. This batch files use an executable called “rasdial.exe” that is available in Windows OS(XP or higher).
  2. This executable lets you run your connections from the command-line. So, i n order to schedule our automatibroadbandon scripts, we are going to use batch files.
  3. Now lets see, what the download consists of…
  4. connect.bat – This file contains the command that will use your existing dial up connection to connect to internet.
  5. disconnect.bat – This file contains the command that will disconnect your dial up connection.
  6. Power-Off.bat – This file contains the command that will shut-down your computer. After all, we should save power too ;-)
  7. The only file you need to modify is connect.bat. It calls rasdial.exe and passes three parameters namely dial up connection name, user id and password. So, open connect.bat in notepad
  8. change “bsnl” to your connection name
  9. change “uid” to your BSNL username
  10. change “pass” to your BSNL password (Your password is stored as plain text so its not that safe to use this method)
  11. No go to Start Menu > Control Panel > Scheduled Tasks and create new tasks as follows

    Time

    Filename
    02:05 AM connect.bat
    07:55 AM disconnect.bat
    07:57 AM power-off.bat
  12. Set this tasks to daily so that they are executed daily.

Note: 

I’ll post steps for Windows Vista later this weekend. I have posted the steps for BSNL Broadband Automation for Vista. Please review them too.

 

Have a sound sleep.

 

BSNL Automation.rar

MWPSK Theme – Astro

By Mayank Raichura at April 15, 2009 15:01
Filed Under: Featured, Download, Astro

 

thumbnail

 

I created this little theme in the spirit of [IYA] – 2009 when I was using [MWPSK]. Now, that I don’t use it any more, I thought, I’ld let this theme remain available for download. The theme was created using MWPSK Theme Generator

 

Astro.zip

Social Bookmarking Extension for BlogEngine.Net – AddThis (Updated)

By Mayank Raichura at April 15, 2009 03:50
Filed Under: Featured, Download, Flagged

This extension is based Danny Douglas’s  SocialBookmarks Extension. I suggest that you also have a look at it.

 

What is AddThis?

 

addthis-expandedAddThis is one of the popular(actually #1 per their site) social bookmarking button on Internet. This button eases your burden of maintaining links to each and every social bookmarking site on internet. Instead, the site provides us with a code that, once embedded into your post, opens a small popup with number of ways for sharing your content. Also, it tracks all the bookmarks through which you can analyze.

addthis_trend addthis-topservices

 

What AddThis extension does?

Instead of manually embedding the code, provided by AddThis, to each and every post, this extension inserts the code, on the fly, as and when the posts are requested.

 

How to insall this extension?

  • Download the extension from the bottom of this post.
  • Extract the AddThis.cs and upload it to your BlogEngine.Net’s ~/App_Code/Extensions folder. If your blog isn’t hosted on root, please change the path as needed.
  • Goto Settings and select Extensions tab.
  • Look for AddThis under the Name column and click on Edit link on the same row.

Extension Page Extension Page

 

  • In the next page, change the Username to your own AddThis Username so that you can track your traffic.

Extension SettingsExtension Settings

  • Check Only Full Post  if you want to show the AddThis button when a full post is requested. If you want to show the AddThis button on all post on the default page(as request by Chad), just uncheck it.
  • Now, you should be able to see the AddThis button at the bottom of your posts. 

test image


New features in v1.3

  • If you don’t wish to monitor your bookmark traffic, just check the Keep Anonymous option and your traffic will not be monitored.
  • Now you can choose from multiple buttons supported by AddThis. The details on how to use different button is given in the inside help, on settings page. If you are struck anywhere, just leave a comment. You can see the list of possible buttons here

addthis-big

bkmark-big

share-big

bkmark-small

share-small

 plus

  • I’ve also added a simple option to change between small and large buttons. Check Large Button option to show large buttons. This will not apply to plus button.

 

Your comments, compliments and bug reports are always welcomed…

Download here --

About Mayank Raichura

Mayank Raichura Mayank Raichura is an aspiring VB.Net and ASP.net programmer who hails from Rajkot, Gujarat(India). He is known for his creations like Social Bookmarking Extension for BlogEngine.Net – AddThis and BlogEngine.Net Extension Creator. He has 6 years of experience in ASP and VB6 programming but recently have jumped in ASP.Net and VB.Net. Apart from that he loves sky gazing, photography, hiking, trekking, visiting place and playing games.

He believes - "Problems in life exist so that we can find a way to resolve them and thereby making us stronger and mature."

You can find him on following Social Networking Sites:

Facebook Linked In Flickr RSS Twitter

Chat With Me

Chat with Me!

Statistics

mayankraichura.com visitor count

trace