Indent BBC for SMF 2.1

Started by GL700Wing, September 11, 2022, 12:43:10 PM

Previous topic - Next topic

GL700Wing

Link to the mod



Indent BBC for SMF 2.1
By GL700Wing
(Based on Indent BBC mod by Hj Ahmad Rasyid Hj Ismail)




Note: For SMF 2.0 use the Indent BBC mod.

Indent BBC for SMF 2.1
- For SMF 2.1.x
- Fully hook, no file modification.

This mod will add three indent BBC buttons (ie: left side; right side; and both sides) that can used to indent text.

BSD License. Feel free to modify accordingly but keep Emanuale's name and author's link if it is in here somewhere. ;)


Release History:
1.0 - 11-Sep-22
o Initial Release

1.1 - 18-Sep-22
o Added Spanish language files - thanks to -Rock Lee-.
o Fixed bug reported by Steve.


License
Copyright (c) 2014 - 2015, Hj Ahmad Rasyid Hj Ismail, 2022 Kathy Leslie
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Life doesn't have to be perfect to be wonderful ...

TwitchisMental

Nice work :). Thank you for porting it to 2.1
My SMF Themes - Remixed Breadcrumb Tutorial -
My SMF 2.1 Themes Demo
Need a Custom SMF Theme? Send me a message.

-Rock Lee-

How good you will update it and by the way I leave you the translation into Spanish latam and es 8).


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Steve

Thank you thank you thank you!!!
Please do not PM me for support.

Steve

Hi GL ... been getting this error (always twice):

Type of error

General

Error message

Hook call: function "IndentBBC" in file /home/steve/public_html/forums could not be called.
URL of page causing the error
https://myforumurl/index.php
https://myforumurl/cron.php

Backtrace information

    #0: call_integration_hook()
    Called from /home/steve/public_html/forums/Sources/Subs.php on line 2485
    #1: parse_bbc()
    Called from /home/steve/public_html/forums/Sources/tasks/CreatePost-Notify.php on line 569
    #2: handleWatchedNotifications()
    Called from /home/steve/public_html/forums/Sources/tasks/CreatePost-Notify.php on line 270
    #3: execute()
    Called from /home/steve/public_html/forums/cron.php on line 237
    #4: perform_task()
    Called from /home/steve/public_html/forums/cron.php on line 131

What does this mean?

Edit: looking at the hooks I find that this one: integrate_bbc_buttons is not found ... is this part of your mod? If not, I'll remove it and that should clear up the problem, right?
Please do not PM me for support.

GL700Wing

@Steve I'm not seeing this on my test forum but as it has no activity there wouldn't be any notification/automated tasks to perform.

The 'integrate_bbc_buttons' is a standard hook definition and this mod uses it to display the indent buttons on the editor toolbar.

I suspect the issue may be that the file './Sources/Subs-IndentBBC.php', which is loaded by a hook, is loaded by the 'integrate_theme_include' hook (this is the same hook that loaded it in the SMF 2.0 version) and that it's probably not being loaded by automated tasks.

I think the solution is to load the file './Sources/Subs-IndentBBC.php' with the 'integrate_pre_include' hook instead - wondering if you could test this for me and let me know the outcome ...
Life doesn't have to be perfect to be wonderful ...

Steve

#6
I'm sorry GL but I wouldn't know how to do that.

I can set up an account for you if you'd like to take a look.
Please do not PM me for support.

GL700Wing

Quote from: Steve on September 13, 2022, 07:34:37 AMI'm sorry GL but I wouldn't know how to do that.

I can set up an account for you if you'd like to take a look.
Not to worry - I've created a new version with this change for you to test and I'll send you a PM with a link to it.
Life doesn't have to be perfect to be wonderful ...

Steve

Okay, I've installed it. Will let you know in a day or two if I'm still getting the errors. Thanks GL!
Please do not PM me for support.

GL700Wing

#9
Version 1.1 - 18-Sep-22
o Added Spanish language files - thanks to -Rock Lee-.
o Fixed bug reported by Steve.


Note: No need to uninstall version 1.0 as the mod installer includes code to update to the latest version.
Life doesn't have to be perfect to be wonderful ...

Steve

Please do not PM me for support.

Advertisement: