Author Topic: Item: EggAvatar  (Read 179456 times)

Offline myg_weng

Re: Item: Egg your victims avatar
« Reply #150 on: February 22, 2007, 12:15:06 am »
is this compatible to any SMF version?

Offline feeble

Re: Item: Egg your victims avatar
« Reply #151 on: February 22, 2007, 06:27:09 am »
is this compatible to any SMF version?

depends, not sure about previous version, but you should be running 1.1.2 anyways. plus smfshop will only install of a few different version.

long story short, if you can install smfshop, im pretty sure this item will work.

Offline myg_weng

Re: Item: Egg your victims avatar
« Reply #152 on: February 24, 2007, 03:08:29 am »
if you encounter :

"Unsuccessful, <name> not found, here have another egg"

and yet, you are 100% sure that the name is existing in the database, the username might not be the original one from his registration. 

To fix this problem just change the part where it compares the

memberName   = '".$_POST['egguser']."'"

to

realName. = '".$_POST['egguser']."'"




its on Line 171, Col 128 onwards

Offline feeble

Re: Item: Egg your victims avatar
« Reply #153 on: February 24, 2007, 06:13:55 am »
if you encounter :

"Unsuccessful, <name> not found, here have another egg"

and yet, you are 100% sure that the name is existing in the database, the username might not be the original one from his registration. 

To fix this problem just change the part where it compares the

memberName   = '".$_POST['egguser']."'"

to

realName. = '".$_POST['egguser']."'"




its on Line 171, Col 128 onwards

thats probably a good idea lol, ill change it in the main package soon

Offline TechnoDragon

Re: Item: Egg your victims avatar
« Reply #154 on: February 25, 2007, 01:50:22 pm »
Or better yet...change the where clause to this:
Code: [Select]
WHERE memberName = '".$_POST['egguser']."' OR realName = '".$_POST['egguser']."'

That way it will check for either....
Don't tell me to get into shape...I have a shape...It is round!


Offline myg_weng

Re: Item: Egg your victims avatar
« Reply #155 on: February 25, 2007, 02:38:44 pm »
Or better yet...change the where clause to this:
Code: [Select]
WHERE memberName = '".$_POST['egguser']."' OR realName = '".$_POST['egguser']."'

That way it will check for either....

there would be a possibility that it would return two records :

1. If my username is USERA
2. then i changed it to USERB
3. then SOMEONE (say USERC) changed his name to USERA

then it would return two records.. if SOMEONE would egg USERA, then it would be either USERB or USERA.. dont know bout the succeeding lines but one of them would be egged.. but not exactly USERA


Offline TechnoDragon

Re: Item: Egg your victims avatar
« Reply #156 on: February 25, 2007, 03:45:24 pm »
That is a possibility, but the same could also be said for every other occurance of similar code within SMF...that is essentially how it determines whether the user is correct...
Don't tell me to get into shape...I have a shape...It is round!


Offline russ

Re: Item: Egg your victims avatar
« Reply #157 on: February 26, 2007, 07:51:52 am »
Very cool little mod this :) Was wondering how, when someone is egged, they can remove it? :)

Cheers :)

Offline TechnoDragon

Re: Item: Egg your victims avatar
« Reply #158 on: February 26, 2007, 08:28:22 am »
that's the easy part...they just go into their profile and switch it back to their old one!
Don't tell me to get into shape...I have a shape...It is round!


Offline russ

Re: Item: Egg your victims avatar
« Reply #159 on: February 26, 2007, 03:49:35 pm »
All installed great, apart from now, if you go to add/edit items.... this error appears:

Fatal error: Cannot redeclare class item_egguser in /home/XX/XXXXXXXXXXX/XXXXXX/forum/Sources/shop/items/EggUser.php on line 42

:(

Offline perplexed

Re: Item: Egg your victims avatar
« Reply #160 on: February 28, 2007, 08:29:28 pm »
whoops sorry, here are the errors I have in the forum error log in relation to the above problem:

2: getimagesize(/home/mysite/public_html/testforum/avatars/egged/egged_fred%20blogs.png) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory
File: /home/mysite/public_html/testforum/Sources/shop/items/EggUser.php
Line: 204

2: getimagesize(http://www.mysite.com/testforum/avatars/egged/egged_fred blogs.png) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request

File: /home/mysite/public_html/testforum/Sources/shop/items/EggUser.php
Line: 212

errors basically mean it couldnt find the avatar image

please make sure you have all your settings correct in smf admin area->attachments and avatars

also if possible can you please give me your test site address so i can check a few things

I think I found the problem.  I looked in your egguser.php and found


Code: [Select]
image: image file name. FOR THIS RELEASE THIS HAS TO BE A GIF. IF THIS FAILS,
       IT WILL NOT WARN YOU, AND IT WILL SAVE AN UNALTERED VERSION IN THE EGGED FOLDER

In the above error message and also in one I got today it shows the avatar in question

2: getimagesize(http://www.mysite.com/testforum/avatars/egged/egged_fred blogs.png)

This only works with gifs, so that would explain it, right?

Is there any chance of getting this to work with .png and .jpg avatars as I have 100s of them on my server and would hate to have to start changing them all over to .gifs :(
« Last Edit: March 26, 2007, 07:03:22 pm by perplexed »
Estne volumen in toga, an solum tibi libet me videre?

Offline feeble

Re: Item: Egg your victims avatar
« Reply #161 on: February 28, 2007, 10:16:29 pm »
Code: [Select]
image: image file name. FOR THIS RELEASE THIS HAS TO BE A GIF. IF THIS FAILS,
       IT WILL NOT WARN YOU, AND IT WILL SAVE AN UNALTERED VERSION IN THE EGGED FOLDER

In the above error message and also in one I got today it shows the avatar in question

2: getimagesize(http://www.mysite.com/testforum/avatars/egged/egged_Imperial Scribe.png)

This only works with gifs, so that would explain it, right?

Is there any chance of getting this to work with .png and .jpg avatars as I have 100s of them on my server and would hate to have to start changing them all over to .gifs :(

odd, as it should be working with png file types ill look into that.

for jpg well, since its not officially support by GD, i havent included it sorry,

Offline perplexed

Re: Item: Egg your victims avatar
« Reply #162 on: March 01, 2007, 12:52:44 am »
I tried it again on the test site and it worked ok with a png but i had to hard refresh the page to pick up the change

Is there a fix for the 'find members' problem?  It works ok in the shop but not on this item when you try to use it on someone?

~thanks
Estne volumen in toga, an solum tibi libet me videre?

Offline perplexed

Re: Item: Egg your victims avatar
« Reply #163 on: March 01, 2007, 11:20:24 pm »
Code: [Select]
image: image file name. FOR THIS RELEASE THIS HAS TO BE A GIF. IF THIS FAILS,
       IT WILL NOT WARN YOU, AND IT WILL SAVE AN UNALTERED VERSION IN THE EGGED FOLDER

In the above error message and also in one I got today it shows the avatar in question

2: getimagesize(http://www.mysite.com/testforum/avatars/egged/egged_fred blogs.png)

This only works with gifs, so that would explain it, right?

Is there any chance of getting this to work with .png and .jpg avatars as I have 100s of them on my server and would hate to have to start changing them all over to .gifs :(

odd, as it should be working with png file types ill look into that.

for jpg well, since its not officially support by GD, i havent included it sorry,

it's working on .pngs the first time you egg them but after they've been egged it doesnt seem to recognise them or something.  Maybe something to do with the egged folder?

error in the forum log is:

2: getimagesize(/home/mysite/public_html/forum/avatars/egged/egged_jack.png) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory
File: /home/mysite/public_html/forum/Sources/shop/items/EggUser.php
Line: 204


(and I hate being a pain but that javascript problem only happens in this item and the members keep complaining at me that it doesnt work)
« Last Edit: March 26, 2007, 07:04:10 pm by perplexed »
Estne volumen in toga, an solum tibi libet me videre?

Offline feeble

Re: Item: Egg your victims avatar
« Reply #164 on: March 02, 2007, 02:06:14 pm »
few things.

im changing my host/plus a few other things around so downloads are going to be a little mixed up so i wont be able to host for about a week.

to perplexed. ill be working on it this soon and gets those problems fixed, plus ill be looking into a jpeg solution

but its going to take time since uni has just started up, plus i dont have a website atm to look into the bugs

sorry for all this, ill try and get up a temp host probably in the next hour or so.