Unable to upload new Mod (Auto Award version 1.0 for SMF 1.1.15 & 2.0.1)

Started by JohnWayne999, October 16, 2011, 10:41:21 PM

Previous topic - Next topic

JohnWayne999

Hello. I was half way through upload my new mod when connection was lost. That mod never quite went through fully. When I tried to re-upload it, I keep getting this error message:

QuoteAn Error Has Occurred!
The package id given matched another mod's package id. The package id is required to be unique.

I checked on http://custom.simplemachines.org/mods/index.php?mod=3239 and indeed the mod half went through, without any screen shots. Also I am not sure how intact that zip file up there is. The mod, relevant info, and screenshots are as follows. Would be great if moderator could kindly help out on this. Thank!

Mod Name: Auto Award
Latest version: 1.0
Compatible with: SMF 1.15 & 2.0.1
Type of mod: Profile
Short description: Automatically award users based on how many posts they made

Full description:

Sixteen medals in total and are awarded automatically based on post count. Takes effect right away and also retrospectively. For example some members may have made many posts already prior to introduction of this mod. Not to worry. As soon as this mod is installed, all members will be awarded all medals they deserve.

TURN ON/OFF
This mod piggy backs on total number of posts and display of it. If your forum has display for total number of posts disabled, then the medals won't show and vice versa.

DISPLAY OF MEDALS
Currently I only coded for the medals to show in the profile window inside posts. For example you'll see medals inside new topics and people's replies. However if you then go check on individual members' personal profile page, you won't see the medals in there. If anyone wants the medals to appear in personal profile page also, please tell me which file handles that page.

DIRECTORY WHERE MEDALS ARE STORED
Medals are stored in /Theme/default/images/medals
Feel free to add more or remove medals. I find 35 x 60 pixels a good size, but you are free to change that ratio as you please. HTML tables can be implemented easily to accommodate for varied sizes. This might be a feature of future version.

Please keep your medal filenames to medal1.gif, medal2.gif, medal3.gif,.. in sequence because that's how they will be fetched in that order. I have included /Themes/default/medal1.gif - medal16.gif for you. You can change pictures or use different file extensions (eg. medal1.png, medal2.png...) but as long as the first part of filename sticks to sequential medal1, medal2 etc. Note also if you are using .gif then all files are .gif. If you want to use .png, then all files are .png, no mixing around please. For example medal1.gif, medal2.jpg, medal3.png will not work.

SETTING POST COUNTS FOR AWARDS
To specify how many posts deserves the next medal, simply go into /Themes/default/Display.template.php and change the numbers in $medalscore = array (10,20,30,40,50,100,150,200,300,400,600,800,1000,1300,1600,2000);
For example the way this array is set up by default now says there are 16 medals in total (16 elements in the array). To be awarded the first medal, you need to have posted a total of 10 posts. Not too hard. To be awarded the next medal, you need to post another 10 posts (absolute total of 20 posts). To get the final 16th medal, you need to post in total 2000 posts (can be new topics and/or replies, as long as they add up to 2000 from the time you registered to this forum). If you wish to add an additional medal to the reservoir, just lengthen the array, and don't forget to also place your medal#.gif in /Theme/default/images/medals where # is sequential natural number. For example, obviously the next file in line will be medal17.gif

Just a few quick clarifications:
Note 1: The numbers in the array are absolute number of posts not incremental posts.
Note 2: Person who receives current award, is also automatically awarded all awards below it if not already done so. For example if a member has been with this forum for some time, has posted 100 posts before this mod was installed. Now you install this mod, he is automatically awarded 6 medals all at once (for 10,20,30,40,50,100 posts check points).
Note 3: Obviously the numbers in the array need to be getting larger towards the right. For example it makes no sense setting up an array of 50,10,60,30,70,5,100,...
Note 4: If you see next to the medals an error message that says someone "has no influence", that means your array is longer than there are actually images for medals. To solve this problem is simple: either shorten your array, or add a few more images into /Theme/default/images/medals

USING IMAGES OTHER THAN GIF
Currently the engine searches for .gif automatically. If you prefer .png or something else, just go into the file /Themes/default/Display.template.php and scroll down to this line
echo '<img src="', '/Themes/default/images/medals', '/medal', $mc++, '.gif" />';

Change the .gif in there to dot whatever extension you like. For example .png would be a good alternative.

BASE AWARD ON OTHER THAN POST COUNT
If you want the medals to be awarded based on something like how much money the user has, karma, or how long since he/she registered, it's pretty straightforward also. Just replace the variable $message['member']['posts'] with whatever variable you have in mind, as long as you know what those exact variables are.

FORWARD & BACKWARD COMPATIBILITY
This mod was developed and tested fine on SMF 2.0.1 as well as SMF 1.1.15. The coding is very straightforward. I don't see why it shouldn't work on nearby versions, although I never tested it on other versions. So please test at your own risk. If it works on a different version, I would love to know about it.

BUGS
BACKGROUND COMPATIBILITY ISSUE
This mod will execute on any theme. However due to problems with the medals' background transparency, the medals won't look good against dark themes. I recommend using this mod only on pale themes. At least the profile window displaying the medals needs to be light coloured. I used free tool InstantMask iaza.com to make the medals' background transparent. They do an okay job but perhaps Photoshop or Paint.net can do better. If anyone knows how to do it, please explain to me in step by step simple terms. Alternatively a cheap way around it, if you really prefer a particular dark theme, is to use only medals whose background colour matches exactly your forum's dark theme.

OTHER RECOMMENDATIONS
If you enjoy this mod, then maybe you would be interested in SMF Shop by vbgamer45 and Member Awards by Spuds also. SMF Shop lets users buy things using credits earned from posts. You can reserve special edition medals for people to purchase or swap around. Member Awards is straight forward. Moderators can award individual members things (eg. trophies or limited edition medals) which will stick to their profile and album indefinitely.

That's about it in a nutshell. Thanks for using Auto Award! All comments, suggestions including feature requests are welcome at http://www.gpland.org under maintenance or feedback section. Lastly but importantly, please remember to backup first before trying this mod.

Sir Osis of Liver


Delete the uploaded zip, and upload the mod again.  As long as you didn't try to install it, should be no problem.

And this certainly doesn't belong in Bug Reports.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

JohnWayne999

How do I delete it? The page says it's still waiting for approval and there is no button for deleting.

Please advise where this post best belongs or how to move it.

Sir Osis of Liver


You should have access to your server account with cpanel and/or ftp.  The uploaded file is in the /Packages/ subdirectory off your forum root.

You'll get a better response if you post a question like this on the 2.x Support board.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters


Avalon Omega

Donde se instala el mod y donde lo edito que no lo encuentro en la seccion de Adminsitracion

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters


JohnWayne999

Thanks guys.
I think I got an email from admin asking me to edit two variables to make it publicly acceptable. Just haven't quite got around to do it and test. Should happen before X'mas (literally).

Advertisement: