Recent Topics

1 Jul 20, 2007 22:37    

My b2evolution Version: 1.10.x

Ok, I've tried what is out there but I'm not looking for a checkbox - and my sites been opening links in new windows for 5+ years so my users are used to it.

at any rate I used to use a hack in /b2evocore/_class_item.php to force post title links to open in a new window or tab.

I can figure out how to get links in the body of a post to open that way. I'm having no luck with a simple and quick hack to get the title links to do so.

btw I just made a test site to upgrade from 0.9.0.11 - to current and it went perfectly - I can't believe I waited so long.

anyone got a quick and dirty non Javascript hack for this?

new site http://www.geeg.info/blog/

old site with behavior I want .. http://www.technicallyoverboard.com/blog/

2 Jul 21, 2007 05:36

It would help if you posted the actual code which generates your titles... but... for example, here is the code from a skin I recently built:

<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>

You could simply change it to read as so:

<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>" target="_blank"><?php $Item->title( '', '', false ); ?></a>

and wrap it in whatever headline (h2, h3, h4, etc) is appropriate in the flow of your page (For WCAG validation if you've already used an H1 in your banner and your date is an H2, then your title should be an H3, etc, but that's another discussion)

Anyway, the target=_blank statement will cause links to spawn a new browser window.

jj.

3 Jul 23, 2007 15:40

Well, I'm using a slightly modded version of the Miami Blue skin -

and this is the section I figure is doing the post titles

<h2 class="bTitle"><?php $Item->title( '', '', true ); ?></h2>
<div class="bSmallHead">

I tried messing with it but to no avail - always ended up crashing the blog.

any suggestions?

4 Jul 23, 2007 16:14

<h2 class="bTitle"><?php $Item->title( '', '', true ); ?></h2> 

to

<h2 class="bTitle"><?php if ( !empty($Item->url) ) echo '<a tartget="_blank" href="'.$Item->url.'">'.$Item->title( '', '', false ).'</a>'; else $Item->title( '', '', false ); ?></h2>

5 Jul 23, 2007 16:27

Well, when I do that the titles cease to be links altogether. 8|


Form is loading...