![]() |
[CMS] Add thread link to article preview
1 Attachment(s)
Hi,
In vB4 CMS, in order to reach the promoted forum posts we have to open the article and click on the tiny url at the end of each article (vbcms_content_article_page): https://vborg.vbsupport.ru/attachmen...1&d=1295789254 I would like have the same thing in my article preview (cms home page) for each of the articles. I found the codes in template "vbcms_content_article_page" which is for this part of articles. PHP Code:
vb:link thread vb:raw threadinfo vb:link member vb:raw poststarter vb:raw post_url These variables are not accessible from "vbcms_content_article_preview" template. However I only need vb:raw post_url to get the url and $promoted_threadid to get the condition. This is what I get in CMS home page (vbcms_content_article_preview): https://vborg.vbsupport.ru/attachmen...1&d=1295789254 I really need to have thread links in article preview in my CMS. I would appreciate your help. thanks in advance, |
You need a plugin to get the thread id, I believe. Something like (at vbcsm_article_populate_end):
PHP Code:
|
Quote:
Thanks! |
Thanks a lot Lynne for your answer,
When I add this as a plugin in hook location vbcms_article_populate_end i get the following db error: Quote:
Execution Order: 5 I appreciate if you tell me the correct way to do this. |
Then add the prefix in front of the other table name also:
PHP Code:
|
I successfully created the plugin after adding another prefix for cms_node.
This will be the correct codes which I used: PHP Code:
I truly appreciate your help Lynne. regards, |
I was looking to do this same thing.
I followed what you did here and I can get it to link to the correct post by using something like: Code:
<a href="showthread.php?{vb:raw threadid}">{vb:raw title}</a> Instead of the link looking like ...showthread.php?37. it would look like ...showthread.php?37-title-text-here |
There is an article on writing the friendly urls correctly here - vBulletin 4 Template Syntax: Links
|
Thanks for the link Lynne, but It's not working for me still.
Is Code:
$record = vB::$vbulletin->db->query_first("SELECT a.threadid enough to give the vbcms_content_article_preview template access to the title information? The only thing I can generate is the thread id. Is there another query I need to add to get the title? If so, I'm not sure of the syntax for that. |
Thanks for Lynne, I also have problems with friendly urls, hope you can help me complete
|
Quote:
|
All times are GMT. The time now is 05:52 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|