Disable Right Click On Your Blog To Prevent Copy/Paste
- Go to your blogger Dashboard and click on Layout.
- Then click on Add Gadget.
- Choose Html/Javascript From Popup Window
- Now Copy and Paste below code into it.
- now save it and refresh your blog, and TaDa...you are done disabling right click on your blog.
<!--CS Code -->
<!--custom-codes.blogspot.com-->
<script language='JavaScript1.2'>
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
21:09 | 0 Comments
Add Photo on Google Search Result
- Step 1: Open up your blog's design code and add a 'rel=author' type link to your Google+ profile there. You can add up the link anywhere on the blog but the About pages are usually a good spot for such. The link is provided below, replace PROFILE_URL with your profile address and add it to your blog.
<a href="PROFILE_URL?rel=author">Google+ Profile</a>An example of the complete link tag is shown below.
<a href="https://plus.google.com/u/0/123456789012345678900?rel=author">Google+ Profile</a>
21:04 | 0 Comments
Convert Video Youtube to Mp3 via Online
custom-codes - Convert Video Youtube to Mp3 via Online
never seen a video song on youtube? we want to change the format of youtube flv video into mp3 format in order to be heard continuously without having to open the website youtube.
here's how to convert youtube flv video formats into mp3 format:
1. access this url http://www.youtube-mp3.org/
2 after the copy paste youtube video url you want to change the format
3 Click the "convert video" then wait a few seconds until the video succeeded in converting
4. download the result file convert
03:47 | 0 Comments
Make Total Posts and Comments on Widget Blog
custom-codes - This time I will be a tutorial on how to display the number of comments and posts on the blog. This article I wrote, when I visited a neighboring blog, I am very interested in this one tutorial blog, so there is no harm in it if I share the knowledge with you all.
How to display the number of blog posts and comments is easy, especially if you have a number of articles and comments that much. You can show or display them on your blog, or even create a blog visitor feel confident that he come to the correct place.
Installing Widget Total Posts and Comments Blog
If you are interested in this widget, you can install it by following the steps below:
- Login with your blog account
- Go to the menu LAYOUT
- Click Add a Gadget, then select the HTML / Javascript
- Copy and paste the script below :
<center><script style="text/javascript">
function showpostcount(json) {
document.write('Total Posts : <b>' + parseInt(json.feed.openSearch$totalResults.$t,10)
+ '</b><br>');}</script>
<script src="http://your-url.blogspot.com/feeds/posts/default?alt=json-in-script&callback=showpostcount"></script><script style="text/javascript"></script>
<script style="text/javascript">
function numberOfComments(json) {
document.write('Total Comments : <b>' + json.feed.openSearch$totalResults.$t +
'</b><br>');}</script>
<script src="http://your-url.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></center>
03:33 | 0 Comments
Enable gzip compression with Php
<?php
ob_start("ob_gzhandler");
?>
This method is dependant on the Apache server and in addition, the mod_gzip module must be installed and loaded.
Other Methods to Enable Gzip Compression
The method mentioned above is quick and easy, but the downfalls are that it only works on Apache with mod_gzip. Not only that, but according to the Php manual, that is not the preferred method for gzipping.
(From the Php manual at www.php.net)
note that using zlib.output_compression is preferred over ob_gzhandler().
Another method of gzipping is as follows:
<?php
// Include this function on your pages
function print_gzipped_page() {
global $HTTP_ACCEPT_ENCODING;
if( headers_sent() ){
$encoding = false;
}elseif( strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false ){
$encoding = 'x-gzip';
}elseif( strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false ){
$encoding = 'gzip';
}else{
$encoding = false;
}
if( $encoding ){
$contents = ob_get_contents();
ob_end_clean();
header('Content-Encoding: '.$encoding);
print("\x1f\x8b\x08\x00\x00\x00\x00\x00");
$size = strlen($contents);
$contents = gzcompress($contents, 9);
$contents = substr($contents, 0, $size);
print($contents);
exit();
}else{
ob_end_flush();
exit();
}
}
// At the beginning of each page call these two functions
ob_start();
ob_implicit_flush(0);
// Then do everything you want to do on the page
echo 'Hello World';
// Call this function to output everything as gzipped content.
print_gzipped_page();
?>
03:19 | 0 Comments
Add Button Donation Paypal on Blogger
custom-codes - want to add a Button Donation Paypal on Blogger? anyone who knows kindly provide us a little donation to the sustainability of blogs that we make.
here's how:
1. first click the link here https://www.paypal.com/us/cgi-bin/?cmd=_donate-intro-outside
2 if you already have a paypal account, please log in first after that click on the link "Create Your Button Now"
3. please fill in the form available there (like form Organization name / service, Choose a button type, Customize button, and others.
4 if it is fill out the form to make a paypal donation button, please click the "Create Button"
5. after that you will get a code or script from paypal
6 Open your blogger account, then select the menu "layout" and then click "add a gadget" and search for "HTML / JavaScript" copy code from the paypal donation button earlier, and then paste it into the form "HTML / JavaScript" in your blogger.
7 click the "save settings" then refresh your blog page, and see the paypal donation button has appeared in your blog.
03:03 | 0 Comments
How to Change Style Blockquote blogspot with CSS
<div class = "code">
place code PHP, HTML, Javascript, jQuery, CSS, and others here
</ div>
now I try a little modification of the automatic blockquote blogspot, so can be used to put the code or script in PHP, HTML, Javascript, jQuery, CSS, etc.
the following way:
1. first click on "Templates" and click "Edit HTML"
2 then look for the word "blockquote" (how quickly can simply press ctrl + f)
3 after the meet said "blockqoute" please replace the old code with the code below
blockquote {
background:#f5f8fa;
background-repeat:no-repeat;
border: solid #5C7B90;
border-width: 1px 1px 1px 20px;
color: #000000;
font: 13px 'Courier New', Courier, monospace;
line-height: 16px;
margin: 10px 0 10px 10px;
max-height: 200px;
min-height: 16px;
overflow: auto;
padding: 10px 10px 10px; width: 90%;
}
blockquote blockquote {
background: #FAFAFA;
background-repeat:no-repeat;
margin:5px 10px;
padding:0 7px 10px 7px;
font-size:12px;
color:#336699;
border-left:4px solid #40a9c9;
}
4 if it is saved template, and then refresh your page to see the results.
now you can add a text box area for the placement of the codes simply by clicking on the "Quote" on page "New Entry"
02:21 | 0 Comments

