Adding Search Engine in your Blogger

Posted by Alex on Thursday, January 24, 2008

This is a simple Search Engine that lets your reader to find post in your blog. If the number of your post is many, it's very useful to have a search engine on your blog's sidebar. Here is the step by step instruction to add a simple search engine in your blog.



STEP 1
Goto "Layout -> Page Elements". Click "Add a page elements" then choose "HTML/Java Script".


STEP 2
Paste the code below into "Content" Box and replace "yourblogname" with your blog name.


<form action="http://yourblogname.blogspot.com/search" method="get"> <input class="textinput" name="q" size="30" type="text"/> <input value="search" class="buttonsubmit" name="submit" type="submit"/></form>



Read More...

Add "Read more" Link under your Blogger Post

Posted by Alex on Tuesday, January 22, 2008

It really makes sense if your posts are too long and you would like to shorten it. From the reader's  point of view, they would feel more comfortable to read your blog if you shorten your post and provide a "Read more..." link under each post . However, Blogger with default does not provide a way to shorten your post.  But now we can do it by using this blogger hack provided by Ramani.


STEP 1
Goto Template -> Edit HTML, tick the "Expand Widget Template"
(Note: Please remember to backup your template!)


STEP 2
Find this tag


</head>


STEP 3
Copy the following code and paste it before </head> <b:if cond='data:blog.pageType != "item"'>
<script type="text/javascript">

var fade = false;
function showFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
for (var i = 0; i &lt; spans.length; i++) {
if (spans[i].id == "fullpost") {
if (fade) {
spans[i].style.background = peekaboo_bgcolor;
Effect.Appear(spans[i]);
} else spans[i].style.display = 'inline';
}
if (spans[i].id == "showlink")
spans[i].style.display = 'none';
if (spans[i].id == "hidelink")
spans[i].style.display = 'inline';
}
}


function hideFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
for (var i = 0; i &lt; spans.length; i++) {
if (spans[i].id == "fullpost") {
if (fade) {
spans[i].style.background = peekaboo_bgcolor;
Effect.Fade(spans[i]);
} else spans[i].style.display = 'none';
}
if (spans[i].id == "showlink")
spans[i].style.display = 'inline';
if (spans[i].id == "hidelink")
spans[i].style.display = 'none';
}
post.scrollIntoView(true);
}

function checkFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName('span');
var found = 0;
for (var i = 0; i &lt; spans.length; i++) {
if (spans[i].id == "fullpost") {
spans[i].style.display = 'none';
found = 1;
}
if ((spans[i].id == "showlink") &amp;&amp; (found == 0))
spans[i].style.display = 'none';
}
}

</script>
</b:if>


STEP 4
Find this div for the post-body and add the portion of code in red color.


<div class='post-body' expr:id='"post-" + data:post.id' >
<b:if cond='data:blog.pageType == "item"'>
<style>#fullpost{display:inline;}</style>
<p><data:post.body/></p>
<b:else/>
<style>#fullpost{display:none;}</style>
<p><data:post.body/></p>
<span id='showlink'>
<a expr:href='data:post.url'>Read More......</a>
</span>
<script type='text/javascript'>
checkFull("post-" + "<data:post.id/>");
</script>
</b:if>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>


STEP 5
Goto Settings -> Formatting , Copy and paste these lines into "Post Template" text box and save the settings.


Type your summary here
<span id="fullpost">
Type rest of the post here
</span>


save


Read More...

Lock any folder without using Software

Posted by Alex on Thursday, January 17, 2008

Did you ever want to lock any secret folders in your computer? However, you don't have any folder locking software in your desktop. Here I'll show you a simple trick that can lock any folder quickly . The trick which I am going to tell you will make your folder change into control panel , so if anyone tries to open it , the control panel will open instead of your folder.

Open your notepad and paste the code below

@echo off
ren %1 "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder Locked.
pause


Then, save it as locker.bat. Now you have created your own folder locking software. You can save it to your Desktop or USB drive, so you can lock your folder anytime.




How to lock your folder?
Just click on any folder you want to lock, drag it on the locker.bat and drop it. Then, your folder has been locked. When someone clicks on this folder, the control panel will open and your files inside the folder remain hidden.

lockfile
   

How to unlock it?
It's pretty simple, just rename your locked folder to the default name or any name and done.  So, next time your folder locked by your friend with this trick, your will know how to unlock it : )


Read More...