vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Custom Postbit for every User (https://vborg.vbsupport.ru/showthread.php?t=43688)

Mystislav 09-19-2002 12:40 AM

Wow, that would end up being pretty complicated but it's cool.

Link14716 09-19-2002 01:13 AM

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?

Colon33 09-19-2002 06:23 AM

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.

Xenon 09-19-2002 09:32 AM

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

Xenon 09-19-2002 09:33 AM

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 ;)

Xenon 09-19-2002 02:28 PM

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)

vdinh 09-19-2002 10:24 PM

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 :)

Xenon 09-20-2002 12:22 PM

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

vdinh 09-20-2002 03:08 PM

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.

Xenon 09-20-2002 03:36 PM

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


All times are GMT. The time now is 01:45 AM.

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.01164 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete