Finally the help of IT is here

Blog of computer solutions.

Improve website performance (Social buttons)

Posted by Xaus Xavier Nadal 17th on March 2013

Today we show you how to improve website performance by making the social buttons facebook, twitter and google plus loaded on the web, but only when you hover over it.

As you all know I am passionate about improving Web performance and you can see examples of this in this blog.

We got very good results even in a load sharing without VPS hosting for lack of pasta.

One of the latest developments that have implemented has been the burden of sandwiches annoying social networks to get off part of the score in the performance test pages as http://www.webpagetest.orgo http://www.gtmetrix.com made the loaded web slower causing a decrease in google positioning among other search engines.

To get around this problem I will show several examples Live to adapt it to any of your websites.

  • The site charges a 55% faster.
  • WordPress -> You can see the result in this blog http://www.megacrack.es.
  • Prestashop -> You can see the result in http://www.venlotodo.com (Website selling all kinds of products including sexshop with impressive prices (send an email to ventas@venlotodo.com and say that you come from MegaCracks and will make a insurance discount.) The pity is that only sell to Spain, and also if you are in the province of Barcelona speak with them and the price even better).

For you to see the change you can use the following link comparing the speed of loading between sites 2 http://whichloadsfaster.com/.

I consider myself quite unable to programming, but I am quite skilled at the art of logic and understand how things work and most of all I like what I do and invest the time it takes. (I say this because I am sure that the source code can be improved greatly with your comments and if you can make the community benefits it will thank you from this blog seeing your suggestions for improvement).

To implement on any web with HTML

Then the source code of the web I teach (HTML), What we do is have multiple images of the same buttons we have on facebook, twitter and google plus and if you hover over using a javascript function call that triggered the script of each of the social elements.

<html>
<body>

<div class="G-plusone" data-size="medium" data-href="Http://www.megacrack.es" onMouseOver="Activate_gp ()">
<I'M G SRC=".. / Files / gplus.png" width=35 height=23>
</div>
<div>
<a href="Https://twitter.com/megacracks" class="Twitter-follow-button"
 data-show-count="True" data-show-screen-name="False" data-lang="Is" onMouseOver="Activate_tw ()">
<I'M G SRC=".. / Files / seguir.png" width=62 height=22></A></div>
<div class="Fb-like" data-href="Http://www.megacrack.es" data-send="False" data-layout="Button_count"
 data-width="100" data-show-faces="False" onMouseOver="Activate_fa ()" >
<div class="Fb-like" data-href="Http://www.megacrack.es" data-send="False" data-layout="Button_count"
 data-width="100" data-show-faces="False" onMouseOver="Activate_fa ()" ></div>
<I'M G SRC="../files/megusta.png" width=74 height=24></div>

<script type="Text / javascript">

	<! - <JavaScript SD forum Facebook Like Button /> ->
	function activate_fa () {(function(D, s, id) {
		  was js, fjs = d.getElementsByTagName (s) [0];
		  if (D.getElementById (id)) return, Js = d.createElement (s); js.id = id; js.src = "/ / Connect.facebook.net / es_LA / all.js # XFBML = 1"; Fjs.parentNode.insertBefore (js, fjs);} (document, 'Script',  'Facebook-jssdk'));} <! - <JavaScript SD forum Like Google Plus Button /> ->
	function activate_gp () {window.___gcfg = {lang: 'en'}; (function() {
			was po = document.createElement ('Script'); Po.type = 'Text / javascript'; Po.async = true; Po.src = 'Https://apis.google.com/js/plusone.js';
			
			was s = document.getElementsByTagName ('Script') [0]; s.parentNode.insertBefore (po, s);}) ();} <! - <JavaScript SD forum Twitter Button /> ->	
	function activate_tw () {!function (D, s, id) {
			was js, fjs = d.getElementsByTagName (s) [0];if(! D.getElementById (id)) {js = d.createElement (s); js.id = id; js.src ="/ / Platform.twitter.com / widgets.js"; Fjs.parentNode.insertBefore (js, fjs);}} (document,"Script","Twitter-WJS");}
</script>

</body>
</html>

To deploy Wordpress

First of all you will have to upload your image files are optimized with such RIOT (Impressive program for compressing images) to be as efficient as possible to your wordpress files in the folder for example. At the end of the article I will post the link to the png files to keep them, downloading them and compress them, etc ... (They are super optimized)

What I have done is to separate the code of the functions in javascript and put it in the file header.php located on Route wp-content \ themes \ <vuestro tema> \ header.php just before closing the head.

<script type="Text / javascript"> <! - <JavaScript SD forum Facebook Like Button /> -> function activate_fa () {(function(D, s, id) { was js, fjs = d.getElementsByTagName (s) [0]; if (D.getElementById (id)) return, Js = d.createElement (s); js.id = id; js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1"; Fjs.parentNode.insertBefore (js, fjs);} (document, 'Script', 'Facebook-jssdk'));} <! - <JavaScript SD forum Like Google Plus Button /> -> function activate_gp () {window.___gcfg = {lang: 'en'}; (function() { was po = document.createElement ('Script'); Po.type = 'Text / javascript'; Po.async = true; Po.src = 'Https://apis.google.com/js/plusone.js'; was s = document.getElementsByTagName ('Script') [0]; s.parentNode.insertBefore (po, s);}) ();} <! - <JavaScript SD forum Twitter Button /> -> function activate_tw () {!function (D, s, id) { was js, fjs = d.getElementsByTagName (s) [0];if(! D.getElementById (id)) {js = d.createElement (s); js.id = id; js.src ="/ / Platform.twitter.com / widgets.js"; Fjs.parentNode.insertBefore (js, fjs);}} (document,"Script","Twitter-WJS"); } </script>

I created an HTML widget and I have the code that displays the images within several div. This piece of code is what will show the buttons of social networks. Adaptadlos for which you may have.

<div class="G-plusone" data-size="medium" data-href="Http://www.megacrack.es" onMouseOver="Activate_gp ()">
<I'M G SRC=".. / Files / gplus.png" width=35 height=23>
</div>
<div>
<a href="Https://twitter.com/megacracks" class="Twitter-follow-button"
 data-show-count="True" data-show-screen-name="False" data-lang="Is" onMouseOver="Activate_tw ()">
<I'M G SRC=".. / Files / seguir.png" width=62 height=22></A></div>
<div class="Fb-like" data-href="Http://www.megacrack.es" data-send="False" data-layout="Button_count"
 data-width="100" data-show-faces="False" onMouseOver="Activate_fa ()" >
<div class="Fb-like" data-href="Http://www.megacrack.es" data-send="False" data-layout="Button_count"
 data-width="100" data-show-faces="False" onMouseOver="Activate_fa ()" ></div>
<I'M G SRC="../files/megusta.png" width=74 height=24></div>

Works great except for facebook do not know how to fix it. (If someone helps me be grateful and also community).

To deploy prestashop

In prestashop is a bit more complicated, but you can also do.

What we do is edit the file header.tpl you will find in the following path on your FTP or your hosting provider for prestashop: public_html \ themes \ default \ header.tpl

Agregad the following lines of code just before closing the head.

<script type="Text / javascript">

 function activate_fa () {(function(D, s, id) {
	  was js, fjs = d.getElementsByTagName (s) [0];
	  if (D.getElementById (id)) return, Js = d.createElement (s); js.id = id; js.src = "/ / Connect.facebook.net / es_LA / all.js # XFBML = 1"; Fjs.parentNode.insertBefore (js, fjs);} (document, 'Script',  'Facebook-jssdk'));}

function activate_gp () {
	was po = document.createElement ('Script'); Po.type = 'Text / javascript'; Po.async = true; Po.src = 'Https://apis.google.com/js/plusone.js';
	
	was s = document.getElementsByTagName ('Script') [0]; s.parentNode.insertBefore (po, s);}

function activate_tw () {!function (D, s, id) {
	was js, fjs = d.getElementsByTagName (s) [0];if(! D.getElementById (id)) {js = d.createElement (s); js.id = id; js.src ="/ / Platform.twitter.com / widgets.js"; Fjs.parentNode.insertBefore (js, fjs);}} (document,"Script","Twitter-WJS");}
</script>

When you have done this'll need a prestashop addon called HTMLBOX that you can download from http://mypresta.eu/modules/front-office-features/html-box.html.

Now only you will have to activate the module in its configuration and add the following code:

The first lines of code you can leave without putting (to get a look is identical to that of the other modules in 1.5.3 version of prestashop)

<P class = "title_block" style = "background-color: # 383838, padding: 6px 11px;

color: # fff; text-shadow: # 0 1 0 000 px; font-size: 12px; font-weight: bold; "> CLICK LIKE HELP</p>

This piece of code is what will show the buttons of social networks. Adaptadlos for which you may have.

<p>

<div class="Fb-like" data-href="Http://www.venlotodo.com" data-send="False"
 data-layout="Button_count" data-show-faces="False" ></div>
<div class="Fb-like" data-href="Http://www.venlotodo.com" onMouseOver="Activate_fa ()"
 data-send="False" data-layout="Button_count" data-show-faces="False" >
<I'M G SRC="../files/megusta.png" width=74 height=24>
</div>

<div class="G-plusone" data-href="Http://www.venlotodo.com" data-size="medium"
 onMouseOver="Activate_gp ()">
<I'M G SRC=".. / Files / gplus.png" width=35 height=23>
</div>

<div>
<a href="Https://twitter.com/share" class="Twitter-share-button" data-url="Http://www.venlotodo.com"
 data-lang="Is" onMouseOver="Activate_tw ()">
<I'M G SRC=".. / Files / twittear.png" width=62 height=22></A></div>
</p>

That's all, I hope you have learned as they work to improve website performance and if you have any problems leave a message and try to answer.

Files with social button images compressed

As I promised before I leave the image files of social networking tablets and ready to download:

Twitter -> http://www.megacrack.es/files/seguir.png

Google Plus -> http://www.megacrack.es/files/gplus.png

Facebook -> http://www.megacrack.es/files/megusta.png

tags: , , , , , , , , ,
Posted by web performance | No Comments »

Today is my birthday and I congratulated Google

Posted by Xaus Xavier Nadal 26th on October 2012

Birthday

I really liked the cards, I was pleasantly surprised.

tags:
Posted by general | 1 Comment »

5 Android apps that everyone should have

Posted by Xaus Xavier Nadal 29th on September 2012

Today I will show 5 Android apps that everyone should have,and for all that you have a smartphone and want to get more out of the device yet, are tools that should have all or at least know them.

These are applications that I use daily and I am very pleased with each and every one of them.

I put 5 but there are many more applications that you may pay more later, but for now I think I enjoy this very much and I hope you enjoy them as I do.

Let me know if you have been to your liking and if you want you can post a comment with which you you use.

Continue reading the article if you want to know all the tools that I have set.

Megacrack read »

tags: , , , , , , , , , , , , , , , , ,
Posted by Android | 1 Comment »

You want to read our blog from your smartphone or tablet?

Posted by Xaus Xavier Nadal 31st on May 2012

Click on the following link and download the Google Currents application.

We are offering this service to thousands of readers since December 2010, but we had not posted on the blog.

Here's the link.

https://www.google.com/producer/editions/CAow5Pg0/wwwmegacrackes

Greetings.

tags: , , , , , , , ,
Posted by Google | No Comments »

Advertise in Blogger

Posted by Xaus Xavier Nadal 29th on April 2012

Today we will explain how to insert an advertising code in your Blogger blog technology developed under, let's do a little more complicated than usual, I explain:

This article will get to place one ad in an article by blogger but this appears on the home page Blog because as you know that you have adsense usage policies prevent us from putting more than 3 advertising blocks of the same type on one page.

The first thing to do is access the administration of our Adsense account manager or advertising that you have, and get the advertising code that best suits your blog measures.

For example the code we have chosen today is this: a banner 468 × 60