summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--banner/banner.class12
1 files changed, 6 insertions, 6 deletions
diff --git a/banner/banner.class b/banner/banner.class
index 214fcb7..7c6d32a 100644
--- a/banner/banner.class
+++ b/banner/banner.class
@@ -139,7 +139,7 @@ function choose()
* @param $noecho Switch off automatic display of HTML snipplet with echo
* @return HTML snipplet to insert banner(s) if $noecho is set, undefined otherwise
*/
-function show($nocount = 0, $noecho = false)
+function show($nocount = false, $noecho = false)
{
if (!is_array($this->banners))
return; // none found or choose() not called yet
@@ -152,7 +152,7 @@ function show($nocount = 0, $noecho = false)
foreach ($this->banners as $banner)
{
- $result .= $this->render($banner, $count, $number);
+ $result .= $this->render($banner, $count, $number, $nocount);
$number++;
}
@@ -174,7 +174,7 @@ function showcombined($position = "banner", $nocount = false)
{
ob_start();
if ($this->bannersbyposition[$position])
- $this->render($this->bannersbyposition[$position], 1, 0);
+ $this->render($this->bannersbyposition[$position], 1, 0, $nocount);
$result = ob_get_contents();
ob_end_clean();
@@ -187,19 +187,19 @@ function showcombined($position = "banner", $nocount = false)
* @param $count Total number of banners, also number of times this method gets called
* @param $position Current banner number, from 0 to $count - 1
*/
-function render($banner, $count, $number)
+function render($banner, $count, $number, $nocount = false)
{
if ($number > 0)
echo "<br><br>";
- $this->render_banner($banner);
+ $this->render_banner($banner, $nocount);
}
/**
* Render one banner
* @param $banner Opaque banner structure to be rendered
*/
-function render_banner($banner)
+function render_banner($banner, $nocount = false)
{
if ($banner['width'] <= 0)
$banner['width'] = 468;