vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   vB4 to vB3 {vb:link} (https://vborg.vbsupport.ru/showthread.php?t=244072)

James Birkett 06-06-2010 01:50 PM

vB4 to vB3 {vb:link}
 
Hi there,

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


HTML Code:

<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:
HTML Code:

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

<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:
HTML Code:

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

<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


All times are GMT. The time now is 03:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01484 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete