- Moderated by:
- Support
-
- rank:
-
Softmore
- registered:
- September 2005
- Status:
- offline
- last visit:
- 01.05.07
- Posts:
- 75
Banners Module used to open new window when you click on an Adveart in version 7.50. But now in version 7.60 they open in the same window. Has anybody got a idear on how to change this?
Thanks for reading my 7.60 woe's
-
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
Add a target back into the code in includes/pnBanners.php - compare the files between .760 and .750 for futher info.
Note that the advice about not opening unexpected new windows applies equally to banners as it does to weblinks. The target attribute is not valid HTML under anything other than HTML 4.01 transitional and shouldn't be used for accessibility reasons.
-Mark -
- rank:
-
Softmore
- registered:
- September 2005
- Status:
- offline
- last visit:
- 01.05.07
- Posts:
- 75
Thanks alot.
I got it to work
and for them who need to see the code here it is
open "includes/pnBanners.php" and Find this
Code
if ($type == 1 or $type == 2 or $type == 0) {
echo "<a href=\"banners.php?op=click&bid=$bid\" title=\"$clickurl\"><img src=\"$imageurl\" alt=\"$clickurl\" /></a>";
} else {
$content = "<a href=\"banners.php?op=click&bid=$bid\" title=\"$clickurl\"><img src=\"$imageurl\" alt=\"$clickurl\" /></a>";
return $content;
}
}
}
And replace with this
Code
if ($type == 1 or $type == 2 or $type == 0) {
echo "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\" title=\"$clickurl\"><img src=\"$imageurl\" alt=\"$clickurl\" /></a>";
} else {
$content = "<a href=\"banners.php?op=click&bid=$bid\" target=\"_blank\" title=\"$clickurl\"><img src=\"$imageurl\" alt=\"$clickurl\" /></a>";
return $content;
}
}
}
This works on version "PN 0.7.6.1"
Again thanks alot -
- rank:
-
Softmore
- registered:
- December 1969
- Status:
- offline
- last visit:
- 24.08.07
- Posts:
- 60
I searched for a solution to this problem but I was looking for open in new window for Banners Block and did not recognize that this was a solution for that problem. FWIW, I'm posting this so that next time someone searches for banner block open in new window, they'll have more luck finding this thread than I did.
Thank you for posting this. It works like a charm.
Cheers,
Stretchr`
--
"It's a small world...
But I wouldn't want to paint it!"
Stephen Wright
