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)
-   -   Multiple ranking System (https://vborg.vbsupport.ru/showthread.php?t=32063)

Ralgar 11-02-2001 10:00 PM

Following features

You can add so many rankingsystems you want extremly easy
The users can switch the systems at the cp and choose his own rankingsystem at the registration
complet admintool support
a possible ramified rankingsystem

i hope u like all

sigh, wrong board, pls move :stupid: ;)

Update 24.11.2001:
The following bugs are handled

When a new user registered to the forum, the user would get the first title from the OLD usertitles. This is fixed.
When a user changed the ranksystem, he would only changed the title then he post something. This is also fixed.

Here are the Bugfixcode, the zipfile is now the bugfixed full release

Code:


*******************
* files, which will be edit by the bugfix
*******************

register.php
member.php


*******************
* file
* member.php
* -------------
* modify the display for the field Ranksystem
* -------------
*******************

***
*search:
***

  // Custom User Title Code!

  if ($resettitle) {
    $group=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]");
    if ($group[usertitle]=="") {

      $gettitle=$DB_site->query_first("SELECT title FROM usertitle WHERE minposts<=$bbuserinfo[posts] ORDER BY minposts DESC LIMIT 1");
      $usertitle=$gettitle[title];
    } else {
      $usertitle=$group[usertitle];
    }
    $bbuserinfo[usertitle] = $usertitle;
    $bbuserinfo[customtitle] = 0;
    unset($customtext);
   
  }

***
*replace with
***

  // Custom User Title Code!

  $group=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]");
  if ($group[usertitle]=="") {

      $getprofilefield=$DB_site->query_first("SELECT profilefieldid from profilefield where 1 and title = 'Ranksystem' LIMIT 0, 1");
      $varname="field$getprofilefield[profilefieldid]";
      $rankid = $$varname;
      $gettitle=$DB_site->query_first("Select rankdetail.title from user, rankdetail left join userfield on user.userid = userfield.userid where user.userid= $bbuserinfo[userid] and rankdetail.rankid = $rankid and rankdetail.minposts <= user.posts ORDER BY rankdetail.minposts DESC LIMIT 1");

      $usertitle=$gettitle[title];
  } else {
    $usertitle=$group[usertitle];
  }
  $bbuserinfo[usertitle] = $usertitle;
  $bbuserinfo[customtitle] = 0;
  unset($customtext);
   
  $customtext = $usertitle;


*******************
* file
* register.php
* -------------
* modify the display for the field Ranksystem
* -------------
*******************

***
*search
***

  $usergroup=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid='$newusergroupid'");
  if ($usergroup[usertitle]=="") {

    $gettitle=$DB_site->query_first("SELECT title FROM usertitle WHERE minposts<=0 ORDER BY minposts DESC LIMIT 1");
    $usertitle=$gettitle[title];
  } else {
    $usertitle=$usergroup[usertitle];
  }

***
*replace with
***

  $usergroup=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid='$newusergroupid'");
  if ($usergroup[usertitle]=="") {

    $getprofilefield=$DB_site->query_first("SELECT profilefieldid from profilefield where 1 and title = 'Ranksystem' LIMIT 0, 1");
    $varname="field$getprofilefield[profilefieldid]";
    $rankid = $$varname;
    $gettitle=$DB_site->query_first("Select rankdetail.title from rankdetail where rankdetail.minposts <= 0 and rankdetail.rankid = $rankid ORDER BY rankdetail.minposts DESC LIMIT 1");

    $usertitle=$gettitle[title];
  } else {
    $usertitle=$usergroup[usertitle];
  }


Zamora 11-03-2001 10:15 AM

additional infos to this hack:

this hack replaces the usertitle function.
It should work with all vb release since 2.x
succesfull testet on 2.2.0 and 2.0.3

the actual rank is stored in the field usertitle in the table user

This hack includes the function to show a choice of rankings within Users CP depending on your actual posting counter and / or the time (in days) registered to the forum.

example: You can create a ranksystem which will be visible for all users having 60 postings and who registerd at least 30 days ago.
This option is great for supporting "veteran user" of a board, getting rankings which is something special for them.

Disadvantage of this hack:
If a user changes the ranksystem in his profile, he has to post something, to make this change visible.
Changing the Users rank within the admin-CP will directly chance the usertitle.

This hack will not need additional sql-queries while showing the postings. This was the reason to create this hack and not using the multi-rank-hack shown on this board.
If a user has a custom title, this custom title will be shown and not the title given by the ranksystem.

Ralgar 11-05-2001 05:50 AM

Noone have a comment or proposal to our hack?

Its our first so we fish for compliments ;)

but serious, we also hope, that anywhan have proposals to make it better

Martyjp 11-05-2001 09:29 AM

Very good hack :D

I installed it over the weekend and was going to post how easy it was to install and how great it works but I couldnt find this post :)

SirSteve 11-05-2001 05:48 PM

Exactly what I needed! Works great on 2.2.0!

Thanks!

Neo 11-06-2001 07:50 PM

*dows to all powerful* works great. i am going to PM with a idea about it..

Mike Gaidin 11-06-2001 09:17 PM

Is there a demo?

I'm wondering if this will do something I've been wanting to do for a while. I want to have ranks for men, and ranks for women. Can this do that?

TheComputerGuy 11-06-2001 09:23 PM

I have seen this before, and its nice.

Mike Gaidin 11-07-2001 01:02 AM

Wow! This is an excellent hack. It is exactly what I've been looking for. I've just found my new favorite hack. Great work guys!!!!!!!!!!

Ralgar 11-07-2001 08:13 AM

Quote:

Originally posted by J-OST
Is there a demo?

I'm wondering if this will do something I've been wanting to do for a while. I want to have ranks for men, and ranks for women. Can this do that?


a demo is aviable at uob.gamesmania.de/forum

and you can have so many ranks you want, mens, womens, animals, aliens :) all at the same board

@neo
i answer if i found the time ;)


All times are GMT. The time now is 06:25 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.01273 seconds
  • Memory Usage 1,742KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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