[RC] Multi-Race Rank Themes mod AKA Ranking Sets (1.3.6)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

[RC] Multi-Race Rank Themes mod AKA Ranking Sets (1.3.6)

Post by IBBoard »

MOD Title: Multi-Race Rank Themes
MOD Description: Adds the ability to include 'themes' of rank set. This can be used on RPG style forums to produce multiple races, or on 'normal' forums to allow people to choose a ranking icon of their choice.
MOD Version: 1.3.6

MOD Download: http://www.ibboard.co.uk/mods/MultiRace ... _1.3.6.zip
Last Stable version: 1.2.2

Demo Board: http://forums.hiveworldterra.co.uk/
Demo Username: ModTester
Demo Password: modtester
Demo user is locked down about as tight as possible. You can change your rank and see it on the members list and profile pages.


Proposed features:
  • Multiple rank themes
  • Add/edit/remove rank theme from ACP
  • Set theme that rank belongs to in ACP
  • Select theme from UCP
  • Allow selection of theme on registration
  • Set user's rank theme from ACP
  • Display themed rank in all relevant locations
  • Page of ranks to show what is available as choices
  • Permission value to allow/deny selection of theme (groups/users can or can't pick a theme)
  • Set default theme for group
  • Restrict rank themes/sets that groups can select from (groups can pick some themes but not others)
  • Compatibility with digiTsai's phpBB2 "Ranking Themes" mod
Features in 1.0:
  • Multiple rank themes
  • Display themed rank in all relevant locations
  • Allow selection of theme on registration
  • Add/edit/remove rank theme from ACP
  • Set theme that rank belongs to in ACP
  • Compatibility with digiTsai's phpBB2 "Ranking Themes" mod (data structure should match and be directly copyable)
Additional features in 1.1:
  • Allow selection of theme on registration
  • Page of ranks to show what is available as choices
  • Subsilver2 styling, as well as Prosilver
Additional features in 1.3:
  • Allow selection of theme on registration (now optional)
  • Set user's rank theme from ACP
  • Permission value to allow/deny selection of theme (groups/users can or can't pick a theme)

This mod takes inspiration from digiTsai's "Ranking Themes" mod that I had installed on my phpBB2 forum, plus the similar mod I had installed on my Invision Board v1 and Ikonboard forum before that (and the similar mod on the STGN - Star Trek Gaming Network - vBulletin forum that I visited before that).



One initial question: Where do people think the "My rank" section of the UCP would be best - "Board Settings > Edit global settings" or "Profile > Edit Profile"?


[edit] 9pm GMT+1 update: Listing in the ACP now works, and themes can now be deleted (which also deletes all ranks in the theme and resets users using it back to the default theme).

So far I'm going with UCP theme changing in "Profile > Edit Profile" unless anyone has any compelling reason for another location.


[edit] 9:30am GMT+1 update: ACP now allows you to set the theme for a rank. Next step, adding/editing themes.


[edit] 11am GMT+1 update: ACP now allows you to add and edit rank themes. A minor change has also been made so that if a theme was public and is made private then the user falls back to the default scheme, but will still use the 'private' scheme if it is made public again. Next step, add all of the new language values and write up the MOD file!
Last edited by IBBoard on Sat Mar 20, 2010 4:54 pm, edited 33 times in total.
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [DEV] Multi-race rank set mod AKA Ranking Themes

Post by IBBoard »

Okay, the mod is now about complete and the MODX file is written up. I'll give it another read tomorrow evening to check for obvious bugs and then release it as ALPHA as soon as possible.

I think the mod is hopefully more at the beta level, but I don't want to release straight to beta quality when I've missed something from the instructions. I have done a diff of vanilla against my modified forums, but I've done a lot of other mods (including a mass replace to remove index.php from URLs) so there's a lot of chaff to sort the wheat from.

Hopefully the mod will be useful to some people.
User avatar
tangren
Registered User
Posts: 18
Joined: Fri Aug 05, 2005 10:09 pm

Re: [DEV] Multi-race rank set mod AKA Ranking Themes

Post by tangren »

Sounds great!
I am looking forward to this mod :mrgreen:
Buy / Sell MMORPG currencies, items, accounts with mmotp.
MMOTP is like EBAY, but trades MMORPG when EBAY doesn't. :)
http://mmotp.com
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [DEV] Multi-race rank set mod AKA Ranking Themes

Post by IBBoard »

Oooops, sorry, got sidetracked with other things (including a family visit). I'll try and get the alpha release out shortly :)


[edit] Okay, I tracked down one obvious "copy and paste" mistake. Hopefully there won't be any more.

The alpha release is now available at http://www.ibboard.co.uk/mods/MultiRace ... _0.1.0.zip

I've put in a guesstimate of 30 minutes editing time and Intermediate due to the number of files edited. If anyone has experiences to the contrary then please tell me how long it took. Also, any typos or errors, please post in the thread so I can answer in public.

Files changed:
  • adm/style/acp_ranks.html,
  • adm/style/admin.css,
  • includes/acp/acp_ranks.php,
  • includes/cache.php,
  • includes/constants.php,
  • includes/functions_display.php,
  • includes/ucp/ucp_profile.php,
  • memberlist.php,
  • viewtopic.php,
  • styles/prosilver/template/ucp_profile_profile_info.html,
  • language/en/acp/common.php,
  • language/en/acp/posting.php,
  • language/en/common.php,
  • language/en/ucp.php


[edit2] Just realised I'd missed the ALTER TABLE command for the phpbb_users table (so there was no-where for it to put the user's rank from the instructions). That's fixed in v0.1.1.
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [ALPHA] Multi-race rank set mod AKA Ranking Themes

Post by IBBoard »

It has been nearly seven hours now, so I'll post this as a new post.

My forums have now been upgraded to phpBB3 RC2, so the mod is live and has a test forum. I've also added a test account (details in the first post).

I have discovered a couple of other mistakes in the SQL, but they're minor so they'll go in another release. Basically, some of the tables are called "phpbb3_..." instead of "phpbb_", because I copied the code from phpMyAdmin while updating my Dev board and forgot to change all of them.
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [ALPHA] Multi-race rank set mod AKA Ranking Themes

Post by IBBoard »

My stats are showing six downloads of the 0.1.1 zip. Anyone have any problems, ideas or comments so far?
farolo
Registered User
Posts: 12
Joined: Sat Apr 07, 2007 11:37 am

Re: [ALPHA] Multi-race rank set mod AKA Ranking Themes

Post by farolo »

Hello, I have tried to install your Mod but she does not work. The truth is that they lack many intrucciones in the explanation.

Image

Very I am interested in this MOD, really to my does much lack to me. I hope that you corrected it
farolo
Registered User
Posts: 12
Joined: Sat Apr 07, 2007 11:37 am

Re: [ALPHA] Multi-race rank set mod AKA Ranking Themes

Post by farolo »

Code: Select all

ALTER TABLE phpbb_users ADD user_rank_theme INT DEFAULT 1 NOT NULL ;
ALTER TABLE phpbb_ranks ADD rank_theme INT DEFAULT 1 NOT NULL ;

UPDATE phpbb_ranks SET rank_theme = -1 WHERE rank_special = 1;

CREATE TABLE `phpbb3_rank_themes` (
  `rtheme_id` smallint(5) NOT NULL auto_increment,
  `rtheme_title` varchar(50) default NULL,
  `rtheme_public` tinyint(1) default '0',
  PRIMARY KEY  (`rtheme_id`)
) CHARSET=utf8_bin;

INSERT INTO `phpbb3_rank_themes` VALUES (-1, 'Special', 0);
INSERT INTO `phpbb3_rank_themes` VALUES (1, 'Default', 1);
Instruction SQL is correct ?. Prefix of the tables is correct? The two first it seems that no.
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [ALPHA] Multi-race rank set mod AKA Ranking Themes

Post by IBBoard »

farolo, thanks for catching that. The SQL should be:

Code: Select all

ALTER TABLE phpbb_users ADD user_rank_theme INT DEFAULT 1 NOT NULL ;
ALTER TABLE phpbb_ranks ADD rank_theme INT DEFAULT 1 NOT NULL ;

UPDATE phpbb_ranks SET rank_theme = -1 WHERE rank_special = 1;

CREATE TABLE `phpbb_rank_themes` (
  `rtheme_id` smallint(5) NOT NULL auto_increment,
  `rtheme_title` varchar(50) default NULL,
  `rtheme_public` tinyint(1) default '0',
  PRIMARY KEY  (`rtheme_id`)
) CHARSET=utf8 COLLATE=utf8_bin;

INSERT INTO `phpbb_rank_themes` VALUES (-1, 'Special', 0);
INSERT INTO `phpbb_rank_themes` VALUES (1, 'Default', 1);
for a standard install, but replace the "phpbb_" with whatever your prefix is. As far as I know the default table names are the standard way of doing SQL changes in a MOD.

I also just noticed that the "CHARSET=" didn't look right, and I've fixed it. I'll put a new version up shortly.

Did you have any other problems, or was it all SQL errors?



[edit] I've also just re-read your screenshot and realised what you meant there. The instructions were correct, but I guess it seemed strange. The instruction is now to replace it with:

Code: Select all

//Multi-rank theme mod: special rank now calculated another way
//$special_rank = request_var('special_rank', 0);


[edit2] Actually, I've just realised that you also meant my "replace with" was missing. I've fixed that as well now and v0.1.2 is now released. I've also upped it to a Beta as I think everything should be fine other than that now that I've had time away from it and looked at it again.
farolo
Registered User
Posts: 12
Joined: Sat Apr 07, 2007 11:37 am

Re: [Beta] Multi-race rank set mod AKA Ranking Themes

Post by farolo »

I have been able to install mod, but I have a question. As new Themess are created?
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [Beta] Multi-race rank set mod AKA Ranking Themes

Post by IBBoard »

No, no new themes are created. This just creates the existing rank schemes as "Default" and special ranks as a "Special" theme.

To create your own new themes go to the ACP, into the "Edit Ranks" section (or whatever it is called - can't remember off-hand) and click the "Add rank theme" button at the bottom of the page. You'll then be able to create a new rank theme, be returned to standard rank management and create new themes.

If you have installed it, do you think time and difficulty are about right?
farolo
Registered User
Posts: 12
Joined: Sat Apr 07, 2007 11:37 am

Re: [Beta] Multi-race rank set mod AKA Ranking Themes

Post by farolo »

I have been able to install the Mod, with some problems. But now I have two problems. When change the subject from my profile of user does not change it, and either I can´t change of theme a user from the Control Panel of administration, simply it does not leave the function in its profile . Some suggestion?

also must extend the language file

Image

PD. sorry by my English
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [Beta] Multi-race rank set mod AKA Ranking Themes

Post by IBBoard »

With regards changing ranks, there isn't currently supposed to be a way to change a user's rank from within the ACP. I could add it if people think it is necessary, though.

In your user profile, what happens exactly? Does it show a list but keep setting you back to the same value (default)? If you're an administrator or have a special rank then you shouldn't see the list as the special rank overrides any selection you might make anyway. I've just tested with a normal user on my forums and it updates okay.

As for the missing language, I'll add that. I already had rank themes copied across from my original phpBB2 version of the mod so it looks like I forgot to add it :)

Thanks for testing this, and sorry for the little problems.
LaylaChaos
Registered User
Posts: 25
Joined: Wed May 23, 2007 7:46 am

Re: [Beta] Multi-race rank set mod AKA Ranking Themes (0.1.3)

Post by LaylaChaos »

Well... I really love the idea and I think it will be quite useful... but I have a question... you could maybe even call it a request... Would it be possible (or do you think it's useful) if you could change the rank/rank-theme in ACP and/or disable the changing of the theme in UCP(so it wouldn't be user defined anymore)? Because I wanted to combine the ranks with the groups they're in and currently that's not possible but with your mod I could do that. Still I'm not sure if I want to allow my user's to be able to change the theme when it should match their usergroup and I would also have to be able to change it in ACP if they join (or I put them in) a certain usergroup. But even without that I will surely install this mod once the gold release of phpbb3 is out and this mod's finished.
User avatar
IBBoard
Registered User
Posts: 543
Joined: Wed May 25, 2005 9:02 pm
Location: Worcestershire, UK

Re: [Beta] Multi-race rank set mod AKA Ranking Themes (0.1.3)

Post by IBBoard »

Interesting idea, and I guess it does work from a base of the multi-rank theme mod, but I think it's also distinct enough that it needs to be separate functionality built on top. Either once Gold comes out or when I get a chance before then I'll see what I can do about creating it. I do have ideas on how it could work, I've just not looked into editing things in the users section of the ACP yet.

Other people are free to take the idea as an 'addon mod' that requires this mod if they want, though.

Return to “[3.0.x] MODs in Development”