Skip to main content

"Subscribe Feed" Blogger Widget

This is my first widget written using the HTML widget type. It just a simple widget for users to easily provide buttons to several popular feed subscription site.I've been trying to use the add-widget form provided by Blogger, but it seems like the widget.template input couldn't accept input other than <data:content>. I think this is a bug and I've reported it. (Due to this bug, I think the next "Hacking Blogger Widget" post will be halted for a while)

Adding the widget into the template is easy. Open edit template html page, check expand widget, then copy the codes below, and paste it after another widget. Save the template and you're done. To rearrange the widget, just use the 'Page Elements' page.

After adding into your template, goto 'Page Elements' and click the edit button at the widget. Put your feed url into the widget content form. Be careful not to put any line breaks or other characters because it will go into your url.

Preview


Subscribe in NewsGator Online Add to GoogleSubscribe in Rojo Add to Newsburst from CNET News.com Subscribe in FeedLoungeAdd to netvibes Subscribe in Bloglines Add to My AOL




And this is the code
<b:widget id='HTML12' locked='false' title='Subscribe Feed' type='HTML'>
<b:includable id='main'>
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<a expr:href='"http://add.my.yahoo.com/rss?url=" + data:content'><img alt='' src='http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif' style='border:0'/></a>
<a expr:href='"http://www.newsgator.com/ngs/subscriber/subext.aspx?url=" + data:content'><img alt='Subscribe in NewsGator Online' src='http://www.newsgator.com/images/ngsub1.gif' style='border:0'/></a>
<a expr:href='"http://fusion.google.com/add?feedurl=" + data:content'><img alt='Add to Google' height='17' src='http://buttons.googlesyndication.com/fusion/add.gif' style='border:0' width='104'/></a>
<a expr:href='"http://www.rojo.com/add-subscription?resource=" + data:content'><img alt='Subscribe in Rojo' src='http://www.rojo.com/corporate/images/add-to-rojo.gif' style='border:0'/></a>
<a expr:href='"http://www.newsburst.com/Source/?add=" + data:content'><img alt='Add to Newsburst from CNET News.com' height='17' src='http://i.i.com.com/cnwk.1d/i/newsbursts/btn/newsburst3.gif' style='border:0'/></a>
<a expr:href='"http://my.feedlounge.com/external/subscribe?url=" + data:content'><img alt='Subscribe in FeedLounge' border='0' src='http://static.feedlounge.com/buttons/subscribe_0.gif' title='Subscribe in FeedLounge'/></a>
<a expr:href='"http://www.netvibes.com/subscribe.php?url=" + data:content'><img alt='Add to netvibes' height='17' src='http://www.netvibes.com/img/add2netvibes.gif' style='border:0'/></a>
<a expr:href='"http://www.bloglines.com/sub/"+data:content' type='application/rss+xml'><img alt='Subscribe in Bloglines' src='http://www.bloglines.com/images/sub_modern11.gif' style='border:0'/></a>
<a expr:href='"http://feeds.my.aol.com/add.jsp?url=" + data:content'><img alt='Add to My AOL' src='http://myfeeds.aolcdn.com/vis/myaol_cta1.gif' style='border:0'/></a>
<br/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>

You might need to adjust the div id to make it compatible with your theme. Also, the widget id must be a unique id. If theres other widget in your template with the same id, put a different id for this one.
6 comments

Popular posts from this blog

Adding simple popup to Plone frontpage

Here is a little guide for those who want to add a simple popup to the Plone frontpage for some purpose (eg: announcements, advertisements, etc).

Create a basic html file containing the content you want to appear in the popup. Upload it into $PLONE_SITE/portal_skins/custom (as Page Template) and for the sake of this example, name it popup.html

Afterward, create a Javascript file with your Pop-Up loader script. For example , this script:


function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=220,height=400,scrollbars=no');
return false;
};

popup('popup.html', 'My Popup');


Also upload this file into $PLONE_SITE/portal_skins/custom (as Page Template too). For this example, name it as popup.js

Afterward, in $PLONE_SITE/portal_javascripts , add popup.js as a new script into portal_javascripts…

HOWTO: Mirroring Yum repositories using Yum-Utils

As promised before in one of my previous post, a Howto on how to mirror and manage yum repositories using some of the utilities in yum-utils.

The first step is, well, of course, is to get yum-utils from fedora repository
yum install yum-utils

Reposync
Reposync is a utility for mirroring and synchronizing local copy of a yum/rpmmetadata repository.

This utility is very useful if you wanted to make a yum repository mirror. Before this, I used "wget -R -np -N" but this method is a little bit tedious and it doesnt work with repos that didn't use directory listing. Plus, it also download together additional site stuff that I don't need/want and it doesn't verify checksum of the downloaded packages.

Mirroring a repo using this utility is easy, just execute this command
reposync -r <repoid> -a <arch> -n
and the repo will be mirrored in a folder with the same name of the repoid in the directory you executed the command. Eg: you executed the command in /mnt/storage/mi…

Consolidated community site infrastructure on Plone

In Inigo, we believe in helping out local FOSS communities and help them grow. We help out in community events where we can, present FOSS talks, and provide some platforms for local communities to grow. One of such platform is our consolidated community site infrastructure on Plone.

The system/infra and its components was originally developed for the Fedora Malaysia website, while keeping in mind to keep it generic enough so that other communities could use the same components for their own community sites. The infra is already at a usable state, and we can add new sites easily with just a few clicks.

Features in this consolidated infra are:
Document/Content management (Plone built-in)Calendar system (powered by solgema.fullcalendar addon)Conference/BarCamp system (powered by collective.conference addon, which was developed for FUDCon Kuala Lumpur 2012)Blog (powered by Products.Scrawl)Simple yet powerful theming engine (powered by plone.app.theming/ Diazo) - Check out Diazo, you'l…