Author Topic: Item: EggAvatar  (Read 99981 times)

Offline feeble

Item: EggAvatar
« on: October 21, 2006, 12:07:41 am »
THE ZIP IS NOT A PACKAGE, JUST EXTRACT IT INTO A FOLDER AND READ THE README
PLEASE READ THE README IN THE ZIP FIRST.
CLICK HERE TO DOWNLOAD V20R6
To PM
CLICK HERE TO DOWNLOAD V20R4
Or not to PM
latest released: 30/MAY/07[/b]
Main Release
Stores Egged Avatars in forum/egged/
Works on most hosts(free and paid)
Also PM's on successful egg, you can edit the msg by going in and editing the item.
You will find the section to edit at the end of the file


CLICK HERE TO DOWNLOAD V14
latest released: 08/MAR/07

Old Release
Stores Egged Avatars in forum/avatars/egged/
Works best on paid hosts


TIP: You can use buyAvatar Item to charge your forum members to change their Avatar

Essentially it Eggs a forums users avatar.

then(if admin allows) changes their custom title, to something like  "You've been Egg'd by {your name here}!"

Quote from: readme.txt
Installation/Update notes:
1. Copy folders "item_images" and "items" into your Sources/shop directory on your website
2. IMPORTANT: When you go to add this item into your shop. Please make sure that it passes
   both tests. If it doesnt, it should give you good enough instructions to fix the problem.
   If not please, follow the link at the bottom of this document, post up and I should beable
   to help you out.

I have created the directories for you in the zip file. just upload them into your forum directory.

Atm i have, an egg, snowball, tomato, a kiss, and a paint ball/splash. If you any any other ideas, please let me know, a of the said idea would also be nice but not necessary.

Requirements: you need GD, ill be putting a safety in soon, so that if you don't have it, it will let you know. and wont alter your forums.

How it works:
It gets your victims avatar, then using gd, overlays their avatar with an image, in this case an egg.

It will not override their old avatar on default settings, in fact it will store their new defaced avatar in avatars/egged/, so if you would like, you could also wear your victims defaced avatar, as a trophy, or something ;)

saved the images are saved in the format of:  egged_{memberusername}.gif

a nice feature of this script, is that you can egg as many times as you want, depending if you can afford that many eggs of course. It will keep piling the eggs onto the avatar. still working on the random script, but ATM its working decently.

It going to **** ppl off, but oh so worth it.

I also need someone to test it for me as well, as i may not have covered all possibilities of getting the users avatar. if someone could let me know, and ill send them the item. also if someone could go over the code that would be great.


Change-log from V13 to V14
-FIX:fixed the issues with users having spaces in their username. thanks to perplexed for pointing this out.
-ADDED: debug mode: ive added a debug mode in the EggUser.php file, so if you are having issues, just set it to true, then send me a pm on its read out next time you use the item.
-UPDATED: as per suggestion from TechnoDragon, ive made it so it will search for the users login name or realname, should make finding users a little easier. should of done this on the get go but better late then never.
---------V12Beta to V13------------
-FIX:fix a bug where egg details weren't being initialized properly on certain hosting. thanks xfollowthereaperx for the use of your forums.
---------V11Beta to V12------------
-Combined both v10 and v11Beta so if one fails, then it trys the other. Basically some forums work differently to others. this should cover most cases now.
-NEW EGG: added a snowflake for the xmas season
---------V10 to V11Beta------------
-REWROTE:completely rewrote how it gets the users avatar href. finally worked out the SMF function for this, so its now like 10 lines from 50. and should work better to.
---------V9 to V10------------
-NEW OPTION: adjust users karma based on what egg he throws.(default off)
-NEW OPTION: actually alter the victims avatar file if its not external. (default off)
-BUG FIX: fixed a few more forum errors.
-SPELLING CORRECT: corrected a few spelling mistakes or just plain grammar.
-AUTO CHMOD: added a funciton to check if egged directory exists and is writable. if not trys to create and chmod egged dir for you. with visual indicators.
-UPGRADE: eggs can now be png or gif formats.
-NEW EGGS: added a snowball and tomato
-few other bug and error fixes
---------V8 to V9------------
-Worked out what was wrong with the javascript so that it works in ie.
-apologies for 2 version within the hour.
---------V7 to V8------------
-Rewrote getting what type of image the avatar is. now 2KB smaller. yay. which means it can handle more ways of getting the file.
---------V6 to V7------------
-BUG FIXES: & in the avatar directory or file name or now handled correctly
-BUG FIXES: now uses the forums avatar directory instead of assuming avatars are stored in /avatars/. should solve a few ppl problems. and not sure why i didnt do this in the first place.
-NEW FEATURE: ive addeda a $donotcolourme variable at the top of egguser.php for ppl that add their own eggs. REMEBER 0 is the first item in the array. just play around with it, nothing bad can come from changing it.
-UPDATED: files are not stored with the users login name instead of using the form data.
---------V5 to V6------------
-BUG FIX: just fixes a few lines so you dont get forum errors building up
---------V4 to V5------------
-BUG FIX:slight edit to how the images were saved. solved a few problems of egged image not saving
---------V3 to V4------------
-IMPROVED: image preview now works in ie. i s****ped the taunt text changing when you selected a different egg, as i could get it to work correctly.bloody ie.
-BUG FIX: custom avatar directories should now work.
-improved: fixed the code. egged images should now retain aspect ratio of the original.
-degraded: my item code looks like **** now. yay for it.
---------V2 to V3------------
-FEATURE: Paintball, and kiss are now random in their color. basically anything not in position 1. anything not transparent will be the same color is how it works. look for paint ball edit and change the if clause there if you don't want it or change which images this will affect.
-FEATURE: preview image on getinput page for user, so they know what they are sending.
-EDIT: got rid of db_prefix as it was unused and spelt incorrectly. thanks chadk.
---------V1 to V2------------
-FEATURE: users are able to right their own taunt to be put in their victim custom title. Admin option.
-bug-fix: spaces in image file names are no properly found. thanks to Technodragon73
-improved: getting the users avatar as been improved. found an easier way, its not pretty ATM. ill rewrite it later. thanks to Technodragon73
-improved: overlayed gifs are now better proportioned if the avatar is not exactly square.
-improved: avatars now keep their correct aspect, but will be shrunk down to the maximum forum avatar size.
-improved: taunts, can now handle '. in them, but please keep the text simple in the php file, but users can write whatever they want.
-increased the default ratio size of the eggs, as generally the victim will only have 1, instead of many. now the paint looks better, since it covers a larger portion of the avatar.
-few other things not worth mentioning.

Wish List:
-dont change the avatar size if its not external - DONE - FIXED IN V4
-fix the javacript for ie users. stupid ie users - DONE - FIXED IN V4
-Different random colours for the paintball, and different shapes for it - DONE - ADDED IN V3
-add/minus system for the eggs. - may have found a way, ill look into it more when this one is done. thinking of adding a new table to smf_members for the data. then if image is not in egged, add eggs. not a perfect solution, but it may work.
-write your own message to replace your victim custom title - DONE - ADDED IN V2

Troubleshooting:
1. matkins70 - egged_{username}.png not being saved.
Solution: changed folder 'egged' in the avatars/ folder to 777. Solution is host dependent. All folders for myself are 755 and works fine. But definitely worth a go, if you are having this problem.
2."Error: Avatar is an unknown filetype"
Solution: please check your "Attachments and Avatars" in smf admin area. make sure Attachment/Avatars directory and avatar url does NOT have a trailing slash
EXAMPLE: Avatars Directory: /home/*****/public_html/avatars

« Last Edit: June 20, 2007, 08:38:54 am by feeble »

Offline Daniel15

Re: Item: Egg on victims avatar
« Reply #1 on: October 21, 2006, 12:57:29 am »
Wow, I was going to PM you about this item...
Seriously, it looks awesome!  I believe that this could easily become one of the most popular SMFShop items :D

Offline matkins70

Re: Item: Egg on victims avatar
« Reply #2 on: October 21, 2006, 01:02:13 am »
Yeah, so how do we get this great script then?

Offline TechnoDragon

Re: Item: Egg on victims avatar
« Reply #3 on: October 21, 2006, 01:54:06 am »
ok, I REALLY REALLY want this item!
Don't tell me to get into shape...I have a shape...It is round!


Offline cponygo

Re: Item: Egg on victims avatar
« Reply #4 on: October 21, 2006, 05:47:34 pm »
as do I

Offline feeble

Re: Item: Egg on victims avatar
« Reply #5 on: October 21, 2006, 06:46:21 pm »
released v1
please let me know if you have problems
make sure you have a folder called 'egged' in your avatar folder.

ill be releasing updates as i find and fix issues that you may get, which means you just need to replace the EggUser.php files that ill upload.
« Last Edit: October 21, 2006, 06:50:52 pm by feeble »

Offline matkins70

Re: Item: Egg your victims avatar
« Reply #6 on: October 21, 2006, 09:08:01 pm »
deleted users avatar :(

Offline feeble

Re: Item: Egg your victims avatar
« Reply #7 on: October 21, 2006, 09:44:01 pm »
deleted users avatar :(

im looking at your forums atm, can you give me an example please?

link to user with a missing avatar

Offline matkins70

Re: Item: Egg your victims avatar
« Reply #8 on: October 21, 2006, 09:51:10 pm »
ah, well i just replaced it.  Not sure what happened, i selected the user, and it said i egged them.  then when i check out their profile, there is no avatar, but when i went toupload it for them again, i could see their avatar, it just wasnt selected, if you understand what i mean, so i uploaded it again, and now their avatar is back.

If you want i can add the item again, and do it to someone else.

BTW, under the GD successful bit, there was a check box that said "allows users to change...", should i have ticked this?

Offline feeble

Re: Item: Egg your victims avatar
« Reply #9 on: October 21, 2006, 09:54:08 pm »
ah, well i just replaced it.  Not sure what happened, i selected the user, and it said i egged them.  then when i check out their profile, there is no avatar, but when i went toupload it for them again, i could see their avatar, it just wasnt selected, if you understand what i mean, so i uploaded it again, and now their avatar is back.
that is correct, its done like that on purpose, it does not delete the users uploaded image, so that they can easily replace it.
If you want i can add the item again, and do it to someone else.
if thats ok, just to confirm, if the image is being saved, and if its looking in the right spot, you created an egged directory in avatars/ ?
BTW, under the GD successful bit, there was a check box that said "allows users to change...", should i have ticked this?
only, if you want your victims custom title to change to the taunt. atm default is off,  i think i might change it to default is on thou
« Last Edit: October 21, 2006, 09:56:13 pm by feeble »

Offline matkins70

Re: Item: Egg your victims avatar
« Reply #10 on: October 21, 2006, 09:56:36 pm »
Right,  I went to avatars in the main forum directory, and created a folder inside it called 'egged', all small caps.  After  i used the item the first time, there was nothing inside this folder, should there have been?
Am gonna use the item again on Wob, so you can see what it does, just check his profile

Offline matkins70

Re: Item: Egg your victims avatar
« Reply #11 on: October 21, 2006, 10:29:10 pm »
Thanks a lot feeble!!  All sorted, and users being egged as i speak!!

Offline feeble

Re: Item: Egg your victims avatar
« Reply #12 on: October 21, 2006, 10:33:56 pm »
Thanks a lot feeble!!  All sorted, and users being egged as i speak!!
no worries man
btw
Quote
Deface someone else's picture with numurous items. You can even taunt them by writing a message to appear below their name
its a pretty sweet idea, ill get right on that.

Offline geezmo

Re: Item: Egg your victims avatar
« Reply #13 on: October 22, 2006, 12:18:27 am »
I'd like to try this but this is what I want to see in the package:

1 - Have another shop item like "Delete eggs/kisses in avatar" so you can remove the eggs/kisses anytime. Of course, the member has to pay for the item.

2 - When new avatars are uploaded, the eggs/kisses should be active again. This way, members will need to buy the Item i said above rather than reupload a new avatar if they dont want the eggs in their avatar.

Overall, though, I personally like this item!

Offline feeble

Re: Item: Egg your victims avatar
« Reply #14 on: October 22, 2006, 12:34:27 am »
I'd like to try this but this is what I want to see in the package:

1 - Have another shop item like "Delete eggs/kisses in avatar" so you can remove the eggs/kisses anytime. Of course, the member has to pay for the item.

the only way i could think of doing this would be to deface the avatar on the fly, meaning getting the avatar, applying the 'eggs' and out putting it to the broswer.  - which is a possibility of course, but generally considered slow. then i would just need a way of storing the data of overlays already on the avatar.

maybe someone else has a better idea.

Quote
2 - When new avatars are uploaded, the eggs/kisses should be active again. This way, members will need to buy the Item i said above rather than reupload a new avatar if they dont want the eggs in their avatar.
same again, just deducting from the stored data

Quote
Overall, though, I personally like this item!
thanks ;)
« Last Edit: October 22, 2006, 12:37:46 am by feeble »