mathforum
01-25-2014, 10:03 PM
Can someone explain how this part of my postbit template could output in one situation but not another?
<vb:if condition="$post['showuserranks'] OR $post['arcadeawards']">
<dt>Awards</dt> <dd>{vb:raw post.arcadeawardimg}{vb:raw awardimages}</dd>
</vb:if>
I realize that two plugins are outputting "{vb:raw post.arcadeawardimg}{vb:raw awardimages}" at some point but I can't figure out where. These plugins are written in a way that the postbit in PMs render an empty box for the template code in the above box. Maybe this is because the private message files aren't set to trigger the plugins? I am looking for advice on locating the important commands from the later stages of the program. So I'm trying to work backwards since I am certain the quoted text is connected to plugins and images...
I searched in the plugins for "$post['showuserranks']" and found it a couple of times in the mod that's for the ranks. Is this logical? I don't know what I'm looking for exactly.
--------------- Added 1390693606 at 1390693606 ---------------
I'm trying not to post too much of someone's code but here is a chunk that I think could contain an important part of rendering:
$post['showuserranks'] = false;
if ($post['num_ranks'] = $db->num_rows($alluserranks))
{
$ra_i = 0;
while ($rank = $db->fetch_array($alluserranks))
{
$ra_i++;
if ($ra_i <= $vbulletin->options['ra_display_limit'])
{
//- VB3 -// eval('$post[userranks] .= "' . fetch_template('ranks_bit') . '";');
//- BEGIN VB4 -//
$templater = vB_Template::create('ranks_bit');
$templater->register('rank', $rank);
$post[userranks] .= $templater->render();
//- END VB4 -//
This ends with rendering a template and variable and I don't see this happen much in the plugin code. Am I close to finding the source of the variables?
<vb:if condition="$post['showuserranks'] OR $post['arcadeawards']">
<dt>Awards</dt> <dd>{vb:raw post.arcadeawardimg}{vb:raw awardimages}</dd>
</vb:if>
I realize that two plugins are outputting "{vb:raw post.arcadeawardimg}{vb:raw awardimages}" at some point but I can't figure out where. These plugins are written in a way that the postbit in PMs render an empty box for the template code in the above box. Maybe this is because the private message files aren't set to trigger the plugins? I am looking for advice on locating the important commands from the later stages of the program. So I'm trying to work backwards since I am certain the quoted text is connected to plugins and images...
I searched in the plugins for "$post['showuserranks']" and found it a couple of times in the mod that's for the ranks. Is this logical? I don't know what I'm looking for exactly.
--------------- Added 1390693606 at 1390693606 ---------------
I'm trying not to post too much of someone's code but here is a chunk that I think could contain an important part of rendering:
$post['showuserranks'] = false;
if ($post['num_ranks'] = $db->num_rows($alluserranks))
{
$ra_i = 0;
while ($rank = $db->fetch_array($alluserranks))
{
$ra_i++;
if ($ra_i <= $vbulletin->options['ra_display_limit'])
{
//- VB3 -// eval('$post[userranks] .= "' . fetch_template('ranks_bit') . '";');
//- BEGIN VB4 -//
$templater = vB_Template::create('ranks_bit');
$templater->register('rank', $rank);
$post[userranks] .= $templater->render();
//- END VB4 -//
This ends with rendering a template and variable and I don't see this happen much in the plugin code. Am I close to finding the source of the variables?