DYBanners 
DYBanners is a Plugin that will allow you to insert a banner into a joomla article for uses such as a links page. You can then monitor the usage as normal in the banners area.
Any help fixing/improving on the things below is always welcome, just use the contacts us link in the left menu.
Version: 1.0.1 - 08/06/2008
The ability to choose the window type used for each banner instance.
The ability to choose the styling css to allow individual styling per banner instance.
The ability to choose the alt description for the banner image per instance.
Currently the extra div image (Transparent) added to allow a click url to work with a flash banner shows the click url when you hover over the flash banner but it does not work as a link.
Version: 1.0.2 - 21/06/2008
You can now add the word "title" in place of the banner ID and if there is a banner with the same name as the article title it will be used, otherwise you will get an error message.
Added error strings to the language file for missing banner ID's, no matching banners, e.t.c.
Currently the extra div image (Transparent) added to allow a click url to work with a flash banner shows the click url when you hover over the flash banner but it does not work as a link.
Version: 1.0.3 - 22/06/2008
You can now choose if the {xxxxxx} part is removed when the PDF button is used, or the actual image is shown.
Currently the extra div image (Transparent) added to allow a click url to work with a flash banner shows the click url when you hover over the flash banner but it does not work as a link.
Still need to allow better styling of the banners on the article page and the PDF output (Any help would be great!!!)
Download here.
######################################
NOTE:
I had to make this change to the joomla core to make flash files appear in the banner image drop-down in the banner area as Joomla must of forgot to add swf files to the core in J1.5!!!
UPDATE: Joomla 1.5.4 now has this change already done.
core/libraries/joomla/html/html/list.php:
Line 16:
Changed From - if ( eregi( "bmp|gif|jpg|png", $file ) ) {
Changed To - if ( eregi( "swf|bmp|gif|jpg|png", $file ) ) {
####################
Also required to prevent the {##dybanners} tags being shown on the PDF output is a modification as below (The Plugin will work without this mod, just the tags will be printed):
After you have installed this plugin, you need to 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 which should look as below, and add the 2 lines shown commented below:
// 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));
// Added to trigger special requirements in different plugins, like it removes the variable strings {##google}, {##dybanners} or {##slimbox} when using the PDF button
JPluginHelper::importPlugin('content');
$results=$dispatcher->trigger('onBeforeDisplayTitle', array(&$article, array(), 32));
// End of addition
$document = &JFactory::getDocument();
// set document information
$document->setTitle($article->title);
$document->setName($article->alias);
$document->setDescription($article->metadesc);
$document->setMetaData('keywords', $article->metakey);
Save and close this file.
######################################
How to use:
{##dybanners}w,x,y,z{/##dybanners} or {##dybanners}w{/##dybanners} if the default settings are ok (I have added the ## parts here so it is not changed to a banner, they are not required).
- To use the plugin, simply enable the plugin and then type the above into your Joomla article.
- w is the banner ID or you can use title in version 1.0.2 onwards to use a banner with the same name as the artivle title.
- x is the window option that the banner click url points to. 0 is top (Parent Window), 1 is self (New window with browser navigation) and 2 is a pop-up window without browser navigation. If you enter no value then 1 is used by default.
- y is the banner style. The style is added to the standard div id's and classes, so the standard css for the banner is #dybanners for the div & #dybanners_inner for the class, but if you add -banner3 to this value then the css for that banner will be #dybanners-banner3 & #dybanners-banner3_inner. If you enter no value then the standard css above will be used by default.
- z is the banner image alt description. If you enter no value then the banner name will be used by default.
Below is the plugin in use, hover over or look at the page source to see the results.







Digg
Del.icio.us
Slashdot
Furl
Yahoo
Googlize this
Blinklist
Facebook
Wikio












