Quote:
Originally Posted by Lestat_
I altered the xml import a little bit and added this line of code
Code:
union SELECT count(userid) as count FROM vb_user WHERE usergroupid in (6,7) and userid='$bbuserinfo[userid]'"
to all the
Code:
$hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]');
so after adding the code you get :
Code:
$hide_replied = $db->query("SELECT COUNT(postid) AS count FROM ". TABLE_PREFIX . "post WHERE userid='$bbuserinfo[userid]' AND visible = 1 AND threadid='$post[threadid]' union SELECT count(userid) as count FROM vb_user WHERE usergroupid in (6,7) and userid='$bbuserinfo[userid]');
It is a bit of hardcoding because of the (6,7) but can easily be extended with parameters i guess, so basically I added one more count to the sql select which checks if the current user is in group 6 or 7 (mods or admins) and if so, it raises the count, which causes the hidden text being visible regardless the current user replied or not.
this little adjustment fixes the "scalar value" error 
|
when i do this i got this error in over 20 rows in me header
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /includes/class_postbit.php(340) : eval()'d code on line 195