This is a smaller version of the Random Rotating Post Gadget. This shows only the post titles linked to their posts in the blog. It has less height and saves more space. It would look good just below the blog header or above the posts column. See picture below :
It shows all post titles in the blog by rotating through them. If you hover the mouse over it the titles will pause rotating. It is also based on Google AJAX code. Here is how to install it......................INSTALLATION STEPS
1. Login at Blogger.com.
2. Click Layout link on Dashboard under blog title.
3. Click Add Gadget link in sidebar on Layout----->Page Elements tab.
4. Scroll down in popup window and click on Html/Javascript gadget.
5. Copy the code below :<style type="text/css">
.gfg-root {
width : 100%;
height : auto;
position : relative;
overflow : hidden;
text-align : center;
font-family: "Arial", sans-serif;
font-size: 20px;
border: 1px solid #BCCDF0;
}
.gfg-title {
font-size: 20px;
font-weight : bold;
color : #3366cc;
background-color: #E5ECF9;
line-height : 1.0em;
overflow : hidden;
white-space : nowrap;
text-align : center;
margin-bottom:40px !important;
}
.gfg-title a {
color : #3366cc;
}
.gfg-subtitle {
font-size: 20px;
font-weight : bold;
color : #3366cc;
background-color: #E5ECF9;
line-height : 1.4em;
overflow : hidden;
white-space : nowrap;
margin-bottom : 0px;
}
.gfg-subtitle a {
color : #3366cc;
display:none !important;
}
.gfg-entry {
background-color : white;
width : 100%;
height : 6.9em;
position : relative;
overflow : hidden;
text-align : left;
margin-top : 3px;
}
/* To allow correct behavior for overlay */
.gfg-root .gfg-entry .gf-result {
position : relative;
background-color : white;
width : auto;
height : 100%;
padding-left : 20px;
padding-right : 5px;
}
.gfg-list {
position : relative;
overflow : hidden;
text-align : left;
margin-bottom : 5px;
display:none !important;
}
.gfg-listentry {
line-height : 1.5em;
overflow : hidden;
white-space : nowrap;
text-overflow : ellipsis;
-o-text-overflow : ellipsis;
padding-left : 15px;
padding-right : 5px;
margin-left : 5px;
margin-right : 5px;
}
.gfg-listentry-odd {
background-color : #F6F6F6;
}
.gfg-listentry-even {
}
.gfg-listentry-highlight {
background-image : url('garrow.gif');
background-repeat: no-repeat;
background-position : center left;
}
/*
* FeedControl customizations.
*/
.gfg-root .gfg-entry .gf-result .gf-title {
font-size: 24px;
line-height : 1.2em;
overflow : hidden;
white-space : nowrap;
text-overflow : ellipsis;
-o-text-overflow : ellipsis;
margin-bottom : 2px;
}
.gfg-root .gfg-entry .gf-result .gf-snippet {
height : 3.8em;
color: #000000;
margin-top : 3px;
}
/*
* Easy way to get horizontal mode, applicable via js options to gadget.
*/
.gfg-horizontal-container {
position : relative;
width:600px;
height:40px;
}
.gfg-horizontal-root {
height : 1.5em;
_height : 100%;
position : relative;
white-space : nowrap;
overflow : hidden;
text-align : center;
font-family: "Arial", sans-serif;
font-size: 13px;
border: 1px solid #AAAAAA;
padding : 5px;
margin-right : 80px;
}
.gfg-horizontal-root .gfg-title {
font-weight : bold;
background-color: #FFFFFF;
line-height : 1.5em;
overflow : hidden;
white-space : nowrap;
float : left;
padding-left : 10px;
padding-right : 12px;
border-right: 1px solid #AAAAAA;
}
.gfg-horizontal-root .gfg-title a {
color : #444444;
text-decoration : none;
}
.gfg-horizontal-root .gfg-entry {
width : auto;
height : 1.5em;
position : relative;
overflow : hidden;
text-align : left;
margin-top : 0px;
margin-left : 0px;
padding-left : 10px;
}
/* To allow correct behavior for overlay */
.gfg-horizontal-root .gfg-entry .gf-result {
position : relative;
background-color : white;
width : 100%;
height : 100%;
line-height : 1.5em;
overflow : hidden;
white-space : nowrap;
}
.gfg-horizontal-root .gfg-list {
display : none;
}
/*
* FeedControl customizations.
*/
.gfg-horizontal-root .gfg-entry .gf-result .gf-snippet,
.gfg-horizontal-root .gfg-entry .gf-result .gf-author {
display : none;
}
.gfg-horizontal-root .gfg-entry .gf-result .gf-title {
color: #0000cc;
margin-right : 3px;
float : left;
}
.gfg-horizontal-root .gfg-entry .gf-result .gf-spacer {
float : left;
}
.gfg-horizontal-root .gfg-entry .gf-result .gf-spacer,
.gfg-horizontal-root .gfg-entry .gf-result .gf-relativePublishedDate {
display : block;
color: #AAAAAA;
}
.gfg-branding {
white-space : nowrap;
overflow : hidden;
text-align : left;
position : absolute;
right : 0px;
top : 0px;
width : 80px;
}
.gfg-collapse-open, .gfg-collapse-closed {
background-repeat : no-repeat;
background-position : center;
cursor : pointer;
float : right;
width : 17px;
height : 20px;
}
.gfg-collapse-open {
background-image : url('arrow_open.gif');
}
.gfg-collapse-closed {
background-image : url('arrow_close.gif');
}
.gfg-collapse-href {
float : left;
}
.clearFloat {
clear : both;
}
#feedGadget {
margin-top : 5px;
margin-left: auto;
margin-right: auto;
width : 440px;
font-size: 16px;
color: #9CADD0;
}
#feedGadget2 {
margin-top : 5px !important;
float:left;
width : 440px;
color: #9CADD0;
}
.feedGadget2 {
}
#big {
width : 440px;
font-size: 10px;
}
</style>
<script src="http://www.google.com/jsapi/?key=PASTE AJAX KEY HERE"
type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" type="text/javascript"></script>
<script type="text/javascript">
function showGadget() {
var feeds = [
{title:'BLOG_TITLE',
url:'http://MYBLOG.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=999'},
];
new GFdynamicFeedControl(feeds, 'feedGadget',
{numResults : 1000, horizontal : true,
});
}
google.load("feeds", "1");
google.setOnLoadCallback(showGadget);
</script>
<div id="big">
<div id="feedGadget">Loading...</div>
<div id="feedgadget2">Gadget by <a href="http://www.blogdoctor.me" target="_blank">The Blog Doctor</a>.</div></div>
6. Paste it in Contents window of the HTML gadget popup window.
7. Change "BLOG_TITLE" to actual title of blog. Also change "MYBLOG" to actual subdomain of your blogspot. Also sign up for an AJAX key for your blog. Then paste the key where it says "PASTE AJAX KEY HERE".
8. Save the HTML gadget.
9. Click on the HTML gadget in the sidebar and drag it to top of posts column.
10. Click Save button at top of sidebar.
View Blog. Wait for page to load fully before gadget starts to operate.
Enjoy!
Rotating Post Titles Gadget. |
Shows All Posts Blogger Gadget Installer. |
The Blogger Archive Gadget shows only the post titles of the latest month (in Hierarchy mode). The rest of the months and post titles are hidden behind small black arrows which have to be clicked to reveal them. The code generated in Step 2 is in HTML. It will work if you paste it directly in a HTML gadget in your blog. However we need to provide it to our readers in a gadget to place on their blog. To do this we need to convert HTML characters like '>' and '<'. You can do this the hard way by converting each character or the easy way by using sites which provide this service free. Copy the code generated in Step 2 and paste it in the box provided at the HTML escape site. Click the Encode button. A fresh code text box will appear lower down. Copy the code in it.
The Feed Gadget shows only the latest five posts if used along with your blog feed. Here is The "Shows All Posts Blogger Gadget Installer" which when added to your blog enables your blog readers to add/show ALL your blog posts in their blog.
This gadget can increase traffic to your blog and also after installing it on your blog you can with one click add all your post titles as a blog archive on your own blog.........1. MODIFY FEED TO JAVASCRIPT CODE
Paste the code below in the place shown in Step2 after modifying it as follows :
Change 'MYBLOG' to the actual subdomain of your blogspot blog. That is if your blog address is http://example.blogspot.com put in 'example' in place of 'MYBLOG' in the code below :
<div style="text-align:left !important;">
<script language="JavaScript" src="http://itde.vccs.edu/rss2js/feed2js.php?src=http%3A%2F%2FMYBLOG.blogspot.com%2Ffeeds%2Fposts%2Fdefault%3Fstart-index%3D1%26max-results%3D999&chan=n&num=1000&desc=0&date=n&targ=y" type="text/javascript"></script>
<noscript>
<a href="http://itde.vccs.edu/rss2js/feed2js.php?src=http%3A%2F%2FMYBLOG.blogspot.com%2Ffeeds%2Fposts%2Fdefault%3Fstart-index%3D1%26max-results%3D999&chan=n&num=0&desc=0&date=n&targ=n&html=y">View RSS feed</a>
</noscript>
<a href="http://www.blogdoctor.com">Gadget by The Blogdoctor.</a>
</div>
This code converts your site feed (1000 posts) :
http://MYBLOG.blogspot.com/feeds/posts/default?start-index=1&max-results=999
into Javascript code at this site.2. CONVERT ABOVE CODE TO ESCAPE HTML
3. CREATE GADGET INSTALLER
To add the gadget installer to your blog copy the code below and paste it in a HTML gadget in your blog AFTER :
a) Changing "MYBLOG.COM" to your actual blog name.
b) Copy code given in Step 2 above after the encoding process and paste where it says "PASTE CODE FROM STEP 2 HERE."<form action="http://beta.blogger.com/add-widget" method="POST">
<input value="All Posts From MYBLOG.COM" name="widget.title" type="hidden"/>
<textarea style="display:none;" name="widget.content">
PASTE CODE FROM STEP 2 HERE.
</textarea>
<input
value http://www.blogdoctor.com="name=" infourl type="hidden"/>
<input
value = name="logoUrl" http://www.blogger.com/img/icon_logo32.gif type="hidden"/>
<div style="text-align:center;">
<input src="http://i52.photobucket.com/albums/g7/vinayak06/add2blogger_lg-1.gif" name="image" type="image"/>
</div></input
value></input
value></form>
<div style="text-align:center;">
<p>Click above button to get ALL posts from this site on your blog</p>
<li><a href="http://www.blogdoctor.me/2008/12/shows-all-posts-blogger-gadget.html">Click here to Get Similar Gadget for Your Blog.</a></li>
</div>
Put the title of the HTML gadget as "Get ALL Posts from THIS BLOG."
Save the HTML gadget. It will look like this :
4. TEST GADGET INSTALLER
Lastly test the Gadget installer. Click on the "Add to Blogger" button and you will get the "Add Page Element" window. Select your blog and add and you will see a complete list of your blog posts in the sidebar (upto 1000 posts).
Enjoy!
List all the posts in alphabetical order in Blogger. |
PROBLEM : How can you list all the posts in your blog in alphabetical order?
SOLUTION :................
We will use Yahoo Pipes to solve this problem as we did in How to Display Combined Labels in Blogger?GET BLOG FEED
First we get the blog feed URL. In this case we will use :
http://betabloggerfordummies.blogspot.com/atom.xml
Then to include all posts we add this parameter to the above feed url :
?redirect=false&start-index=1&max-results=999
This will fetch 1000 posts from the blog. Now the complete feed url is :http://betabloggerfordummies.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=999
To get your feed url simply replace 'betabloggerfordummies' in the above url with your blog name.YAHOO PIPES
Next get a Yahoo account and go to Yahoo Pipes. Click Create a Pipe to open the interface. In the sidebar click Source and from drop down list drag and drop a Fetch Feed module onto the Interface. In the Fetch Feed module paste the URL for the blog feed shown in above step. See Picture below 
Next click on arrow next to 'Operators' in the sidebar. From the drop down list choose 'Sort' module and drag and drop that onto the interface. See Picture below 
In the Sort Module choose Sort by "item title" in "ascending" order. Drag the blue circle on the bottom border of the Fetch Feed module and connect it to the Sort Module. Then connect the Sort Module to the Pipe Output Module.
Wait for the results to appear in the bottom grey Debugger pane. Click Save Pipe at the top right of the interface. Give it a name and OK it. Next click Run Pipe link at the top center of the interface. You can see the pipe I made here.
Open the pipe by clicking the link above. Click Clone link at top and a copy of this pipe will be added to your Yahoo Pipes. Click Edit Source link and it will open in your interface just as shown in above diagrams. Then in the Fetch Feed Module paste in your Blog Feed url as shown in first step and you have your own pipe. Save it with your own title/name. Click Run Pipe and you will see the output of all posts sorted alphabetically from your blog.
At the top click the 'Get as Badge' link and in popup window click Blogger and the Add Page Element window will open and you can add this list to any of your blogs.SORT LABEL POSTS ALPHABETICALLY
To sort Label Posts alphabetically paste the Label Feed url in the Fetch Feed module. See the Sort Label Posts Alphabetically Yahoo Pipe I made for the label Template in this blog. Clone it as shown above. In the Fetch Feed module text box replace 'betabloggerfordummies' and 'Template' with your blog name and label name to make your own label pipe.
Enjoy!
Add Icon to Post Titles. |
Would you like to add a small graphic or icon to your post titles? Some members of Google Groups asked for this feature and here it is......1. CREATE A GRAPHIC
First step is to create a graphic either in an image editor or in an online image generator such as cooltext.com. Save it to your hard disk and upload it to a freehost. Then copy down its link/URL.2. CREATING THE IMAGE CODE
The image code is :
<img src="LINK OF YOUR IMAGE" style="border-width:0px" />
Replace the CAPS with the link of your image obtained in step 1.3. MODIFYING THE TEMPLATE
Login to the Dashboard and click on Layout for the blog you wish to modify. Then click the Edit Html subtab of Template tab. First backup the template. Put a check in Expand Widgets Template box at the top of the template text box.
Scroll down till you come to the Blog Posts widget code. Locate this code :
<b:includable id='post' var='post'>
<div class='post hentry'>
<a expr:name='data:post.id'/>
<b:if cond='data:post.title'>
<h3 class='post-title entry-title'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
Paste the code you created in Step2 immediately after the last line in the above code. Preview and Save Template. See picture below of the icon next to my post title![]()
If you want it to appear after the title paste the image code after this subsequent line of code :
<data:post.title/>
Preview and save Template.
The Table of Contents Template. |
A reader asked to have a three column template with a Table of Contents at the top. So I decided to make it and take you, my dear readers, along with me as I do so. Something like "The Making of a template.....". So here we go......... Technorati Tags:template, width, third column, change template, conditional tags, css, blogger hacks, 1. CREATE A BLOG
As I have said previously in Practical Approach to Hacking Templates, it is always best to start of with one of the Blogger Templates. So we login to the Dashboard and click on Create Blog link and follow the steps in How to Start a Blog. We will use this blog to showcase the new template. We choose the name as Table of Contents Template and the URL as http://tableofcontentsdemo.blogspot.com/. Lastly we choose the Minima Template and create a Test Post. Since this is to be a Demo blog we set the Settings----Basic------->Add your Blog to our listings?----->No----->Save. In Settings----->Publishing----->Send Pings---->No----->Save. In Settings----->Comments we set Who Can Comment? to Only Members of this blog----->Save, since we do not want spam comments on this Demo blog. In Settings----->Site Feed we set Allow Blog Feed to None---->Save, as this is a demo.2. INCREASE BLOG WIDTH
The next step is to increase blog width, as shown in How to change width of blog, so as to accommodate a third column. So we go to Template------>Edit Html and first backup the template. Then scroll down in edit Html text box till you come to this code :
/* Outer-Wrapper
----------------------------------------------- */
#outer-wrapper {
width: 660px; <----CHANGE THIS
margin:0 auto;
padding:10px;
text-align:left;
font: $bodyfont;
}
The outer wrapper contains all the blog sections within it. See the picture below
:
To create space for a third column we increase it to 880 px and save the template. See the picture below showing increased width of the blog
3. ADD THIRD COLUMN
To add a third column as shown in add a third column to blog, we first define a new column which will be floated left and which will hold the posts column and the new left sidebar. Let us call it the bigcolumn. We add this code just below the outer wrapper code in No 2 above :
#bigcolumn {
width: 630px;
float: left;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
The width is Main (posts) Column 410px + Left sidebar 220px = 630px. It is floated left. Then add the new left sidebar wrapper code below it :
#leftsidebar-wrapper {
width: 220px;
float: left;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
It is floated left within the big column while the posts column is floated right. So we change the float property of the posts column in the code below fro left to right:
#main-wrapper {
width: 410px;
float: right;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
Save Template. The columns have been defined in the CSS and now we have to add code in the body part to show the on page. So we add the big column first after this line in the code :
<div id='content-wrapper'>
ADD THIS LINE
<div id='bigcolumn'>
THEN ADD THE LEFT SIDEBAR WRAPPER CODE BELOW IT :
<div id='leftsidebar-wrapper'>
<b:section class='sidebar' id='leftsidebar' preferred='yes'>
</b:section>
</div>
save the template after closing the bigcolumn division by putting
</div>
after this block of code which represents the main (posts) column :
<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>
See the picture of the full blog below which is now three columns :
4. TABLE OF CONTENTS
The Table of Contents is a Archive Widget which we will place in the central (posts) column. To do this we have to increase the number of widgets in the central column. Go to Template----->Edit Html----->and scroll down till you come to :
<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
Change this code to
<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='yes' maxwidgets='3'>
Save Template and switch to Page Elements tab. There is already an Archive widget in the right sidebar. Drag and drop it to the top of the posts column and click on Save at the top. Switch back to Edit Html tab and put a check in Expand Widgets Template checkbox at the top of the Edit Template textbox. This will expand the code for the Archives widget. Replace the code AFTER THE FIRST TWO LINES which are :
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'>
<b:includable id='main'>
WITH THE CODE BELOW :
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<div id='ArchiveList'>
<div expr:id='data:widget.instanceId + "_ArchiveList"'>
<b:if cond='data:style == "HIERARCHY"'>
<b:include data='data' name='interval'/>
</b:if>
</div>
</div>
<b:include name='quickedit'/>
</div>
</b:includable>
<b:includable id='interval' var='intervalData'>
<b:loop values='data:intervalData' var='i'>
<b:if cond='data:i.data'>
<b:include data='i.data' name='interval'/>
</b:if>
<b:if cond='data:i.posts'>
<b:include data='i.posts' name='posts'/>
</b:if>
</b:loop>
</b:includable>
<b:includable id='posts' var='posts'>
<ul class='posts'>
<b:loop values='data:posts' var='i'>
<li><a expr:href='data:i.url'><data:i.title/></a></li>
</b:loop>
</ul>
</b:includable>
</b:widget>
Save Template.5. USE CONDITIONAL TAGS
Now we have the Blog Archives widget showing only the links to the posts. Below it is the posts. We will now use conditional tags as described in Post a Book in the New Blogger to show only the Archives widget on the main page and to show the posts widget on the post pages only.
To do this go to Templates----->Edit Html and put a check in the box to expand Widgets Templates at the top of the Edit Template text box. Then scroll down to the archives code
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'>
<b:includable id='main'>
Add after the above lines the following code :
<b:if cond='data:blog.url == data:blog.homepageUrl'>
Also add </b:if> before the immediate next </b:includable>
The whole code after modification becomes :
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<div id='ArchiveList'>
<div expr:id='data:widget.instanceId + "_ArchiveList"'>
<b:if cond='data:style == "HIERARCHY"'>
<b:include data='data' name='interval'/>
</b:if>
</div>
</div>
<b:include name='quickedit'/>
</div>
</b:if>
</b:includable>
<b:includable id='toggle' var='interval'>
<b:if cond='data:interval.toggleId'>
<b:if cond='data:interval.expclass == "expanded"'>
<a class='toggle' expr:href='data:widget.actionUrl + "&action=toggle" + "&dir=close&toggle=" + data:interval.toggleId + "&toggleopen=" + data:toggleopen'>
<span class='zippy toggle-open'>▼ </span>
</a>
<b:else/>
<a class='toggle' expr:href='data:widget.actionUrl + "&action=toggle" + "&dir=open&toggle=" + data:interval.toggleId + "&toggleopen=" + data:toggleopen'>
<span class='zippy'>► </span>
</a>
</b:if>
</b:if>
</b:includable>
<b:includable id='flat' var='data'>
<ul>
<b:loop values='data:data' var='i'>
<li class='archivedate'>
<a expr:href='data:i.url'><data:i.name/></a> (<data:i.post-count/>)
</li>
</b:loop>
</ul>
</b:includable>
<b:includable id='posts' var='posts'>
<ul class='posts'>
<b:loop values='data:posts' var='i'>
<li><a expr:href='data:i.url'><data:i.title/></a></li>
</b:loop>
</ul>
</b:includable>
<b:includable id='menu' var='data'>
<select expr:id='data:widget.instanceId + "_ArchiveMenu"'>
<option value=''><data:title/></option>
<b:loop values='data:data' var='i'>
<option expr:value='data:i.url'><data:i.name/> (<data:i.post-count/>)</option>
</b:loop>
</select>
</b:includable>
<b:includable id='interval' var='intervalData'>
<b:loop values='data:intervalData' var='i'>
<b:if cond='data:i.data'>
<b:include data='i.data' name='interval'/>
</b:if>
<b:if cond='data:i.posts'>
<b:include data='i.posts' name='posts'/>
</b:if>
</b:loop>
</b:includable>
</b:widget>
For the posts column paste this line of code :
<b:if cond='data:blog.pageType == "item"'>
instead of line xxxxxxxxxxxxxxxxx in below code in your template :
<b:includable id='main' var='top'>
<!-- posts -->
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<div class='blog-posts'>
Then locate the immediate next </div> and add </b:if> after it. Save Template.6. CUSTOMIZING APPEARANCE
You now have a TABLE OF CONTENTS on the front page. To change the title from Blog Archives to TABLE OF CONTENTS just click Edit link in the Archives section on top of the blog posts on Page Elements subtab of Template tab. To change the background of the Table of Contents put this code in the VARIABLE DEFINITIONS :
<Variable name="headingcolor" description="TABLE OF CONTENTS Color"
type="color" default="#fff" value="#ffffff">
<Variable name="contentBackgrnd" description="TABLE OF CONTENTS Background Color"
type="color" default="#fff" value="#ffff66">
and this code lower down after the outer wrapper code :
.BlogArchive h2 {
color:$headingcolor;
}
.BlogArchive {
border:10px solid #000000;
border-bottom:10px solid #000000 !important;
background-color:$contentBackgrnd;
text-align:center;
}
Save Template. See the picture of the blog below :
You can check out the DEMO BLOG here. You can download the full template here.
post titlestable of contents












