vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   [CMS] Thread url friendly to article preview (https://vborg.vbsupport.ru/showthread.php?t=314486)

hoangserip 09-23-2014 04:14 PM

[CMS] Thread url friendly to article preview
 
I did see the instructions in the article https://vborg.vbsupport.ru/showpost....05&postcount=6

PHP Code:

$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 but not working

:) Looking forward to the help !

Lynne 09-23-2014 04: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 05:03 PM

Template vbcms_content_article_preview I use :

PHP Code:

<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 04: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

Quote:

Originally Posted by hoangserip (Post 2516281)
Template vbcms_content_article_preview I use :

PHP Code:

<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?


All times are GMT. The time now is 02:02 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.01037 seconds
  • Memory Usage 1,729KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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