Lightquick Web Design - Elements of the past and the future combining to make something not quite as good as either

LightQuick Web Design - Latest News

We are working to complete a new web shop for New Venture Products at . The new shop will feature a Joomla CMS front-end using a modern corporate template. LightQuick previously provided the older HTML site whilst the new development is be on-line shortly. The on-line shop will remain using the well known and respected shopping system OSCommerce.
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
(1 vote)

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 then 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 mambot-controls.jpgthe 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 was Joomla 1.0.15 on steroids - but is now dead), 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/{ /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:


- 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.


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.


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:


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


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:


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.



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:

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: If you like this plugin please find a lot more useful code at 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.

Facebook not working correctly on the Frontpage due to cache.

If you have the default Joomla cacheing enabled it may have an adverse effect on the front page article if you are using the component com_frontpage. You can test for this by using the "view source" function on your browser on the front page, you should see something like this:

<meta property="fb:app_id" content="284396941601658" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Lightquick Web Design - Elements of the  ... " />
<meta property="og:description" content="Lightquick" />
<meta property="og:title" content="LightQuick Web Design" />
<meta property="og:url" content="" />
<meta property="og:image" content="" />
<meta name="Generator" content="Design by Lightquick (" />
<meta name="keywords" content="Design, Sites, Click, Web, Here, Lightquick ... " />
<meta name="description" content="Lightquick provide quality web design for ..." />
<meta name="revisit-after" content="3" />
<meta name="googlebot" content="index, follow" />
<meta name="author" content="" />
<meta name="robots" content="index, follow" />

The content will vary according to the mambots you have loaded and the information contained on your site but if the above general information is present on your front page then all is well.

However, if this is missing on your front page then the problem may be this:

Joomla 1.0.15 cache-ing interferes with the operation of content mambots. On the front page component all the good work that the Facebook mambot does to add the meta tags to content automatically is simply discarded, in fact the mambots that prepare content are simply not called at all. This does not just affect the facebook mambots but any 3rd party mambots that provide extra header information onto the frontpage. None of them will work.

This means that if you have the facebook mambot enabled on the front page then a click on the FB like button will not work exactly as you want it to as the required og:tag information will not be present for the FB like function to gather the appropriate information it requires. The 'like' may be posted to facebook but all the pertinent information about the page will be missing. This is a Joomla 1.0 cacheing bug.

To allow onPrepareContent mambots to function on the frontpage component you need to make the following changes:

Edit the content.php file: /components/com_content/content.php
goto line 39 (joomla 1.0.15)

if ( $option == 'com_frontpage' ) {
       $cache->call( 'frontpage', $gid, $access, $pop, 0, $limit, $limitstart );

and change this into:

if ( $option == 'com_frontpage' ) {
        frontpage( $gid, $access, $pop, 0, $limit, $limitstart );

Clear all your caches afterwards and retry the frontpage a few times.  The meta tag information should start to appear. This should cause the og:tags to appear on 90% of systems on the Front page.

I have site that still won't work despite the above changes being made. It has been too hard to fathom why... so I simply suggest you turn off the facebook mambot on frontpages where the problem manifests. The problem is to do with the peculiarities of the Joomla cacheing mechanism.

The page will work correctly when it is called using the frontpage component:

but not when the called just using the bare domain name like this :

Facebook not working correctly on 3rd Party Cached Sites.

If you have a 3rd party tool like PageCache, you need to turn it off in order to make the onPrepareContent mambots work. PageCache is a great component but cacheing has side-effects that can be unwanted. Use default Joomla cacheing instead.


If you liked this, please consider buying me a beer., any contribution is appreciatedmfBeer Joomla! Plugin

Comments (0)Add comments

Write comment

Last Updated ( Saturday, 14 December 2013 )
< Prev   Next >


By EU law we have to leave this message about cookies - In order to deliver a personalised, responsive service and to improve the site, it remembers and stores information about how you use it. This is done using simple text files called cookies which sit on your computer. These cookies are completely safe and secure and will never contain any sensitive information. They are used only by Lightquick or the trusted partners we work with ie. Google. By continuing to use this site you accept the use of these cookies. Remember all sites use these cookies but if you are unhappy with this cookie usage, then unfortunately we have to ask you to leave the site.


RSS feeds listed below - Select the format of feed that you require.

Britain & Scotland - Better Together