Custom BBCodes Manager

Started by dougiefresh, September 14, 2014, 03:10:14 PM

Previous topic - Next topic

aegersz

oh, i just remembered, attached is the "hover" gif for the editor:
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

@dougiefresh, a tiny bug causing many SMF "invalid index for vfunc" & "foreach() ..." errors as the field $tag was in fact empty on occasion ...
 
in Subs-CustomBBCodes.php, remove the "!" symbol in if (!empty($tag['vfunc'])) 

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

#222
another bug in Sources/Subs-CustomBBCodes.php that caused me 12 errors at a time because $data is an array.

I disabled the code as i didn't really see the need for it but you may want it and be able to come up with a better solution of course.

I needed to clear the file cache (Admin > Maintenance/Forum Maintenance > Routine > Empty the file cache) after the patch.

locate:
                        if (!empty($row['accept_urls']))
                                $row['vfunc'][] = 'CustomBBCodes_URL';


change to:
// disabled bug fix     if (!empty($row['accept_urls']))
// disabled bug fix             $row['vfunc'][] = 'CustomBBCodes_URL';
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Uploaded v2.8 - October 11th, 2018
o No functionality change.
o Updated documentation to point to new website.

gorbi

How to add buttons to an additional theme?

-Rock Lee-

Quote from: gorbi on June 13, 2020, 07:11:16 AM
How to add buttons to an additional theme?

You have to add the modifications manually in the custom theme you are using. You can do that by looking at the parse where it explains that it should be modified.


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

wernborg

Hi,

I use the mod to insert a button for creating the audio-tag.

I'm using the parsed_content for the button. Like this:

<br/><audio controls>
  <source src="{content}" type="audio/mpeg">
Your browser does not support the audio element.
</audio></br>


Unfortunatly it is generating broken code. This is what it looks like client-side:
<audio controls=""> &nbsp;
<source src="<a href=" https:="" www.soundhelix.com="" examples="" mp3="" soundhelix-song-1.mp3"="" class="bbc_link" target="_blank">https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3" type="audio/mpeg"&gt;Your browser does not support the audio element.</audio>



Any idea on how I should write the code to get it to work?


wernborg

I found out it interfears with the automatically create links-setting.

Bug or feature?  :D

aegersz

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

see my previous post for my audio settings. The Custom BBCodes Manager, wonderful as it is, is buggy so I have taken a lot of time to find what fits best, not what I think it should be.

Quote from: wernborg on March 21, 2021, 10:28:08 AM
Hi,

I use the mod to insert a button for creating the audio-tag.

I'm using the parsed_content for the button. Like this:

<br/><audio controls>
  <source src="{content}" type="audio/mpeg">
Your browser does not support the audio element.
</audio></br>


Unfortunatly it is generating broken code. This is what it looks like client-side:
<audio controls=""> &nbsp;
<source src="<a href=" https:="" www.soundhelix.com="" examples="" mp3="" soundhelix-song-1.mp3"="" class="bbc_link" target="_blank">https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3" type="audio/mpeg"&gt;Your browser does not support the audio element.</audio>



Any idea on how I should write the code to get it to work?

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dodos26

Php execution doesn't work here?

<!DOCTYPE html>
<html>
<body>

<?php
$txt 
"{content}";
echo 
"I love $txt!";
?>


</body>
</html>

Steve

Anybody willing (if they're allowed) to update this for 2.1.2?
DO NOT pm me for support!

Louis

The BSD-2-clause license states
QuoteRedistribution and use in source and binary forms, with or without modification, are permitted[...]
so here's my take on it - only roughly tested on SMF 2.1.3 so YMMV...

(If only SMF would provide a nice "offtopic" BBC button...)
It is your mind that creates this world (Buddha)

Louis

Oops. Some leftover typos in line 336 of Subs-CustomBBCodesAdmin.php...
updated package is attached
It is your mind that creates this world (Buddha)

gorbi

@Ĺouis do this mod work with SMF2.0?

Louis

Nope, I removed all 2.0 code in my package to make it fully work with 2.1.x

For 2.0 compatibility use the original version 2.8 from the mod repository
It is your mind that creates this world (Buddha)

Louis

Would anybody know how to put the custom BBC buttons into a separate group?
Something like the Indent BBC for SMF 2.1 mod would be nice, but I don't get my head around that right now....
It is your mind that creates this world (Buddha)

dodos26

In subs-edit for example  (for group)
$context['bbc_tags'][] = array(
            array(
                'image' => 'bold',
                'code' => 'b',
                'before' => '[b]',
                'after' => '[/b]',
                'description' => $txt['bold'],
            ),
            array(
                'image' => 'italicize',
                'code' => 'i',
                'before' => '[i]',
                'after' => '[/i]',
                'description' => $txt['italic'],
            ),
        );

ADRBossman

This mod works a treat for me in regard to displaying video files.  What I would like to do, though, is simplify the BBCode so a user doesn't receive a message regarding an empty message body if they don't enter some content between the embed tags.  This is what the BBCode button creates at the moment ...

[embed=Video Iframe URL][/embed]
The above will cause an error message, as above, unless some content is entered before the [/embed] tag.  What I will like to create is this kind of BBCode ...

[embed]Video Iframe URL[/embed]
I am using iframe html to create the necessary video display.  Anyone know how to go about this?







Steve

DO NOT pm me for support!

Advertisement: