Recent Topics

1 May 25, 2007 21:30    

My b2evolution Version: 1.9.x

i hope this isn't too redundant, but i can't figure out how to make the title of my posts link to my posts. I can't copy the preview url and placing the title of the post in the "link url" doesn't work. is there a trick to this that I am missing?

any help would be appreciated.
-mike

p.s. scott, the guy with the e-mail a friend plug in, is the man!!![/i]

2 May 26, 2007 08:00

Preview is a temporary page only. To have the title link to the post requires that you edit your skins/yourskin/_main.php file. The following snippet replaces your "Item->title()" bit, and will give you the title permalinked to the article unless you also have a link in the Link to URL field when you post. In that case it gives you the chain-link icon for a permalink right before the title.

<h2 class="bTitle"><?php 
if( $Item->get('url') ) { ?>
	<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><img src="img/chain_link.gif" alt="<?php echo T_('Permalink') ?>" width="14" height="14" border="0" class="middle" /></a>
	<?php 
	$Item->title();
	} else { ?>
	<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>
	<?php } ?>
</h2>

Check out the "skinners_guide" skin. It shows tons of stuff you can do with that file. It might even show this!

3 May 29, 2007 04:11

wow man, around here you ask for a fish and you get a fishing pole!

Thanks man. I plugged in your code and got an "unexpected T string" that i had to fix. i messed with it so much i don't remember what i did to fix it, but it works.

im going to go hunt for a b2e (non-rocket scientist) compatible BBS. and a simple way to post comments, without leaving an e-mail.

that skinners guide was cool.
thanks again.

4 Aug 16, 2010 22:55

Hello,

I use a modified version of the above code so that the external links are opened in a new tab/window:

<h3 class="bTitle">
 <?php
     if( $Item->get('url') ) { ?>
       <a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><img src="img/chain_link.gif" alt="<?php echo T_('Permalink') ?>" width="14" height="14" border="0" class="middle" /></a>
     <?php
     if (($blog == 1 or $blog == 3) and !empty($Item->url)) {           
       echo $Item->url_link('', '', $Item->title, array('target' => '_blank'));  
     } else {  
       $Item->title();   
     }  
     } else { ?>
       <a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php $Item->title( '', '', false ); ?></a>
 <?php } ?>
</h3>

...and it works well - question: what I have to change to create the chain-icon after the headline? I have tried but sadly without success.

Thanks for your help.

Best Regards,
Daniel


Form is loading...