News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Stupid bouncy BBC

Started by Antechinus, March 03, 2013, 07:30:33 PM

Previous topic - Next topic

Steve

Please do not PM me for support.

Antechinus

Lol. Hey Steve: get the team to enable bouncy tags here. Ideal for support topics. Great way to showcase the flexibility of SMF 2.1. :D :D :D :D

Quote from: FrizzleFried on May 01, 2022, 10:24:26 AMI have a real stupid last request if at all possible.  If it's difficult... at all... ignore my stupidity...
The real problem is that all these things are stupidly easy. :D

QuoteRight now I have like a half dozen images that would work great with the move both command... EXCEPT they are all facing left ... which means they are all going backwards.  :)
Yes, this had occurred to me too...
We shall see. :D

FrizzleFried

After doing some testing... at this point... I am thinking you may want to rename the mod...

What was stupid has become pretty damn kickass.

I propose Not-Stupid Bouncy BBC or just simply Kickass Bouncy BBC.

Antechinus

Yes the multiple marquees are actually useful for news tickers, etc. Not sure if I really want to rename it though. I do like the current name, and it still contains plenty of stupid. :D

Ok, the only tricky part about your request is what to call the option. An obvious choice is both_move, but OTOH I'm half inclined to name it evom_htob just for laughs. :P

ETA: I suppose I could get even more evil with hover options too...

Steve

Quote from: Antechinus on May 01, 2022, 04:25:00 PMHey Steve: get the team to enable bouncy tags here. Ideal for support topics. Great way to showcase the flexibility of SMF 2.1.
Ha! I had to walk barefoot through broken glass and flaming embers just to get a simple rule change ...  :P

Quote from: Antechinus on May 01, 2022, 04:44:46 PMI do like the current name
+1
Please do not PM me for support.

Antechinus

#85
Ok, I just whipped up the vertical marquees, and the both_move option.

[bouncy bounce=both_move]Slides to left-right-left... ad infinitum[/bouncy]
Vertical marquees are much the same as horizontal.
[bouncy bounce=move_rise]Slides to top[/bouncy]
[bouncy bounce=move_fall]Slides to bottom[/bouncy]
[bouncy bounce=move_vert]Slides to bottom-top-bottom, ad infinitum[/bouncy]

Do note that for the vertical marquees it will be necessary to include the height parameter, to ensure correct behaviour with Chrome and any browsers based on Chrome.

Vertical marquees are set to centre-align any content. You can also wrap vertical marquees in float tags, to place them at the left or right of other content (floats don't really work with the other animations, unless you get really tricky).

Also, vertical marquees have the top and bottom padding overridden in the CSS, so that you can (if you wish) add side padding without screwing the animation. ;)

Now, before I go packaging this beast up again: are we quite sure this is enough?  :P

ETA: Ok, I did the obvious. Added a time parameter to adjust animation-duration.

FrizzleFried

Hahaha... is it even possible to do anything else with text or smiley?!?

:D

Antechinus

It is possible, but I am beginning t think it really is not advisable. There has to be a limit to this mod somewhere. I think anything past this point should be custom insanity by the site admin. ;)

Anyway, the timing function will accept any values from 1s to 99.9s (ie: integer + one optional decimal place). Timing values < 1 second are not accepted, because that really does get stupid.


Antechinus

Ok, thought of one more refinement.

Since the array of bounce options was getting rather long anyway, I've changed the logic to match strings of up to nine lowercase letters. These can be in either a single group, or in two groups separated by an underscore. This means there is no longer any need to define custom animation classes in Subs-Stupid-Bouncy.php. If you want to add extra animations of your own, you can decide on your own class names and add them to any CSS file that is called on that page.

IOW, if you want two new animations called lollipop and deranged_bandicoot you can write your own declarations like this:
.lollipop {whatever: ****}
.lollipop .parrot_cage {whatever: ****}
.lollipop .parrot {whatever: ****}
.deranged_bandicoot {whatever: ****}
.deranged_bandicoot .parrot_cage {whatever: ****}
.deranged_bandicoot .parrot {whatever: ****}

If you enter an incorrect animation name, it will just be ignored and the tag will fall back to the default bouncy animation. :)

FrizzleFried

Holy smokes... can it get ANY stupider?   I just can't imagine!!


You sir,  are just stupid awesome and I applaud your foray in to the realm of stupidity!


My users ... and I ... thank you!


Antechinus

#90
Ok, version 2.1.5 is locked and loaded.

ETA: Lol. Did a CSS whoopsie in 2.1.5. Try 2.1.6 instead. That one works. :D

One slight change from my previous post: on reflection I decided to only make the time option accept integers. This is to keep things simple, and keep it consistent with other options. So, no fractions of a second for animation times. It's whole seconds only, which TBH I think is perfectly adequate for this use case.

If anyone really wants fractions of a second in animation times there are three ways you can do it:
1/ Write your own regex for Subs-Stupid-Bouncy.php, or...
2/ Edit the default animation times in stupid_bouncy_***.css, or...
3/ Use custom CSS in another theme file, to override the default animation times.

ETA: Oh yeah, the CSS file name has changed. I'm now putting the version number on the end of the CSS file name, so that a hard refresh will not be necessary when updating the mod. This is version 2.1.5, and the _bae suffix is the 2nd, 1st and 5th letters of the alphabet. Obviously if there is a next version, the suffix will be _baf. :)

PS: And, obviously, 2.1.6 does indeed have the _baf suffix. :P

Antechinus

Ok, whatever: 2.1.7 is up. I just thought of a couple of things I really should have included in 2.1.6, namely a couple of extra CSS options.

So... you can now have a non-alternating left-to-right marquee (ie: travels left-to-right only) or a non-alternating right-to-left marquee, that will both accept gifs that are animated to go in the opposite direction by default.

So if you have a gif of a running dog, that runs from left to right by default, and you want to put it in a marquee that only goes right to left, you can use bounce=move_right_alt to flip a right-moving gif the other way. If your dog naturally runs from right to left, and you want him only running left to right, you can use bounce=move_left_alt.

I also added a bounce=zomg_alt to reverse the direction of the existing bounce=zomg, just because it was so trivially easy so might as well have it.

And class names can now accept up to three groups of nine letters each, just to make some of the class names a bit clearer.

And yes, this one has a _bag suffix on the CSS file, so no hard refresh needed. ;)

I think I really am over this thing for a while. It comes with 16 animations coded in by default.

Time to write your own animations and see what you can come up with. :D

Antechinus

I'll package up a 2.1.8 sometime soon, mainly so the mod can use loadCSSFile when running on SMF 2.1.x.

Other changes planned are:
1/ Fix a typo or two in the readme (d'oh).
2/ Add the ability to create custom hover classes, just by editing the CSS.

The latter will similar to the way custom bounce classes can be done: regex that will accept groups of 1 to 9 letters.

I'll let the current version percolate for the rest of the week. If anyone has any extra ideas that are not completely insane, I am prepared to consider them. :)

FrizzleFried

FWIW... I will be installing Bugo's Message Bookmark mod simply to be able to easily refer to this mods instructions...

:D

You sir... are stupid genius.  :)

Antechinus

Easy way to have a reference is to simply copy the readme file content to a forum post. It's all written in standard post BBC, so will keep the same formatting as you see in admin when installing the mod. I actually wrote the readme on my local test site. :)

The OP of this thread (which is the same as the mod description page on the Mods Site here) is a direct copy/paste from the readme. It contains all the information you need for a reference. ;)

Steve

Well, slap my a** and call me Sally! You just keep outdoing yourself!

My personal belief is that it's getting to the point where one can't possibly remember all the different things this mod does.  :P

Like @FrizzleFried, I'm bookmarking the instructions page.  ;D
Please do not PM me for support.

Antechinus

#96
Quote from: Steve on May 02, 2022, 09:21:23 AMMy personal belief is that it's getting to the point where one can't possibly remember all the different things this mod does.  :P
Well when I included basic sliding marquees, which are sane and useful for news and notices, I started to feel the mod was getting a bit too sensible . So I thought "Hey, do the job properly. Bring back the stupid!"

The idea of having marquees that would handle a gif that was in the opposite direction by default was due to a daft gif I have had for ages. If you set up two consecutive bouncy tags, with the dogs gif running in opposite directions, it's just too hilarious. Check the attached gif, and try it. ;)

ETA: The two bounce settings you want for this trick are move_both and move_both alt. Drop a dog gif in each one and crack up laughing.

Or even three, like this...
[bouncy bounce=move_both][img]http://127.0.0.1/SMF_21x/wooferz.gif[/img][img]http://127.0.0.1/SMF_21x/wooferz.gif[/img]
[img]http://127.0.0.1/SMF_21x/wooferz.gif[/img][/bouncy]
[bouncy bounce=move_both_alt][img]http://127.0.0.1/SMF_21x/wooferz.gif[/img][img]http://127.0.0.1/SMF_21x/wooferz.gif[/img]
[img]http://127.0.0.1/SMF_21x/wooferz.gif[/img][/bouncy]

Steve

Please do not PM me for support.

FrizzleFried

Quote from: Antechinus on May 02, 2022, 09:13:17 AMEasy way to have a reference is to simply copy the readme file content to a forum post. It's all written in standard post BBC, so will keep the same formatting as you see in admin when installing the mod. I actually wrote the readme on my local test site. :)

The OP of this thread (which is the same as the mod description page on the Mods Site here) is a direct copy/paste from the readme. It contains all the information you need for a reference. ;)

Exactly... and then BOOKMARK that post for easy reference.

:)


Antechinus

I just thought: it would be easy for me to drop anchors into the readme, and make a small clickable table of contents. That will work as a forum post too, as long as the anchor ID's aren't duplicated on that page.

Advertisement: