PDA

View Full Version : vB4 to vB3 {vb:link}


James Birkett
06-06-2010, 01:50 PM
Hi there,

I want to convert the following links in vB4 format to vB3 format, can anyone help?


<a href="{vb:link forum, {vb:raw thread}, {vb:raw foruminfo}}&prefixid={vb:raw thread.prefixid}" rel="nofollow">{vb:raw thread.prefix_rich}</a>

I know it includes $thread, $foruminfo, $thread['prefixid'] and $thread['prefix_rich'] - I'm just unsure on how to convert the "forum" to vB3.

Also:
<a href="{vb:link forum, {vb:raw foruminfo}, {vb:raw pageinfo_postusername}}" rel="nofollow">{vb:rawphrase thread_starter}{vb:raw sortarrow.postusername}</a>

Finally:
<a href="{vb:link forum, {vb:raw foruminfo}}">

Lynne
06-06-2010, 01:57 PM
You may want to take a look at this article - https://vborg.vbsupport.ru/showthread.php?t=221572

James Birkett
06-06-2010, 02:04 PM
I have read that, but I'm not sure what {vb: link forum} is in terms of vB3, what does forum represent in terms of hyperlinking?

For the first one, would it be:
<a href="{vb:link forum, {vb:raw thread}, {vb:raw foruminfo}}&prefixid={vb:raw thread.prefixid}" rel="nofollow">{vb:raw thread.prefix_rich}</a>

<a href="$vbulletin->options['bburl']/forumdisplay.php?f=$thread['forumid']&prefixid=$thread['prefixid']" rel="nofollow">$thread['prefix_rich']</a>

Lynne
06-06-2010, 02:19 PM
forum means it's linking to a forum page, ie. forumdisplay.php and it is being passed the thread and foruminfo arrays.

Have you tried just hovering over the link to see what variables are being used? (Your translation looks correct except for "$vbulletin->options['bburl']" should just be "$vboptions['bburl']")

Guest190829
06-06-2010, 02:30 PM
To get a closer look at what is going on under the hood, look at includes/class_friendly_url.php.

The type "forum" in direct linking terms, simply means forumdisplay.php; that is the script that deals with forum listing.

James Birkett
06-06-2010, 02:38 PM
Thanks Lynne and Danny

Issue resolved