Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Rank Ordering Details »
Rank Ordering
Mod Version: 1.2, by MarkFL (Coder) MarkFL is offline
Developer Last Online: Mar 2019 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (3 votes - 5.00 average) Installs: 46
Released: 29 Jul 2015 Last Update: 25 May 2017 Downloads: 247
Not Supported DB Changes Code Changes Translations  

This product will, upon installation, add a column to your "ranks" table labeled "rankorder" and will edit your "/admincp/ranks.php" and "/includes/functions_ranks.php" files so that you may assign display ordering for your defined ranks. The original code is stored as "/admincp/ranks_orig.php" and "/includes/functions_ranks_orig.php" respectively. When uninstalled, your database and files are restored to their original condition.

This add-on utilizes code written by DragonBlade and n8td as posted here:

where do I change the order of rank images?

This add-on simply automates all of the file edits and the database change into one easy step.

When you go to your "User Rank Manager" you will see a new field titled "Rank Order" associated with each defined rank:



And when you edit a rank, you will find a new field on the form into which you can set the rank order:



Rank ordering can be used to control the order in which your various ranks are displayed in user postbits and profile pages. The smaller the number, the higher in the stack a rank will be displayed.

For example, suppose you have a rank for the forum owner(s) and you want this to be on top regardless of the other ranks the owners might have. You could assign this rank a rank order of 0. Then you may have several ranks which indicate a user's position in your staff, such as administrators, global moderators, forum moderators, etc. No one user would have more than 1 of these ranks, and so you could assign these a rank order of 1. This way any of the owners who are also an admin/global mod/mod would have the site owner rank on top and then their staff position rank next.

In this manner, you can assign rank orders to completely control the order in which all of your ranks are displayed:



Note: Once you edit your ranks to assign the rank order, you must run "update user titles and ranks" in order for the ordering to take effect.

Update: version 1.1
  • Added missed file edit which allows for new ranks to be successfully added after installing this add-on.

Update: version 1.2
  • Reads path to admin control panel folder from config.php.

Note: If you have not renamed your "admincp" folder, then you don't need to update to v. 1.2. If you edited the v. 1.1 .XML file to use your renamed "admincp" folder, then you also don't need to upgrade to v. 1.2. If you do decide to upgrade to v. 1.2 anyway, then you need to uninstall v. 1.1 first. If you wish to keep the rank ordering you've already defined, then you need to edit the product's uninstall code to remove the following db query:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To Install:

In AdminCP go to Plugins & Products -> Manage Products -> Add/Import Product.

Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.

Click "Import"

There are no settings to set, once installed, the product is active.

Note: When updating your vB, please follow these steps after completing the upgrade:

First, delete the files "/includes/functions_ranks_orig.php" and "admincp/ranks_orig.php".

Next, edit the "Rank Ordering" product to remove the uninstall code completely and save it.

Then, uninstall the product.

Lastly, reinstall the product, and the new PHP files will be backed up and then edited, and you'll be back in business.

Support for this product can be found here:

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	rankorderlist.png
Views:	1277
Size:	74.2 KB
ID:	153032   Click image for larger version

Name:	rankorderedit.jpg
Views:	1260
Size:	46.3 KB
ID:	153033   Click image for larger version

Name:	rankorderpost.png
Views:	1273
Size:	65.3 KB
ID:	153036  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 03 Aug 2015, 21:37
SpikeyWelsh SpikeyWelsh is offline
 
Join Date: Jun 2010
got ever thing working
Reply With Quote
  #17  
Old 03 Aug 2015, 21:39
Cody.9791 Cody.9791 is offline
 
Join Date: Jul 2015
I'm having an issue with this on vB 4.2.3. When I install it, I'm unable to see the area in the user ranks to edit the display order of existing ones as well as for setting up new ones.
Reply With Quote
  #18  
Old 03 Aug 2015, 23:11
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by Cody.9791 View Post
I'm having an issue with this on vB 4.2.3. When I install it, I'm unable to see the area in the user ranks to edit the display order of existing ones as well as for setting up new ones.
In your file system, do you see the files:
  • /admincp/ranks.php
  • /includes/functions_ranks.php
  • /admincp/ranks_orig.php
  • /includes/functions_ranks_orig.php

In your database, doe the table named "ranks" have the column "rankorder"?
Reply With Quote
  #19  
Old 03 Aug 2015, 23:26
Cody.9791 Cody.9791 is offline
 
Join Date: Jul 2015
Originally Posted by MarkFL View Post
In your file system, do you see the files:
  • /admincp/ranks.php
  • /includes/functions_ranks.php
  • /admincp/ranks_orig.php
  • /includes/functions_ranks_orig.php

In your database, doe the table named "ranks" have the column "rankorder"?
I'm not seeing:

/includes/functions_ranks.php
or
/includes/functions_ranks_orig.php

I do see:
/admincp/ranks.php
and
/admincp/ranks_orig.php

When I'm in the database, I open the "Ranks" section, it says, "Rank Order" then has "NULL" in the column.
Reply With Quote
  #20  
Old 03 Aug 2015, 23:38
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Did you get any errors when installing?

Here's what I suggest doing:
  1. Rename /admincp/ranks_orig.php to /admincp/ranks_xxx.php
  2. Uninstall this product.
  3. Delete /admincp/ranks.php
  4. Rename /admincp/ranks_xxx.php to /admincp/ranks.php
  5. Upload a copy of "functions_ranks.php" to your "includes" folder.
  6. Install the product again.
  7. Verifiy the 4 files I asked about before are all present. If so, see if the rank ordering function works.
Reply With Quote
  #21  
Old 03 Aug 2015, 23:56
Cody.9791 Cody.9791 is offline
 
Join Date: Jul 2015
Originally Posted by MarkFL View Post
Did you get any errors when installing?

Here's what I suggest doing:
  1. Rename /admincp/ranks_orig.php to /admincp/ranks_xxx.php
  2. Uninstall this product.
  3. Delete /admincp/ranks.php
  4. Rename /admincp/ranks_xxx.php to /admincp/ranks.php
  5. Upload a copy of "functions_ranks.php" to your "includes" folder.
  6. Install the product again.
  7. Verifiy the 4 files I asked about before are all present. If so, see if the rank ordering function works.
When I installed it the first time, I received an error. It said,

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log."

I uninstalled it and re-installed it and got the same error.

Where would I find a copy of the "functions_ranks.php" to copy to my "includes" folder?
Reply With Quote
  #22  
Old 04 Aug 2015, 02:43
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
You should be able to grab a fresh copy from your vB files on your hard drive?
Reply With Quote
  #23  
Old 04 Aug 2015, 07:00
4ngeluxpunk's Avatar
4ngeluxpunk 4ngeluxpunk is offline
 
Join Date: Jul 2010
Excellent, here's a tutorial on how to do old manually: http://vbforos.com/forum/recursos/ti...go-de-usuarios
Reply With Quote
  #24  
Old 11 Aug 2015, 18:23
Cody.9791 Cody.9791 is offline
 
Join Date: Jul 2015
Originally Posted by MarkFL View Post
Did you get any errors when installing?

Here's what I suggest doing:
  1. Rename /admincp/ranks_orig.php to /admincp/ranks_xxx.php
  2. Uninstall this product.
  3. Delete /admincp/ranks.php
  4. Rename /admincp/ranks_xxx.php to /admincp/ranks.php
  5. Upload a copy of "functions_ranks.php" to your "includes" folder.
  6. Install the product again.
  7. Verifiy the 4 files I asked about before are all present. If so, see if the rank ordering function works.
I currently have the product installed and active. I go into my file manager to do the things that you suggested, but I'm not seeing "admincp/ranks_orig.php" I just see "admincp/ranks.php". I do have "includes/functions_ranks.php" however. I went to see if the display order is showing for the ranks and it is not. What do you suggest?
Reply With Quote
  #25  
Old 11 Aug 2015, 18:26
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Were those two files on your server prior to installing this add-on?
Reply With Quote
  #26  
Old 11 Aug 2015, 18:37
Cody.9791 Cody.9791 is offline
 
Join Date: Jul 2015
Originally Posted by MarkFL View Post
Were those two files on your server prior to installing this add-on?
admincp/ranks.php & includes/functions_ranks.php? Yes, I believe so. I didn't upload any files myself.
Reply With Quote
  #27  
Old 11 Aug 2015, 18:42
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
If those files were present before the installation of this add-on, then you should find that you have copies of the originals as well as the modified versions of the originals.

Here is what I recommend doing. Uninstall the product, then delete "admincp/ranks.php" and "includes/functions_ranks.php" from your server. Upload unaltered versions of these two files from your installation fileset on your hard drive to the correct locations. Finally, install this product again. Verify that you now have 4 files (the originals that have been renamed and the modified versions).
Reply With Quote
  #28  
Old 11 Aug 2015, 18:58
Cody.9791 Cody.9791 is offline
 
Join Date: Jul 2015
Originally Posted by MarkFL View Post
If those files were present before the installation of this add-on, then you should find that you have copies of the originals as well as the modified versions of the originals.

Here is what I recommend doing. Uninstall the product, then delete "admincp/ranks.php" and "includes/functions_ranks.php" from your server. Upload unaltered versions of these two files from your installation fileset on your hard drive to the correct locations. Finally, install this product again. Verify that you now have 4 files (the originals that have been renamed and the modified versions).
I followed your exact steps.

When I went to install the product again, I got the following error:

"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log."

The product shows to be installed. I went and checked the files in the directory and only "admincp/ranks.php" & "includes/functions_ranks.php" are there. Not the other two.
Reply With Quote
  #29  
Old 11 Aug 2015, 19:05
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Without knowing the nature of the server errors, I really don't know what to tell you. It sounds like a permissions issue (chmod 777) though.
Reply With Quote
  #30  
Old 26 Aug 2015, 17:27
Total-AI Total-AI is offline
 
Join Date: Sep 2010
I'm having a similar issue on vBulletin 4.2.3. The plugin is installed, and I'm receiving no errors, but neither file has been created and as far as I can tell the database hasn't been affected either. It's late now so I'm not able to fiddle around with my file settings, however I'll try in the morning and let you know how I get on.

Edit: Ended up getting the plugin to install but it deleted the contents of my ranks.php and functions_ranks.php files. Not sure what the go there was. Any suggestions?

Last edited by Total-AI; 26 Aug 2015 at 23:37.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 23:44.

Layout Options | Width: Wide Color: