Page 10 of 11

Re: What do you think about our smilies?

PostPosted: April 15th, 2015, 6:14 pm
by Oranjui
...you sure about that?

download/file.php?avatar=9799.png takes me right to my avatar.
download/file.php?avatar=4611.png takes me right to your avatar.

Just change the number to a user's ID thing and it should display the most recent avatar, right? You could add a smiley or a tag to make it shorter. [avatar]9799[/avatar], or [avatar]4611[/avatar], etc displays the avatar associated with that user.

Re: What do you think about our smilies?

PostPosted: April 15th, 2015, 7:30 pm
by Doram
You know what? I've looked at it before, and where the database stores the info, it's more gibberish than that, and the files themselves are pretty gibberish, and when you right click the image, and go to "View Image", it uses more gibberish than that. I never knew you could shorten it to the User ID and it would work.

For showing me something new about how the forums work, your wish is granted. And yes, it will have to be BBCode. The smilies won't take input like that.



Ok, caveat time. This IS not perfect. A number of people I tried with it, don't work. Some for the obvious reason that they are linking to their avi, and not having it stored here on the site (Supershroom qualifies: 146552), and others are not so clear cut why they fail (MoD qualifies: 298).

Otherwise, it works beautifully.

Code: Select all
[avatar=33070]NanTheDark[/avatar] Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

[avatar=33070]NanTheDark[/avatar] Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

It's the avatar, and their name, floated to the left, and the whole thing is a link to their user profile. Also of note, it does not do rank colors, and I am working on that (technically there's a staffcolor bbcode - that's not working - that you could embed in it; having it pull the color automatically is MUCH harder). Just be aware of things stacking up to the right of the left floated element, like this:
[avatar=4611]Doram[/avatar] The avatars will line up on the left, and the text will all flow to the right. Just be aware of how far down the text reaches (if you are trying to line up the text with the avatar). Of course, you could also use tables to get the positioning right (one cell per row, avatar floated to the left of it by default, and text to the right by default, but table rows separate individual sets).

Re: What do you think about our smilies?

PostPosted: April 16th, 2015, 10:45 am
by Raz
I still think the delay between the animation in the suggestive smiley is too long. I think the delay should be either removed (I really don't think the eyebrow wiggle will be annoying) or something incredibly short.



[avatar=10691]Raz the winner of LDCs everywhere[/avatar]

Re: What do you think about our smilies?

PostPosted: April 16th, 2015, 10:47 am
by MessengerOfDreams
[avatar=298]MessengerOfDreams[/avatar] Maybe because I change my avatar every two picoseconds? Does change rate have anything to do with it?

Re: What do you think about our smilies?

PostPosted: April 16th, 2015, 11:53 am
by KABOOM

KABOOM
My avatar and the other ones that have worked in this topic are all PNG files. MOD's is a JPEG. Maybe that's the problem?

Re: What do you think about our smilies?

PostPosted: April 16th, 2015, 2:53 pm
by Kimonio
Oh my god Doram impregnate me and let me have your babies, I've been trying to do that without tables since forever.

Re: What do you think about our smilies?

PostPosted: April 16th, 2015, 6:53 pm
by Sethster
[avatar=145638]That one guy that does stuff[/avatar] Testing it with GIF file type, since mine is a GIF. It doesn't work on my end and looking at the pic in a new tab gives a blank PNG (no picture at all)

Re: What do you think about our smilies?

PostPosted: April 16th, 2015, 8:59 pm
by Doram
Oh, bloody hell. I just figured out what was breaking, and... there's no easy fix. You are totally right. It's all about the file types.

Well, the link was literally download/file.php?avatar=4611.png, so if I had a gif in there, of course it wouldn't load, the url is specifying png. Slight solution: I put in an extra spot to specify what image type. Problem: I have no easy way of finding out what the necessary image type for any given person is, so the work will have to be done by you - the person writing the BBCode (in other words, you go to their profile, and load the image separately and find out what the extension is, and then use that in the BBCode). Unrecoverable problem: if the user changes their avatar AND uses a different image type, the code is broken with no hope of catching it. I will look into possible ways of finding the image type through code, but this will have to do for now.

NEW FORMAT:
Code: Select all
[avatar=4611, ext=png]Doram[/avatar]


Doram




MessengerOfDreams


KABOOM


Sethster4321

EDIT2: Oh, and especially considering the slightly unfinished/wonky nature of this, I'm going to leave it as a hidden BBCode and not advertize or add it to the main thread.


Also, you can stack BBCode inside the username (and it can override the link address):
Code: Select all
[avatar=4611, ext=png][staffpm position=glomo id=4611]Doram[/staffpm][/avatar]





Oh, and awesomeface looks good now? :awe: (I'll shorten the delay on waggle, too.) |:)
EDIT: Better?

Re: What do you think about our smilies?

PostPosted: April 16th, 2015, 10:10 pm
by Kimonio
Could we implement apng maybe with the png format?

Dunno how it works, and it's 1AM, but...I'll hit it up and check it out a bit in an hour

Re: What do you think about our smilies?

PostPosted: April 17th, 2015, 4:27 pm
by Doram
To a fair extent, it is not my job. Showing APNG properly is the browser's job, not the server. The only browser that doesn't show it properly right now is IE. Some brief research shows that there is a workaround that puts it on a canvas, but I have no idea how much resources it would demand, whether it would work with the forums, or even how to install it. So, this is a candidate for the long game.

Technically, you can submit it like normal, and if the browser won't show it animated, it WILL show it as a still.



Also, I wanted to see if they would combine, and they do.




In the end, I just combined the two into another tag (yes, the avi not being centered bothered me that much). Also, it works with the new staffcolor tag:
Code: Select all
[approvedavi id=4611 ext=png][staffcolor position=glomo]Doram[/staffcolor][/approvedavi]