Banners to _self

I am using the banner mod to promote the different functions of my site. Pretty simple idea really. Have one issue I can;t seem to fix.

When you click on a banner, it always opens a new window. Where can I add target="_self" to arrest that behavior?

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

What banner mod?  There are dozens of them.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 1 Feb 2013

Lets see how smart I am. I think I need to do it in the banners.php file, in this section of code. Just don't know how to do it.

 

            ),
            'BannerUrl' => array(
                'type' => 'text',
                'name' => 'Url',
                'value' => $sFormUrl,
                'caption' => $sUrlC,
                'required' => false,
                'db' => array (
                    'pass' => 'Xss',
                ),
            ),

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

 

What banner mod?  There are dozens of them.

 The one that comes with it, lol

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

 

I am using the banner mod to promote the different functions of my site. Pretty simple idea really. Have one issue I can;t seem to fix.

When you click on a banner, it always opens a new window. Where can I add target="_self" to arrest that behavior?

 e.g.

your game zone banner.

 

to get to open on same page, enter this code into the banner box.

<img src="/media/images/banners/towtalkgamezone.png" width="500" height="40" alt="Game Zone" longdesc="http://towtalk.net/gamezone.php?page=home" /><a href="http://towtalk.net/gamezone.php?page=home" title="Game Zone" target="_self"></a>

towtalkgamezone.png · 10.5K · 345 views
ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2013

I already tried that. I even tried editing the DB manually. It doesn't work....

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

I'm pretty sure it has to happen in that banner.php file.... I know that's a global fix but doesn;t matter because I don't sell banner ads anyway

I think I have to add it here:

  ),
            'BannerUrl' => array(
                'type' => 'text',
                'name' => 'Url',
                'value' => $sFormUrl,  <---------
                'caption' => $sUrlC,
                'required' => false,
                'db' => array (
                    'pass' => 'Xss',
                ),
            ),

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

 

I already tried that. I even tried editing the DB manually. It doesn't work....

 then how come it works on my site with your banner, click the banner and it opens in same page.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2013

That's odd as hell because it doesn't work on mine!

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

<center><img src="/media/images/banners/towtalkgamezone.png" width="500" height="40" alt="Game Zone" longdesc="http://towtalk.net/gamezone.php?page=home" /><a href="http://towtalk.net/gamezone.php?page=home" title="Game Zone" target="_self"></a></center>

I had to center it. I don;t think those center tags would affect it though/..

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

Wait... Are you leaving ther URL field empty since you're adding the href into the description field?

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

 

I don;t think those center tags would affect it though/..

 they do [edit] with out them the banner defaults left

did you see the banner there? I'm going to remove if you have..

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2013

 

Wait... Are you leaving ther URL field empty since you're adding the href into the description field?

 yes

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2013

I nsaw it, go ahead. and removing the banner url from the banner editor makes the banner non clickable.

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

Perhaps you could try changing this line of code in inc/banners.inc.php to _self

Around line 50:


    $sLinkWrapper = $arr['Url'] ? "<a target="_blank" href="{$bann_click_url}?{$arr['ID']}" onmouseout="ce()" onfocus="ss('{$arr['Url']}')" onmouseover="return ss('{$arr['Url']}')">{$arr['Text']}</a><br />" : $arr['Text'];

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 1 Feb 2013

 

removing the banner url from the banner editor makes

 I'm speaking of the "URL:" I have left that blank and used just what I posted.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2013

 

Perhaps you could try changing this line of code in inc/banners.inc.php to _self

Around line 50:


    $sLinkWrapper = $arr['Url'] ? "<a target="_blank" href="{$bann_click_url}?{$arr['ID']}" onmouseout="ce()" onfocus="ss('{$arr['Url']}')" onmouseover="return ss('{$arr['Url']}')">{$arr['Text']}</a><br />" : $arr['Text'];

 that sounds good. [edit] I tried this and it didn't work.

I don't always want them to leave and always use _new or _blank and prefer to be able to control this function.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2013

I do not know how you're getting that to work Newton because I can't make it work on mine. But that's normal for me... LOL

Thanks to both of you for helping...., Now if we can just fix that damned TOS {evalResult} problem, I could go to bed.

I just realized you said inc.banners.inc.php... Well, I was close anyway

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013

 

 

Perhaps you could try changing this line of code in inc/banners.inc.php to _self

Around line 50:


    $sLinkWrapper = $arr['Url'] ? "<a target="_blank" href="{$bann_click_url}?{$arr['ID']}" onmouseout="ce()" onfocus="ss('{$arr['Url']}')" onmouseover="return ss('{$arr['Url']}')">{$arr['Text']}</a><br />" : $arr['Text'];

 that sounds good.

I don't always want them to leave and always use _new or _blank and prefer to be able to control this function.

 _new or _blank is good for other sites but I'm redirecting them internally.. Don't want them to end up with 10 open towtalk windows... (lol). Thanks again. That fix worked perfectly H,

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Feb 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.