Aravind Ranganathan
Home Professional Personal Miscellaneous Contact Me

Coding Problems and Errors:


Labels widget for Blogger Classic Template


Problem: How to generate an automatic listing of labels in Blogger Classic template?
Solution: Add the following code to the side-bar where you want the labels:
<div id="labelList"></div>
<script type="text/javascript">
//<![CDATA[
function listLabels(root){
    var baseURL = '/search/label/';
    var baseHeading = "Labels";
    var isFTP = false;
    var llDiv =
document.getElementById('labelList');
    var entry = root.entry;
    var h2 = document.createElement('h2');
    h2.className = 'sidebar-title';
    var h2t =
document.createTextNode(baseHeading);
    h2.appendChild(h2t);
    llDiv.appendChild(h2);
    var ul = document.createElement('ul');
    ul.id = 'label-list';
    var category = entry.category;
    labelSort = new Array();
    for(p in category){    
labelSort[labelSort.length] = [category[p].term];
        }
    labelSort.sort();
    for (var r=0; r <
labelSort.length; r++){
var li = document.createElement('li');
var a = document.createElement('a');
if(isFTP){          
a.href = baseURL + encodeURIComponent(labelSort[r])+'.html';        
}
else {        
a.href = baseURL + encodeURIComponent(labelSort[r]);  
}
a.innerHTML = labelSort[r] + ' ';
li.appendChild(a);
ul.appendChild(li);
abnk = document.createTextNode(' ');
ul.appendChild(abnk);
}
    llDiv.appendChild(ul);
}
//]]>
</script><script type="text/javascript" src="http://www.blogger.com/feeds/USERID/blogs/BLOGID?alt=json-inscript&callback=listLabels"
></script>
Remember to change USERID and BLOGID in the final line with the actual values for your blog. The USERID of your blog is the number on the url on your profile page and the BLOGID is the number on the url on any of the settings/posting/layout pages - all of which can be accessed from your blog's dashboard. You also need to set the baseURL variable to the path (I recommend http://blogurl path instead of the server path) to the labels folder in your blog and set the variable isFTP to true if you publish using FTP.

For a very detailed solution (and the actual source) see: http://phydeaux3.blogspot.com/2007/05/automatic-list-of-labels-for-classic.html

Back to Top


Twip.me commands


Some important commands in Twip.me for twitter:

t [status] – to twit this status
d [username] [message] – to dm that fellow twitter
d [username1,username2,username3,...] [message] – to mass dm
follow [username] – to follow that user
unfollow [username] – to unfollow the user
mute – to stop receiving friends updates
talk – to start receiving friends updates again
report [error] – to send an error report
Back to Top


DreamWeaver 8: FTP information does not save for sites


Problem: Dreamweaver 8 does not save the user name and password for sites that are connected through ftp.

This is because Dreamweaver 8 (not earlier versions) loses FTP login settings as the FTP unames and passwords in their Dreamweaver site definitions are deleted when Dereamweaver is closed and re-opened.

Two known reasons:
1. IE7 is installed in the machine, or less likely that
2. The following registry key is missing or is empty: HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Explorer\ User Shell Folders\ AppData

Solution: If you have IE7 installed then install the Dreamweaver 8.0.2 updater from http://www.adobe.com/support/dreamweaver/downloads_updaters.html

Otherwise, make sure Dreamweaver 8.0.2 updater is installed and the go to the HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Explorer\ User Shell Folders\ AppData folder in the registry and edit / add the value field of the AppData key with %USERPROFILE%\Application Data (Note: If the values for the other keys in your User Shell Folders directory don't start with %USERPROFILE%, then use the value that your other keys use. For example, if your Local Settings key has a value of u:\Local Settings, then try using u:\Application Data)

For more detailed help see: http://kb2.adobe.com/cps/349/3491671c.html

Back to Top


 

Labels