Recent Topics

1 May 11, 2009 16:07    

My b2evolution Version: Not Entered

I've looked over the forum and see this asked a few times but not answered in a way that I can use.

The full blog lives by default within /blogs/, and I have placed <iframe src="../../blogs/blog_stub.php?posts=2" height="100" width="210" scrolling="no" frameborder="0"></iframe> on the home page of the site (that page cannot be rebuilt using b2evo so iframe seemed like the quickest bet). But, the links to articles open up in the iframe.

I searched throughout the files to see where I could add "target = _parent" (which would leave the existing blog links, in /blogs/ operating normally and force the iframe links to open correctly). I can't seem to find the right file to modify - I don't want to use a plug in, I don't mind a simple hack as it's only a few words of code...

Any help would be very much appreciated. This blog app is really fantastic, thank you.

2 May 11, 2009 17:41

marsthedog wrote:

(that page cannot be rebuilt using b2evo

I'm betting you're wrong

marsthedog wrote:

iframe seemed like the quickest bet

I'm betting you're right ;)

In the long run rebuilding your page would be easiest ... I'm guessing ... tad hard without a link ;)

In the meantime you could use javascript or something, I guess, but that'd fail in my browser.

You could pray for a browser quirk and add target="_top" ( or parent ) to your iframe ... it'd be funky if it works ... but don't hold your breath because I know bugger all about using iframes ;)

¥

3 May 11, 2009 17:51

Thanks for the reply. The page is generated by another customized and encrypted app, templated around flash and video - there's no good reason to rebuild what is already working, and javascript is overkill for a simple browser target.

Anyone able to point me to the file that says '<a href = xxx>Post Title Here</a> ?

4 May 11, 2009 21:17

Ok, I'm still betting you're wrong, but I'm biased huh? ;)

Your problem is, the various links are generated by lots of files ( most of the ones you want should be in /inc/items/model/_item.class.php .. or the light class ).

¥

5 May 11, 2009 22:55

Thanks for the tip on the pages. I edited itemlight.class.php, adding target="_parent" to the script:

echo $params['before'];
if( !empty($url) )
{
echo '<a href="'.$url.'" target="_parent">'.$title.'</a>';
}
else
{
echo $title;
}
echo $params['after'];
}

around lines 740 - 750. Works like a charm (haven't tested fully), hope this helps someone else.


Form is loading...