RSS Feed (Joomla Plugins)

If you have installed the {googleAds} plugin, and you try to generate PDF of your content item by clicking on the PDF icon in the top right corner of your content page, you will find that the google Adsense codes will appear in the generated PDF too! This is, of course, undesirable.

This plugin will automatically hide all these {googleAds} tags and google Adsense codes in the generated PDF.

From the Installers menu, select mambots. In the field "Install directory", enter the folder location (where you unzipped the file) and click Install.

From the Mambots menu, select Site Mambots.

Make sure the plugin "Hide googleAds for PDF" is published. If you see a cross in the Published column, just click on it. It will turn into a green tick.

To use this plugin, you need to add a trigger to the PDF generator. In the original Joomla installation, there is no trigger during the generation of PDF. When there is no trigger, none of the plugin gets called. In order for Joomla to call the new plugin that we have just installed to hide the {googleAds} tags, we need to add a trigger.

Go to the folder <Joomla root folder>/includes, you will see a file called pdf.php.

Open this file pdf.php in your favorite editor.

Go to around line 112, and add the 6 lines highlighted in yellow as shown below:

Try generate PDF for your content item. It should now be clean of any {googleAds} tags!

How to install (Joomla 1.5.x)

Download the plugin and unzip it into a folder.

From the Extensions menu, select Install/Uninstall. In the field "Install directory", enter the folder location (where you unzipped the file) and click Install.

From the Extensions menu, select Plugin Manager.

Enable the plugin "Hide googleAds in PDF" - make sure there is a green tick in the Enabled column.

To use this plugin, you need to add a trigger to the PDF generator. In the original Joomla installation, there is no trigger during the generation of PDF. When there is no trigger, none of the plugin gets called. In order for Joomla to call the new plugin that we have just installed to hide the {googleAds} tags, we need to add a trigger.

Go to the folder <Joomla root folder>/components/com_content/views/article, you will see a file called view.pdf.php.

Open this file view.pdf.php in your favorite editor.

Go to around line 42, and add the 2 lines highlighted in yellow as shown below: