Make sure that this:
PHP Code:
$postbits .= getpostbit($post);
Is in your showthread.php file, somewhere beneath this big, ugly query... not directly under it, but under it.
PHP Code:
$posts=$DB_site->query("
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter
".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM post
".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN userfield ON userfield.userid=user.userid
".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid","")."
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE $postids
ORDER BY dateline $postorder
");
If it's not, that's probably the problem. If it is then try this... go to your admin/functions folder.
!!!!BACK IT UP BEFORE MAKING ANY CHANGED!!!!
right after this line
PHP Code:
if ($post[userid]!=0) {
Put in this
PHP Code:
$posterid = $post['userid'];
After that, go to the template in question and replace:
PHP Code:
<a href="#" onclick="java script:window.open('itemshop.php?action=donate&user=$post[userid]', '', 'toolbar=no,scrollbars=no,resizable=no,width=200,height=50');">Donate</a>
with
PHP Code:
<a href="#" onclick="java script:window.open('itemshop.php?action=donate&user=$posterid', '', 'toolbar=no,scrollbars=no,resizable=no,width=200,height=50');">Donate</a>
Just make sure you back things up in case something bad happens.