Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMF Customization Team on October 31, 2009, 06:45:18 PM

Title: [BBCode] Dotted Underline
Post by: SMF Customization Team on October 31, 2009, 06:45:18 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=2247)

[BBCode] Dotted Underline



Original Author: iKiller (https://www.simplemachines.org/community/index.php?action=profile;u=211435)
Supported Languages: English
Link To Mod (https://custom.simplemachines.org/index.php?mod=2247) | Mod Discussion (http://www.simplemachines.org/community/index.php?topic=345493.0) | Other SMF Customization Team Mods (https://custom.simplemachines.org/index.php?action=profile;u=1)



Compatibility
SMF 2.0.x, SMF 2.1.x

Introduction
This modification adds a BBCode button next to the "Underline" button on the post page. You can use the [dot] BBCode to place a dotted line underneath the selected text. Instead of being a plain underline, this makes an underline of dots.

Installation Information
The Package Manager should work in most cases, if you have problems installing please use the discussion thread as well as Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402)

Support
Please use the modification thread for support with this modification.

Changelog
Version 1.1.1 - March 20 2022
- Added support for SMF 2.1

Version 1.1 - March 20 2014
- Fixed wrong language string
- Fixed issue with hooks

Version 1.0 - October 30 2009
- Initial release


Copyright (c) 2022, Simple Machines, under BSD 3-Clause License.
All rights reserved.
Title: Re: [BBCode] Dotted Underline
Post by: Smog on November 01, 2009, 05:57:04 AM
Nice gimmick, txs  :)
Title: Re: [BBCode] Dotted Underline
Post by: Liam. on November 02, 2009, 03:58:09 PM
Thanks ^_^ Just something random that I thought might aswell be done./
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 09, 2009, 05:00:13 PM
Mod site cannot parse it for 2.0 RC2 and it won't work properly anyway due to a number of changes in the code.
Title: Re: [BBCode] Dotted Underline
Post by: C4G-TK on November 09, 2009, 06:15:22 PM
I should have looked at this before trying to install on my site.

I get the "The package you are trying to download or install is either corrupt or not compatible with this version of SMF." when I tried to install it on RC2.
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 09, 2009, 06:16:20 PM
This hasn't been made compatible with RC2 yet as far as I could tell when I looked.

Even if the package-info.xml is updated to include RC2, it won't actually work properly anyway; the image will be broken in the editor due to changes in RC2.
Title: Re: [BBCode] Dotted Underline
Post by: C4G-TK on November 09, 2009, 06:18:26 PM
I only tried to install because it said Compatible With: 2.0 RC1.2, 2.0 RC2 on the mod site
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 09, 2009, 06:21:26 PM
As far as I could tell it hasn't been tested on RC2, it won't work properly unless something seriously changed between Charter and Public releases of RC2.
Title: Re: [BBCode] Dotted Underline
Post by: 7s-1k on November 15, 2009, 07:17:05 PM
For SMF 2.0 RC2

in sourcedir/Subs.php find:

array(
'tag' => 'u',
'before' => '<span class="bbc_u">',
'after' => '</span>',



after add:

         array(
            'tag' => 'dot',
            'before' => '<span style="border-bottom:1px dotted;">',
            'after' => '</span>',
         ),



in posts use [dot] [/dot]
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 15, 2009, 07:18:19 PM
The Subs edit doesn't change between 2.0 RC1.2 and 2.0 RC2. It's only the Subs-Editor.php edit that should need to change.

iKorp, please either update this mod to be compatible with 2.0 RC2 properly, or I can remove the 2.0 RC2 compatibility tag from it, since right now it isn't compatible.
Title: Re: [BBCode] Dotted Underline
Post by: 7s-1k on November 15, 2009, 07:30:40 PM
in Subs-Editor.php find:

array(
'image' => 'underline',
'code' => 'u',
'before' => '[u]',
'after' => '[/u]',
'description' => $txt['underline']
),


after add:

array(
'image' => 'dot',
'code' => 'd',
'before' => '[dot]',
'after' => '[/dot]',
'description' => $txt['dot_desc']
),


upload dot.gif to /Themes/default/images/bbc/
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 15, 2009, 07:33:36 PM
Thank you 7s-1k.

iKorp, please roll these changes in as soon as possible (I note I already advised you a week ago that you needed to update your mods) otherwise unmark this mod as 2.0 RC2 compatible.
Title: Re: [BBCode] Dotted Underline
Post by: 7s-1k on November 15, 2009, 07:36:17 PM
I am glad that I could help u :)
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 15, 2009, 07:48:08 PM
It's more iKorp that this helps. I wouldn't mind but I already gave him two mods that have these changes applied.
Title: Re: [BBCode] Dotted Underline
Post by: flamechica on November 19, 2009, 05:23:33 AM
I take it iKorp still hasn't fixed this as I got the not compatible error too....which is frustrating cuz it says on the download page that it is compatible with RC2
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 19, 2009, 10:36:39 AM
It isn't, as I pointed out over a week ago.
Title: Re: [BBCode] Dotted Underline
Post by: Eclipse16V on November 24, 2009, 07:12:07 AM
Nice Mod

Works fine in 2.0 RC2
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on November 24, 2009, 07:19:11 AM
Eclipse, I'm guessing you did the manual edits mentioned above? The mod won't work properly without those.
Title: Re: [BBCode] Dotted Underline
Post by: Eclipse16V on November 24, 2009, 09:21:48 AM
Yes I make it manual.
Title: Re: [BBCode] Dotted Underline
Post by: Liam. on December 06, 2009, 08:56:31 AM
This has now been updated to work with SMF 2.0 RC2.
Title: Re: [BBCode] Dotted Underline
Post by: C4G-TK on December 13, 2009, 04:11:44 AM
I don't think you updated it correctly.  It still gives a TEST FAILED for the Subs-Editor.php edit for RC2.  I looked at the parse for it and it still shows the wrong thing to look for as well.  Is this going to be updated to work correctly?
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on December 13, 2009, 04:24:04 AM
If you grab the 2RC2 package it looks right at a glance.
Title: Re: [BBCode] Dotted Underline
Post by: C4G-TK on December 13, 2009, 04:34:33 AM
I'm obviously not doing something right then.  I can't find:

array(
'image' => 'dot',
'code' => 'dot',
'before' => '[dot]',
'after' => '[/dot]',
'description' => $txt['dot']
),


in my Subs-Editor.php file in RC2.  In the parse of it for the RC2 package, it says to find that piece of code. ????
Title: Re: [BBCode] Dotted Underline
Post by: Arantor on December 13, 2009, 04:38:57 AM
Ah. I didn't actually look at what it said - just literally glanced at it to ensure it was 2.0 RC2 format not the previous one-line format.

/me would remind all mod authors that packages should be tested on a fresh RC2 installation prior to updating their mod on this site.
Title: Re: [BBCode] Dotted Underline
Post by: C4G-TK on December 13, 2009, 04:51:19 AM
Overline is his other mod.  Somehow, that code is in this mod according to the parser which it wouldn't be.  I think he may have saved the file and mixed up the packages after working on the two mods or something.
Title: Re: [BBCode] Dotted Underline
Post by: Liam. on December 13, 2009, 06:29:18 AM
Ahh, I may have gotten mixed up. Sorry, I'll fix it ASAP!
Title: Re: [BBCode] Dotted Underline
Post by: Liam. on December 13, 2009, 06:59:34 AM
Fixed and tested. It should all work now.
Title: Re: [BBCode] Dotted Underline
Post by: C4G-TK on December 13, 2009, 02:52:48 PM
THANK YOU!!!!

It now install and works perfectly!
Title: Re: [BBCode] Dotted Underline
Post by: Liam. on December 13, 2009, 03:42:20 PM
No problem! I guess I should've checked it before uploading, I checked the others but I knew I missed one ^_^
Thanks for using the Dotted Underline mod!
Title: Re: [BBCode] Dotted Underline
Post by: dougiefresh on June 15, 2011, 03:30:24 PM
Thank you for the wonderful mod!  I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods.  This mod installed without issues and using 2.0 RC5 emulation.  Hope this info helps someone!
Title: Re: [BBCode] Dotted Underline
Post by: Rain Forest on September 19, 2011, 05:45:37 PM
It's not working for me on 2.0 Final
Title: Re: [BBCode] Dotted Underline
Post by: Suki on September 19, 2011, 05:53:24 PM
giovannie_1 please define "not working"  do you installed it properly? does it gave you errors on install?  what happen when you try to use it?

you must provide more info so we can help you, otherwise it is extremely difficult to assist you.
Title: Re: [BBCode] Dotted Underline
Post by: Rain Forest on September 19, 2011, 06:01:56 PM
Hi Miss All Sunday,

For 2.0 Final the manual says:

in: /Themes/default/languages/Modifications.english.php

find
?>
add before
$txt['dot'] = 'Dotted Underline';

in ./Themes/default/languages/Modifications.english-utf8.php

find
[code?>[/code]
add before
$txt['blink'] = 'Dotted Underline';

Code
add_remove_hooks.php

This file should be able to execute standalone.

File Operations
Move the included file "Subs-Dottedunderlinebbc.php" to "./Sources".
Move the included file "dot.gif" to "./Themes/default/images/bbc".

Just that...

But now it works.

I added manually:

in Sources/Subs.php
afterarray(
'tag' => 'u',
'before' => '<span class="bbc_u">',
'after' => '</span>',
         ),

add after
         array(
            'tag' => 'dot',
            'before' => '<span style="border-bottom:1px dotted;">',
            'after' => '</span>',
         ),


and in Sources/Subs-Editor.php
find
array(
'image' => 'underline',
'code' => 'u',
'before' => '[u]',
'after' => '[/u]',
'description' => $txt['underline']
),

add after
array(
'image' => 'dot',
'code' => 'd',
'before' => '[dot]',
'after' => '[/dot]',
'description' => $txt['dot_desc']
),

Title: Re: [BBCode] Dotted Underline
Post by: Suki on September 19, 2011, 06:05:29 PM
This mod uses hooks, which means theres no need to edit your  Sources/Subs.php.

You still do not say if you install it with the packager manager or you installed it manually.
Title: Re: [BBCode] Dotted Underline
Post by: Rain Forest on September 19, 2011, 06:09:46 PM
Quote from: Miss All Sunday on September 19, 2011, 06:05:29 PM
This mod uses hooks, which means theres no need to edit your  Sources/Subs.php.

You still do not say if you install it with the packager manager or you installed it manually.

I installed it first with the packager manager.

But after that the dotted where not visible. After my manual editting it was visible.
Title: Re: [BBCode] Dotted Underline
Post by: Suki on September 19, 2011, 06:11:56 PM
so, is the mod working or do you still need assistant?
Title: Re: [BBCode] Dotted Underline
Post by: Rain Forest on September 19, 2011, 06:14:17 PM
Quote from: Miss All Sunday on September 19, 2011, 06:11:56 PM
so, is the mod working or do you still need assistant?

Quote from: giovannie_1 on September 19, 2011, 06:01:56 PM

[...]
But now it works.

I added manually.. [...]

:)
Title: Re: [BBCode] Dotted Underline
Post by: Apllicmz on December 07, 2011, 10:41:53 PM
Good Work
When Update dont forget portuguese file

Title: Re: [BBCode] Dotted Underline
Post by: Shambles on March 20, 2014, 07:11:11 AM
Just a FYI...

In the package file english.xml,

Code (Find) Select
         <add><![CDATA[$txt['blink'] = 'Dotted Underline';]]></add>

Code (Amend To Read) Select
         <add><![CDATA[$txt['dot'] = 'Dotted Underline';]]></add>
Title: Re: [BBCode] Dotted Underline
Post by: margarett on March 20, 2014, 09:13:44 AM
Thanks.

The package was fixed. Not only that wrong string, but also an issue with hooks that prevent the MOD from working as expected (as indicated by Soft Drink above)
Title: Re: [BBCode] Dotted Underline
Post by: Shambles on March 20, 2014, 09:39:39 AM
Yeah, the hook call-by-reference problem was why I revisited my installation of this mod :)
Title: Re: [BBCode] Dotted Underline
Post by: Shambles on March 20, 2014, 09:46:00 AM
I'm sure it's purely documentary, but the ID strings in english.xml are also a tad misleading ;)


<name>[BBCode] Blink</name>
<id>iKorp:Blink</id>
Title: Re: [BBCode] Dotted Underline
Post by: margarett on March 20, 2014, 10:02:11 AM
That was how the original author wrote it (based in some other MOD, of course) and it was never fixed :P

I'll correct it in a minute. Thanks.
Title: Re: [BBCode] Dotted Underline
Post by: Diego Andrés on March 21, 2022, 03:30:30 PM
updated for smf 2.1
Title: Re: [BBCode] Dotted Underline
Post by: Shades. on March 21, 2022, 04:52:07 PM
Quote from: Diego Andrés on March 21, 2022, 03:30:30 PMupdated for smf 2.1
SMF 2.1.1
[BBCode] Dotted Underline v1.1.1

Getting this error when viewing a post with the dotted line:

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: dot
File
/home2/*****/public_html/*****/Sources/Subs-Dottedunderlinebbc.php
Line
45
URL of page causing the error
https://*****.com/index.php?topic=2.msg4;boardseen

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/*****/Sources/Subs-Dottedunderlinebbc.php on line 45
#1: dottedunderline_bbc_add_button()
Called from /home2/*****/public_html/*****/Sources/Subs.php on line 5751
#2: call_integration_hook()
Called from /home2/*****/public_html/*****/Sources/Subs-Editor.php on line 1764
#3: create_control_richedit()
Called from /home2/*****/public_html/*****/Sources/Display.php on line 1256
#4: Display()
Called from /home2/*****/public_html/*****/index.php on line 187
Title: Re: [BBCode] Dotted Underline
Post by: Diego Andrés on March 21, 2022, 05:35:20 PM
Can't reproduce it, make sure the text string was added to your Modifications.english.php file
Title: Re: [BBCode] Dotted Underline
Post by: Shades. on March 21, 2022, 06:36:11 PM
Quote from: Diego Andrés on March 21, 2022, 05:35:20 PMCan't reproduce it, make sure the text string was added to your Modifications.english.php file
I had to go in and manually fix it because for some reason it added on the same line behind another mod text string that wasn't removed after uninstall.

It was at the end of the file like this:

//END SMF Classifieds Text Strings            $txt['dot'] = 'Dotted Underline';
?>

 ::) Works fine now, Thanks! 8)