WordPress.org

Forums

Open PHP link (Log in) in a New Window (2 posts)

  1. Saive
    Member
    Posted 5 years ago #

    Ok, I have my blog embedded in a frame within a webpage. Therefore when the user goes to login to the control panel, it opens within the frame, which looks really bad as you can imagine. Because the Log in link is in php, HTML or Javascript 'new window' commands will not open it. I understand I have to pass the php as HTML in order to make the control panel open in a new window.

    I have the following code on the functions.php page:

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '',
            'after_widget' => '',
            'before_title' => '<h2>',
            'after_title' => '</h2>',
        ));
    ?>
    <?php
    function widget_mytheme_search() {
    ?>
    <h2>Search</h2>
    <form id="searchform" method="get" action="<?php bloginfo('home'); ?>/"> <input type="text" value="type, hit enter" onfocus="if (this.value == 'type, hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'type, hit enter';}" size="18" maxlength="50" name="s" id="s" /> </form>
    <?php
    }
    if ( function_exists('register_sidebar_widget') )
        register_sidebar_widget(__('Search'), 'widget_mytheme_search');
    ?>
    <?php
    add_filter('comments_template', 'legacy_comments');
    function legacy_comments($file) {
    	if(!function_exists('wp_list_comments')) : // WP 2.7-only check
    		$file = TEMPLATEPATH . '/legacy.comments.php';
    	endif;
    	return $file;
    }
    ?>
    <?php
    add_filter('loginout', 'somefunc');
    function somefunc($link) {
      //apply changes to $link html
      return $link;
    }
    ?>

    This results in the blog disappearing! Can someone please tell me what is wrong with this code, and what I need to do to change it. Many thanks.

  2. s_ha_dum
    Member
    Posted 5 years ago #

    I'm having a minor emergency right now-- what with being over-run by the Crimson Lance and all-- but I've thinking about doing something like this so I'll try to come back later.

Topic Closed

This topic has been closed to new replies.

About this Topic