Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: aegersz on April 28, 2021, 11:57:47 PM

Title: Better Blink BBC
Post by: aegersz on April 28, 2021, 11:57:47 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4283)

Better Blink BBC
by aegersz



Introduction

This version uses hooks, inline css and allows you to control the blink rate (per second(s)); it should work on all browsers.

It has been tested and works for on 2.0.18 and 2.1 RC4.

The SMF 2.1 version is v1.32

It fades and blinks at a 2 second rate by default.

Usage


[blink]Text to blink[/blink] or [blink=5]Text to blink every 5 seconds[/blink]

Installation

Remember to uninstall any other blink BBC mods or disable any added via the Custom BBCodes Manager mod if you use it.

Credits

Note: the "blink.gif" button image is borrowed from the defunct blinkbbc_1-0 mod
and is renamed to "blink.png" for SMF 2.1 compatibility (it won't blink). However, the gif image is still valid for SMF 2.0.* and will blink.

Changelog

v1.32 (2014-04-28)
Change blink rate to "n" via "Blink=n" option

v1.31 (2021-05-03)
Use span instead of div to allow mixed usage on a single line and restructure the install/uninstall

v1.30 (2021-04-27)
For SMF 2.1 only (use the alternate zip file)




v1.24 (2014-04-28)
Change blink rate to "n" via "Blink=n" option

v1.23 (2021-05-03)
Use span instead of div to allow mixed usage on a single line

v1.22 (2021-04-27)
Implemented more of the customization's team's advice. For SMF 2.0.* but can be installed
in SMF 2.1's 2.0.14 Emulation mode

v1.21 (2021-04-27)
Prevent errors in validation as per customization's team's advice

v1.2 (2021-04-20
Use hooks instead

v1.0 (2021-04-20)
* Initial release
Title: Re: Better Blink BBC
Post by: pocttopus on April 29, 2021, 07:44:15 AM
After uninstalling the mod there are some errors:

Type of error: General
Hook call: function "BBC_Blink2::bbc_button" in file /home/xxx/public_html/Sources/BBC-Blink.php could not be called.


Type of error: General
Hook call: The file at path: /home/xxx/public_html/Sources/$sourcedir/BBC-Blink.php could not be loaded.


How can I fix them?
Forum version 2.1RC3
Mod version 1.30
Title: Re: Better Blink BBC
Post by: Aleksi "Lex" Kilpinen on April 29, 2021, 07:46:47 AM
That looks like leftover hooks that should get removed on uninstall.
Title: Re: Better Blink BBC
Post by: pocttopus on April 29, 2021, 12:35:41 PM
How can I remove them?  ??? :-\
Title: Re: Better Blink BBC
Post by: aegersz on April 29, 2021, 09:29:02 PM
Admin > Maintenance > Integration Hooks.

You will see them in red.

This is not a mod problem I believe because it only happened on an old version of RC3 - it didn't happen on the latest version of the nightly download.
Title: Re: Better Blink BBC
Post by: pocttopus on April 30, 2021, 05:09:28 AM
Thanks, it solves the issue.  :)
Title: Re: Better Blink BBC
Post by: Steve on April 30, 2021, 09:49:09 AM
Now that it's been approved, a couple of questions ...

Can the blink rate be easily changed?

This bbcode has to be used on a line by itself. Any way to change that? e.g. 'blinking text' and 'more text' all on the same line.
Title: Re: Better Blink BBC
Post by: aegersz on April 30, 2021, 05:35:46 PM
The blinking rate is hard coded.

I will look into trying to get it on the same line but it will take me some time to look into it.

Apologies, I didn't test multiple blinks on the same line.
Title: Re: Better Blink BBC
Post by: Steve on April 30, 2021, 08:01:14 PM
No worries. Not in any hurry. And I wasn't asking about multiple blinks on the same line, just more text allowed on the same line as any blinked text. :)
Title: Re: Better Blink BBC
Post by: aegersz on May 02, 2021, 09:04:59 PM
v1.31 (2021-05-03)
Use span instead of div to allow mixed usage on a single line and restructure the install/uninstall

v1.23 (2021-05-03)
Use span instead of div to allow mixed usage on a single line




I have addressed your issues and there are now two new versions so please uninstall the old version and then reinstall the new version.
Title: Re: Better Blink BBC
Post by: aegersz on May 03, 2021, 12:09:53 AM
Steve, try this new version that allows you to specify the blink rate:

[blink=1]1 second blink rate[/blink]) ... and let me know if you're happy with it.

Quote from: Steve on April 30, 2021, 09:49:09 AM
Now that it's been approved, a couple of questions ...

Can the blink rate be easily changed?

This bbcode has to be used on a line by itself. Any way to change that? e.g. 'blinking text' and 'more text' all on the same line.

Title: Re: Better Blink BBC
Post by: aegersz on May 03, 2021, 01:18:10 AM
Quote from: pocttopus on April 29, 2021, 07:44:15 AM
After uninstalling the mod there are some errors:

Type of error: General
Hook call: function "BBC_Blink2::bbc_button" in file /home/xxx/public_html/Sources/BBC-Blink.php could not be called.


Type of error: General
Hook call: The file at path: /home/xxx/public_html/Sources/$sourcedir/BBC-Blink.php could not be loaded.


How can I fix them?
Forum version 2.1RC3
Mod version 1.30

This should be fixed after the install/uninstall was restructured. Check/remove the 2 hooks via:

Admin > Maintenance > Forum Maintenance > Integration Hooks
Title: Re: Better Blink BBC
Post by: aegersz on May 03, 2021, 02:22:33 AM
Most recent updated versions:

v1.32 (2014-04-28)
Change blink rate to "n" via "Blink=n" option

v1.24 (2014-04-28)
Change blink rate to "n" via "Blink=n" option
Title: Re: Better Blink BBC
Post by: Steve on May 03, 2021, 06:40:53 AM
Works beautifully!

Many thanks! :D
Title: Re: Better Blink BBC
Post by: aegersz on May 03, 2021, 06:43:04 AM
You're most welcome - it makes me feel good that someone is interested in blinking BBC (!  :))
Title: Re: Better Blink BBC
Post by: FrizzleFried on March 01, 2022, 09:42:25 AM
Hello... question,  is the button text supposed to be this big/ugly (no offense)?


If not.. how do I rectify that situation?  If so... how do I rectify that situation?  ;)


ScreenHunter 262.jpg
Title: Re: Better Blink BBC
Post by: FrizzleFried on March 01, 2022, 10:45:32 AM
Unfortunately,  I am also now getting this error... (SMF 2.1.1):


3

 Today at 08:43:17 AM
 Iggy
 https://www.xxxxxxxx.com/cron.php
 /home/ahaforum/public_html/Sources/BBC-Blink.php (Line 17)  Backtrace information

Type of error: Cron
Error messageSelect
8: Undefined index: html_headers
Title: Re: Better Blink BBC
Post by: FrizzleFried on March 01, 2022, 10:53:07 AM
Son of a B....

After UNINSTALLING successfully this mod has left something behind (i suspect that stupid ugly BBC button or some parts of it) and it's filling my error log up.

Where do i go to fix this problem manually?

Someone needs to but a block on this MOD for 2.1.1...


osver
 67.170.23.99
 5b355b68a40d5ab5e12b7bc2fbd80117
 https://www.xxxxxx.com/index.php?topic=34909.msg839022;topicseen  Backtrace information

Type of error: General
Error messageSelect
Hook call: function "BBC_Blink_Button::bbc_button" in file /home/ahaforum/public_html/Sources/BBC-Blink.php could not be called.

Title: Re: Better Blink BBC
Post by: FrizzleFried on March 01, 2022, 12:00:04 PM
Nevermind... my apologies... i should READ THE DAMN THREAD FIRST.  I am guessing I just need to remove the integration hook.
Title: Re: Better Blink BBC
Post by: Diego Andrés on March 01, 2022, 12:02:45 PM
That's part of SMF, you shouldn't be commenting that...
If your issue was fixed removing that line, it means that the mod left some integration hooks behind even after uninstalling.
You should go into Admin > Maintenance > Integration hooks. Then attempt to locate the one hook from this mod causing issues, and disable/delete it.


You beat me to it  :laugh:

Quote from: FrizzleFried on March 01, 2022, 12:00:04 PMNevermind... my apologies... i should READ THE DAMN THREAD FIRST.  I am guessing I just need to remove the integration hook.

Yes.

I'm not exactly sure what the issue is on this mod, might try it out later.
Title: Re: Better Blink BBC
Post by: Steve on March 01, 2022, 03:19:23 PM
I hope you do, it won't work on 2.0.19 either without errors.
Title: Re: Better Blink BBC
Post by: Kindred on March 01, 2022, 05:11:04 PM
As you figured out, that is the INCORRECT thing to do.  You have removed core code that is supposed to be there.
That code is calling the hook...  which means that the mod did not uninstall the hooks in the database.
you need to remove the hook from the database, not the code.

smf_themes table search for integrate_bbc_buttons


however, I tested on my 2.1 site.  The mod correctly uninstalled and removed the button for me.

Alternative button included here
Title: Re: Better Blink BBC
Post by: Diego Andrés on March 01, 2022, 05:13:22 PM
User rectified that in other post and the table is smf_settings :P
But it DOES have something strange with one of the hooks not being removed, I could definitely reproduce that but couldn't figure out why.
Title: Re: Better Blink BBC
Post by: Kindred on March 01, 2022, 05:16:31 PM
oops... you're right.

1- settings table.
2- it removed from integrate_bbc_codes but not from integrate_bbc_buttons...  however, the button was removed from my site because the button image file got deleted correctly.

wierd.