[BETA] Medal System MOD [ Latest: 0.4.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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

[BETA] Medal System MOD [ Latest: 0.4.6 ]

Post by ycl6 »

Code: Select all

######################################################## 
## Mod Title: Medal System
## MOD Author: ycl6 < [email protected] > (Y.C. LIN) http://macphpbbmod.sourceforge.net/
## MOD Description: This mod is a complete Medal system for your phpBB forum. 
##			It consists:
## 				A ACP medal management panel
##				A Medal Listing page to display all medal information
##				A Medal moderator management panel for adding/removing medal from users
##				An e-mail is sent to user receiving the medal
##				Display amount of medal a user holds on viewtopic and profile page
## Mod Version: 0.4.6
## 
## Installation Level: Intermediate
## Installation Time: 10 Minutes
##
## Files To Edit: 12
##	viewonline.php
##	viewtopic.php
##	includes/constants.php
##	includes/functions.php
##	includes/page_header.php
##	includes/usercp_viewprofile.php
##	language/lang_english/lang_main.php
##	language/lang_english/lang_admin.php
##	templates/subSilver/viewtopic_body.tpl
##	templates/subSilver/profile_view_body.tpl
##	templates/subSilver/overall_header.tpl
##	templates/subSilver/subSilver.cfg
##
## Included Files: 17 (+ 24 images)
##	root/medals.php
##	root/medalcp.php
##	root/medalcp_edit.php
##	root/admin/admin_medal.php
##	root/admin/admin_medal_cfg.php
##	root/language/lang_english/email/medal_added.tpl
##	root/templates/toggle.js
##	root/templates/subSilver/medals_body.tpl
##	root/templates/subSilver/medalcp_body.tpl
##	root/templates/subSilver/medalcp_edit_body.tpl
##	root/templates/subSilver/images/icon_mini_medal.gif
##	root/templates/subSilver/admin/medal_config_body.tpl
##	root/templates/subSilver/admin/medal_delete_body.tpl
##	root/templates/subSilver/admin/medals_edit_body.tpl
##	root/templates/subSilver/admin/medals_editcat_body.tpl
##	root/templates/subSilver/admin/medals_list_body.tpl
##	root/templates/subSilver/admin/medals_moderator_body.tpl
##	root/medals/*.gif
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
################################################################# 
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
############################################################## 
## Author Notes:
##	
##	Please READ the "Usage Guide" found in EXTRA folder for FAQ/Tips
##
##	Special thanks to Gremlinn and other supporters of this MOD
## 
############################################################## 
## MOD History: 
##
##   2003-10-21 - Version 0.0.1 { a.k.a 1.0.0 in the older release files}
##      - Initial Release
##
##   2003-11-02 - Version 0.0.2 { a.k.a 1.0.1 in the older release files}
##      - Fix image display path in medals.php
##	- 2 small changes to medals_body.tpl
##
##   2003-11-02 - Version 0.0.3 { a.k.a 1.0.2 in the older release files}
##      - Fix sql statement in admin_medal.php
##	- A change in the lang_admin.php
##
##   2003-11-03 - Version 0.1.0 { a.k.a 1.1.0 in the older release files}
##      - Allow admin to choose showing medal images in viewtopic or not
##	- All admin to configure number of rows & column in the viewtopic display
##	- Change medal display in profile, if no medal, medal table does not appear
##
##   2003-11-07 - Version 0.1.1 { a.k.a 1.1.1 in the older release files}
##	- Upgraded to 2.0.6 competible
##	- Only 2 minor changes in medalcp.php, and 1 change in the installation guide
##		for usercp_viewprofile.php
## 
##   2004-03-24 - Version 0.2.0 { a.k.a 2.0.0 in the older release files}
##	- Major re-write of this MOD, 1.1.1 is NOT upgradable to 2.0.0
##		because of the change in database design
##	- What's New:
##	  * In ACP, Medal Configuration & Medal Management
##	  * In ACP Medal Management, Add, Delete & Edit Medal, Add & Delete Medal Moderator(s)
##	  * Medals.php for overall Medal & User Listing
##	  * Moderator(s) can enter Medal Control Panel to Award & Delete User
##	  * Moderator can edit Award Reason for each award occasion for each user
##	  * Viewtopic Medal Display with image number and size control 
##		from ACP Medal Configuration
##	  * Viewprofile Medal History for the particular user
##
##   2004-03-26 - Version 0.2.1 { a.k.a 2.0.1 in the older release files}
##	- Security updates
##	- Fix 2 bugs in medalcp.php
##
##   2004-04-03 - Version 0.2.2 { a.k.a 2.0.2 in the older release files}
##	- Bug Fixs in medalcp.php & admin_medal.php
##	- Fix Medal Count Display in Viewtopic for Guests
##	- Two Chinese language change in lang_admin.php
##
##   2004-04-08 - Version 0.3.0 { a.k.a 2.1.0 in the older release files}
##	- Bug Fixs in viewtopic.php & usercp_viewprofile.php
##	- Added image randomize feature to Viewtopic, config in ACP
##
##   2004-08-11 - Version 0.4.0 { a.k.a 2.2.0 in the older release files}
##	- Fix template Actions synthax (Thanks to silvercloud @ phpBB.com)
##	- Fix image path in Viewtopic & Usercp_viewprofile
##	- Optimize & fix admin_medal_cfg.php sql query
##	- Added Medal Category and Category Order fuction
##
##   2004-08-12 - Version 0.4.1 { a.k.a 2.2.1 in the older release files}
##	- Added the forgotten toggle.js modification step in UPGRADE guide
##
##   2004-08-14 - Version 0.4.2 { a.k.a 2.2.2 in the older release files}
##	- Fix non-admin medal moderator can't see medalcp link problem
##
##   2005-09-25 - Version 0.4.3 { a.k.a 2.2.3 in the older release files}
##	- Fix some bugs and re-wrote some bits of script
##	- Added an add-on to remove toggle button effect from viewprofile
##
##   2005-12-06 - Version 0.4.4
##	- Fix a problem concerning issuing medal to user that has a username consists of numbers 
##		(changes in medalcp.php only)
##	- Change parts of the SQL syntax to add NOT NULL to a few places and removed "TYPE=MyISAM"
##
##   2005-12-07 - Version 0.4.5
##	- Fix an error in a switch (thanks to 心靈捕手 from phpbb-tw)
##	- Fix type-errors in Chinese lang file (thanks to 心靈捕手 from phpbb-tw)
##
##   2006-04-04 - Version 0.4.6
##	- Fix a few language errors
##	- Fix toogle button to allow make it work in Firefox (thanks to 心靈捕手 from phpbb-tw)
##	- Fix a bug with empty username in medalcp.php
##	- Fix a bug with dropdown list ordering bug in admin_medal.php
##	- Fix a bug with the showing of category in medals.php
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
:idea: Screen Shots:
Inside the package ( Medal_System_MOD/extra/ )

:idea: Download: Medal System MOD

Know Error & BUG Fix
:arrow: None

Beware
:arrow: latest stable version is 0.4.6

Others
:arrow: Medals with PCP toggle.js

~Mac
Last edited by ycl6 on Fri May 19, 2006 12:11 pm, edited 24 times in total.
McLR
Registered User
Posts: 95
Joined: Thu Aug 21, 2003 12:51 pm

Post by McLR »

looks great 8O , please explain more about your "MedalSystem"
tnx
Rapid Dr3am
Registered User
Posts: 198
Joined: Sun Jul 13, 2003 4:14 pm
Location: Incommunicado
Contact:

Post by Rapid Dr3am »

Nice work. :)

One slight suggestion, if you are the medal moderator then make the link in viewtopic and viewprofile. :)
xmulder
Registered User
Posts: 429
Joined: Thu Jun 27, 2002 8:37 pm

Post by xmulder »

is the image you used just random or is it the Combat readyness medal from startrek ;)

This mod looks cooool! Im gonna install it now once i find a few decent images to use ;) thankyou!!
xmulder
Registered User
Posts: 429
Joined: Thu Jun 27, 2002 8:37 pm

Post by xmulder »

in my usercp_viewprofile.php i have....

Code: Select all

$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
...not...
$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));


as the install file asks for. I am not sure if this is because my board is heavily modded or if it was a typo or not, better to be safe then sorry ;)
xmulder
Registered User
Posts: 429
Joined: Thu Jun 27, 2002 8:37 pm

Post by xmulder »

ok, its gone in nicely but there are a few bugs :P

First one is that on the profile page for the medal moderator it automatically awards that user the medal, its not a big thing its just that if you control all the medals it looks a bit big headed that you gave them all to yourself ;) click

Secondly on the discription page the text does not wrap so it streched the screen loads! click

Also in the medal display it does not account for the forum being in any other directoy than the base domain. So when you specify that time images are in /medals but the forum is located in www.mullys.net/board on the medal display it just looks for www.mullys.net/board/med.jpg rather than www.mullys.net/board/medal/med.jpg where-as the ACP will display it corectly ;)

asside from those few things its realllly good! im loving adding all these little images to use and im sure that my members will be happy to get them ;) a job well done
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

McLR wrote: explain more about your "MedalSystem"

err... the info did explain what it does. Basically it's a award system for your member where you can hand out medals to member you think deserve them
Rapid Dr3am wrote: One slight suggestion, if you are the medal moderator then make the link in viewtopic and viewprofile. :)

I think not in viewtopic, viewtopic only shows the amount of medal a user owns. I decided not to include detailed images in viewtopic because it would make it too massy it members own lots of medals

viewprofile, it's doable, may implement it in the next version, together with 2.0.6 updates
xmulder wrote: is the image you used just random or is it the Combat readyness medal from startrek ;)

That's just a random image I used for testing :wink:
xmulder wrote: in my usercp_viewprofile.php i have....

Code: Select all

$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
...not...
$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));

EDIT: the 2.0.4 version has:

Code: Select all

$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));
maybe because you are using 2.0.6 :)

~Mac
Last edited by ycl6 on Sat Nov 01, 2003 11:40 pm, edited 1 time in total.
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

xmulder, I wasn't sure about your first question
the profile page should show all the medal a user has,and, since someone is a medal moderator, he/she should own that medal too, at least that what I think it should be.

as for the image & table problem, I will look into it, and correct it :)

~Mac
xmulder
Registered User
Posts: 429
Joined: Thu Jun 27, 2002 8:37 pm

Post by xmulder »

ycl6 wrote: xmulder, I wasn't sure about your first question
the profile page should show all the medal a user has,and, since someone is a medal moderator, he/she should own that medal too, at least that what I think it should be.

as for the image & table problem, I will look into it, and correct it :)

~Mac


cool thanks :D

Is there a way i can make it not appear in the moderators pannel? because i want to add loads but i dont want them all in my profile page =/

By my other question i meant that...

If the image is located at www.mullys.net/board/medal/medal.gif
The forum is located at www.mullys.net/board/
then in the acp if you set the medal image as /medal/medal.gif the medals.php page will look for it at www.mullys.net/medal/medal.gif totally skipping out the /board bit. The only reason why mine work is because i put /board/medal/medal.gif in the ACP because i didnt want the not found images showing ;)
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

if you don't want any of the detailed medal information to appear in your profile (and all other members)

you don't have to do this part:

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
#
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
	<td align="right"><span class="nav"><br />{JUMPBOX}</span></td>
  </tr>
</table>

# 
#-----[ BEFORE,ADD ]------------------------------------------ 
#
<BR>
<a name="medal">
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
  <tr> 
	<th class="thCornerL">{L_USER_MEDAL}</th>
	<th class="thTop">{MEDAL_DESCRIPTION}</th>
	<th class="thCornerR">{MEDAL_IMAGE}</th>
  </tr>
  {MEDAL_BODY}
</table>
</a>
it's really a trade of, to show or not to show... :o

~Mac
User avatar
drumstix42
Registered User
Posts: 1100
Joined: Tue Sep 24, 2002 11:01 pm
Location: NJ
Contact:

Post by drumstix42 »

This is a nice mod. I like the idea. Pretty original.

A good way to show users maybe they've earned respect, or have been a memeber at a forum for an amount of time.

I think there could be many variations to this mod to be used in different ways. Cool MOD :)

I'll try it out, and see how it goes...
Need a phpBB update or mod installed? PM me for any questions and pricing!
HostMonster.com (Unlimited Space, Unlimited Transfer, Unlimited Domains, $6.95/month )
theanimewizard
Registered User
Posts: 646
Joined: Tue Jul 08, 2003 9:24 pm
Contact:

Post by theanimewizard »

ill install it in a few days or so.. makin sure most, if not all, bugs are found and fixed :D

nice mod though.. been waitin for a long time ^^
pengrus
Registered User
Posts: 566
Joined: Mon Dec 02, 2002 6:13 am
Contact:

Post by pengrus »

Mac,

Excellent Job!!!

I have taken a look at your files and code and found it's very well written and clean. I feel safe to install this mod - how difficult is it to make it work with phpbb 2.06?


I would strongly recommend to show the medal image in the ViewTopic page like this one here.

I understand your reasoning of Not to show the medal image in the viewtopic since it might mess up with the board. And I agree with you to some extent. But to show it on the viewtopic page, it also gives a strong visual impact that the members would love to have.

Maybe the solution could be (the option in the admin control panel) to specify how many medals that the every medal receipient can display on the viewtopic page. For example, you might be able to specify only the latest 2 medals displayed on topic page. But on profile page, we would like to display all of them.


Mac, once again, excellent job!!!
ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

drumstix42 wrote: I think there could be many variations to this mod to be used in different ways. Cool MOD :)

I agree it's use does not limit to just giving Medal to members. Although it's called Medal System, it can be re-written to use with RPG Mod, and allow admin/"Medal" moderator to give out items/spells/etcs... to members. That's one idea, and there could be a lot more.
pengrus wrote: I have taken a look at your files and code and found it's very well written and clean. I feel safe to install this mod - how difficult is it to make it work with phpbb 2.06?

I think it should not take long, I just need to compare the code I use with those of 2.0.6. And since xmulder has successfully install this Mod on his board (2.0.6), I think there is no big differences.
But to show it on the viewtopic page, it also gives a strong visual impact that the members would love to have.

Maybe the solution could be (the option in the admin control panel) to specify how many medals that the every medal receipient can display on the viewtopic page. For example, you might be able to specify only the latest 2 medals displayed on topic page. But on profile page, we would like to display all of them.

Mmm... I agree with you. I will think of something, maybe limit the image dimension and/or allow admin to define how many medal to display in viewtopic.

~Mac
danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

hmm can someone make it pcp compatable?
Post Reply

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