If you are a blogger using Google's Blogger platform, I'm sure you have met with some Widgets which you can add to your blog as simply as Clicking a button. While most blogger widget makers provide this One-click installation method, you too can!
In an overview, this is a facility provided by Blogger itself. By calling this facility and passing parameters to it, we can initiate this installation procedure.
The interface we are about to deal with is here
Suppose you found a web page which allows you to add a widget to one of your blogs with this system.
When you click the "Add To Blogger" button from there, this page will be called and some parameters will also be passed to it. Then the Title and Widget content fields will be already filled with those parameters.
The 2 parameters are named
These can be passed via HTTP GET method or via HTTP POST method.
Replace X with the widget name and Y with HTML content. By navigating to this link opens the Installation which will be preloaded and ready to go.
When you are using this installation link in your webpage, beware that the HTML tags used in place of Y will interfere with HTML coding of the page. To avoid that you have to encode the tags by URL Encode or simply by replacing '<' with '<' and '>' with '>'
The one-click Add To Blogger facility is a very useful tool anyone can use to offer visitors with something much friendly than inserting code manually.
In an overview, this is a facility provided by Blogger itself. By calling this facility and passing parameters to it, we can initiate this installation procedure.
The interface we are about to deal with is here
http://www.blogger.com/add-widgetBy going there, you have called the "Add Page Element" installation. Now, since we didn't pass any parameters to this page, right now its empty. You will see the empty Title field , and widget content by clicking "Edit Content".
Suppose you found a web page which allows you to add a widget to one of your blogs with this system.
When you click the "Add To Blogger" button from there, this page will be called and some parameters will also be passed to it. Then the Title and Widget content fields will be already filled with those parameters.
The 2 parameters are named
widget.title
and
widget.content
These can be passed via HTTP GET method or via HTTP POST method.
GET Method
http://www.blogger.com/add-widget?widget.title=X&widget.content=YReplace X with the widget name and Y with HTML content. By navigating to this link opens the Installation which will be preloaded and ready to go.
When you are using this installation link in your webpage, beware that the HTML tags used in place of Y will interfere with HTML coding of the page. To avoid that you have to encode the tags by URL Encode or simply by replacing '<' with '<' and '>' with '>'
POST Method
<form action="http://www.blogger.com/add-widget" method="post" target="_blank">
<span style="font-size: large;">
<b>Widget Title: </b>
</span>
<input name="widget.title" size="25" type="text" value="TITLE" />
<input name="go" style="font-size: 20px; width: 180px;" type="submit" value="Add to Blogger" />
<textarea name="widget.content" style="display: none; height: 0px; width: 0px;">ENCODEDCODE
</textarea>
</form>
Change TITLE and ENCODEDCODE with your vales and embed this form. Widget Parameters will be passed and Installation will kick-start when Add To Blogger button is clicked. Using some CSS coding will help the look and feel of the form.Comparison
In most cases; the GET method is relatively easier to implement than the POST and it's more compact. In POST method, the passing of parameters is not observed by the user where as they are easily noticed in GET method.The one-click Add To Blogger facility is a very useful tool anyone can use to offer visitors with something much friendly than inserting code manually.
Hi,
ReplyDeleteI faced a problem while using POST request. The parameters(Title, content, etc.) are lost if the user is not loggedIn to blogger. Is there any solution?
Thanks.