View Full Version : Administrative and Maintenance Tools - Rank Ordering
MarkFL
07-28-2015, 09:00 PM
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 (https://vborg.vbsupport.ru/member.php?u=142514) and n8td (https://vborg.vbsupport.ru/member.php?u=207372) as posted here:
where do I change the order of rank images? (https://vborg.vbsupport.ru/showthread.php?t=109292&page=2)
This add-on simply automates all of the file edits and the database change into one easy step. :cool:
When you go to your "User Rank Manager" you will see a new field titled "Rank Order" associated with each defined rank:
https://vborg.vbsupport.ru/external/2015/07/17.jpg
And when you edit a rank, you will find a new field on the form into which you can set the rank order:
https://vborg.vbsupport.ru/external/2015/07/17.jpg
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:
https://vborg.vbsupport.ru/external/2015/07/17.jpg
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:
// 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:
MHB - Rank Ordering (http://mathhelpboards.com/vbulletin-products-61/rank-ordering-21882.html)
TAZ - Rank Ordering (https://theadminzone.com/threads/rank-ordering.145175/)
SpikeyWelsh
07-29-2015, 11:57 AM
thank you so much for the mod works so well :)
fatal rseort
07-31-2015, 12:52 AM
Works flawlessly, thanks. :)
fatal rseort
07-31-2015, 01:43 AM
Possible bug, but it seems when you try to add a new user rank with the mod installed you get a Database error. Assuming this was the problem as when I uninstalled it I was able to add the rank without a problem.
MarkFL
07-31-2015, 01:50 AM
Possible bug, but it seems when you try to add a new user rank with the mod installed you get a Database error. Assuming this was the problem as when I uninstalled it I was able to add the rank without a problem.
Okay, yes I am getting the same issue...thank you for letting me know and I will get it resolved ASAP. :)
MarkFL
07-31-2015, 02:14 AM
Update: version 1.1
Added missed file edit which allows for new ranks to be successfully added after installing this add-on.
Skyrider
08-02-2015, 06:56 AM
At installation, getting:
PHP Warning: file_get_contents(./admincp/ranks.php): failed to open stream: Permission denied in ..../includes/adminfunctions_plugin.php(1201) : eval()'d code on line 11
PHP Warning: file_put_contents(./admincp/ranks_orig.php): failed to open stream: Permission denied in ..../includes/adminfunctions_plugin.php(1201) : eval()'d code on line 13
PHP Warning: file_put_contents(./admincp/ranks.php): failed to open stream: Permission denied in ..../includes/adminfunctions_plugin.php(1201) : eval()'d code on line 35
PHP Warning: file_get_contents(./admincp/ranks.php): failed to open stream: Permission denied in ..../includes/adminfunctions_plugin.php(1201) : eval()'d code on line 1
PHP Warning: file_put_contents(./admincp/ranks.php): failed to open stream: Permission denied in ..../includes/adminfunctions_plugin.php(1201) : eval()'d code on line 5
on vB 4.2.3. That's because our admincp directory has a different name. Maybe handy to include in the code to use the config.php admincp directory path instead.
After altering the paths, I've changed the ranking order for 2 ranks, one being 0 and the other being 1. (also tried one being 1, and the second being 2). But the rank order doesn't seem to change.
MarkFL
08-02-2015, 07:25 AM
I will look into parsing the config.php file. :)
Do you mean the value shown in the rank manager doesn't change, or the order in which the ranks are displayed in the postbits doesn't change?
Skyrider
08-02-2015, 07:27 AM
Sorry for not being clear about that! The ranks in the postbit doesn't change.
MarkFL
08-02-2015, 07:32 AM
Did you run "update user titles and ranks?"
Skyrider
08-02-2015, 08:11 AM
Missed that note ;), Will try later on, thanks!
crower55
08-02-2015, 08:49 AM
MarkFL YOU ARE AMAZING !!!!!!!!!!
Thanks a lot...
SpikeyWelsh
08-02-2015, 06:50 PM
ya i getting the same error when adding a new rank
akz645
08-02-2015, 07:26 PM
ya i getting the same error when adding a new rank
He updated the version.
Download the new one and re-upload the XML.
friendlymela
08-03-2015, 04:28 AM
This mod is really nice and useful
SpikeyWelsh
08-03-2015, 07:37 PM
got ever thing working
Cody.9791
08-03-2015, 07:39 PM
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.
MarkFL
08-03-2015, 09:11 PM
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"?
Cody.9791
08-03-2015, 09:26 PM
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.
MarkFL
08-03-2015, 09:38 PM
Did you get any errors when installing?
Here's what I suggest doing:
Rename /admincp/ranks_orig.php to /admincp/ranks_xxx.php
Uninstall this product.
Delete /admincp/ranks.php
Rename /admincp/ranks_xxx.php to /admincp/ranks.php
Upload a copy of "functions_ranks.php" to your "includes" folder.
Install the product again.
Verifiy the 4 files I asked about before are all present. If so, see if the rank ordering function works.
Cody.9791
08-03-2015, 09:56 PM
Did you get any errors when installing?
Here's what I suggest doing:
Rename /admincp/ranks_orig.php to /admincp/ranks_xxx.php
Uninstall this product.
Delete /admincp/ranks.php
Rename /admincp/ranks_xxx.php to /admincp/ranks.php
Upload a copy of "functions_ranks.php" to your "includes" folder.
Install the product again.
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?
MarkFL
08-04-2015, 12:43 AM
You should be able to grab a fresh copy from your vB files on your hard drive?
4ngeluxpunk
08-04-2015, 05:00 AM
Excellent, here's a tutorial on how to do old manually: http://vbforos.com/forum/recursos/tips-y-tutoriales/374-ordenar-rango-de-usuarios
Cody.9791
08-11-2015, 04:23 PM
Did you get any errors when installing?
Here's what I suggest doing:
Rename /admincp/ranks_orig.php to /admincp/ranks_xxx.php
Uninstall this product.
Delete /admincp/ranks.php
Rename /admincp/ranks_xxx.php to /admincp/ranks.php
Upload a copy of "functions_ranks.php" to your "includes" folder.
Install the product again.
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?
MarkFL
08-11-2015, 04:26 PM
Were those two files on your server prior to installing this add-on?
Cody.9791
08-11-2015, 04:37 PM
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.
MarkFL
08-11-2015, 04:42 PM
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).
Cody.9791
08-11-2015, 04:58 PM
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.
MarkFL
08-11-2015, 05:05 PM
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.
Total-AI
08-26-2015, 03:27 PM
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?
AhmetYerli
02-02-2016, 06:36 PM
Is there a version of vBulletin 3?
MarkFL
02-02-2016, 07:09 PM
Is there a version of vBulletin 3?
It's possible this will work with vB3 with just a version dependency change. I will look into this soon. :)
Inked_Mono
03-11-2016, 12:38 PM
This plugin works like an absolute charm! Had to run the update tool on "Update User Titles and Ranks" just to see the order changes, but that was completely expected.
Amazing plugin, Mark. Thanks a ton.
twistedsoul
05-06-2016, 07:58 PM
Sweet! Ty!
boggseric
09-05-2016, 01:10 AM
Worked perfect. We use a custom admincp folder name for security, I just modified the xml file before installation and replaced all the admincp occurrences with my actual folder name.
Webion
10-10-2016, 06:49 PM
Not working on 5.2.4
MarkFL
10-10-2016, 09:07 PM
Not working on 5.2.4
This product isn't intended for use with vBulletin 5.x. :)
mikez006
10-21-2016, 01:41 PM
Doesn't work with 4.2.0. I get a bunch of errors on import. No 'Rank Order' column appears after import.
Warning: Illegal string offset 'dependency' in [path]/includes/adminfunctions_plugin.php on line 912
Warning: Illegal string offset 'template' in [path]/includes/adminfunctions_plugin.php on line 1242
Warning: Illegal string offset 'stylevargroup' in [path]/includes/adminfunctions_plugin.php on line 1253
Warning: Illegal string offset 'stylevar' in [path]/includes/adminfunctions_plugin.php on line 1258
Warning: Illegal string offset 'plugin' in [path]/includes/adminfunctions_plugin.php on line 1274
Warning: Illegal string offset 'phrasetype' in [path]/includes/adminfunctions_plugin.php on line 1294
MarkFL
10-21-2016, 02:03 PM
Doesn't work with 4.2.0. I get a bunch of errors on import. No 'Rank Order' column appears after import.
Warning: Illegal string offset 'dependency' in [path]/includes/adminfunctions_plugin.php on line 912
Warning: Illegal string offset 'template' in [path]/includes/adminfunctions_plugin.php on line 1242
Warning: Illegal string offset 'stylevargroup' in [path]/includes/adminfunctions_plugin.php on line 1253
Warning: Illegal string offset 'stylevar' in [path]/includes/adminfunctions_plugin.php on line 1258
Warning: Illegal string offset 'plugin' in [path]/includes/adminfunctions_plugin.php on line 1274
Warning: Illegal string offset 'phrasetype' in [path]/includes/adminfunctions_plugin.php on line 1294
Have you renamed your "admincp" folder?
vpcarrocci
02-05-2017, 12:13 AM
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!
Snowhog
02-05-2017, 05:35 PM
Running vBulletin 4.2.3 Patch Level 2.
Installed just now, but there is no rankorder column when I go into User Rank Manager.
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.
MarkFL
02-05-2017, 05:40 PM
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:
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". :)
Snowhog
02-05-2017, 05:56 PM
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?
MarkFL
02-05-2017, 06:04 PM
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:
// ****** 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. ;)
Snowhog
02-05-2017, 06:32 PM
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?
MarkFL
02-05-2017, 07:13 PM
Try vpcarrocci's method...:)
Snowhog
02-05-2017, 07:41 PM
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.
MarkFL
02-06-2017, 07:14 AM
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. :)
Snowhog
02-06-2017, 06:54 PM
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?
MarkFL
02-06-2017, 06:59 PM
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.
Snowhog
02-06-2017, 08:14 PM
Nothing in config.php that would suppress error logging.
grep error config.php returns:
| If you get any errors while attempting to connect to |
// If any database errors occur, they will be emailed to the address specified here.
// Leave this blank to not send any emails when there is a database error.
// may receive collation errors. Ignore this setting unless you
What version of PHP are you running? Our server is running 5.5.9.
Snowhog
02-07-2017, 01:58 AM
Should this be? Two versions of the Install code? Version 1.0 appears complete. Version 1.1 is only a fragment. Not even sure where version 1.1 came from.
https://vborg.vbsupport.ru/external/2017/02/12.png
MarkFL
02-07-2017, 02:17 AM
Should this be? Two versions of the Install code? Version 1.0 appears complete. Version 1.1 is only a fragment. Not even sure where version 1.1 came from.
https://vborg.vbsupport.ru/external/2017/02/12.png
Yes, that looks correct. :)
After I initially released version 1.0, I realized I missed a file edit, so the install code for version 1.1 catches that missing edit.
Snowhog
02-07-2017, 02:40 AM
Thank you.
I have verified that folder and file permissions on the server are correct (didn't really think they weren't, but...)
The only thing I can come up with as to why this MOD isn't getting installed is either, the php commands are not correct (for our installation), or the relative path to the two files isn't correct. I find both possibilities rather unlikely given the author. ;)
I can provide you with my SSH login credentials via separate PMs if you are still inclined to go in and look around. I would like to get this problem resolved so the MOD can actually get installed.
sub_ubi
02-10-2017, 08:42 PM
Working well with 4.2.5 Beta 1 + PHP 7.0
Did an edit+replace on the xml file for my custom admincp, otherwise no issues.
Snowhog
02-10-2017, 09:24 PM
I wish that were true here. Still waiting for MarkFL to ascertain why it won't install on our Forum.
Snowhog
02-13-2017, 09:38 PM
The first part of the .xml instructions was executed properly.
$vbulletin->db->hide_errors();
$vbulletin->db->query_write("
ALTER TABLE`" . TABLE_PREFIX . "ranks`
ADD rankorder SMALLINT
");
The ranks database was altered to add rankorder.
https://vborg.vbsupport.ru/external/2017/02/6.png
But the remaining code isn't being executed, or is failing, as the two files: ranks.php and functions_ranks.php; are not being backed up or modified. This leaves me to believe that the (php ?) commands aren't correct (for us), or the permissions on the folders and/or .php files are wrong.
The folders containing ranks.php and functions_ranks.php are set with permissions 755 (rwxr-xr-x) and the .php files are set with permissions 644. I'm 99.999% confident that these are correct.
MarkFL@
I understand that you are quite busy at the moment, so I am more than willing to try and debug this installation issue on my own.
When the .xml file is executed, is it PHP that is running the code?
MarkFL
02-14-2017, 01:28 PM
Hey Paul,
The only things I can think of that would prevent the files from being altered is either the folder permissions aren't correct, or the files are not located where they need to be. I have installed this product a multitude of times on many sites and never had any issues. However, none of these sites had the "admincp" folder renamed.
The install code is PHP, and I have used it on sites running PHP 5.2.x - 7.x. :)
Just to double check, before you install:
Did you create a folder called "admincp" in the same folder your renamed "admincp" folder is located?
Did you put a copy of your "ranks.php" file there?
Ensure permissions of "admincp" folder is 0755 and permissions of "admincp/ranks.php" is 0644?
After install, copy the files (the backup and the altered "ranks.php" file) in the "admincp" folder to your renamed "admincp" folder?
Snowhog
02-14-2017, 01:36 PM
Yes, I did that previously, but I'll repeat it again, making sure that the permissions on the created folder and the file put in it are as stated. I'll also ensure that the other file; functions_ranks.php has the indicated permissions.
I'll report back on the results.
Snowhog
02-14-2017, 03:34 PM
I'm sad to report that there was no success here. This is the first MOD that has failed to install on our Forum. :(
I verified the permissions on the created admincp folder, as well as the copy of ranks.php that was put in to it. I verified that the permissions on functions_ranks.php in the includes folder had the right permissions. The MOD simply doesn't get installed. Neither of the .php files gets backed up, and they don't get modified. The database does get the added field, and when I run the uninstall on the MOD, the database is updated to remove the added field. Everything else in the .xml doesn't work for me.
I'm still wondering if it's our version of PHP that is the issue.
php -v
PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct 3 2016 13:00:37)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
I suggest this based only on the syntax of the file_get_contents and file_put_contents functions. Both utilize FILE_USE_INCLUDE_PATH, and according to php.net (Documentation):
Example #2 Searching within the include_path
<?php
// <= PHP 5
$file = file_get_contents('./people.txt', true);
// > PHP 5
$file = file_get_contents('./people.txt', FILE_USE_INCLUDE_PATH);
?>
this implies your version of PHP is greater than version 5.
When I start up PHP interactively (php -a) and execute:
$file = file_get_contents('./admincp/ranks.php', FILE_USE_INCLUDE_PATH);
I don't get any error message, but the contents of the $file variable doesn't appear to contain anything. When I execute:
echo $file
or
print $file
I only get the php prompt.
I won't ask you to spend any more time on this; unless you want to. I'm not going to try and manually modify the two files, as I don't have the knowledge to properly understand what the .xml is saying with regards how the two .php files are changed, and I don't want to make a mess of things.
MarkFL
02-14-2017, 03:38 PM
Well, if you want, I can send you via email my modified copies of those two files. You can rename your existing files, and then upload them to your server. If you want to try that, send me your email address via PM. :)
Snowhog
02-14-2017, 04:30 PM
Thank you. The two modified files you sent me work. :D
I created backup copies of both and replaced the originals with your copies. Reinstalled the MOD; verified that the new field was added to the ranks database (it was); fired up User Rank Manager.
https://vborg.vbsupport.ru/external/2017/02/4.png
MarkFL
02-14-2017, 04:33 PM
Good deal! :up:
4.2.5 Does not seem to work
When you go to your "User Rank Manager" you will see a new field titled "Rank Order" associated with each defined rank:
No list is displayed
MarkFL
03-08-2017, 11:57 AM
4.2.5 Does not seem to work
When you go to your "User Rank Manager" you will see a new field titled "Rank Order" associated with each defined rank:
No list is displayed
I have installed it on two sites using vB 4.2.5 with no issues, so the problem on your end isn't related to the vB version. :)
Have you defined any user ranks yet?
Snowhog
03-11-2017, 09:19 PM
I guess I didn't look closely enough.
With the two modified files you sent me, the User Rank Manager does reflect the ordering I specified, but when I look at a members profile page, the ordering isn't being reflected.
https://vborg.vbsupport.ru/external/2017/03/22.png
The Rank Order is shown by the red numbers in the image. The ordering should be 0, 2, 12, 13.
What do I look for to figure out why the ordering isn't being respected?
MarkFL
03-11-2017, 10:07 PM
I don't know...I've never had any issue whatsoever with this product on many sites on which I've installed it. I'd have to come to your site to investigate what's not set up correctly. But it would be a while before I could get to it...I am absolutely slammed at the moment.
Snowhog
03-11-2017, 10:48 PM
I'd appreciate that. I understand if it takes you awhile.
In the past; several years ago; I did make modifications to cetain templates to adjust where in postbit (I believe that's correct) the rank images appeared. Would that affect your MOD, and if 'possibly', which template should I look in?
MarkFL
03-11-2017, 11:46 PM
As far as know the order shouldn't be affected by where they are displayed. Do they display in the desired order in the postbits?
Snowhog
03-12-2017, 01:25 AM
No.
MarkFL
03-12-2017, 02:23 AM
No.
Okay, so the issue isn't specific to the members pages at least. :)
Snowhog
03-12-2017, 02:34 AM
No, it's not. The rank images aren't "ordered" anywhere that they are displayed.
MarkFL
03-12-2017, 02:41 AM
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. :)
MarkFL
03-12-2017, 03:50 AM
Okay, it turns out the issue was minor...what needed to be done was to run the update on user titles and ranks. :)
Snowhog
03-12-2017, 04:08 AM
Thank you. And it's the simple things that often are the most complicated! ;)
MarkFL
03-12-2017, 04:12 AM
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. :eek::p
WindVoice
05-21-2017, 05:10 PM
Is it possible to make it work with vB 4.2.5, it stopped working after I did an upgrade.
Thanks!
MarkFL
05-21-2017, 05:19 PM
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. :)
WindVoice
05-21-2017, 05:28 PM
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:
Snowhog
05-21-2017, 06:02 PM
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? :confused:
MarkFL
05-21-2017, 06:06 PM
If one removes the uninstall code, how then does one uninstall the product? :confused:
A product can still be uninstalled, it's just that when you remove the uninstall code, then that code won't be executed when you uninstall the product.
In this case, we primarily don't want the database to have the added columns removed, this way the rank orders previously defined will remain intact.
Snowhog
05-21-2017, 06:10 PM
Ah. Okay. That's sensible. Thank you.
This information will be handy when we update to vBulletin 4.2.5.
MarkFL
05-21-2017, 06:17 PM
Ah. Okay. That's sensible. Thank you.
This information will be handy when we update to vBulletin 4.2.5.
I've added the steps to follow when upgrading vB to the product description to make it easier to find. :)
alcazarx
05-24-2017, 06:30 PM
Nice Addon, but works only if you havent renamed the admin-dir.
Else you have to adjust the *.xml to make it work (like we did) :cool:
MarkFL
05-25-2017, 12:14 AM
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:
// Remove "rankorder" column from "ranks" table
$vbulletin->db->hide_errors();
$vbulletin->db->query_write("
ALTER TABLE`" . TABLE_PREFIX . "ranks`
DROP COLUMN rankorder
");
AwesomeShark305
02-16-2019, 08:22 AM
Is their a way to get an updated version for Vbulletin 5.5.0
MarkFL
02-16-2019, 04:18 PM
Is their a way to get an updated version for Vbulletin 5.5.0
Not unless someone ports it to that version. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.