Quote:
Originally Posted by btappan
does anybody know how to get the same custom user profile fields i have in my postbit to show in the printable version? I use this:
<if condition="$post[fieldX]"><div align="left">$post[fieldX]</div></if>
in my postbit and it works fine, however when put in the printthreadbit template, it does nothing. The team over at VB.com said it will not work that way either, and to try asking here. I am desperate to do this as 90 % of my users print threads for use as notes and i have contact info for the user show up in these fields that has to be on there somehow. thanks ahead for your help.
I'll paypal or mail a check for $30 to the first person with a working soloution!
|
Ok, I got it. Thanks to Zach for finding the query I needed to edit.
In the printthread.php file
Find:
PHP Code:
$posts = $DB_site->query("
SELECT post.*,post.username AS postusername,user.username
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE post.threadid=$threadid AND post.visible=1 AND deletionlog.primaryid IS NULL
ORDER BY dateline $postorder
LIMIT $startat, $perpage
");
and replace it with:
PHP Code:
$posts = $DB_site->query("
SELECT post.*,post.username AS postusername,user.username,userfield.*
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = post.userid)
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE post.threadid=$threadid AND post.visible=1 AND deletionlog.primaryid IS NULL
ORDER BY dateline $postorder
LIMIT $startat, $perpage
");
and voila! Your if condition should now work.