plugin: Hide googleAds in PDF |
| Written by kksou | ||
| Sunday, 15 June 2008 | ||
|
This plugin hides {googleAds} tags when generating PDF of your content items. 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. Latest Version v1.0.1 (for Joomla 1.0) and v1.5.1 (for Joomla 1.5) Fixed the warning message "Undefined variable: flag" DownloadNote: Due to the recent "warning" from my host that my site's CPU usage is too high, I have to resort to a more primitive method of downloading that does not take up much CPU resource. (The original AJAX version uses too much CPU and mysql resources.) As javascript is used, you have to enable javascript to download the files. Thank you for your understanding. Joomla 1.0.x: hide_googleAds_for_pdf_v1.01.zipJoomla 1.5.x: hide_googleAds_for_pdf_v1.51.zip How to install (Joomla 1.0.x)
$txt1 = $row->title;
$pdf->ezText( $txt1, 14 );
$txt2 = AuthorDateLine( $row, $params );
$pdf->ezText( $txt2, 8 );
$txt3 = $row->introtext ."\n". $row->fulltext;
global $_MAMBOTS;
$params = array();
$row->text = $txt3;
$_MAMBOTS->loadBotGroup( 'content' );
$results = $_MAMBOTS->trigger( 'onBeforeDisplayTitle', array( &$row, array(), 32) );
$txt3 = $row->text;
$pdf->ezText( $txt3, 10 );
$pdf->ezStream();
How to install (Joomla 1.5.x)
// Initialize some variables
$article = & $this->get( 'Article' );
$params = & $article->parameters;
// process the new plugins
JPluginHelper::importPlugin('content', 'image');
$dispatcher->trigger('onPrepareContent', array (& $article, & $params, 0));
JPluginHelper::importPlugin('content');
$results=$dispatcher->trigger('onBeforeDisplayTitle', array(&$article, array(), 32));
$document = &JFactory::getDocument();
// set document information
$document->setTitle($article->title);
$document->setName($article->alias);
$document->setDescription($article->metadesc);
$document->setMetaData('keywords', $article->metakey);
User reviews There are no user reviews yet. Note: You have to be a registered member to leave a comment. Free registration here. |
||
| < Prev | Next > |
|---|
Joomla 1.0 Articles
- How to create a module with DirectPHP plugin?
- How to include modules in Content item?
- How to include modules in Section/Content Description
- How to include PHP commands in Section/Content Description
- How to make plugins process Section/Category descriptions
- Include Code Listing plugin - More Tips and Techniques
- How to have DirectPHP plugin process RSS feed?
- How to have the plugins processed when genrating PDF documents of content items?
- How to have DirectPHP commands processed in Joomla search?
Joomla 1.5 Articles
- How to create a module with DirectPHP plugin?
- How to include modules in Content item?
- How to include modules in Section/Content Description
- How to include PHP commands in Section/Content Description
- How to make plugins process Section/Category descriptions
- Include Code Listing plugin - More Tips and Techniques
- How to have DirectPHP plugin process RSS feed?
- How to have the plugins processed when genrating PDF documents of content items?
- How to have DirectPHP commands processed in Joomla search?
Joomla Plugins
Joomla Components
Joomla Gadgets
- Google Image Search
- Google News Search
- Wikipedia Search
- Google Book Search
- Google Video Search
- Google Currency Converter - AJAX version
- Yahoo Currency Converter - AJAX version
- Yahoo Stock Quote (AJAX module version)
- Yahoo Stock Quote (AJAX component/ module version)
- googleSearch_cse component
- googleSearch_cse module
- googleMaps plugin







