PDA

View Full Version : User post count as binary


Takara
06-16-2002, 05:22 AM
Umm, seems like I come here alot.. lol

Anyway, Im trying to make it so that the person with the userid 1 has the post count show up as binary inside posts.

In showthread.php underneath

$post=$DB_site->query_first("
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,attach ment.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 post.postid = '$postid'
");

I added things like
if($thread['postuserid'] == 1) {
$post['posts'] = decbin($post['posts']);
}

and several other versions of $thread['postuserid'] ($post['postid'] etc etc) but it didnt work >_<
think anyone can help me out? heh -_-

Admin
06-16-2002, 05:27 AM
Put that in functions.php, getpostbit() function. (or is it buildpostbit()?)

Takara
06-16-2002, 05:41 AM
hehe, after

} else {
$post[aim]="";
}

I added

if($post[userid] == 1) {
$post[posts] = decbin($post[posts]);
}


And it worked, lol. Thanks again FireFly. This will be usefull for the spammers on my board too, I can use it to specify a usergroup, and have the posts just be 0 ^_^

Brad
06-16-2002, 05:50 AM
https://vborg.vbsupport.ru/showthread.php?s=&threadid=39800

you can also do that if it becomes to extream :)