Sunday, 6 September 2015

How to Disable mouse Right Click and Hide Page Source

Newbie bloggers just surf Internet to compare the contents of different blogs. They Copy the contents of the Blogs they like. Being the New in blogging platform, they do not think how much time it had taken to write or make contents. This happens because they are new bloggers and want to become a successful blogger in no time. They are unknown that Google Adsense do not Approve the application having copy pasted contents. And when they fail in application they then came to know how much worse task they have done. You can say their blogs are dead, i.e. the fact is no more earnings from Google.

We actually are running more than 15 blogs around, when we were a new blogger earlier, we were the one of those who did copy and paste. And somehow with the passage of time we realize that our earlier blogs are now dead. So, we make up our mind that without copy pasting others contents, we will run our blog with Fresh/New contents. Now we are running more blogs and getting good response from Google Adsense. Therefore Guys, always write a new/fresh/unique contents to achieve pure goals and happy days comes, lol.

Hereafter, we have now new,fresh,unique contents in our Blogs. Our web page contents, we mean "page source" can be seen easily by doing mouse right click in blog/website. Viewing the page source others can steal your information from your Blog/Website. So, It's now headache to protect them from being copied/thept by other users. 

It's not possible to disable viewing a pages source. You can attempt to circumvent unaknowledgeable users from seeing the source, but it won't stop anyone who understands how to use menu's or shortcut keys. Your best bet is to develop your site in a manner that will not be compromised by someone seeing your source, If you're attempting to hide it for any other reason than to protect your intellectual property, then we would say you're doing something wrong.

Disadvantage of Disabling mouse right click:- 
  • Annoying Users 
  • Unprofessional 
  • Insulting to Users 
  • Pointless 
Lets come to the point - if you want to irritate Users playing with your blogs/websites, there are other, less controversial alternative solutions available to the problem protecting your images, contents, and source code.

Also Check:
  1. How to Disable right click context menu on images
  2. How to Prevent People From Copying Your Blog Contents

Disable mouse Right Click and Hide Page Source

To protect you contents, images, source code, etc, disable mouse Right Click and Hide Page Source. To do this, you require a HTMLJavaScript code which is given below;

<script language=javascript>
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
//
</script>
You will require above code later. Now follow below steps:
Step-1. Sign in your Blogger account
Step-2. Dashboard, go to Layout Option.
Step-3. In Layout Option, you will see "Add a Gadget", select it (See Demo below)


Step-4. After selecting "Add a Gadget", a popup window will be open (Add a Gadget window)
Step-5. Now Select "HTML/Javascript" Gadget. (See below Demo)


Step-6. Now add above HTML Script in Content Box. (See below Demo)


Step-7. Important Step - press the Save button. After saving you can drag the gadget wherever you want and click on Save Arrangement button.

Now you are done, check your blog Mouse right click function, it is now disabled. It will popup a message like below;


You are a genius. Yuppy...hurray !

Note: If you are irritated from above message being displayed and is annoying all the time when you do right click, to stop message displaying you should add below java script.

No right mouse click script !!! (no alert)

<script language=JavaScript>
<!--

//Disable right click script III- By Blogger Addict (addictofblogging.blogspot.com)
//For full source code, visit http://
addictofblogging.blogspot.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
We hope you liked our tutorial on Disabling mouse right click and hiding page source. If it helped just subscribe and like us on facebook. 

Enjoy ! 

Saturday, 5 September 2015

How to Add a Gadget Above the Header in Blogger

Blogger's Dashboard feature allows users to adjust the appearance of their blog with a few clicks of the mouse. Within the Dashboard, there is a " Layout " feature which lets bloggers add Gadgets such as RSS feeds, traffic counters, embedded media to their sites, adding beautiful widgets, showing notifications, pictures, etc.

Mainly by default in Blogger "Layout", you can see several places to add a Gadget. Such as:-

Right below the Title and above the posts, The Sidebars, The Footer, etc.

It is easy to identify them because all of them have a big linked title yelling " Add a Gadget ". Click on the link and you can choose the gadgets you want to add. After adding them, you can drag and rearrange them. You can also drag one from the side bar to the footer, above the post, below the post, etc.

Now, by editing your Blog's HTML code, you can allow for the addition of a Gadget above the header. Let's see some steps adding " Add a Gadget " icon above the header of your Blog.

Adding a Gadget Above the Header in Blogger

Step-1. Log into your Blogger account. Once logged in, you will be transported to your Dashboard.
Step-2. Select "Template", then click "Edit HTML".
Step-3. Scroll through the HTML code within the text box and locate this fragment:
<div id="header-wrapper">
Or you can press Ctrl+F and search below;
<div class="header-wrapper">
Step-4. Now you will find the detailed fragment. Just beneath the line <<div class='header-wrapper'> you will see below;


<b:section class='header' id='header' maxwidgets='1' showaddelement='no'> 
From above change maxwidgets='1' to maxwidgets='5'.
Step-5. Just next to maxwidgets - in showaddelement='no', change 'no' to 'yes'.
Step-6. This is an important step - Hit the "Save" button, lol.
Step-7. After saving return to your Dashboard. Select "Layout". Above your header, there will be a link titled "Add a Gadget". Click this and add the Gadget of your choice.
Step-8. Save your changes and view your blog to ensure the widget was added correctly.

Hope this tutorial helped you. If you like our posts, share to your friends and comment below if you have any concern. Do not forget to subscribe us.

Enjoy !

Friday, 4 September 2015

How to List the Post Titles of all POSTS from your Blogger/Blogspot Blog [Tutorial]

In this Tutorial, we will show you how to list the Titles of your blog's more than 500 recent posts. If you are looking for an alternative to Blogger's gadget, then this might be very useful to you.

As we experienced, to retrieve the posts of a blog, you can use the URL like this:

http://***.blogspot.com/feeds/posts/default?alt=json&callback=mycallbackfunc&start-index=1&max-results=100

However, it does not work if your blog has more than 500 posts and you want to list them all. Our experiment showed that even you supplied a big number like (e.g.-10000) for max results, only up to 500 posts would return. To retrieve the list of more than 500 posts, we need a loop to do that. The following is how we implemented it for our several blogs.
We can also label all posts in a single page in another way, i.e. SITEMAP/Table Of Contents shows post titles with separated labels and a New! text with recently published posts.
Go through this link How to create a Sitemap/Table of Contents in Blogger to create a page of All Posts Titles for your information/use.
Click here >> SITEMAP to see our Sitemap / Table Of Contents.
Now lets come to the point,

Code goes here :-
<div><ul id="postList12"></ul></div>
<script type="text/javascript">
var startIndex = 1;
var maxResults = 100;
function sendQuery12()
{
var scpt = document.createElement("script");
scpt.src = "/feeds/posts/summary?alt=json&callback=processPostList12&start-index=" + startIndex + "&max-results=" + maxResults;
document.body.appendChild(scpt);
}
function processPostList12(root)
{
var elmt = document.getElementById("postList12");
if (!elmt)
return;
var feed = root.feed;
if (feed.entry.length > 0)
{
for (var i = 0; i < feed.entry.length; i++)
{
var entry = feed.entry[i];
var title = entry.title.$t;
for (var j = 0; j < entry.link.length; j++)
{
if (entry.link[j].rel == "alternate")
{
var url = entry.link[j].href;
if (url && url.length > 0 && title && title.length > 0)
{
var liE = document.createElement("li");
var a1E = document.createElement("a");
a1E.href = url;
a1E.textContent = title;
liE.appendChild(a1E);
elmt.appendChild(liE);
}
break;
}
}
}
if (feed.entry.length >= maxResults)
{
startIndex += maxResults;
sendQuery12();
}
}
}
sendQuery12();
</script>
Now you can put above code in two different ways anywhere in your blogger/blogspot blog. We would recommend to put the code in sidebars - left/right, that's the first way and you can put code in a html page which we can used it as a Sitemap of a blog or Archive or List of All post in a Single page.
Lets see how we can insert above given code in blogger/blogspot blog.

First Method: Putting the List in a Gadget

Inserting code in sidebars - left right, of a Blog.
Step:1. Go to Dashboard>>Layout
Step:2. Select add a Gadget Link
Step:3. Select HTML/Javascript gadget
Step:4. Enter the Title of your Widget, e.g. All Posts List
Step:5. Copy above code and paste the code inside the content box
Step:6. Now save and view your blog.

Second Method: Putting the List in a Page

Inserting code in a Page.
Step:1. Go to Dashboard>>Layout
Step:2. Select Page
Step:3. To create page click on New Page button
Step:4. Click Edit HTML tab to switch to HTML mode
Step:5. Copy and paste the code into the Editor
Step:6. Now publish and view your post. The list should appear inside the page.

We hope this Tutorial helps you to align list of all posts in sidebars and in a page as a content of table/sitemap. If you think this helped, subscribe us.
Enjoy !

Thursday, 3 September 2015

Devcorner: Macros Are Evil

The joys of programming - hours spent scratching one's head whilst trying to figure out why the seemingly correct code does not produce correct results.

Hi, Charlie here. I used to post often.

Where was I? Ah, yes, this nugget of brain fudgery from the VDrift forums posted by NaN:
So I've spent some time today try to figure out why cars are still flying off in random directions when hitting curbs sometimes.

It turns out it is a bug in Bullet, to be more specific in the SIMD_DEGS_PER_RAD macro.

Code:

#define SIMD_PI           btScalar(3.1415926535897932384626433832795029)
#define SIMD_2_PI         btScalar(2.0) * SIMD_PI
#define SIMD_HALF_PI      (SIMD_PI * btScalar(0.5))
#define SIMD_RADS_PER_DEG (SIMD_2_PI / btScalar(360.0))
#define SIMD_DEGS_PER_RAD  (btScalar(360.0) / SIMD_2_PI)

The first one to spot it gets a virtual cookie.

For the answer visit the thread, I won't spoil it here. Instead, I'll post a screenshot, also sourced from said forums and taken by Stunt Rally author CrystalH.

 


For those who don't know, Stunt Rally is a friendly fork of VDrift.

Sunday, 30 August 2015

Xonotic 0.8.1 released & related news

For those that are not keeping up to the latest development branch (via the autobuilds), the Xonotic developers have released a new version with various smaller changes and new official maps.

From the user "Antibody" (known for his duel commentary videos) comes this nice video overview of the new features:

(please note that due to video capture performance reasons the graphic settings are pretty low, and the game can look much nicer with different settings)

On the longer term horizon of Xonotic development, there is the very exiting news that they are currently porting their game to run on the same engine that Unvanquished uses. With this the future of Xonotic is indeed much brighter, as their current engine has not seem much development lately. See more details in this thread.

Oh and while we are talking about FOSS arena FPS: A short while ago Red Eclipse also released a new version. Changes include updated to the AI Bots and a build in universal updater to easily follow the latest releases.