Quote:
Originally Posted by Dave
The easiest way to find out why it's not working is to debug: dump your variables and see what it contains. Now it's a guessing game.
For example, above the if statement, add:
PHP Code:
var_dump($lastpav);
echo '<br>';
This will then dump the $lastpav variable of each forum loop on top of the screen.
|
that actually worked amazingly, although it returned everything it was supposed to and correctly i have no idea what to do with this information.
the result of running the dump (to big for a screenshot)
Legend for dump:
batman (means full default img)
me (means my avatar)
and the results:
NULL
string(126) "batman"
NULL
NULL
string(126) "batman"
string(78) "me"
string(78) "me"
string(126) "batman"
so it looks to be correctly getting the information, and even though it gets that last batman img its not were it supposed to be as seen in the 1st post image. as for the user with no avatar (i believe is the 2nd NULL) im guessing i need an if condition for if user has avatar which i thought i was doing with:
Code:
fetch_avatar_url($vbulletin->userinfo['userid']);
so now that i have essentially debugged this... anyone know where to go from here, cause im still lost (especially on that last post not displaying the avatar even though the echo showed its getting the info (img) for it
--------------- Added [DATE]1423937537[/DATE] at [TIME]1423937537[/TIME] ---------------
also i left the dump echo on my site you wont miss it (sry for the big img overlay which rly isnt hard to disable in chrome) but you can see the results starting at the top of the page
http://dirtrif.com
this is with the original code from the first post