Log in

View Full Version : ProfilePic ForumHome Conditional


paul41598
08-17-2006, 01:16 AM
I need this code, somehow put in a plugin, global start Im presuming, But I dont think its 100% accurate, cuz I already tried it,and got erros


$profilepic = $DB_site->query_first("
SELECT userid, dateline
FROM " . TABLE_PREFIX . "customprofilepic
WHERE userid = $vbulletin->userinfo[userid]
");

$show['profilepic'] = iif($profilepic, true, false);



I can't use this conditional in forumhome, cuz it doesnt work
<if condition="$show['profilepic']">

I know using a plugin will help make it so I can use that conditional in any template. Can anyone help?

My goal here is to say on the forumhome. If user doesnt have a custom profile pic, mention to them that they outta upload one. ;)

Ntfu2
08-17-2006, 01:20 AM
<if condition="$show['profilepic']">
<img src="image.php?u=$vbulletin->userinfo[userid]&amp;type=profile&amp;dateline=$vbulletin->userinfo[profilepicdateline]">
<else />
<img src="$vboptions[bburl]/$stylevar[imgdir_misc]/profiledef.gif">
</if>


Try that code, its from another hack here, search for Show Profile Pic anywhere.

And if you are only trying to put this on the forumhome, why not try a forum home hook location?

paul41598
08-17-2006, 09:33 AM
The <if condition="$show['profilepic']"> condition doesnt work on forumhome.
So maybe cuz its not usuable in that template. Im guessing I would need a hook. Can anyone help out with a hook, or what goes in it