Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #12  
Old 09-19-2002, 12:40 AM
Mystislav's Avatar
Mystislav Mystislav is offline
 
Join Date: Jun 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, that would end up being pretty complicated but it's cool.
Reply With Quote
  #13  
Old 09-19-2002, 01:13 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed it, and all is fine but on the cpostbit.php page AND on the admin cpostbit page, the preview just shows the postbit template no matter what the postbit is. Any fix?
Reply With Quote
  #14  
Old 09-19-2002, 06:23 AM
Colon33
Guest
 
Posts: n/a
Default

Hey, Like i was saying in the BETA forum. Its not a good idea unless you trust a user to know his HTML well. i mean very well.

You can trust a user not too mess it up on purpose but what happens when they completely botch a customizing job and really screw over your forums for awhile? It has nothing to do with trust people make mistakes. Maybe you should release a version of this where people can change the location and whats displayed but the HTML is SET. Its too much of a risk allowing people to do there own HTML work.

But the idea itself is a great mod to a VB... just i think its way to risky.
Reply With Quote
  #15  
Old 09-19-2002, 09:32 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #16  
Old 09-19-2002, 09:33 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mystislav, please go to this page and enter your username, to show you are licensed. (you will need to use your customer number and password to access that page)
Thank you.


oh and no it's not so complicated as it looks now
Reply With Quote
  #17  
Old 09-19-2002, 02:28 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

damn triplepost ^^

ok i've released version 1.20
no new features are added but i'd say all of you should update, because it'll reduce query ammount alot (if a user hast posted twice on a page just one query is needed now)

upgradeinfos: you have just to apply the changes in functions.php
then you should apply the changes to showthread.php

and then at the end of getpostbit function apply the changes you can see in cpostbit.txt


With this new Version the query-count increases just by 1 instead of 15 (or how much post per page you had)
Reply With Quote
  #18  
Old 09-19-2002, 10:24 PM
vdinh vdinh is offline
 
Join Date: Feb 2002
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Xenon,
Great hack ...

In your version 1.20 instruction:

Quote:
Step 6: edit admin/index.php
----------------------------
after:
if ($moderatenewmembers==1 or $usecoppa==1) {
$waiting=$DB_site->query_first("SELECT COUNT(*) AS users FROM user WHERE usergroupid=4");
if ($waiting[users]==0) {
echo "<font size='1'>There are currently $waiting[users] user(s) awaiting <a href=\"user.php?s=$session[sessionhash]&action=moderate\">moderation</a>.</font>";
} else {
echo "<b><a href=\"user.php?s=$session[sessionhash]&action=moderate\">There are currently $waiting[users] user(s) awaiting moderation</a>.</b>";
}
}

add:
$unvalid=$DB_site->query_first("SELECT COUNT(*) AS number FROM custompostbit WHERE validated=0");
echo "<br><a href=\"admincpb.php?s=$session[sessionhash]&action=validate\">There are currently ".$unvalid[number]." custom postbits to validate!</a><br><br>";

find:
// ***
makenavoption("New Posts","../mod/moderate.php?action=posts","<br>");
makenavoption("New Attachments","../mod/moderate.php?action=attachments");
makenavselect("Moderation","<hr>");

replace with:
// ***
makenavoption("New Posts","../mod/moderate.php?action=posts","<br>");
makenavoption("New Attachments","../mod/moderate.php?action=attachments");
makenavselect("Moderation");
// **
makenavoption("Add","admincpb?action=add","|");
makenavoption("View/Edit/Delete","admincpb?action=view","<br>");
makenavoption("Validate Postbits","admincpb?action=validate","<br>");
makenavselect("Custom Postbits","<hr>");
I think those lines need to add the .php extension before the question makrs
Reply With Quote
  #19  
Old 09-20-2002, 12:22 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

huh?

yes you're right thank you....

but it also works without i think.. (i mean it worked here i just copied the lines out of my index.php)

i've updated the instructions
Reply With Quote
  #20  
Old 09-20-2002, 03:08 PM
vdinh vdinh is offline
 
Join Date: Feb 2002
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Xenon,
I wonder if there is a way to, also, create separate postbit format for a member for each sub-forum. Suppose that my vBulletin forum got 3 rooms, can each of the 3 rooms carry a different postbit format for myself? Thanks.
Reply With Quote
  #21  
Old 09-20-2002, 03:36 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well if you've installed this hack you cann edit your showthread.php:
find
PHP Code:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

  if (
$postdone[$post[postid]]) {
    
$counter--;
    continue;
  } else {
    
$postdone[$post[postid]]=1;
  }
  
$postbits .= getpostbit($post);

and replace with this:
PHP Code:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

  if (
$postdone[$post[postid]]) {
    
$counter--;
    continue;
  } else {
    
$postdone[$post[postid]]=1;
  }
  
$postbitid=0;  
if(
$thread['forumid']==and $post[userid]==y$postbitid=z;
$postbits .= getpostbit($post,$postbitid);

that should do it
Reply With Quote
Reply

Thread Tools

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 04:39 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.05853 seconds
  • Memory Usage 2,312KB
  • 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
  • (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
  • (3)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