This is a first time my doing this with vb4 and I need some help. This seems easy but I'm struggling with it bad.
I have added a sample product showing the 2 ways I am trying to add buttons within a post. thanks to shka I have the custom template one working, the parse_template one is not fetching the threadid though.
I have tried pulling the threadid from postbit, and showthread within plugins.
example

arse templat (in a showthread condition) i am just using new thread button in posts as a base, I want to add a button that will be grabbing the threadid not the forum id.
Code:
$sessionurl = $session['sessionurl'];
$threadidid = '{vb:raw threadid}';
$post_phrase = 'Refresh this Listing';
$new_thread_link = '<div><a href="refresh.php?'.$sessionurl.'do=newthread&f='.$threadid.'" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top" style="margin-left:10px;"><span>+</span> '.$post_phrase.'</a></div>';
$find = '<div id="pagination_top"';
$replace = $new_thread_link.$find;
$vbulletin->templatecache['SHOWTHREAD'] = str_replace($find, $replace, $vbulletin->templatecache['SHOWTHREAD']);
I have tried directly replacing the variable, replacing with other variables IE $threadinfo['threadid']
but I am not having any luck.
I first wanted to do this in postbit, but was having the same issue. Using post thanks button placement as my base, I could not get the threadid to input:
Code:
<template name="post_thanks_button" templatetype="template" date="1477136504" username="Abe1" version="7.88"><![CDATA[
<vb:if condition="$post['userid'] != 0">
<a href="postings.php?t={vb:raw threadid}" class="post_thanks_button">Refresh</a>
</vb:if>]]></template>
which is placed into the template through this plugin:
Code:
<plugin active="1" executionorder="5">
<title>Post Thank You Hack</title>
<hookname>postbit_display_complete</hookname>
<phpcode><![CDATA[if ($this->post[postid] == $this->thread[firstpostid]){
$display_thanks_image = '';
$templater = vB_Template::create('post_thanks_button');
$templater->register('post', $post);
$templater->register('display_thanks_image', $display_thanks_image);
$template_hook['postbit_controls'] .= $templater->render();
}
]]></phpcode>
</plugin>
how can I pull the threadid in either of these locations?