Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

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
  #42  
Old 02-05-2017, 05:35 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Running vBulletin 4.2.3 Patch Level 2.

Installed just now, but there is no rankorder column when I go into User Rank Manager.

Quote:
Purpose

This product will...edit your "/admincp/ranks.php" and "/includes/functions_ranks.php" files...
Our installation doesn't have directory /admincp; we have /admincontrolpanel instead, so ranks.php hasn't been modified. File /includes/functions_ranks.php wasn't modified either.

Thoughts? Suggestions?

Added:
Just read post#35. Edited the .xml to replace admincp with admincontrolpanel and reloaded. Same result; no rankorder column and the two files remain unchanged.
Reply With Quote
  #43  
Old 02-05-2017, 05:40 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 Snowhog View Post
Running vBulletin 4.2.3 Patch Level 2.

Installed just now, but there is no rankorder column when I go into User Rank Manager.

Our installation doesn't have directory /admincp; we have /admincontrolpanel instead, so ranks.php hasn't been modified. File /includes/functions_ranks.php wasn't modified either.

Thoughts? Suggestions?
Try doing what this user did:

Quote:
Originally Posted by vpcarrocci View Post
Installed!

It didn't work on the first install but I quickly figured out that it was due to the fact that I had changed the name of the my "admincp" folder. I uninstalled the plug-in and created a new empty folder that I titled as "admincp" and uploaded the rank.php file into it. I then installed the plug-in again, moved the two files from the "admincp" folder into my renamed admincp folder and everything is working just as advertised. I also deleted the dummy admincp folder.

Thanks for the cool plug-in!
Or, you might get away with just uninstalling the product, then rename "/admincontrolpanel" to "/admincp", then install the product, and once you verify it works, rename the folder "/admincp" back to "/admincontrolpanel".
Reply With Quote
  #44  
Old 02-05-2017, 05:56 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried uninstalling the MOD first, and then reloading it. Same results.

I can't just rename the /admincontrolpanel to /admincp as doing so results in my not being able to access the AdminCP. I had renamed this folder several years ago for security reasons.

Where in vBulletin is the folder name for admincp set?
Reply With Quote
  #45  
Old 02-05-2017, 06:04 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 Snowhog View Post
Tried uninstalling the MOD first, and then reloading it. Same results.

I can't just rename the /admincontrolpanel to /admincp as doing so results in my not being able to access the AdminCP. I had renamed this folder several years ago for security reasons.

Where in vBulletin is the folder name for admincp set?
In the file "includes/config.php" look for the line:

PHP Code:
    //    ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ****** 
and change them there as well...sorry for leaving out that step, perhaps this is why vpcarrocci used the "dummy folder" method instead.
Reply With Quote
  #46  
Old 02-05-2017, 06:32 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That file exists in two locations; our server forum root as well as /includes.

I edited both files are replaced admincontrolpanel with admincp. Renamed the /admincontrolpanel folder to /admincp.

When I attempt to load the AdminCP it fails with:

The requested URL /admincontrolpanel/index.php was not found on this server.

I've reset both files and renamed the folder back so that at least getting into the AdminCP still works.

Is this likely just a browser cache problem?
Reply With Quote
  #47  
Old 02-05-2017, 07:13 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try vpcarrocci's method...
Reply With Quote
  #48  
Old 02-05-2017, 07:41 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Duplicating exactly what post #40 did also doesn't work here.

The ranks.php file in the created /admincp folder remains unchanged and the second file: ranks_orig.php; doesn't exist/wasn't created.

The same is true of the /includes/functions.php file. It remains unchanged and the second file: functions_orig.php doesn exist/wasn't created.

Installing the MOD didn't present any errors of any kind.
Reply With Quote
  #49  
Old 02-06-2017, 07:14 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
Duplicating exactly what post #40 did also doesn't work here.

The ranks.php file in the created /admincp folder remains unchanged and the second file: ranks_orig.php; doesn't exist/wasn't created.

The same is true of the /includes/functions.php file. It remains unchanged and the second file: functions_orig.php doesn exist/wasn't created.

Installing the MOD didn't present any errors of any kind.
Send the login credentials to an admin account with FTP access to me by PM, and I will try to resolve the issue.
Reply With Quote
  #50  
Old 02-06-2017, 06:54 PM
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Location: Andover, MN
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll do that if it really becomes necessary.

As neither the source files are being changed; date/time stamp isn't changing; and the backup files aren't being created, I thought maybe it's a permission issue, like it was with the other MOD I mucked with.

Both directories; admincontrolpanel and inlcudes; have permissions of 755. The contents of both directories have permissions of 644. I changed the directories to 775 and the two individual .php files to 775 and reran the installation .xml file. Still didn't get any error notifications, but the result was the same; no backup files created and the original files remained untouched.

Permissions on the directories and the two files have been reset back to what they were.

Is there a way to capture what's going on when the .xml file is run to a log file we can then examine?
Reply With Quote
  #51  
Old 02-06-2017, 06:59 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 Snowhog View Post
I'll do that if it really becomes necessary.

As neither the source files are being changed; date/time stamp isn't changing; and the backup files aren't being created, I thought maybe it's a permission issue, like it was with the other MOD I mucked with.

Both directories; admincontrolpanel and inlcudes; have permissions of 755. The contents of both directories have permissions of 644. I changed the directories to 775 and the two individual .php files to 775 and reran the installation .xml file. Still didn't get any error notifications, but the result was the same; no backup files created and the original files remained untouched.

Permissions on the directories and the two files have been reset back to what they were.

Is there a way to capture what's going on when the .xml file is run to a log file we can then examine?
If you have errors and/or warnings being suppressed by your config.php file, try turning that off (just comment that out) when you run the install. When done, then uncomment those lines.
Reply With Quote
Reply

Thread Tools

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 05:02 AM.


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.07083 seconds
  • Memory Usage 2,365KB
  • 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
  • (2)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)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