PDA

View Full Version : Link to Replies


ihl
12-23-2005, 09:59 PM
I just upgraded to VB 3.5.2 and CMPS v2.0.0. Things seem to be working pretty well except for one thing I can't figure out.

There used to be a link on the number of replies that took you to the full text of the post. (See attached screen shot for a better explanation)

It still shows the number of replies correctly but it is no longer a link to the actual replies. I used to be able to click on '28 Replies' in this case, and view the replies. Is there a way I can re-enable that link?

Thank you.

Brian
12-24-2005, 12:03 PM
If you'll look in your adv_portal_newsbits template for this code:
$news[replycount]

And replace with this:
<if condition="$news['replycount']"><a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[replycount]</a><else />$news[replycount]</if>

Then that should create a link when there are replies.

Our Sponsors
 

ihl
12-24-2005, 12:44 PM
Brian, thank you so much for the reply. That did the trick so thanks. Now, if I can be really picky - your suggesting makes the link out of just the number. In the v1.0 the word 'Replies' was also part of the link. Is there some code I could add so that both the number and the word "Replies" are the link like they used to be?

Thanks again for your help.

Brian
12-24-2005, 12:58 PM
No problem. :)

If you'll remove this bit of code from the template:
<if condition="$news['replycount'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if>

And replace the code you added earlier with this:
<if condition="$news['replycount']"><a href="$vboptions[bburl]/showthread.php?t=$news[threadid]">$news[replycount] <if condition="$news['replycount'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if></a><else />$news[replycount]</if>
Then that should do the trick.

Our Sponsors
 

ihl
12-24-2005, 10:35 PM
You are definitely the man. I'm not sure how you do it, but that is perfect.

Thanks again.

Scythe99
03-05-2006, 08:34 PM
I have done this with VB 3.5.4 and it works for the most part. I couldn't find this part in my template, however:

<if condition="$news['replycount'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if>

I did however find this in the template:

<if condition="$news['reply_noformat'] == 1">$vbphrase[reply]<else />$vbphrase[replies]</if>

Everything works pretty good when I removed that, however, when I create a new newspost with 0 replies. I get the following:

http://www.sanctu.com/images/error.gif

What can I do to make it so that it says 0 Replies (with a link to the thread) instead of just the 0 ? Thanks for any help in advance :)

Brian
03-06-2006, 01:49 PM
Just wrap the <a href=""> tag around the code you posted above.

Scythe99
03-06-2006, 04:27 PM
But the code I posted above is the code that I'm supposed to remove, right? If I don't remove that line I get something that looks like this:


2 Replies Replies | 32 Views

The second replies is not a link, just standard text.