Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts

    I have an issue need a little hand shouldnt be to hard.

    I have an issue and i need to redirect a link that is not in an iframe, to a location that uses an iframe.

    Confusing yes, so let me show you.

    Example On that page you will see the block for "Forum statistics" Our newest member and then the persons name which is a link, I need this link to redirect to this page: Iframe

    As you can see if the main page link is clicked it will load it up in the same window, i need it to some how redirect to that iframe..

    I have to use Iframe because the integration with drupal.

    PHP Code:
    if (($row['session_viewonline']) || $auth->acl_get('u_viewonline')) {
                  if (
    $row['user_type'] <> USER_IGNORE) {
                    
    $user_online_link '<a href="' append_sid("{$phpbb_url}/memberlist.$phpEx"'mode=viewprofile&amp;u=' $row['user_id']) . '"' $user_colour '>' $user_online_link '</a>';
                  }
                  else {
                    
    $user_online_link = ($user_colour) ? '<span' $user_colour '>' $user_online_link '</span>' $user_online_link;
                  }

                  
    $online_userlist .= ($online_userlist != '') ? ', ' $user_online_link $user_online_link;
                } 
    Any help would be appreciated thx.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,980
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    This hasn't a thing to do with PHP. You need to specify a named target in your HTML anchor in order to change an iframe.
    So simply modify the anchor tag and add a target to the named iframe.

    This is part of the reason why I would suggest not using an iframe.

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts
    if your talking about adding ' target="forumFrame">'

    the Id of the iframe to the ending of that code i listed

    PHP Code:
    $user_online_link '<a href="' append_sid("{$phpbb_url}/memberlist.$phpEx"'mode=viewprofile&amp;u=' $row['user_id']) . '"' $user_colour '>' $user_online_link '</a>' 
    I already tried adding an target id, and it wouldn't work, so i came seeking alternatives.


    I found an issue with the script im using as its not pathing properly i think i can figure it out without doing in an iframe but thx for helping can close this thread.
    Last edited by KoRe; 10-05-2012 at 03:58 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •