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

Neo 11-07-2001 03:11 PM

:rolleyes: umm k

over 11-18-2001 11:53 PM

has anyone tried this on 2.2.1 yet? :)

Mike Gaidin 11-19-2001 12:31 AM

Yes, it works perfectly.

over 11-19-2001 01:01 AM

Quote:

Originally posted by J-OST
Yes, it works perfectly.
cheers for letting me know :) im gonna see how it looks along side the rest of my hacks :D

Psychdrone 11-23-2001 01:23 AM

could some one please explain this to me, I looked at thats guys board, and did nto notice anythign differemt?

Wilhelm 12-07-2001 07:53 AM

help, i think i did not all right. All works fine, i can add new rankings and it works in forum. But in my cp all "users" options(add, find...) except the last 2 one(email building list..) dont work any more. I get always an parse error in user.php on line 107. Please can anyone look after my problem? copy of the edited code in user.php

Quote:


$profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield");
while ($profilefield=$DB_site->fetch_array($profilefields)) {

if ($profilefield[title] == "Ranksystem") {
makechoosercode("Ranksystem","field".$profilefield[profilefieldid],"rank");
}
else {
makeinputcode($profilefield[title],"field".$profilefield[profilefieldid]);
}
{
doformfooter("Save");
}
if no one knows, can anyone send me his good working hacked user.php file? Before i installed this hack i updated to 2.2.1. in moment its not fine that the whole users cp dont work, i cant manage my users any more :( Would be very happy for help.

Wilhelm from germany

Tho007 12-09-2001 02:09 PM

I have install it but new user can not register/signup.

<<<
Database error in vBulletin 2.2.1:

Invalid SQL: Select rankdetail.title from rankdetail where rankdetail.minposts <= 0 and rankdetail.rankid = ORDER BY rankdetail.minposts DESC LIMIT 1 mysql error: You have an error in your SQL syntax near 'ORDER BY rankdetail.minposts DESC LIMIT 1' at line 1
>>>

can me anybody help.Whats wrong?
Thank you

Zamora 12-13-2001 06:02 PM

Quote:

Originally posted by Tho007
I have install it but new user can not register/signup.

<<<
Database error in vBulletin 2.2.1:

Invalid SQL: Select rankdetail.title from rankdetail where rankdetail.minposts <= 0 and rankdetail.rankid = ORDER BY rankdetail.minposts DESC LIMIT 1 mysql error: You have an error in your SQL syntax near 'ORDER BY rankdetail.minposts DESC LIMIT 1' at line 1
>>>

can me anybody help.Whats wrong?
Thank you

Sorry, but i wasn?t able to post here until yet. I see the problem within the sql-statement, but i don?t know where it comes from. We use this hack on our board without complications, so i need more information to find a posible bug.
Perhaps you can get me via ICQ [42732369], so we can talk in a faster way?
I will test the hack-installation again, to find posible errors.

Your Error here:
rankdetail.rankid = ORDER
just after = there is missing the choosen RankID.
I cannot say why this is so. Can you please post me a link to this forum, so i can test the signup. I think i can find this bug faster, when i see it "live".

@Wilhelm: I?m just writing an email to you. But if you use ICQ, you can also try to catch me.

null shinji 01-15-2002 05:07 AM

but if you dont want it to just disable ur customtitle function you should then put a
if ($resettitle) {
before the if ($group[usertitle]=") { statement and close it just after the unset($customtext);
and dont forget to delete the $customtext = $usertitle; that is just after u must close the if ($resettitle) statement.....

Minimazz 02-04-2002 12:20 AM

Great hack, it works perfectly and no problem to the installation

SirSteve 02-16-2002 10:41 PM

Why does it say, "Ranksystem: 1" in the users Profile? Shouldn't it say whatever the Rank actually is?

ie. Ranksystem: Jedi Knight

(oh, and isn't it supposed to be 2 words? Rank System ?

Other than that, works great!

Tarion 03-06-2002 05:01 PM

bump

Zamora 03-06-2002 05:09 PM

I will make a bugfix for this viewing-problem at the weekend.
Expect it in a few days.

Zamora 03-11-2002 04:06 PM

OK, this should handle the viewing-"bug".

Go into member.php

find
Quote:

eval("\$customfields .= \"".gettemplate("getinfo_customfields")."\";");
before this statement, insert

Quote:

if ($profilefield[title]=="Ranksystem")
{

$getranksystem=$DB_site->query_first("SELECT title from rank left join userfield on rank.rankid = userfield.$profilefieldname where userid=". $userinfo[userid] . " LIMIT 0, 1");
$profilefield[value]=$getranksystem["title"];

}

This is all, after uploading your member.php, you should see the Jedi Knight instead of the 1
have fun!

Martyjp 03-18-2002 10:24 AM

On my board mods and admins can set their own titles, yet after installing this hack that no longer works, the option is still there but after they make the change it just reverts to the default title. Any ideas why?

Its no biggie as it can still be changed from the admin control panel, just wondering if I have done something wrong?

Zedd 03-21-2002 07:17 PM

I am having a bit of trouble with this hack

The peoples custom ranks do not stay.

After they start psoting it reverts back to junior member, member, ect.

Zedd 03-24-2002 06:50 PM

Anyone?

Zamora 03-24-2002 06:59 PM

I will look after this problem in the next few days.

Zedd 04-03-2002 02:32 PM

Still looking for an answer?

Hate to be a pain, but I have 2.2.4 Any ideas

Everything seems to work, but the new ranks disappear as soon as a person posts.

Sadie Frost 04-03-2002 05:59 PM

Sorry I don't have any ideas for you - I'm running 2.2.4 with no problems :)

Zedd 04-03-2002 06:53 PM

and you downloaded the zip file form the 1st page of this thread?

Sadie Frost 04-03-2002 06:54 PM

Yep :)

Zedd 04-04-2002 02:27 AM

I mus thave messed something up then. I cut and pasted everything thought. I guess I will just start with a fresh files and try it again.

Sadie Frost 04-04-2002 06:13 PM

Not to insult your intelligence, but did you re-run the install file after you upgraded? Or is this a brand new install?

Zamora 04-04-2002 06:19 PM

I have registered on your Forum quite a few minutes ago and made several postings.
Sorry, but after you have reinstalled, I cannot find any bug.
If there are some bug, that I can reproduce on your forum, then I will look for them and rewrite some code to solve the problem.

Just say it.

Zedd 04-04-2002 06:24 PM

Sadie..I am not insulted andI am also new to the VB. Been running a UBB for a few years and hacking that is completely different from this, but exactly what do you mean by
Quote:

but did you re-run the install file after you upgraded
Zamora: It seems to be working today. I was in the procees of uploading re-hacked files when you were testing it. I will have to see if it keep sworking. thank you for your help.

Zamora 04-04-2002 06:27 PM

Everytime you upgrade your forum, you have to reinstall the hacks, because vbulletin usualy exchange every (even the patched) files.
This is, what Sadie Frost means.

So if you upgrade to 2.2.x then reinstall all hacks and everything is ok.

Zedd 04-04-2002 06:30 PM

ok. No this was a newly installed 2.2.4 I just got it like 2 weeks ago.

And that is always the problem with hacking. Had to redo a ton of stuff on my UBB every time there was a major release.

Ofcourse the VB seems a bit easier to hack and a lot of what was a hack for a UBB is standard here :)

Mike Gaidin 04-04-2002 06:45 PM

Hey Zedd, it's Mike. If you want help I'll be glad to help you. I posted a message for you at the Tower.

Sadie Frost 04-04-2002 07:00 PM

Quote:

Originally posted by Zedd
Sadie..I am not insulted and I am also new to the VB.
Good :) I'm not very advanced so my suggestions are usually the simple ones, so didn't want you to take it the wrong way.

I upgraded my board recently from 2.2.1 and (I think) I had to re-run the install file (forums/admin/multirank.php) in order to make it work after the upgrade, so I thought that might have been your problem too.

But it looks like you may have gotten it working, so I hope it's fixed :)


All times are GMT. The time now is 11:40 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.04046 seconds
  • Memory Usage 1,827KB
  • 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
  • (8)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
  • (40)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