You could actually put
Code:
<meta name="twitter:description" content="{vb:raw thread.meta_description}" />
<meta name="twitter:title" content="{vb:raw thread.prefix_plain_html} {vb:raw thread.title}" />
in the SHOWTHREAD template right under <title></title>, then they would be inside of the <head></head> where technically they belong.
Then, I changed headinclude to look like this:
Code:
<meta name="twitter:card" content="summary" />
<meta name="twitter:creator" content="@twitteruser" />
<meta name="twitter:site" content="@twitteruser" />
<meta name="twitter:image" content="http://images.com/twitter-02.png" />
<vb:if condition="$show['threadinfo']">
<!-- Twitter title, description set in template SHOWTHREAD -->
<vb:elseif condition="$show['foruminfo']" />
<meta name="twitter:title" content="{vb:raw foruminfo.title_clean} - {vb:raw vboptions.bbtitle}" />
<meta name="twitter:description" content="{vb:raw foruminfo.description_clean}" />
<meta name="keywords" content="{vb:raw foruminfo.title_clean}, {vb:raw vboptions.keywords}" />
<meta name="description" content="<vb:if condition="$pagenumber > 1">{vb:rawphrase page_x, {vb:raw pagenumber}}-</vb:if>{vb:raw foruminfo.description_clean}" />
<vb:else />
<meta name="twitter:title" content="{vb:raw vboptions.bbtitle}" />
<meta name="twitter:description" content="{vb:raw vboptions.description}" />
<meta name="keywords" content="{vb:raw vboptions.keywords}" />
<meta name="description" content="{vb:raw vboptions.description}" />
</vb:if>
Just look for the following line in headinclude as the place to sync up.
Code:
<vb:if condition="$show['threadinfo']">
and then add the Twitter stuff in where it belongs among the existing code as shown above. You have to go through all of this because the Thread Title and Meta Description are not available as variables in the headinclude template.
This way, you will get a Twitter card that makes sense for each of the following type of pages: 1) A forum page, 2) a Thread , 3) any other page. Hope this helps.