Get support from Xavier Media
It is currently Sun Dec 08, 2013 12:25 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Help please
PostPosted: Thu Nov 20, 2008 5:45 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Thu Nov 20, 2008 5:36 am
Posts: 2
Points: 0
I am using PhpBB Fetch All. I am having a slight code problem.

This code ends every thread that has been trimmed with the words "Read the full story."

Code:
<?php echo $news[$i]['post_text']; ?><?php if ($news[$i]['trimmed']) { echo 'Read the full story'; } ?>


However, I would like the "Read the full story" to be linked to the current forum thread. Here is the code:

Code:
<a href="<?php echo append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id']); ?>">
<?php echo 'Read the full story'; ?></a>


I did have this, but it then displayed a "Read the full story" link even if the thread was/wasn't cut off.

Code:
<?php echo $news[$i]['post_text']; ?><?php if ($news[$i]['trimmed']); ?>
<a href="<?php echo append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id']); ?>">
<?php echo 'Read the full story'; ?></a>


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Help please
PostPosted: Thu Nov 20, 2008 7:14 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Thu Nov 20, 2008 5:36 am
Posts: 2
Points: 0
This did the trick:

Code:
<?php echo $news[$i]['post_text']; ?><?php if ($news[$i]['trimmed']) { echo "<a href='".append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id'])."'>Read the full story</a>"; } ?>


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Help please
PostPosted: Thu Nov 20, 2008 9:11 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Ok, good that you solved the problem :D

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]