Lightquick Web Design - High Quality, Low Cost

LightQuick Web Design - Latest News

We have just created a site for Stonehaven Beer Festival. The site is built using Joomla 1.0.15 featuring a modern and stylish design and a simple navigation and menu layout.  The site aims to serve as an information portal for this brand new festival bringing all of Scotlands real ales under one roof for the very first time.
You are here:
  • Decrease font size
  • Default font size
  • Increase font size
Instructions for the Facebook Like This/Share This button on individual content items v2.0. PDF Print
Written by Dean Beedell   
Sunday, 29 January 2012

You must read the requirements section at the bottom of this page before enabling this mambot or your front end will white-screen.

If you have not enabled FB buttons before I recommend you read all of this and thenmambot-controls.jpg familiarise yourself with the tooltips for each configuration option. Some of the FB configuration is really not straight forward and it differs according to method used.

It isn't a very simple process but you can blame that on Facebook! They keep changing the methods required to add a FB like button.

This mambot looks complicated because it deals with all three methods currently in operation.  In truth it is not that difficult so press on...

This Mambot was created by Dean Beedell in 2011 to provide that missing facebook linking functionality that you've found so hard to find for Joomla 1.0.15. This Mambot allows you to add a facebook button to content items as well as for Virtuemart and Jdownloads. You can add two types of link, the old share.php method which provides the white F in a blue box (where you have type in some text to share) or the new Facebook iframe method of "like this" where you just click on the button. Each has advantages over the other. The old method is easier to configure and works on all pages, the new methods are not so good for blogs and the xfbml method takes a little more configuration. They also don't work so well on blog pages consisting of a number of individual articles. You'll have to test and see. This mambot will automatically add a Facebook button link at the top of the page which can be positioned left or right. It will also generate the open:graph tags that are required for the current Facebook API. As of today it has been tested on live Joomla 1.0.15 and Joostina 1.2 sites (Joostina is Joomla 1.0.15 on steroids), and mostly everything works - but if it doesn't please don't complain, simply raise a bug by contacting me on the website. I will fix it.

As well as placing the icon on the top of the page this mambot will also allow you to add the same button anywhere you like on a content page. Just place { facebook }{ /facebook } in the content in HTML code view and turn manual links to ON. You can even replace the URL with a hard-coded URL. Just place it between the { facebook }{ /facebook }tag as this example: { facebook }http://www/lightquick.co.uk{ /facebook } and turn replacement URLs to ON.

There are three methods:

OldShare - The old style of Facebook share is the white F in a blue box. This functionality is now obsolete and although it still works, Facebook may some day in the future turn this functionality off. So, why do we provide this? because the old functionality is easy for you to implement (you just turn it on) and you won't have to worry about any further configuration. Some people just like it. It also works better on blog pages consisting of a number of individual articles as it does not require the use of og: tags (you can only have one set of og: tags per page).

Iframe - The iframe method is current and you can switch from the old method to the new as you require or when Facebook make the old method redundant. Note that the iFrames method is not always compatible with all browsers. If you use the iframe method then you will need to enable and configure the facebook OG tags as per your requirement (the Open Graph tags are the means by which Facebook identifies your site). This mambot provides some easy methods for entering the OG information and some clever ways of getting the details automatically from the installed applications as required. The mambot also changes some of  the og:tags dynamically as page content changes, namely:

og:type
fb:app_id
og:type
og:site_name
og:description
og:title
og:url

Xfbml
- If you use XFBML method, you will have much more control over how the FB will display and perform. The XFBML method is similar in operation to the iframe method but you will need to embed the JSDK code in the website. We provide another mambot to do this which will need to be installed and enabled. You will also need to visit Facebook's "Create an App" page and register your site. This provides you with an app id. This is used as an access token when your site interfaces with Facebook to show the "like this " buttons. You enter this access token into the JSDK mambot and the facebook mambot.

Installation Procedures.

Installation is easy and straight-forward. Install the mambot and make the changes to joomla.php as detailed below. If you want to have the FB button appear on virtuemart and jdownload items then follow the appropriate instructions below, otherwise ignore them.


Requirements:

You must make the following change to the following file before enabling this mambot. If you do not make the changes then your site will give you a white-screen from the front end.

/public_html/includes/joomla.php

Several changes have been made here to allow creation on new meta property Open Graph tags, the use of which allows Facebook to identify your site.
This file has been included as part of the package.

Using your control panel file manager navigate to to this folder:

/public_html/includes

Then backup the original joomla.php by renaming it to:

joomla.php.1

This will save the original file just in case you make any mistakes.

For Joomla 1.0.13:

Extract the file named joomla.1.0.13.php and rename it to   joomla.php.

For Joomla 1.0.15:

Extract the file named joomla.1.0.15.php and rename it to   joomla.php.

For Joostina 1.2:

Extract the file named joostina.php and rename it to   joomla.php.

Place the supplied file into this folder /public_html/includes/ on your Joomla installation. Any errors report here .

Ensure you enable the plugin after installing it.

Once you have made the changes to joomla.php, then enable the plugin. If the facebook link does not appear at first, do not worry, it will. Try clearing the Joomla cache and your browser cache and give the site a few minutes to sort itself out. If it still does not then stick the { facebook }{  /facebook } moscode (no spaces) in a content item and set Manual URLs to ON, a couple of refreshes after that and it should start to appear site wide. Sometimes it takes a while for a Joomla 1.0 plugin to wake up and actually do anything!.

Enable it by clicking on Mambots >> Site Mambots

Facebook on individual Virtuemart products.  

It will also work on virtuemart 1.0.15 product items as long as you make a change to one VM product file:

shop.product_details.php

This file is also included in this package but you will need to move it to the right location yourself.

Backup the original file and then place the new one in this folder: /public_html/administrator/components/com_virtuemart/html

Find this line:
$template = preg_replace("/{vm_lang:([^}]*)}/ie", "\$VM_LANG->\\1", $template);

And you will see that this code has been added immediately beneath:

//.01 Code added by Dean Beedell to call joomla plugins STARTS

global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'content' );
$tmp_row = new stdClass();
$tmp_params = new mosParameters('');
$tmp_row->text = $template;
$_MAMBOTS->trigger( 'onPrepareContent', array( &$tmp_row, &$tmp_params ), true );
$template = $tmp_row->text;

//.01 Code added by Dean Beedell to call joomla plugins ENDS

Facebook on individual Jdownload items.  

It will also work on jdownloads 1.4 on the final download summary pages as long as you make a change to one Jdownloads file. Why have changes been made to support such an old version of Jdownloads? because it is the newest version that runs on Joomla 1.0.15.

/public_html/components/com_jdownloads/jdownloads.html.php

Unwanted additional Facebook buttons appear in modules.  

Joomla 1.0 allows mambots to operate on custom HTML modules with the result that content mambots are also displayed in custom HTML modules. This means that the facebook buttons will pop up in a variety of module positions around your site. If this is unwanted functionality then you need to disable buttons for module positions. This is a configuration option in the mambot. As a result the extra FB buttons will disappear.

Facebook App. ID

To use the iframe/xfbml methods you may need to obtain an Facebook app id. This allows you to link your site to the advanced features of Facebook. To obtain a Facebook app. id. you need to go here:

https://developers.facebook.com/app

The first thing to do is to register for a developer account. When that is complete visit your main developer page and press the "create new app" button. You need to create a separate app id for each site that you want to link to. The sites that you connect to Facebook will be listed on the left hand side.

The result of this process is the app id. that you enter into the app. id. field  of both the Facebook mambot and the JSDK mambot.

 

Facebook Errors.

If using the iframe/xfbml methods then ensure you have configured all the OG tags correctly, until you do so correctly clicking on a Facebook "like this" button may generate an error. Facebook provide a method of testing the correct settings of the OG tags here: http://developers.facebook.com/tools/debug. If you like this plugin please find a lot more useful code at lightquick.co.uk and consider getting in touch with me email me here to say how much you like the plugin. You can also make a donation by sending some money to this paypal account: Donate using this address. Reasons to donate? It funds the development.

 

Comments (0)Add comments

Write comment

busy
Last Updated ( Thursday, 17 May 2012 )
 
< Prev   Next >

Steampunk Yahoo Widget

How about something special for the weekend sir?

Steampunk Yahoo clock/calendar widget download

Lightquick have a nice little Yahoo widget for you to download. Steampunk Stamp WidgetClick on the image above.

Do you need a stamp with that madam?

Yahoo Widget Downloads

Download the Joomla Multi-Sit... here

Joomla Multi-Sit...

Downloads: 32
Avg. Rating:
StarStarStarStarStar(5)

Download the Steampunk Orrery... here

Steampunk Orrery...

Downloads: 1146
Avg. Rating:
StarStarStarStarStar(2)

Download the Steampunk Weathe... here

Steampunk Weathe...

Downloads: 48169
Avg. Rating:
StarStarStarStarStar(38)

Download the Cyberpunk Yahoo ... here

Cyberpunk Yahoo ...

Downloads: 3296
Avg. Rating:
StarStarStarStarStar(15)

Download the Steampunk CPU / ... here

Steampunk CPU / ...

Downloads: 7894
Avg. Rating:
StarStarStarStarStar(26)

Virtuemart Assistance

If you require assistance regarding VM or Joomla then please contact lightquick here...

Contact me here

Site Total Page Views

mod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_counter
mod_vvisit_counterToday914
mod_vvisit_counterYesterday997
mod_vvisit_counterThis week3821
mod_vvisit_counterThis month15890
mod_vvisit_counterAll Visitors480841

Site Last Modified

Site Last Modified:Thursday 17 May 2012, 12:09

Secure Login Form

Log In / Sign Up

Find us on the FreeIndex directory under Web Designers