vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   User post count as binary (https://vborg.vbsupport.ru/showthread.php?t=39917)

Takara 06-16-2002 05:22 AM

User post count as binary
 
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

PHP Code:

    $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,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 post.postid = '
$postid'
    "
); 

I added things like
PHP Code:

               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

PHP Code:

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

I added
PHP Code:

               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/showthrea...threadid=39800

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


All times are GMT. The time now is 10:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00915 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete