Thursday, 7 March 2013

How To Add Auto ‘Read More’ Feature with Thumbnails


This nice trick will automatically create post summaries with thumbnails. You don't need to add any extra code in every blogger post that you make.
Tutorial Updated : Jan 1, 2013
1.Go to "Template" --> "Edit HTML" of your blog.
2.Click on "Expand Widget Templates"
3.Scroll down to where you see </head> tag.
4.Now add below code just before </head> tag.
<script type='text/javascript'>
summary_noimg = 250;
summary_img = 200;
img_thumb_height = 150;
img_thumb_width = 150;
</script>
<script type='text/javascript'>
//<![CDATA[

function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}

function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = summary_noimg;
if(img.length>=1) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = summary_img;
}

var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}

//]]>
</script>
Note : You can change below values as your choice.
summary_noimg : number of character to display when there is no image.
summary_img : number of character to display when there is an image.
img_thumb_height : hight of the post thumbnails.
img_thumb_width : width of the post thumbnails.
5.Now Scroll down to where you see this:
<data:post.body/>
6.Replace above code with below code.
<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:blog.pageType != "item"'>
<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>

<b:if cond='data:blog.pageType == "static_page"'><data:post.body/></b:if>

<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:blog.pageType != "item"'>
<div style='float:right;margin-right:10px;margin-top:5px;'>
<a expr:href='data:post.url'>Read More</a>
</div>
</b:if>
</b:if>
7.Now save your template and you are done.

How To Disable Highlight Text on blogger blog








1.Log in to your dashboard--> layout- ->Page Elements


2.Click on 'Add a Gadget' on the sidebar.


3.Select 'HTML/Javascript' and add the code given below and click save.
<script type="text/javascript">

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>
Now you are done.

Tuesday, 5 March 2013

How to delete windows.old in windows 7 or undeleteable files & folders


1ST METHOD

To delete the Windows.old folder from an earlier installation of Windows, follow these steps:
  1. Click Start, type disk cleanup in the Start Search text box, and then click Disk Cleanup.
  2. In the Disk Cleanup Options dialog box, click Files from all users on this computer.
  3. In the User Account Control dialog box, click Continue.
  4. Click to select the Previous Windows installation(s) check box, and then click OK.
Advanced users can also use a command prompt to delete files and folders from an earlier installation of Windows Vista. To do this, follow these steps:
  1. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
  2. In the User Account Control dialog box, click Continue.
  3. At the command prompt, type takeown /F <DriveLetter>:\<FolderName>\* /R /A, and then press ENTER.

    Note When you run this command, you are granted ownership of the administrator group for the folder, of all the subdirectories in the folder, and of all the files in the folder.
  4. At the command prompt, type cacls <DriveLetter>:\<FolderName>\*.* /T /grant administrators:F, and then press ENTER.

    Note When you run this command, administrators are granted full rights to all files and to all folders.
  5. At the command prompt, type rmdir /S /Q <DriveLetter>:\<FolderName>\, and then press ENTER.

    Note When you run this command, all subfolders and all files in the specified folder are deleted. Additionally, the specified folder itself is deleted.


2nd METHOD

I know what you're going through.  I had two aborted attempts at installing Windows 7 and it left two huge .old files on my drive.  The answer the others are giving is if you are deleting them from a Vista OS.  You, like I was, are trying to delete them from the Windows 7 OS .  Here is how to do that:

Click on Start/All Programs/Accessories/System Tools/Disc Cleanup
When the dialog box comes up, select the drive that has the .old files on it and click OK
The system then scans for the files to be cleaned up and another dialog box opens with the selection.  Click on the button labeled Clean up system files at the bottom of that dialog box.

Another dialog box will come up, select the drive again that has the .old files on it.  The system will perform another scan for the system files that need to be cleaned up.

After scanning, another dialog box opens up and there you will find a list of check boxes.  Scroll through and check on the box labeled Older versions of Windows and clickOK .

That should take care of them.  The two aborted install attempts I had as .old files where taking up 16 gigs.  This got rid of them.





3rd METHOD

Click Start> All Programs> Accessories>>right-click "Command Prompt", and then click Run as administrator.

run following 3 commands on command prompt

takeown /F c:\Windows.old\* /R /A
cacls c:\Windows.old\*.* /T /grant administrators:F
rmdir /S /Q c:\Windows.old\