Log in

View Full Version : add parent forum link to search results?


masterross
04-23-2015, 02:52 PM
Guys,

How to add full path to destination forum in search results (vb4.2)?

For example:

https://vborg.vbsupport.ru/external/2015/04/9.jpg

In this image destination forum is "Android Applications" but it's sub-forum.
And full path is Forum1 > Forum2 > Android Applications
I want this full path to be shown.

I looked in search_threadbit template :

{vb:rawphrase forum}:<br /><a href="{vb:link forum, {vb:raw thread}, null, 'forumid', 'forumtitle'}" title="{vb:raw thread.forumtitleclean}">{vb:raw thread.forumtitle}</a>

But is there any ready to use function like:

<a href="{vb:link forum, {vb:raw thread}, null, 'parentid', 'parenttitle'}" title="{vb:raw thread.parenttitle}">{vb:raw thread.parenttitle}</a> -

kh99
04-24-2015, 11:09 AM
There is nothing like that available. But you could use a plugin on hook search_results_thread_process to add it. There's an array called $vbulletin->forumcache that has info about all the forums, so you could use that and $thread[forumid] to build a string with the parent titles.