Written by Administrator Saturday, 23 August 2008 16:01

DYBanners 

Overview
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.
UPDATE:
DYBanners is now packaged as a component which adds 2 plugins (The DYBanners one as before plus an Editor Button with advanced options)
Any help fixing/improving is always welcome.
JED: http://extensions.joomla.org/extensions/ads-a-affiliates/banner-management/5119
Compatibility: 
Usage
How to use (Latest Version):
{##dybanners}a,b,c,d,e,f{/##dybanners} or {##dybanners}a{/##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).
- a 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 article title or random as of version 1.0.7.
- b 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 or leave the default entered by the NEW Editor Button then 1 is used by default.
- c is the banner style. The CSS style will now be #dybannersx for the main DIV where x is the number for the plugin occurance increasing on each occurance of {##dybanners} and .dybannersclassc for the DIV Class where c is the style suffix if used, so if you added 3 to the style_suffix part of the syntax you insert in the content then the CSS would be .dybannersclass3 otherwise it would be .dybannersclass. I have removed the dybanners_inner class and have put the banners inside "paragrapths" so the sample CSS would be as below:
For all banners
.dybannersclass p {
text-align: center;
border: 2px solid #000;
}
.dybannersclass img {
margin-right: 25px;
border: 2px solid #a9e671;
}
For a banner with the style_suffix set as 3
.dybannersclass3 p {
text-align: right;
border: 2px solid #ff0000;
}
.dybannersclass3 img {
margin-right: 25px;
border: 2px solid #000;
}
- d is the banner image alt description. If you enter no value or leave the default entered by the NEW Editor Button then the banner name will be used by default.
- e is the client id that is used with random in the banner field to display random banners from that client (Can be used with f).
- f is the category id that is used with random in the banner field to display random banners from that category (Can be used with e).
Below is the plugin in use, hover over or look at the page source to see the results.
Modifications
######################################
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: As of Joomla 1.5.4 this is now already fixed.
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.
######################################
Changelog
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!!!).
Version: 1.0.4 - 14/08/2008
You can now have multiple banners inside a single DIV by seperating each code with a ; so for example {##dybanners}a,b,c,d,e,f;a,b,c,d,e,f{/##dybanners).
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!!!).
Note:
In doing this i have changed the style part (c) slightly so the div id is now dybannersx where x is the number for the plugin occurance, increasing on each occurance of {##dybanners} and left the class as the part from c as before (This has now changed for the better in 1.0.9).
Version: 1.0.5 - 06/06/2009
Added page impressions as they were not incremented before.
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!!!).
Version: 1.0.6 - 19/06/2009
Corrected some error messages.
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!!!).
Version: 1.0.7 - 07/11/2009
Added a random function, just replace the banner field with "random".
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!!!).
Version: 1.0.8 - 08/11/2009
You can now use the "random" fetaure from 1.0.7 above but you can limit it by client, category or both.
Created a DYBanners Editor Button.
Added another error message for the DYBanners Editor Button to warn if the default value is not changed on the banner field.
Updated the PDF output that was forgotton in 1.0.7.
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!!!).
Version: 1.0.9 - 14/11/2009
Changed the syling to alllow the banner/bannerset to be styled and positioned.
Removed the extra div image (Transparent) added to allow a click url to work with a flash banner as it shows the click url when you hover over the flash banner but it does not work as a link, will be added again if a solution is found
Note:
The CSS style will now be #dybannersx for the main DIV where x is the number for the plugin occurance increasing on each occurance of {##dybanners} and .dybannersclassc for the DIV Class where c is the style suffix if used, so if you added 3 to the style_suffix part of the syntax you insert in the content then the CSS would be .dybannersclass3 otherwise it would be .dybannersclass. I have removed the dybanners_inner class and have put the banners inside "paragrapths" so the sample CSS would be as below:
For all banners
.dybannersclass p {
text-align: center;
border: 2px solid #000;
}
.dybannersclass img {
margin-right: 25px;
border: 2px solid #a9e671;
}
For a banner with the style_suffix set as 3
.dybannersclass3 p {
text-align: right;
border: 2px solid #ff0000;
}
.dybannersclass3 img {
margin-right: 25px;
border: 2px solid #000;
}
CHANGED TO A COMPONENT WHICH INCLUDES BOTH THE MAIN PLUGIN AS ABOVE AND THE NEW EDITOR BUTTON.
Version: 1.5.4 - 15/11/2009
Same features as 1.0.9 above.
Improved the Editor Button so you can pick the banner, client, e.t.c. from drop-down lists.
Both plugins enabled on installation so you can insert straight away.
The extra div image (Transparent) added to allow a click url to work with a flash banner is removed as it shows the click url when you hover over the flash banner but it does not work as a link, it will be added again if a solution is found
Downloads
| Title | Date Added | Date Updated | License | File Size | Hits |
| 15/11/2009 | 22/11/2009 | GNU/GPL | 38.86 kB | 1392 | |
| 14/11/2009 | 22/11/2009 | GNU/GPL | 8.56 kB | 218 | |
| 08/11/2009 | 22/11/2009 | GNU/GPL | 7.36 kB | 115 | |
| 07/11/2009 | 22/11/2009 | GNU/GPL | 7.39 kB | 60 | |
| 19/06/2009 | 22/11/2009 | GNU/GPL | 7.27 kB | 108 | |
| 06/06/2009 | 22/11/2009 | GNU/GPL | 7.2 kB | 65 | |
| 14/08/2008 | 22/11/2009 | GNU/GPL | 6.85 kB | 54 | |
| 22/06/2008 | 22/11/2009 | GNU/GPL | 6.48 kB | 66 | |
| 21/06/2008 | 22/11/2009 | GNU/GPL | 5.08 kB | 66 | |
| 08/06/2008 | 22/11/2009 | GNU/GPL | 3.74 kB | 73 |
Last Updated on Tuesday, 22 December 2009 14:44
Visitor Activity






![]() | Today | 114 |
![]() | Yesterday | 104 |
![]() | This week | 114 |
![]() | This month | 1044 |
![]() | All | 62806 |




.png)












