Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Rank Ordering Details »»
Rank Ordering
Version: 1.2, by MarkFL MarkFL is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 07-28-2015 Last Update: 05-24-2017 Installs: 50
DB Changes
Code Changes Translations  
No support by the author.

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:

PHP Code:
// Remove "rankorder" column from "ranks" table

$vbulletin->db->hide_errors();
$vbulletin->db->query_write("
    ALTER TABLE`" 
TABLE_PREFIX "ranks`
        DROP COLUMN rankorder
"
); 
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. :up:

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

File Type: zip MarkFL - Rank Order v1.2.zip (2.6 KB, 82 views)

Screenshots

File Type: png rankorderlist.png (74.2 KB, 0 views)
File Type: jpg rankorderedit.jpg (46.3 KB, 0 views)
File Type: png rankorderpost.png (65.3 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
alcazarx, ELROBLE, midnz

Comments
  #72  
Old 03-12-2017, 02:23 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Snowhog View Post
No.
Okay, so the issue isn't specific to the members pages at least.
Reply With Quote
  #73  
Old 03-12-2017, 02:34 AM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, it's not. The rank images aren't "ordered" anywhere that they are displayed.
Reply With Quote
  #74  
Old 03-12-2017, 02:41 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Snowhog View Post
No, it's not. The rank images aren't "ordered" anywhere that they are displayed.
Okay, then shoot me a PM with the login credentials for an admin account (that can run manual SQL queries), and I will take a look.
Reply With Quote
  #75  
Old 03-12-2017, 03:50 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, it turns out the issue was minor...what needed to be done was to run the update on user titles and ranks.
Reply With Quote
  #76  
Old 03-12-2017, 04:08 AM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. And it's the simple things that often are the most complicated!
Reply With Quote
Благодарность от:
MarkFL
  #77  
Old 03-12-2017, 04:12 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Snowhog View Post
Thank you. And it's the simple things that often are the most complicated!
Yes, and that issue sure caught me when I first defined user ranks at MHB...and I know several folks who were caught by it too.

It's a shame that information/link is expertly hidden right at the top of the "User Rank Manager" page.
Reply With Quote
  #78  
Old 05-21-2017, 05:10 PM
WindVoice WindVoice is offline
 
Join Date: Aug 2016
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to make it work with vB 4.2.5, it stopped working after I did an upgrade.

Thanks!
Reply With Quote
  #79  
Old 05-21-2017, 05:19 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WindVoice View Post
Is it possible to make it work with vB 4.2.5, it stopped working after I did an upgrade.

Thanks!
The issue is that your PHP scripts naturally got overwritten with newer files when you did the upgrade.

What you need to do is as follows:

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.
Reply With Quote
  #80  
Old 05-21-2017, 05:28 PM
WindVoice WindVoice is offline
 
Join Date: Aug 2016
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
The issue is that your PHP scripts naturally got overwritten with newer files when you did the upgrade.

What you need to do is as follows:

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.
Working again

Thank you :up:
Reply With Quote
Благодарность от:
MarkFL
  #81  
Old 05-21-2017, 06:02 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
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.
If one removes the uninstall code, how then does one uninstall the product?
Reply With Quote
Reply


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 11:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12013 seconds
  • Memory Usage 2,362KB
  • Queries Executed 27 (?)
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
  • (1)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (5)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete