[eluser]Tim Brownlaw[/eluser]
Well just as an aside your function would look a little better like this... ( or course there are other ways to do this )
Code:
if($r) //voting done
{
echo $LANG['sources_HAVE_AN_ACCOUNT'];
echo '<a href="../login" target="_blank">';
echo $LANG['header_LOGIN_title'].'</a>';
}
else //voting failed
{
$effectiveVote = getEffectiveVotes($id);
echo $effectiveVote.' '.$LANG['sources_POINTS_title'];
}
Is $r definitely a Boolean - TRUE/FALSE... Also you could get a bit more creative on naming $r to something more meaningful as you seem to have done on your $LANG indexes! But that's a minor point.
To the meaty bits!
Now I am assuming that your statement...
Quote:The problem is that when you click on the vote button the text “Have an account?” doesn’t appears!!
means that this code is then run.
Now are you Certain that $LANG['sources_HAVE_AN_ACCOUNT'] exists when this code is executed.
And do the other $LANG[] values show up as expected?
If you were to put in a
at the end of that code - Do you see that item set and is it spelt the same (CASE is important!)
That's about all I can suggest at the moment.
Cheers