vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Referencing original thread URL from vBCMS Article (https://vborg.vbsupport.ru/showthread.php?t=315154)

cash7c3 10-31-2014 11:05 AM

Referencing original thread URL from vBCMS Article
 
Hello, I'm having all sorts of difficulty passing a variable in a CMS article template (header) to output the original thread URL. Please advise how to do this.

cash7c3 11-03-2014 09:52 AM

Bump.

Lynne 11-03-2014 04:31 PM

So you created an article from a thread and need to somehow pass the threadid in the header template? What have you tried so far? Have you verified there is a cms_article.threadid that exists for that particle article?

cash7c3 11-03-2014 05:10 PM

I had this in there:

<vb:if condition="$promoted_threadid">
<link rel="canonical" href="{vb:raw vboptions.bburl}/showpost.php?{vb:raw session.sessionurl}p={vb:raw postid}"/>
</vb:if>

But that's the other way around (links to the forum post). I'd like to link it FROM the thread TO the article.

Lynne 11-04-2014 03:59 PM

So, you are putting that code into the header template on the showthread page and hoping to link to the article id (it sounded like before, you were wanting to link to the threadid). If you want to link to the article, you will need to do a query to get the article id before you can actually post a link to it.

cash7c3 11-04-2014 04:04 PM

Real example:

http://modmyi.com/content/16967-appl...est-rates.html is an article page.

It's original thread is http://modmyi.com/forums/mac-news/84...est-rates.html

In the THREAD header, I would like this code:

<link rel="canonical" href="http://modmyi.com/content/16967-apple-set-issue-bonds-euros-due-low-interest-rates.html"/>

I am not terribly opposed to it being the other way around, but prefer the canonical link to be the article URL.

I do not know how to do that, and am hoping someone can assist. I don't know how to do a query to get the article id, nor what to do with it when I get it.

cash7c3 11-07-2014 09:53 AM

Bump.

Lynne 11-07-2014 04:38 PM

Well, as I said, you would need to write a query to get the article id. I have no idea how to then take that and make an SEO link out of it. You may want to hire somebody if you are unsure how to do that.


All times are GMT. The time now is 07:08 AM.

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.02660 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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