rita
Not New Member
Posts: 36
rita said 0 great things
|
Post by rita on Dec 10, 2011 10:02:12 GMT -8
|
|
|
Post by Wormopolis on Dec 10, 2011 22:45:02 GMT -8
there is a condition in the code that doesnt put the hat on an avatar if it doesnt load by a certain point. if the image tales too long to render, it gets skipped. if you refresh the page, and the image is in the cache, the hat will usually show up.
I had to do it that way or the hats were just floating there by themselves.
|
|
|
Post by Wormopolis on Dec 10, 2011 22:49:13 GMT -8
also if you have a MP remodel that moves where the avatar sits or completely changes how the avatar lies in the MP, the hats wont find the avatar - or the avatar will get moved somewhere else and the hat will target a contact icon.
|
|
rita
Not New Member
Posts: 36
rita said 0 great things
|
Post by rita on Dec 11, 2011 1:20:55 GMT -8
there is a condition in the code that doesnt put the hat on an avatar if it doesnt load by a certain point. if the image tales too long to render, it gets skipped. if you refresh the page, and the image is in the cache, the hat will usually show up. I had to do it that way or the hats were just floating there by themselves. Oh I see - so will there be a problem keeping this code at the top of the global footer? What's an MP?
|
|
|
Post by Wormopolis on Dec 11, 2011 1:49:14 GMT -8
MP is mini profile. the part to the left of posts. codes are fickle in where they get placed. sometimes they work better at the top or bottom. I run it on this forum at the bottom to give the avatars more time to load, but even then sometimes they dont make it. your avatar for example gets skipped a lot because the URL to it went bad and I never replaced it. but if you put in your own avatar URL, it would more likely find it quicker.
if there was a better way to ensure the image was loaded all the way I would incorporate it, but what I used seemed to be the one with the highest results.
|
|
rita
Not New Member
Posts: 36
rita said 0 great things
|
Post by rita on Dec 11, 2011 23:46:34 GMT -8
I'd like to change the image, but what size pixel x pixel should it be Wormo?
|
|
|
Post by Wormopolis on Dec 12, 2011 18:24:16 GMT -8
change the image of your avatar or one of the hats?
|
|
rita
Not New Member
Posts: 36
rita said 0 great things
|
Post by rita on Dec 12, 2011 23:31:59 GMT -8
The hats.
|
|
|
Post by tunescool on Dec 13, 2011 7:54:44 GMT -8
the code does work on my random avatar but it wouldnt work with my MYOMP
|
|
|
Post by Wormopolis on Dec 13, 2011 20:47:09 GMT -8
MYOMP probably restructures the entire cell so hats cant even find the avatar to put a hat on it....
the hats images should be sorta small. the santa hat I have is 50 wide by 75 tall. you dont want it TOO big or it wont calculate where the middle will lie in relation to the avatar. I would say dont go more then 80px wide or tall and it should fit. it doesnt do any resize, so you need to use an image that is already sized right.
in the code, the offset number is for getting the placement just right. each image gets tweaked just a little by that number.
|
|
rita
Not New Member
Posts: 36
rita said 0 great things
|
Post by rita on Dec 13, 2011 23:32:24 GMT -8
Thanks Wormo. I love the hats/code but my members aren't as thrilled!!!!
|
|
|
Post by Wormopolis on Dec 14, 2011 16:53:16 GMT -8
they must hate the holidays!
|
|
rita
Not New Member
Posts: 36
rita said 0 great things
|
Post by rita on Dec 14, 2011 23:33:51 GMT -8
As it happens some of them really do hate Christmas because it means they have to spend money!!!
|
|
sol9999
Not New Member
Posts: 18
sol9999 said 0 great things
|
Post by sol9999 on Feb 3, 2012 7:36:22 GMT -8
great code! thanks a lot!
|
|
|
Post by Wormopolis on Feb 3, 2012 8:56:32 GMT -8
I appreciate that!
|
|