PDA

View Full Version : Question about if condition


JuniorWU
02-12-2011, 12:10 AM
well, I used a <if condition> to limit a change in the template threadbit I did, I used to do if the limitation that only appear where the modification can take the necessary information, it worked normally and not appearing on the topics that do not have information you want in this modification.

But if I set a topic that there is no hidden information <if> the modification, but if I set a topic where it hides <if> modification automatically pinned topics where <if> should hide the change, get appear on the topic where the information enables the information <if> Mod.

the code used was:

<if condition="$uploadinfo[servidores]"><div class="smallfont"><b>Servidores:</b> $uploadinfo[servidores]</div></if>

he conten information from another mod, but I've used the tag itself vbulletin to see if it was problem with the mod, where the information was death, the more the problem happens the same way.

kh99
02-12-2011, 01:50 AM
Sorry, I read this a few times but I don't understand. I think you are saying that the "if" works sometimes but doesn't work other times, but that's as much as I can understand.

JuniorWU
02-12-2011, 02:12 AM
Yes, exactly!

sometimes when <if> not find valid information, uses the other threads when it should disappear and hide the modification

kh99
02-12-2011, 10:16 AM
Maybe the problem is where $uploadinfo[servidores] is set? For exmaple,, if it's like this:


if (something)
{
...
$uploadinfo[servidores] = "servidores";
...
}


then if "something" is false it does not set $uploadinfo but leaves it at the previous value. So you would need to add:

if (something)
{
...
$uploadinfo[servidores] = "servidores";
...
}
else
{
$uploadinfo[servidores] = "";
}


This is a guess - I still don't understand.

JuniorWU
02-12-2011, 03:37 PM
unfortunately did not work.
I will simplify my problem, <if> sometimes works and sometimes not.

for example lets say I remove the tag $ uploadinfo [servers] one tag for the thanks plugin, If the creator of the topic does not have the thanks <if> , it should disappear, does not occur anymore, he grabs information from the next topic, namely the creator of the next topic