[BETA] Medal System MOD 1.0.1

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!
Scam Warning
Locked
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Jessica »

wrecked wrote:Is there a way to award a medal to a group?
No, you can only award to users, I'm afraid :/
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
Ledsen Arkangel
Registered User
Posts: 16
Joined: Wed Aug 24, 2011 1:20 pm

Re: [BETA] Medal System MOD 0.21.0

Post by Ledsen Arkangel »

Jessica wrote:Because I used rate-good-icon instead of approve-icon, now the Rate good icon appears in my own posts on my board when it shouldn't, next to the rep score (though it's not clickable)
Why you just don't use approve-icon, and set it to use same image that rate-good-icon uses? Or copy your rate-good-icon image and rename it as approve-icon image (I'm not sure about the correct names, but I guess you know what they are)?

Anyhow, there is a funny bug when you show medals in viewtopic. If you use non-dynamic medals, and if you have more than one level for a medal, the level 1 medal is shown in viewtopic always, no matter which level user really has (if (s)he has the medal, that is). If you use dynamic medals, the medal of user's current level is shown. Looks like the script searches from a wrong place when it tries to find if the image file exists or not. I made the following fix and got it working:

OPEN includes/medals_viewtopic.php
FIND

Code: Select all

if ( file_exists($device_image) )
REPLACE WITH

Code: Select all

if ( file_exists($phpbb_root_path . 'images/medals/' . $device_image) )
Though now it doesn't look good, as it is done differently in medals_memberlist.php... but that was easiest way to do it (and because it now shows current level medal image instead of level 1 medal image, I'm pretty sure that it is a bug) ... I have to investigate that further to really understand how it is done in medals_memberlist.php, so I can get it look similar.
User avatar
salvocortesiano
Registered User
Posts: 190
Joined: Mon Mar 22, 2010 1:49 pm
Location: Florence (Italy)
Name: Salvo Cortesiano
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by salvocortesiano »

Hello to everyone,
a good implementation for this best mod would be nice to assign a medal based on the number of posts of the user :) Example: if the user reaches the quota of 1000 posts will be allocated a automatic medal :D
This implementation is possible?

Best regards

Salvo Cortesiano
The best way to predict the future is to invent it!
Image
Sweeney
Registered User
Posts: 20
Joined: Mon Apr 29, 2013 2:53 pm

Re: [BETA] Medal System MOD 0.21.0

Post by Sweeney »

i installed it via automod but on the last screen i get this error

Code: Select all

Medal System
PHP Version: 5.3.23
DBMS: MySQL(i) 5.5.30-log
phpBB3 Version: 3.0.11

Adding a new column named user_points to table phpbb_users
ERROR: The column user_points already exists on table phpbb_users.
is it because i have a points system installed? if so is there no way round it i would like them both on my forum
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Jessica »

Sweeney wrote:i installed it via automod but on the last screen i get this error

Code: Select all

Medal System
PHP Version: 5.3.23
DBMS: MySQL(i) 5.5.30-log
phpBB3 Version: 3.0.11

Adding a new column named user_points to table phpbb_users
ERROR: The column user_points already exists on table phpbb_users.
is it because i have a points system installed? if so is there no way round it i would like them both on my forum
That's probably why, yes. You can still install it.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
Lutten
Registered User
Posts: 24
Joined: Wed May 09, 2012 1:51 pm
Location: India
Name: iRockstar Stark
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Lutten »

Glad to see the Mod still going.
mk katti
Registered User
Posts: 16
Joined: Wed Mar 30, 2011 9:02 am

Re: [BETA] Medal System MOD 0.21.0

Post by mk katti »

Is this still in the BETA? Because I want to install this one but I normally don't install BETA's
User avatar
FCproductions
Registered User
Posts: 58
Joined: Sun Feb 03, 2013 8:39 am

Re: [BETA] Medal System MOD 0.21.0

Post by FCproductions »

Is this still in the BETA? Because I want to install this one but I normally don't install BETA's
Been using this mod for about 3 months or so, on a a live board with about 500 members. We have full system of awards in several categories, and over 100 have been passed it.

No issues
No problems

My board is heavily modded, and I mean...heavily modded. This mod does not conflict with anything and works just as it should. Using twilightBB/subsilver.

Love it. There are features that I wish the Developer would add, but I am not complaining in the least.
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Jessica »

Added link to github repo....
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Jessica »

Ledsen Arkangel wrote:Anyhow, there is a funny bug when you show medals in viewtopic. If you use non-dynamic medals, and if you have more than one level for a medal, the level 1 medal is shown in viewtopic always, no matter which level user really has (if (s)he has the medal, that is). If you use dynamic medals, the medal of user's current level is shown. Looks like the script searches from a wrong place when it tries to find if the image file exists or not. I made the following fix and got it working:

OPEN includes/medals_viewtopic.php
FIND

Code: Select all

if ( file_exists($device_image) )
REPLACE WITH

Code: Select all

if ( file_exists($phpbb_root_path . 'images/medals/' . $device_image) )
Though now it doesn't look good, as it is done differently in medals_memberlist.php... but that was easiest way to do it (and because it now shows current level medal image instead of level 1 medal image, I'm pretty sure that it is a bug) ... I have to investigate that further to really understand how it is done in medals_memberlist.php, so I can get it look similar.
I don't understand what you mean by a level 1 medal..or "levels" for a medal...
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
Ledsen Arkangel
Registered User
Posts: 16
Joined: Wed Aug 24, 2011 1:20 pm

Re: [BETA] Medal System MOD 0.21.0

Post by Ledsen Arkangel »

I mean the medals that can be awarded multiple times to same user. As the image depends on the number of awards of that medal to that user (1 award = "medal.gif", 2 awards = "medal-2.gif" and so on) it felt reasonable to call it a "level" (1 award = level 1, 2 awards = level 2, and so on). Maybe that is just because I'm not a native English-speaker (but then again, sometimes I say things that sound reasonable only to me, no matter what language I'm speaking), so here's a couple of screenshots. Hopefully they make more sense than my sentences. Looks like I forgot to change board language, so some parts of screenshot texts are in Finnish, but the Medals mod is untranslated, so I hope that's not a big deal.

Dynamic medal image:
Image
Non-dynamic medal image:
Image
As you can see, the medal image is different in viewtopic, even though it is same in viewprofile (so the image file must exist, as it can't show up in viewprofile if it doesn't exist, would it?) depending that if it is dynamic or not. (After my fix image is same, but I didn't take a screenshot of that part, as I didn't feel it necessary to show what I meant.)
mk katti
Registered User
Posts: 16
Joined: Wed Mar 30, 2011 9:02 am

Re: [BETA] Medal System MOD 0.21.0

Post by mk katti »

I installed this version and Im very happy with it, but there is a little problem.

For award a medal I put every group permissions on "no" but when I try with permissions of a registred user I can award medals and put information in.

I only want to do that 8-)

How is this possible?
User avatar
Solidjeuh
Registered User
Posts: 522
Joined: Wed Oct 06, 2010 11:20 pm
Location: Aalst / Belgium
Name: Andy Dm
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Solidjeuh »

Maybe you can add the medal page in viewonline.php

Open language/en/mods/info_medals_mod.php

search:

Code: Select all

	'MEDAL_AMOUNT'					=> 'Amount',
After add:

Code: Select all

	'MEDALS_VIEW_EXPLAIN'			=> 'Viewing medal page',
Open viewonline.php

Search

Code: Select all

		case 'faq':
			$location = $user->lang['VIEWING_FAQ'];
			$location_url = append_sid("{$phpbb_root_path}faq.$phpEx");
		break;
After add:

Code: Select all

		case 'medals':
		    $user->add_lang('mods/info_medals_mod');		
			$location = $user->lang['MEDALS_VIEW_EXPLAIN'];
			$location_url = append_sid("{$phpbb_root_path}medals.$phpEx");
		break;	
I don't suffer from insanity. I enjoy every minute of it.
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Jessica »

Solidjeuh wrote:Maybe you can add the medal page in viewonline.php

Open language/en/mods/info_medals_mod.php

search:

Code: Select all

	'MEDAL_AMOUNT'					=> 'Amount',
After add:

Code: Select all

	'MEDALS_VIEW_EXPLAIN'			=> 'Viewing medal page',
Open viewonline.php

Search

Code: Select all

		case 'faq':
			$location = $user->lang['VIEWING_FAQ'];
			$location_url = append_sid("{$phpbb_root_path}faq.$phpEx");
		break;
After add:

Code: Select all

		case 'medals':
		    $user->add_lang('mods/info_medals_mod');		
			$location = $user->lang['MEDALS_VIEW_EXPLAIN'];
			$location_url = append_sid("{$phpbb_root_path}medals.$phpEx");
		break;	
Thank you, I will add that in.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Solidjeuh
Registered User
Posts: 522
Joined: Wed Oct 06, 2010 11:20 pm
Location: Aalst / Belgium
Name: Andy Dm
Contact:

Re: [BETA] Medal System MOD 0.21.0

Post by Solidjeuh »

I found a big big problem when you remove / uninstall this medal mod ..
When you have Ultimate Points installed, the medal mod uninstaller also removes the user points table from the database

So all the users cash on hand points are being deleted..

Those 2 mods have the same table in the database
I don't suffer from insanity. I enjoy every minute of it.
Locked

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