Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Banners Module used to open new window
  • Posted: 12.09.2005, 23:06
     
    OddsodzLost
    rank:
    Softmore 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


    icon_lol
  • Posted: 22.09.2005, 13:58
     
    OddsodzLost
    rank:
    Softmore Softmore
    registered:
     September 2005
    Status:
    offline
    last visit:
    01.05.07
    Posts:
    75
    Did have a clue yet?
  • Posted: 22.09.2005, 14:13
     
    rank:
    Moderator 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
  • Posted: 04.10.2005, 19:13
     
    OddsodzLost
    rank:
    Softmore 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&amp;bid=$bid\" title=\"$clickurl\"><img src=\"$imageurl\" alt=\"$clickurl\" /></a>";
            } else {
                $content = "<a href=\"banners.php?op=click&amp;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&amp;bid=$bid\" target=\"_blank\" title=\"$clickurl\"><img src=\"$imageurl\" alt=\"$clickurl\" /></a>";
            } else {
                $content = "<a href=\"banners.php?op=click&amp;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
  • Posted: 10.01.2006, 08:56
     
    stretchr
    rank:
    Softmore 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
  • Posted: 14.06.2006, 03:23
     
    Cleverdick
    rank:
    Softmore Softmore
    registered:
     January 2006
    Status:
    offline
    last visit:
    20.11.07
    Posts:
    96
    Edited.. wrongg thread sorry.



    edited by: Cleverdick, Jun 13, 2006 - 10:32 PM

    --
    Visit http://freebets.freebetguide.com today!

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula