Recent Topics

1 Sep 08, 2005 19:09    

Hello all, I am new here and hope I can get an answer to my question. I have my blog iframed in my website and when clicking a link it opens within the Iframe. I want to have all links, when clicked on, open a different browser on "top" of the my webpage. Is this possible. I have searched throughout this forum and this subject is not talked about. PLEASE HELP!

2 Sep 08, 2005 21:18

In your skin directory, open the _main.php file, and fine this line (near the top)

<base href="<?php skinbase(); // Base URL for this skin. You need this to fix relative links! ?>" />

Add some code to check for a parameter on the URL (I'll call it "targetnew"), and if that parameter exists, add a target to the base tag, causing all links to open in a new window.

<base href="<?php skinbase(); // Base URL for this skin. You need this to fix relative links! ?>"<?php if ($_GET['targetnew']) { ?> target="_blank"<?php } ?> />

Then, in your IFRAME, where you have the URL to your blog page, add the "targetnew" parameter to the URL

http://www.myblogurl.com/blogdirectory/index.php?targetnew=true

This will cause links on your page to open in a new browser window, only when the URL is called with the "targetnew" attribute, which should only happen in your IFRAME. If the blog is outside your IFRAME, the parameter won't be there, so links will open in the same window as usual.

Note that you can call the parameter anything you want, just as long as it doesn't interfere with any of the existing parameters that b2evolution uses.

3 Sep 08, 2005 21:35

Add some code to check for a parameter on the URL (I'll call it "targetnew"), and if that parameter exists, add a target to the base tag, causing all links to open in a new window.

Thanks Kweb I will try this

4 Sep 08, 2005 22:36

Kweb

Thanks it worked. Really appriciate the quick response.


Form is loading...