Quote:
Originally Posted by KirbyDE
Nice one, but let me suggest an optimization (this is how I did it some weeks ago):
In showthread.php FIND
PHP Code:
post_parsed.pagetext_html, post_parsed.hasimages,
BELOW that ADD
PHP Code:
NOT ISNULL(customprofilepic.userid) AS haspic,
Further down in showthread.php FIND
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "post_parsed AS post_parsed ON(post_parsed.postid = post.postid)
BELOW that ADD
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON(customprofilepic.userid=post.userid)
And use this template modification:
In template postbit FIND
PHP Code:
$post[onlinestatus]
BELOW that ADD
PHP Code:
<if condition="$post['haspic']"><img src="/photo.gif" border=0 alt="Photo in Profile!"></if>
That's it. This way you don't have to alter table user, file profile.php and functions_showthread.php.
You also might want to extend this for single post display and PM 
|
Thanks for that it works on 3.0.5 in all display modes
I added this code to the image link.
<if condition="$post['haspic']"><a href="image.php?u=$post[userid]&type=profile"><img src="$stylevar[imgdir_misc]/photo.gif" align="absmiddle" border="0" alt="$post[musername] Has A Photo Click Here To View"></a></if>
I would like to add a 100x100 pop up window to show the image, if anyone could help out.