PDA

View Full Version : [CMS] Thread url friendly to article preview


hoangserip
09-23-2014, 03:14 PM
I did see the instructions in the article https://vborg.vbsupport.ru/showpost.php?p=2154205&postcount=6

$record = vB::$vbulletin->db->query_first("SELECT a.threadid
FROM " . TABLE_PREFIX . "cms_article AS a
JOIN " . TABLE_PREFIX . "cms_node ON(" . TABLE_PREFIX . "cms_node.contentid = a.contentid)
WHERE nodeid = " . $this->getNodeId());

$view->threadid = $record['threadid'];

I used threadid in templates in this format: {vb:raw threadid}

I have tried to do as directed by Lynne in vBulletin 4 Template Syntax: Links (https://vborg.vbsupport.ru/showthread.php?t=221572) but not working

:) Looking forward to the help !

Lynne
09-23-2014, 03:37 PM
You need to post more about what you have done. Where did you put that query? Exactly what have you added to the templates and which template? Exactly what did you try from the Template Syntax article? Exactly what was the result?

hoangserip
09-23-2014, 04:03 PM
Template vbcms_content_article_preview I use :

<a href="showthread.php?t={vb:raw threadid}">{vb:raw title}</a>

I want to use url friendly instead of the link looking like ...showthread.php?37. it would look like ...showthread.php?37-title-text-here

Lynne
09-25-2014, 03:04 PM
So, what should the URL be for that example?

And what did you try from that Syntax article you linked to? It says you should be doing something more along these lines?

{vb:link thread, {vb:raw threadinfo}}

So, try it with the threadid and let us know the *exact* results (page source). Or, try the next thing in that article:

{vb:link thread, {vb:raw post}, null, 'threadid', 'threadtitle'}

irantk
10-02-2018, 11:23 AM
Template vbcms_content_article_preview I use :

<a href="showthread.php?t={vb:raw threadid}">{vb:raw title}</a>

I want to use url friendly instead of the link looking like ...showthread.php?37. it would look like ...showthread.php?37-title-text-here

how to get url friendly whithoute showthread.php?