Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

for you PHP gods...

  • 15-10-2011 03:45PM
    #1
    Registered Users, Registered Users 2 Posts: 459 ✭✭


    How the feck do I have this statement open in a new (seperate) window pweeeze(I've tried putting target="new" in just about every combo to no avail?:o
    $href = $sess->url( $_SERVER['PHP_SELF'].'?page=checkout.index&ssl_redirect=1', true);
       		$href2 = $sess->url( $mm_action_url . "/index2.php?page=checkout.index&ssl_redirect=1", true);
       		$class_att = 'class="checkout_link"';
       		$text = $VM_LANG->_('PHPSHOP_CHECKOUT_TITLE');
     		
       		if( $this->get_cfg('useGreyBoxOnCheckout', 1)) {
       			echo vmCommonHTML::getGreyBoxPopupLink( $href2, $text, '', $text, $class_att, 500, 600, $href );
       		}
       		else {
       			echo vmCommonHTML::hyperlink( $href, $text, '', $text, $class_att );
       		}
    

    where on the $href could I set this to open in new window?

    ...or must it be set on last line (echo vmCommonHTML::hyperlink( $href, $text, '', $text, $class_att );)???


Comments

  • Registered Users, Registered Users 2 Posts: 177 ✭✭joebloggs123


    CSU wrote: »
    How the feck do I have this statement open in a new (seperate) window pweeeze(I've tried putting target="new" in just about every combo to no avail?:o
    $href = $sess->url( $_SERVER['PHP_SELF'].'?page=checkout.index&ssl_redirect=1', true);
       		$href2 = $sess->url( $mm_action_url . "/index2.php?page=checkout.index&ssl_redirect=1", true);
       		$class_att = 'class="checkout_link"';
       		$text = $VM_LANG->_('PHPSHOP_CHECKOUT_TITLE');
     		
       		if( $this->get_cfg('useGreyBoxOnCheckout', 1)) {
       			echo vmCommonHTML::getGreyBoxPopupLink( $href2, $text, '', $text, $class_att, 500, 600, $href );
       		}
       		else {
       			echo vmCommonHTML::hyperlink( $href, $text, '', $text, $class_att );
       		}
    

    where on the $href could I set this to open in new window?

    ...or must it be set on last line (echo vmCommonHTML::hyperlink( $href, $text, '', $text, $class_att );)???






    You could prob try something like this but im sure there are tidier ways of doing it.

    $href = $sess->url( $_SERVER['PHP_SELF'].'?page=checkout.index&ssl_redirect=1', true);
       		$href2 = $sess->url( $mm_action_url . "/index2.php?page=checkout.index&ssl_redirect=1", true);
       		$class_att = 'class="checkout_link" target="_blank"';
       		$text = $VM_LANG->_('PHPSHOP_CHECKOUT_TITLE');
     		
       		if( $this->get_cfg('useGreyBoxOnCheckout', 1)) {
       			echo vmCommonHTML::getGreyBoxPopupLink( $href2, $text, '', $text, $class_att, 500, 600, $href );
       		}
       		else {
       			echo vmCommonHTML::hyperlink( $href, $text, '', $text, $class_att );
       		}
    


  • Registered Users, Registered Users 2 Posts: 459 ✭✭CSU


    You could prob try something like this but im sure there are tidier ways of doing it.
       		$class_att = 'class="checkout_link" target="_blank"';
    

    ...haven't the foggiest about coding...well enough to get me by - but I thought $class_att was defining a CSS class to use...dunno wtf it works but it works - Thank you kind fello ;)

    (all fu*en day waiting on stupid bleedin virtuefart forums)


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    CSU wrote: »
    ...haven't the foggiest about coding...well enough to get me by - but I thought $class_att was defining a CSS class to use...dunno wtf it works but it works - Thank you kind fello ;)

    (all fu*en day waiting on stupid bleedin virtuefart forums)

    It was - it contained the class attribute and the value for it - but joebloggs added the target attribute to the same string.


Advertisement