vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - Yet Another Ranks System (https://vborg.vbsupport.ru/showthread.php?t=265893)

TheLastSuperman 06-27-2011 10:00 PM

Yet Another Ranks System
 
1 Attachment(s)
* CREATE A BACKUP OF YOUR FORUM AND DATABASE BEFORE INSTALLING !

I've had quite a few PM's in regards to this and seeing as how once upon a time I administered a gaming tournament forum it came in handy... we had virtual armies in battlefield games with Generals, LtCol's, Captains, squads of 6 and enjoyed a rank structure along with our awards so we converted the Awards mod into a Ranks mod, many also had a need for it and now we have it for 4.x. This is a complete re-write of the 4.x Yet Another Awards System by CypherSTL and Xanlamin ( https://vborg.vbsupport.ru/showthread.php?t=232684 ) with updates including one fix by another community member for the profile tabs (noted in Changelog.txt). I hope everyone enjoys it who finds a use for it :D.

DESCRIPTION:
This is a Medals/Ranks system. Admin can give members ranks, and rank icons will be displayed in member's profile, posts, as well as in a rank list.

FEATURES:

In AdminCP
  • Can Create/Edit/Delete/Reorder categories/sub-categories in ACP (with category name and description)
  • Can Create/Edit/Delete ranks in ACP (with Rank Name, Description, Icon URL, Image URL)
  • Can Move one (or all) rank(s) from one category to another
  • Can set some ranks un-classified (not displayed for public)
  • Can re-order ranks in ranks showcase
  • Issue ranks to members, based on username or userid, with Issue Reason
  • Remove ranks from members

In ModCP
  • Issue ranks to members, based on username or userid, with Issue Reason
  • Remove ranks from members

Front page & other
  • Display ranks list in with: Rank Name, Description, Icon, Image, and Members who get each rank.
  • Display ranks showcase in profile, with Rank information, Issue time and reason
  • Display rank icons in postbit (showthread, showpost, announcement, private)
  • Separate Rank Request/Recommendation Forms
  • CSS Customizable
  • Points System *Requires MySQL 5.0+


Attention:

If you do not properly setup this modification you will see errors such as:

Quote:

Originally Posted by faraz_hamza (Post 2219546)
Code:

Something unexpected has happened, your rank request cannot be sent at this time. Please contact a site administrator for assistance.
I am getting this error when i recommend or issue rank request?

how to fix it ?

Basically here's the short on this:
  • Edit your usergroups, for each usergroup set whether they can request and recommend ranks.
  • Setup the mod options in AdminCP > Ranks System > Rank System Settings.
  • If your having the requests or recommendations posted as a New Thread OR New Post within a existing thread please ensure that the members usergroup has permission to do so, in other words they can't post a new rank request into a private admin-only forum or a new post in a admin only thread correct? Bingo :p. You can create a new forum and only allow viewing to normal members ;).
  • If your having users requesting ranks every min or two, adjust your minimum time between posts to be one minute.
  • Try disabling the Points System, do you still have a issue?

Other issues:
  • What is the minimum version of MySQL Required?
    - The core of the ranks sytem will function on MySQL 4.1. However, in order to use the Points System you must be running at least MySQL 5.0+
  • I'm seeing output like "-- BEGIN TEMPLATE: ranks_rankusers_bit -->" before it displays members. Why?
    In your AdminCP > Settings > Options > General Settings > Add Template Name in HTML Comments = OFF
  • Styling issues? - https://vborg.vbsupport.ru/showpost....58&postcount=2
  • If you have any other issues, post them however I need to know if this was the 2nd, 3rd or 4th request, what was done before the error and if issuing to another user worked afterwords! Thanks!

TheLastSuperman 06-27-2011 10:27 PM

Updated to v4.1.4 on 7/2/2011
Notes:
  • Removed some residual Awards references in snippets of the code.
  • Updated two phrases.
  • Tested and initial bug report of database error depends on settings from tests ran, please be sure to test on a site with more than one user and have the options set correctly in admincp.
  • Tested and confirmed to work on vBulletin 4.1.4.

Updated (Remains at v4.1.4) on 7/3/2011
Notes:
  • Updated SQL to properly delete awards.
  • Confirmed the dismissed DB error upon request/recommend after further testing and this has been sorted.

Updated (Remains at v4.1.4) on 7/11/2011
Notes:
  • Updated installation SQL to check for MySQL version and define as TYPE or ENGINE correctly.

Updated (Remains at v4.1.4) on 10/29/2012
Notes:
  • Fixed Security Vulnerability UNIT => UINT etc.
________________________

Custom Style - Display issues on the Rank Page?

Edit template RANKS and find:
Code:

{vb:raw header}
{vb:raw navbar}

{vb:raw rank_categories}

Add [S]{vb:cssfile additional.css}[/S] {vb:raw headinclude_bottom} as shown in blue then save template:

Code:

<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}editor.css" />
<link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css" />
{vb:raw headinclude_bottom}
</head>

*I'll include the call of additional.css in the next version :D.

lapiervb 06-27-2011 10:30 PM

Demo, pics?

TheLastSuperman 06-27-2011 11:03 PM

Quote:

Originally Posted by lapiervb (Post 2213759)
Demo, pics?

Up :D.

Kaspersku 06-28-2011 01:28 AM

It's great, I very like but I have some question for you:
It can use for 4.1.x or 4.x.x ?
Are you test it in all verison 4.x.x?

Thanks you much

Kaspersku 06-28-2011 01:45 AM

Oh dear, it can not be installed on vbb 4.1.4
When I installed the 4.1.4 database, then it fails, I try to install on localhost, it was like, you can explain ?

Quote:

Database error in vBulletin 4.1.4:

Invalid SQL:
ALTER TABLE rank ADD rank_allowrecommend TINYINT( 1 ) DEFAULT 1 NOT NULL,ADD rank_pointvalue TINYINT( 3 ) DEFAULT 0 NOT NULL;

MySQL Error : Table 'vbb4.1.4.rank' doesn't exist
Error Number : 1146
Request Date : Tuesday, June 28th 2011 @ 04:42:20 AM
Error Date : Tuesday, June 28th 2011 @ 04:42:23 AM
Script : http://localhost/vbb4.1.4/admincp/pl...=productimport
Referrer : http://localhost/vbb4.1.4/admincp/pl...?do=productadd
IP Address : 127.0.0.1
Username : Admin
Classname : vB_Database
MySQL Version : 5.5.8

TheLastSuperman 06-28-2011 04:08 AM

Quote:

Originally Posted by Kaspersku (Post 2213836)
Oh dear, it can not be installed on vbb 4.1.4
When I installed the 4.1.4 database, then it fails, I try to install on localhost, it was like, you can explain ?

[S]I've only ran this on 4.1.3 and below per the info in the mod description: vB Version: 4.1.3[/S]

Edit: Works fine in 4.1.3 and 4.1.4 etc and this was due to MySQL version i.e. Type or Engine as pointed out by Ninjapaul - https://vborg.vbsupport.ru/showpost....4&postcount=33

nacaruncr 06-28-2011 04:56 AM

so.... is the same as awards hack, right?
only a few changes.. the words, isn't it?

TheLastSuperman 06-28-2011 06:18 AM

Quote:

Originally Posted by nacaruncr (Post 2213919)
so.... is the same as awards hack, right?
only a few changes.. the words, isn't it?

Bingo, so you can install this and use in conjunction w/ the Awards mod if your running a military or FPS gaming community etc etc same as it's been since we first converted Hachno's mod into the Ranks system pretty much, I simply used Cypher and Xan's code to make it easier on me to update since a few had requested it for 4.x ;).

In fact you could rename the Awards mod into well.. anything and use it like a badge/ribbon/award/rank whatever mod, it is marked as re-usable code after all :cool:.

nacaruncr 06-28-2011 06:43 AM

ohhh... it's awesome men, this is so good ;)

CharlieDelta 06-28-2011 01:04 PM

Thank you, thank you, thank you Superman. We have been running a gaming site for years now and I have been manually giving ranks.
Now I can use this.:D

TheLastSuperman 06-28-2011 02:26 PM

Quote:

Originally Posted by CharlieDelta (Post 2214061)
Thank you, thank you, thank you Superman. We have been running a gaming site for years now and I have been manually giving ranks.
Now I can use this.:D

We surely used this along w/ the Awards mod for a good virtual "army" forum atmosphere... it was fun when everyone played along and followed the ranks in-game not paying attention to actual game rank etc. Gosh you have me thinking back to my weeks as a Captain of a squad then my 2 and a half campaigns as General of the PAC where we dominated the EU division until my retirement! http://www.youtube.com/watch?v=WNI02LZ8F20 - http://www.youtube.com/watch?v=luauhr8Avxg I miss my gaming site days, sadly if I had more time I would still help out at that one community, in a galaxy far, far away now as it seems :p.

NarutoFTW 06-28-2011 04:55 PM

So can I upgrade from this mod: https://vborg.vbsupport.ru/showthread.php?t=232684 to yours? i've been using that mod and have many awards on it.

Sayid 06-28-2011 06:09 PM

If the answer to NarutoFTW Q is no, then a converter from 3.x or 4.x version of Awards System to yours will be much appreciated. ;)

TheLastSuperman 06-28-2011 07:26 PM

Quote:

Originally Posted by NarutoFTW (Post 2214155)
So can I upgrade from this mod: https://vborg.vbsupport.ru/showthread.php?t=232684 to yours? i've been using that mod and have many awards on it.

Hmm I think you have this wrong... this can be used in conjunction w/ that mod if you wish, this way you have a separate need for Awards and Ranks it is so ;). That mod only requires a few updates for example the profile fix listed in the changelog i.e.
Quote:

Fix for Member Profile Tab by sadiq6210 https://vborg.vbsupport.ru/member.php?u=111268 as shown in YAAS - https://vborg.vbsupport.ru/showpost....&postcount=742
Was made before this was released, special thanks to sadiq for helping so many in the Awards mod eh? Round of Applause indeed :cool:. So you see if you spend a few minutes and use Sadiq's fix you can have yours working on 4.1.3 and below, I'm not sure if it works on 4.1.4 as I simply have not tested, if so please post... so far one says no.

Quote:

Originally Posted by Sayid (Post 2214184)
If the answer to NarutoFTW Q is no, then a converter from 3.x or 4.x version of Awards System to yours will be much appreciated. ;)

I believe, from our mods being similar in the past that you should only be required to backup the awards mod tables, then import the product and mark it so it can be overwritten etc and you should then be upgraded, if any issues you may need to import some of the award tables you backed up back into the DB to repopulate the info.

grey_goose 06-28-2011 07:42 PM

1 Attachment(s)
How configurable is the position of the ranks? I'd like to redo my usergroup/ranks as just awards, but I'm pretty adamant on how I want my postbit to appear :D and would want the awards to be in the same location. Doable with minor postbit editing?

TheLastSuperman 06-28-2011 08:22 PM

Quote:

Originally Posted by grey_goose (Post 2214235)
How configurable is the position of the ranks? I'd like to redo my usergroup/ranks as just awards, but I'm pretty adamant on how I want my postbit to appear :D and would want the awards to be in the same location. Doable with minor postbit editing?

You should try using the custom css option first before editing any templates (this is located within the rank options, enable by selecting custom then either edit the rank css template or post your modified css you fabricated from the default.css file included and paste within additional.css. That way you could adjust it to suit and perhaps avoid unnecessary template editing by using css alone ;).

Edit: Although for us at one point in time... we displayed [S]ranks[/S] correction Awards on the userinfo right location and displayed our military rank just below the avatar and designed to compliment it as well - just a idea if your only showcasing one rank otherwise if a display box containing a few you may not desire such changes or that location specifically, it's up to you :D.

grey_goose 07-01-2011 10:38 PM

*facepalm*

Like "{vb:raw post.userranks}" ?

:D

grey_goose 07-01-2011 10:47 PM

1 Attachment(s)
I'm getting some 'extra' info:

grey_goose 07-02-2011 01:34 AM

Fixed that by turning off adding template names as HTML comments.

However, requests don't seem to be working:

There's some error when sending your rank request. Please contact site's administrator for assistant.

TheLastSuperman 07-02-2011 06:42 AM

Quote:

Originally Posted by grey_goose (Post 2215703)
Fixed that by turning off adding template names as HTML comments.

However, requests don't seem to be working:

There's some error when sending your rank request. Please contact site's administrator for assistant.

Confirmed, will release a new version fixing requests/recommend asap although more than likely right after Monday (4th). Anyone else feel free to use the current version and simply restrict those two options in your usergroup settings until the new version is out :cool:.

Edit: Updated, reference here: https://vborg.vbsupport.ru/showpost....58&postcount=2

sticky 07-02-2011 07:24 AM

Quote:

Originally Posted by TheLastSuperman (Post 2213940)
Bingo, so you can install this and use in conjunction w/ the Awards mod if your running a military or FPS gaming community etc etc same as it's been since we first converted Hachno's mod into the Ranks system pretty much, I simply used Cypher and Xan's code to make it easier on me to update since a few had requested it for 4.x ;).

In fact you could rename the Awards mod into well.. anything and use it like a badge/ribbon/award/rank whatever mod, it is marked as re-usable code after all :cool:.

Are there any differences between this mod and the awards mod other than the wording?

borbole 07-02-2011 12:14 PM

Quote:

Originally Posted by Kaspersku (Post 2213836)
Oh dear, it can not be installed on vbb 4.1.4
When I installed the 4.1.4 database, then it fails, I try to install on localhost, it was like, you can explain ?

It looks like the installer did not add the rank table at your database.

Quote:

Originally Posted by TheLastSuperman (Post 2213906)
I've only ran this on 4.1.3 and below per the info in the mod description: vB Version: 4.1.3

It shouldn't make any difference at all about the versions, mod database install wise I mean.

After taking a quick look at the xml file I noticed a few things that need correction. For example, at the below install code you have forgotten to include the TABLE_PREFIX part which has been included everywhere else. Because if a user is using a custom prefix at his/her database then it won't work. It will work only if no prefix has been used at all.

PHP Code:

<installcode><![CDATA[$db->reporterror 0;
$db->query_write("ALTER TABLE `rank` CHANGE `rank_desc` `rank_desc` TEXT  NOT NULL");
$db->query_write("ALTER TABLE `rank_user` CHANGE `issue_reason` `issue_reason` TEXT NOT NULL");
echo 
"<font size=\"1\">Alter table - 2.1.4</font><br />";
$db->reporterror 1;]]></installcode


Also you are using the depricated font size all over the place. It would be better, coding wise to use <span style instead.

Also it would be better to use:

PHP Code:

$vbulletin->db->query_write 

instead of:

PHP Code:

$db->query_write 

Other than that, great mod :)

TheLastSuperman 07-02-2011 02:32 PM

Quote:

Originally Posted by borbole (Post 2215844)
Also it would be better to use:

PHP Code:

$vbulletin->db->query_write 

instead of:

PHP Code:

$db->query_write 


I noticed the install code this morning along w/ a few other misc changes, I had not noticed the above ^ ;).

TheLastSuperman 07-02-2011 04:12 PM

Quote:

Originally Posted by sticky (Post 2215769)
Are there any differences between this mod and the awards mod other than the wording?

As far as revisions to code and corrections per Borbole's suggestion above and other misc changes and updates... yes, as far as functionality that would be none. So again, no need to use this unless you have a requirement to give out Awards and Ranks and the ranks should be used in a different manner other than "titles" per say as you already have a rank structure i.e. Administrator/Moderator/Member etc etc :cool:.

TheLastSuperman 07-03-2011 01:55 AM

Updated to v4.1.4 on 7/2/2011

Notes:
  • Removed some residual Awards references in snippets of the code.
  • Updated two phrases.
  • Tested and initial bug report of database error depends on settings from tests ran, please be sure to test on a site with more than one user and have the options set correctly in admincp.
  • Tested and confirmed to work on vBulletin 4.1.4.

sticky 07-03-2011 06:03 AM

Quote:

Originally Posted by TheLastSuperman (Post 2215909)
As far as revisions to code and corrections per Borbole's suggestion above and other misc changes and updates... yes, as far as functionality that would be none. So again, no need to use this unless you have a requirement to give out Awards and Ranks and the ranks should be used in a different manner other than "titles" per say as you already have a rank structure i.e. Administrator/Moderator/Member etc etc :cool:.

Can I change the text in this to saw "award" instead of "rank?"

If the coding is cleaner and has some fixes I would prefer to use this.

TheLastSuperman 07-03-2011 08:27 PM

Quote:

Originally Posted by sticky (Post 2216120)
Can I change the text in this to saw "award" instead of "rank?"

If the coding is cleaner and has some fixes I would prefer to use this.

Well... it's not just a simple matter of find/replace as some would think there's many variations i.e.

Award = Rank
Awards = Ranks
award = rank
awards = ranks
aw = ra
au = ru
etc
etc
etc

So it might be easier for you to simply rename a few phrases, in that case most of it would show the wording "Award" or whatever you wish it to say... some areas in admincp may still say Ranks etc but a few changes to the phrases in the xml and you should have something working the only con to that is if you have Awards mod installed atm it might conflict and certainly won't upgrade from a previous Award mod version know what I mean? ;).

Maischter 07-06-2011 05:24 PM

1 Attachment(s)
the profil menu isnt displayed correctly...??? attachment 1

and could you insert an option for postbit info placement like in attachment 2?

if im in the my ranks menu (in the profile section) i cant see the the yars menu anymore! ( attachment 3)

p.s. i have 4.1.4

TheLastSuperman 07-06-2011 08:10 PM

Quote:

Originally Posted by Maischter (Post 2217478)
the profil menu isnt displayed correctly...??? attachment 1

and could you insert an option for postbit info placement like in attachment 2?

if im in the my ranks menu (in the profile section) i cant see the the yars menu anymore! ( attachment 3)

p.s. i have 4.1.4

For the first image, it seems you have a fixed width or your browser was at a certain set size due to screen resolution but the point being once you install so many mods that add tabs your going to run out of room and it will drop the others on a new line. I also assume you have "My Ranks" from this modification and "Ranks" from another mod perhaps a DB Tech mod or something to do w/ ranks as well?

Second image, sure let me see what I can whip up, about to release a update here shortly and will include that information.

Third image I'm assuming is another mod conflicting.. what else do you have installed that interacts with your postbit?

Maischter 07-07-2011 06:43 AM

yep i have fixed width... but i dont have a second rank mod.. i send you a pn with my hacks list!

Paul K 07-07-2011 12:53 PM

For all people having problems with installing the mod (SQL Errors), open up the xml file and search and replace:
TYPE=MyISAM
to
ENGINE=MyISAM

This has to do with MySQL compatibility, the newer MySQL versions DO NOT support TYPE= anymore.

@TheLastSuperman: Please include this in a future update :)

Thanks, good mod!

TheLastSuperman 07-11-2011 03:52 PM

Quote:

Originally Posted by Ninjapaul (Post 2217761)
For all people having problems with installing the mod (SQL Errors), open up the xml file and search and replace:
TYPE=MyISAM
to
ENGINE=MyISAM

This has to do with MySQL compatibility, the newer MySQL versions DO NOT support TYPE= anymore.

@TheLastSuperman: Please include this in a future update :)

Thanks, good mod!

Done ;)

Code:

                                // Check for TYPE or ENGINE based on version from what I read it was still in 5.1.45 fully but only partially there afterwords - TheLastSuperman
                                $mysql_version = $db->query_first("SELECT version() AS version");
                                define('MYSQL_VERSION', $mysql_version['version']);
                                $type_or_engine = (version_compare(MYSQL_VERSION, '5.1.45', '<')) ? 'TYPE' : 'ENGINE';

Code:

                                                ) $type_or_engine=MyISAM
                                        ");


faraz_hamza 07-12-2011 05:59 AM

Code:

Something unexpected has happened, your rank request cannot be sent at this time. Please contact a site administrator for assistance
I am getting this error when i recommend or isue rank request?

how to fix it ?

TheLastSuperman 07-12-2011 07:41 PM

Quote:

Originally Posted by faraz_hamza (Post 2219546)
Code:

Something unexpected has happened, your rank request cannot be sent at this time. Please contact a site administrator for assistance
I am getting this error when i recommend or isue rank request?

how to fix it ?

You've set the permissions correctly for Admins and the usergroup the member is in as well correct? Was this your first, second or third request? What's your minimum time between post set as? Is a member requesting a rank when you have it set to create a new thread or post... is that in a admin only forum? If so then make a new area and only allow normal users to view and not make new post this way no permission issues come up when their userid is used to generate the new thread or post ;).

Ensure you have all the usergroup options set correctly and it's setup in admincp how you wish. If your not on MySQL 5+ then don't enable the points system and everything should work fine.

grey_goose 07-13-2011 07:05 PM

I updated to the current version and did this, but still have issues with profile pics not displaying ... ?

faraz_hamza 07-13-2011 07:40 PM

I Fixed that isue by Just putting Forum Id. in Admin control panel, in rank setting.
where the recomended and requestes will be posts

How can i Change RANK word to AWARD or MEDAL ????
is it possible.???

borbole 07-13-2011 07:43 PM

Quote:

Originally Posted by faraz_hamza (Post 2220180)

How can i Change RANK word to AWARD or MEDAL ????
is it possible.???

That can be done by changing the language phrase/s.

LuMiS! 07-14-2011 11:02 PM

Working Perfect!

Finally man... thank you very much, i was waiting for this long time ago.. :o

j0k4w1ld 08-12-2011 10:23 AM

Quote:

Originally Posted by borbole (Post 2220181)
That can be done by changing the language phrase/s.

where is that?


All times are GMT. The time now is 05: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.01712 seconds
  • Memory Usage 1,879KB
  • 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
  • (7)bbcode_code_printable
  • (5)bbcode_php_printable
  • (23)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