Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-04-2012, 05:35 PM   PM User | #1
KoRe
New Coder

 
Join Date: Feb 2009
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
KoRe is an unknown quantity at this point
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.
KoRe is offline   Reply With Quote
Old 10-04-2012, 07:04 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,650
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
Fou-Lu is offline   Reply With Quote
Old 10-05-2012, 02:06 AM   PM User | #3
KoRe
New Coder

 
Join Date: Feb 2009
Posts: 22
Thanks: 2
Thanked 0 Times in 0 Posts
KoRe is an unknown quantity at this point
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..
KoRe is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:00 AM.


Advertisement
Log in to turn off these ads.