Disable text select on blogger

If You want to disable text select inside blogger posts here is the code for that:


<script type="text/javascript">
/***********************************************
* Disable select-text script- &#169; Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//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>

Place above code just before ending </body> tag inside Your blogger template :)

ASUS X5DC CPU upgrade

I have this laptop ASUS X5DC with Intel Celeron 1.2 Dual core CPU.
This laptop is useless with this CPU and the question is - How can I upgrade this CPU?


Few days ago I have remove back cover to take a closer look at the motherboard and CPU. What have I found?

CPU in this particular laptop cant be replaced because this Intel Celeron 1.2 Dual core is soldered on the board directly, without any CPU removable socket.

My advice for all You guys who are looking for a cheap laptop is to avoid this one (Celeron CPU in general) because it is not worth any.

P.S. Like this CPU handicap is not enough.You should know that this laptop have shitty integrated graphic adapter also. SIS GPU is all I can say.

Wordpress - adsense inside posts

Here is sample code for Wordpress widget. With this widget You can place random posts + Google adsense code inside single post.

Rule for showing this box is : If img = 600px , after H2 show box ; else do nothing



And code goes like this:

public function sadrzaj_dodaj_widget($content) {
        if(is_single()) {
            global $post;
            if(has_post_thumbnail($post->ID)) {
                $post_thumbnail_id = get_post_thumbnail_id( $post->ID );
                list($slika_sirina, $slika_visina, $slika_tip, $slika_attr) = getimagesize( get_attached_file( $post_thumbnail_id ) );
                if($slika_sirina == 600) {
                    //Filtriranje samo ako je post
                    $html .= preg_replace('/<\/h{1}2>/', '</h2>'.$this->html_widgeta(), $content, 1);
                    return $html;
                }
            }
        }
        return $content;
    }

Blogspot - How to setup Google Analytics account?

To setup Google Analytic account on the blogspot do this

First of all, You must create new analytic account




On the picture above You can see New Account for this blog. After You have enter all data into form, click button Get code. You will be prompted for Google TOS, which You must Agree with.

After that You will get code for Google Analytics.


Select code and copy it to clipboard.
Now, go to blogspot dashboard and edit template. Find opening <body> tag and paste Google Analytics code right after that line of code.


Wait a few seconds, maybe one minute and You will see the result on the live analytic stream


Related post - Widget on blogspot

If You like this widget under each post here is code for it

<!--Related Posts with thumbnails Scripts and Styles Start-->
<!-- remove -->
<style type='text/css'>
#related-posts{float:left;width:auto;}
#related-posts a{border-right: 1px dotted #eaeaea;}
#related-posts a:hover{background: #EEEEEE;}
#related-posts h2{margin-top: 2px; background:none; font:18px Georgia;padding:0px;color:#000000;}
#related-posts .related_img {margin:1px; border:1px solid #f2f2f2; width:100px; height:100px;}
#related-title {color:#666;text-align:center; padding: 0px 5px 5px; font-size:12px; width:100px;}
</style>
<script src='http://helplogger.googlecode.com/svn/trunk/relatedposts.js' type='text/javascript'/>
<!-- remove -->
<!--Related Posts with thumbnails Scripts and Styles End-->


Place that code just before </head> in Your blogspot template.

After that, find this part of code

<div class='post-footer'>
and just before that line place this code

 <!-- Related Posts with Thumbnails Code Start-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != &quot;true&quot;'>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels_thumbs&amp;max-results=5&quot;' type='text/javascript'/></b:if></b:loop>
<script type='text/javascript'>
var currentposturl=&quot;<data:post.url/>&quot;;
var maxresults=5;
var relatedpoststitle=&quot;<b>Related posts:</b>&quot;;
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs();
</script>
</div><div class='clear'/>
</b:if>
<b:if cond='data:blog.url == data:blog.homepageUrl'><b:if cond='data:post.isFirstPost'>
<a href='http://helplogger.blogspot.com'><img alt='Blogger Tricks' src='http://3.bp.blogspot.com/-K65p5zLLKQk/T3ObCINoP7I/AAAAAAAABmI/dF84-alnOu4/s1600/best+blogger+tips.png'/></a>
</b:if></b:if><!-- Related Posts with Thumbnails Code End-->

You can change some basics - number of posts to show, widget text ... etc

How to show adsense only in post?

If You like to show Google adsense only in posts - not on index page or category pages then place this IF CONDITION around Google adsense code.

<br /> stays for break line &
<center></center> stays for better display alignment.

P.S. Google adsense code on the picture above is converted for blogspot functionality.

Setup G plus comments while using custom template

It's a bit tricky to use G+ comment system on the customized blogspot template. This post shows how to setup G+ comments instead of standard blogger comment system.

Edit your template and look for a code like this


Now replace highlighted lines with new code

<b:include data='post' name='comment_picker'/>

Save template and refresh Your blog page. See if it is working.

You should get G plus comments under each post