Showing posts with label Blogger Hacks. Show all posts
Showing posts with label Blogger Hacks. Show all posts

Saturday, 8 October 2011

[Blogger tricks]How To Dynamically Increase Or Decrease Your Blogger/Blogspot text Size

Ever wondered how it would be to increase/decrease the Blogger text size dynamically?See this if you want to know what I mean.The advantage of this method is that your website is flocked by people of different ages so some might find the font too small to read,so what this javascript does is that using your mouse click it can either increase or decrease the font without you needing to change the layout.Amazing right?Without further delay lets get into the work:
Step1)First download a copy of your template.Go to Design-->Edit html-->Click on Download template.Always keep a backup of your template.

Step2)Now Search for the following Piece of code (Use Crtl +F):
<div class='post-body entry-content' >
Now just add id='wrap-content' to above code such that in the end the code looks like:
<div class='post-body entry-content' id='wrap-content'>

Step3)Now Click on save template & now go to Design-->page elements -->Add a gadget & Select Html/javascript.

Step4)Now copy the code from here,paste it in the content text box & click save.The widget would be added.And thats that!Now you will be able to Increase or Decrease Your Font Size On Blogger Dynamically - The Text Resizing Widget

Monday, 3 October 2011

Blogger Hacks[Fixed]: How to Add Email Subscription Pop-Up Form In Blogger With Fix

Email Pop-Up forms are the new trend in attracting potential Customers to Websites/Blogs by providing updates via email/feed.A lot of sites are not equipped with this new Pop-Up feature which some people claim to be really annoying,it has proved that it has a better likelyhood of attracting potential followers/Customers.Here we will be dealing with similar subscribe feature involving Email Rss provided by feedburner.


Step1) Always remember to back-up your template.Never tinker with your blogger template unless you have saved a back-up.Go to Design-->Edit Html -->Download Template & save a copy of it as shown below:
Step2)Now Click on Expand Widgets & search for the following piece of code using Ctrl + F:

]]></b:skin>
Step3)Copy and paste the following code directly above ]]></b:skin>:
/*Subscription Pop Up Css*/
#popupContactClose{
cursor: pointer;
text-decoration:none;
}
#backgroundPopup{
display:none;
position:fixed;
_position:absolute; /* hack for internet explorer 6*/
height:100%;
width:100%;
top:0;
left:0;
background:#000000;
border:1px solid #cecece;
z-index:1;
}
#popupContact{
display:none;
position:fixed;
_position:absolute; /* hack for internet explorer 6*/
height:384px;
width:408px;
background:#FFFFFF;
border:2px solid #cecece;
z-index:2;
padding:12px;
font-size:13px;
}
#popupContact h1{
text-align:left;
color:#6FA5FD;
font-size:22px;
font-weight:700;
border-bottom:1px dotted #D3D3D3;
padding-bottom:2px;
margin-bottom:20px;
}
#popupContactClose{
font-size:14px;
line-height:14px;
right:6px;
top:4px;
position:absolute;
color:#6fa5fd;
font-weight:700;
display:block;
}
Step4)Now look for the following piece of code using Ctrl + F:
</head>
Step5)Paste the following code directly above</head>:
<!--Pop Up Subscription-->
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js' type='text/javascript'/>
<script src='http://dinhquanghuy.110mb.com/jquery.cookie.js' type='text/javascript'/>
<script type='text/javascript'>
var popupStatus = 0;

//loading popup with jQuery magic!
function loadPopup(){
centerPopup();
//loads popup only if it is disabled
if(popupStatus==0){
$(&quot;#backgroundPopup&quot;).css({
&quot;opacity&quot;: &quot;0.7&quot;
});
$(&quot;#backgroundPopup&quot;).fadeIn(&quot;slow&quot;);
$(&quot;#popupContact&quot;).fadeIn(&quot;slow&quot;);
popupStatus = 1;
}
}

//disabling popup with jQuery magic!
function disablePopup(){
//disables popup only if it is enabled
if(popupStatus==1){
$(&quot;#backgroundPopup&quot;).fadeOut(&quot;slow&quot;);
$(&quot;#popupContact&quot;).fadeOut(&quot;slow&quot;);
popupStatus = 0;
}
}

//centering popup
function centerPopup(){
//request data for centering
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var windowscrolltop = document.documentElement.scrollTop;
var windowscrollleft = document.documentElement.scrollLeft;
var popupHeight = $(&quot;#popupContact&quot;).height();
var popupWidth = $(&quot;#popupContact&quot;).width();
var toppos = windowHeight/2-popupHeight/2+windowscrolltop;
var leftpos = windowWidth/2-popupWidth/2+windowscrollleft;
//centering
$(&quot;#popupContact&quot;).css({
&quot;position&quot;: &quot;absolute&quot;,
&quot;top&quot;: toppos,
&quot;left&quot;: leftpos
});
//only need force for IE6

$(&quot;#backgroundPopup&quot;).css({
&quot;height&quot;: windowHeight
});

}


//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
if ($.cookie(&quot;anewsletter&quot;) != 1) {

//load popup
setTimeout(&quot;loadPopup()&quot;,5000);
}
//CLOSING POPUP
//Click the x event!
$(&quot;#popupContactClose&quot;).click(function(){
disablePopup();
$.cookie(&quot;anewsletter&quot;, &quot;1&quot;, { expires: 7 });
});
//Click out event!
$(&quot;#backgroundPopup&quot;).click(function(){
disablePopup();
$.cookie(&quot;anewsletter&quot;, &quot;1&quot;, { expires: 7 });
});
//Press Escape event!
$(document).keypress(function(e){
if(e.keyCode==27 &amp;&amp; popupStatus==1){
disablePopup();
$.cookie(&quot;anewsletter&quot;, &quot;1&quot;, { expires: 7 });
}
});

});
</script>
Step5)Now search for the following code by using Crtl+ F:
</body>
Step6)Now copy the paste directly above</body>

<div id='popupContact'>
<a id='popupContactClose'>x</a>
<h1>Get Our Latest Posts Via Email - It&#39;s Free</h1>
<p id='contactArea'><form action='http://feedburner.google.com/fb/a/mailverify' method='post' onsubmit='window.open(&apos;http://feedburner.google.com/fb/a/mailverify?uri=welcometospicytricks&apos;, &apos;popupwindow&apos;, &apos;scrollbars=yes,width=550,height=520&apos;);return true' style='border:1px solid #ccc;padding:3px;text-align:center;' target='popupwindow'><p>Enter your email address:</p><p><input name='email' style='width:140px' type='text'/></p><input name='uri' type='hidden' value='welcometospicytricks'/><input name='loc' type='hidden' value='en_US'/><input type='submit' value='Subscribe'/><p>Delivered by <a href='http://feedburner.google.com' target='_blank'>FeedBurner</a></p></form></p>
</div>
<div id='backgroundPopup'/>
MOST IMPORTANT:You need to replace the items highlighted in Red with your feeds in the feedburner otherwise the subscription will come to me directly.
If you have any issues,feel free to comment in the post and I will get back @ the earliest.

Sunday, 2 October 2011

Blogger Hacks: How To Add Glossy Tabs/Horizontal Navigation Labels/Pages In Blogger

Having Horizontal Tab navigation in Blogger is one thing,but having an animated Tab with multi-colored feature just like Websites can blow you away.Just by adding a few Css code into your Blogger template,even your blog can obtain the roll-over effect implemented in my blog(Click here to view it).The beautiful thing is its perfectly customizable.
Step1)First & Foremost,Download a copy of your Blogger template.Go to Design-->Edit Html-->CLick on download template.Always download a copy of your template if planning to tinker with Blogger codes.

Step2)Go to Design-->Page Element-->Click on Add gadget-->Select HTML & JavaScript Widget.

Step3)Copy the following code & Paste it into the Widget.Don't save it yet.Still somethings to be done:

<style>
.mbt-red-grey-menu{
border:5px solid #cd0000;
padding:0;
clear:both;
}
.mbt-red-grey-menu{
margin:0px;
padding: 0;
float: left;
font: bold 13px Arial;
width: 100%;
overflow: hidden;
margin-bottom: 1em;
border: 1px solid #625e00;
border-width: 1px 0;
background: black url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNgdNaGEgZ5jpKwe-eUPvwtziDef09-kOc70qX4SLAraDkqfAgYe6N7V9W3I8rWSuma8r7NRm3NKDs479wbpiARooQyzfxmEHbW70ejQj75nsQoGxfeku6cTBPeUpH47lDRBL35x7XyUw/s400/blockdefault.gif) center center repeat-x;
}
.mbt-red-grey-menu li{
display: inline;
}
.mbt-red-grey-menu li a{
float: left;
color: #fff;
padding: 9px 11px;
text-decoration: none;
border-right: 1px solid white;
}
.mbt-red-grey-menu li a:visited{
color: #fff;
}
.mbt-red-grey-menu li a:hover, .mbt-red-grey-menu li a.selected{
color: #fff;
background: transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbDi-FUTmnQBy1Z3ZixFG7UioahbdqMSRtDai_AwDpGzka6jfm2hsKxlmGg4ukom6FZTNL3E1lcNfm2mtfs70Kn5VzLCFqewLxJ6G-fjsLyt9KuEL20pYVgj_SMPfcN60rIQMC20LtRe4/s400/blockactive.gif) center center repeat-x;
}
</style>
<ul  class="mbt-red-grey-menu">
<li><a href="#">Home</a></li>
<li><a href="#" >About Us </a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Sitemap</a></li>
</ul>
The default tab config will be Red-Grey scale & incase you want a Grey-Red Cobo then exchange the codes mentioned in red vice-versa.
Step4)Now replace the "#" sign with your Blogger page Url.The more pages you want you can keep adding into the list.For instance when you create a new page like About me then add  one like following:
<li><a href="#">page-name</a></li>
Step5)Save the widget now and drag it to the Header column right below the blog title description.

                                                             And you are all done.In case you want to change the default red-grey to any other color like I did(Red/orange) feel free to approach me.In my next post I will dealing with Adding Drop down's and adding a your other blogger sites as navigational links like mine.

Saturday, 1 October 2011

Blogger hack: Highlighting & Customizing Author/Admin Comments in Blogger Posts

Even wondered how it would be to see your blogger comments stand out from the rest when you are the Author of the blog?There is also a really cool method which as usual involves tinkering with your blogger template so make sure you download a copy of the template.So to Highlight the Admin/Author comments:
Step1: Go to Design-->Edit Html-->Click on Download Template.Always save a back up of your template first.  


Step2):Now search for the following Using (Ctrl + F):
]]></b:skin>
Step3): Copy the following code directly above the earlier code:

.comment-body-author {
background: #ffffff;
border: 2px solid #666666;
padding: 5px;
}
Now If you want to display an Image in the background to then replace #ffffff(white background) to background: url(http://DIRECT_LINK_OF_THE_IMAGE.jpg) ;
Step4)In case you plan to Change the Text color then search the following code & add the ones displayed in red for you:
<dl id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt class='comment-author' expr:id='"comment-" + data:comment.id'>
<a expr:name='"comment-" + data:comment.id'/>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<b:if cond='data:comment.author == data:post.author'>
<dd class='comment-body-author'>
<p><data:comment.body/></p>
</dd>
<b:else/>


<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>

</b:if>

<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='"#comment-" + data:
comment.id' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>
Now all that;s left to do is save the template.Now in case of any issues feel free to Holla @ me.