Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Custom Postbit for every User Details »»
Custom Postbit for every User
Version: 1.00, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-17-2002 Last Update: Never Installs: 29
 
No support by the author.

After the one Day Beta-Version i've finished the Hack so i can release it now.

Hack Version: 1.20b

Additional Queries in showthread.php: 1

What it does: It gives users the Ability to choose between custom postbits instead of just the one global postbit (or more if you have different styles).
Also it allows users to create their own custom postbits using html-code (These must be validated by an admin before they can use them)
It also gives you the ability to create a postbit just a special usergroup or just a special user can use.

I think i've tested every little option, but if you find a bug please tell me.

Please click install if you use the hack.

Some additions:
in cpostbit.php you find this lines to allow users wether to choose a custom postbit or to create new ones:
// Usergroups which can use custom postbits
$canusecpb="2 5 7 6";
// Usergroups which can create own custom postbits
$cancreatecpb="2 5 7 6";

people who installed the beta version should run installcpb.php?action=unstall&killbeta=1 before installing the hack.

Enjoy
screenshots following

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 09-20-2002, 03:55 PM
vdinh vdinh is offline
 
Join Date: Feb 2002
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot, Xenon! Finally I figured out what you meant It worked like a charm
Reply With Quote
  #23  
Old 09-22-2002, 04:16 PM
Colon33
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Xenon
colon i think you didn't understand my hack....
a user cannot use a selfmade custom postbit until it has been validatet by an admin, so the risky thing is that you as an admin would oversee anything...

@Link: Are you sure you have applied the changes to functions.php correctly?
because here at my testboard everything works fine

OK. i think i understand. I thought, that you had to validate a user before using it. Not the customization. In that case, its a little more safer. Just one question.

How bad does this lag a board? If at all.
Reply With Quote
  #24  
Old 09-22-2002, 04:43 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it adds just one query so the DB queries don't lag a board.
and if the users don't use foreign images then it doesn't lag a board..
Reply With Quote
  #25  
Old 09-22-2002, 09:58 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I figured it out. There was a part of futureal's arcade code in there, I had to switch the position of the code to get it to work
Reply With Quote
  #26  
Old 09-24-2002, 12:34 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon m8 is there a way i can make it not show the picture of the default post bit just a option user Default Postbit

and it will only show the pics of the custom postbit i made
Reply With Quote
  #27  
Old 09-24-2002, 01:23 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have to edit cpostbit.php:
PHP Code:
  if($bbuserinfo[postbitid]!=0) {
      
$choosetext "<input type=\"radio\" name=\"cpostbit\" value=\"0\"> Use standart";
      
$postbit=getpostbit($post,0);
      eval(
"\$choosebits .= \"".gettemplate('cpostbit_choosebit')."\";");
  } 
not the finest way but try this:
PHP Code:
  if($bbuserinfo[postbitid]!=0) {
      
$choosetext "<input type=\"radio\" name=\"cpostbit\" value=\"0\"> Use standart";
      
$postbit="";
      eval(
"\$choosebits .= \"".gettemplate('cpostbit_choosebit')."\";");
  } 
that should do it
Reply With Quote
  #28  
Old 09-24-2002, 01:34 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

also there is something wrong i have added a custom postbit

and it goes something like this

Code:
<br>
<table align="center" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="15"><img src="{imagesfolder}/left.gif" border="0"></td>

<td align="center" background="{imagesfolder}/catbg.gif" width="887"><normalfont color="{categoryfontcolor}"><b>$post[title]</b></normalfont></td>

<td width="15"><img src="{imagesfolder}/right.gif" border="0"></td>
</tr>
</table>
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>

<DIV id="p$post[postid]h" style="display:$ph">
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
	<td bgcolor="#CFCFCF" width="175" valign="top" nowrap>$plusimg   <font size="4"><b>$post[username]</b></font><br>
$bigstars
$goldstars
$pips<br>
              <smallfont>$post[usertitle]</smallfont></td>
	<td bgcolor="#CFCFCF" width="100%" valign="top">
		<table width="100% cellspacing="0" cellpadding="0" border="0">
		<tr>
		<td><smallfont>$post[icon] <b>$post[title]</b></smallfont></td>
		<td align="right" nowrap><smallfont>$onlinestatus $post[foldericon] $post[postdate] <font color="{timecolor}">$post[posttime]</font></smallfont></td><td width="15%" align="right"> <smallfont>(Post# <a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>$countposts</smallfont></a>)</smallfont></td></tr></table><br><normalfont>$post[shortmsg]</normalfont>
		
</tr>
</table>
</DIV>

<DIV id="p$post[postid]e" style="display:$pe">

<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%"><tr>

          <td bgcolor="#CFCFCF" width="175" valign="top" nowrap> <a name="post$post[postid]"></a> 
            <br>
            <br>

<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="verdana,arial,helvetica" size="1"><B>Level: $level | Member ID: $post[userid]</b></font></p>

<p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><font face="verdana,arial,helvetica" size="1"><B>MP: $maxmp%</font></B></p><table border="1" cellpadding="0" cellspacing="0" width="90%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"><tr><td width="100%"><img border="0" src="{imagesfolder}/bar1.gif" width="$maxmp%" height="9"></td>  </tr></table><font face="verdana,arial,helvetica" size="1"><B>HP: $hp%</B><table border="1" cellpadding="0" cellspacing="0" width="90%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"><tr><td width="100%"><img border="0" src="{imagesfolder}/bar2.gif" width="$hp%" height="9"></td>  </tr></table><font face="verdana,arial,helvetica" size="1"><B>EXP: $exp%</b><table border="1" cellpadding="0" cellspacing="0" width="90%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000"><tr><td width="100%"><img border="0" src="{imagesfolder}/bar3.gif" width="$exp%" height="9"></td></tr></table><br>	

<smallfont>
$awaymessage
Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts] <font color="#00FFFF">[$postsperday Per Day]</font><br>
Board Pounds: $post[storep] $donate<br>
Thread Views: $post[views]<br><br>
</smallfont></td>

          <td bgcolor="CFCFCF" width="100%" valign="top"> 
            <p><normalfont>$post[firstnewinsert]$minusimg <font size="4"><b>$post[username]</b></font><br>
              $bigstars $goldstars $pips<br>
              <smallfont>$post[usertitle]<br>
              $post[avatar]<br>
              <br>
              <a href='timeonline.php?s=$session[sessionhash]&action=view_leader'><b>Time 
              Spent On This Board:</b></a><br>
              $post[onlinetime] </smallfont></normalfont></p>
              $post[attachment] 
            <p>$post[signature]</p>
<p>$post[editedby]</p>

            <p align="right"><smallfont></smallfont></p>
            <table border="0" width="100%">
              <tr> 
                <td width="85%"> <smallfont>$post[icon] <b>$post[title] </b></smallfont></td>
                <td width="15%" align="right"> <smallfont>(Post# <a href="showthread.php?postid=$post[postid]#post$post[postid]"><smallfont>$countposts</smallfont></a>)</smallfont></td>
              </tr>
            </table>
            <p><br>
              $post[message]</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p align="right"> <a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report 
              this post to a moderator</a> | $post[iplogged]<br>
              $post[warnings]</p>
          </td>
        </tr><tr>	<td bgcolor="#CFCFCF" width="175" height="16" nowrap><smallfont>$post[foldericon] $post[postdate] <font color="{timecolor}">$post[posttime]</font></smallfont></td>		<td bgcolor="#CFCFCF" width="100%" valign="middle" height="16"><table width="100%" border="0" cellpadding="0" cellspacing="0">		<tr valign="bottom"><td><smallfont>$post[profile] $post[pmlink] $post[useremail] $post[homepage] $post[search] $post[buddy]$post[icqicon] $post[aimicon] $post[yahooicon] $post[msnicon]</smallfont></td><td align="right" nowrap><smallfont><a href="javascript:showwin('store.php?action=rate&postuserid=$post[userid]&postid=$post[postid]&postusername=$post[username]', 'width=550,height=250')"><img src="{imagesfolder}/storerate.gif" border="0" alt="Rate This Post"></a><a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="{imagesfolder}/edit.gif" border="0" alt="Edit/Delete Message"></a><a href="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]"><img src="{imagesfolder}/quote.gif" border="0" alt="Reply w/Quote"></a></smallfont></td></tr>
</table>	
</td></tr>
</table></td></tr>
</table>
</DIV>
<table align="center" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" width="15"><img src="{imagesfolder}/pbbleft.gif" border="0"></td>

<td align="center" background="{imagesfolder}/postbbg.gif" width="887"></td>

<td align="center" width="15"><img src="{imagesfolder}/pbbright.gif" border="0"></td>
</tr>
</table>
and it is just making the default one what comes with VBB i am using 2.2.7 also when i pick one i made it just still uses the default one i did on the board please help
Reply With Quote
  #29  
Old 09-24-2002, 01:36 PM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wtf it just added vbb.org where i had { imagesfolder }
Reply With Quote
  #30  
Old 09-24-2002, 01:40 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it shows the postbits correct on the chooserscreen?

be sure you have added correctly every single line to functions.php and showthread.php

normally everything should work, and it works on two of my test boards..
Reply With Quote
  #31  
Old 10-01-2002, 03:15 AM
Mathiau's Avatar
Mathiau Mathiau is offline
 
Join Date: Jan 2002
Location: Costa Rica and toronto
Posts: 227
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow!

a wicked hack

Question

me, i like things to ALL look the same, so this could make things look "messy" to someone like me.

Would it, if it does not already, have an option, much like a certain template

So, i make my own postbit template and then, when I view forums ALL posbits look like that? OR i can change to say another postbit template and it will look like that? - much the same as u change the color scheme on here... it affects the overall site, nut just what u do.

instead of seeing everyonme diff, postbit - as i can see some people finding that annoying as you get used to something, like profile being in one place, but it is in a few diff. places for diff people....

Just a thought.

but other wiuse very impressive hack!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:58 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08859 seconds
  • Memory Usage 2,335KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete