News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Custom BBCodes Manager

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

Previous topic - Next topic

seremoni

Quote from: dougiefresh on April 27, 2017, 05:34:05 PM
UPDATE:  I'm sorry I've put off dealing with this mod for so long.  I've been trying to deal with life issues recently and haven't felt like trying to tackle this problematic mod....

I'm starting a top-to-bottom rewrite of this mod.  I will be taking a completely different approach to defining the custom bbcode tags, mandating a completely new table format for version 3.0.  It will be completely incompatible with version 1.x and 2.x tables, and you probably will have to redefine all of your custom bbcode tags. The database table for version 3.0 will be more flexible, so that further additions can be made without messing with the database table format.

Please update.

dougiefresh

Gee, let me just whip out my magic wand and BAM, omg, it's fixed.....  NOT!  :o

seremoni


dougiefresh

UPDATE: I apologize for the unacceptably long wait.....  I've finally gotten through my massive list of mods, fixing everything possible as quickly as possible.  I'm going to start looking at this mod in the next few days (today is Sunday for me at 10:50pm - probably Tuesday, not Monday).  Please note that this won't be a simple fix, as I don't understand why the database isn't being created (or a hundred other different complaints --- sarcasm....  gotta love it!)

@seremoni:  I'm sorry for taking your comment the wrong way.  Was in a bad mood that day....   O:)

dougiefresh

Uploaded v2.4 - August 7th, 2017
o Fixed edit_db.php so that database creation can occur.




@Everybody:  This update SHOULD fix the blank screen and/or error that people are seeing after installing this mod.  By removing the error (redeclaration of a function), the database will be created and the mod will function without breaking the forum.

Future updates will address other issues as I can find them, but I felt it was important to release an update that didn't break forums as soon as possible.....

Bugo

It seems you forgot to add some columns:

Unknown column 'last_update' in 'field list'
File: Subs-CustomBBCodesAdmin.php
Line: 225

Unknown column 'accept_urls' in 'field list'
File: Subs-CustomBBCodesAdmin.php
Line: 225


These errors occur on creating new bbcode tags.

dougiefresh

Uploaded v2.5 - August 9th, 2017
o Readded missing database fields removed by version 2.4 update.




@Bugo:  Thanks for the report!  It's been fixed....

drewactual

i don't know how you guys do what you do, but i can certainly tell you it's appreciated.  hugely appreciated.  thank you, @dougiefresh ...

this mod has my undivided attention.  i haven't implemented it but may attempt to do so tonight.  my site is college football centric and it is wide open right now with the season just underway.  i usually have between 500 and 700 people on it at any time.. i inherited a massive interwebz presence in July that went bankrupt last Feb.. i don't have the luxury right now of 'slapping this in there' and 'seeing if it sticks'. 

i do have confidence that it will work, though... just can't do it until the little hours. 

i seek this for one express purpose: to fix the copy&paste formatting issue my users are lighting me up about.  they copy from various sources across the web and share them on our site for discussion.  it happens all day every day.  the 'remove formatting' only works on the less sophisticated items they 'paste'. 

so... why I'm here and asking the community (and author) before i am knee deep and past the point of return is:

is it possible to use this mod to create a BBC that:
- uses a (beginning code) div:clear-both... div:border....div:background color... (open)table {may as well put whatever they paste in a table, and to assist in containing}
- uses a (ending code) div: clear both... table(close) {in case they opened a table} div(close)

and which basically encapsulates whatever users have pasted and w/o threat of 'breaking the forum's appearance'? 

NekoSensei

Quote from: Bugo on August 08, 2017, 04:09:30 AM
It seems you forgot to add some columns:

Unknown column 'last_update' in 'field list'
File: Subs-CustomBBCodesAdmin.php
Line: 225

Unknown column 'accept_urls' in 'field list'
File: Subs-CustomBBCodesAdmin.php
Line: 225


These errors occur on creating new bbcode tags.

i got same with Css ...  ::)
I added

209. 'css' => 'text',
225. isset($data['css']) ? addslashes($data['css']) : '',

i don't know if it's good , but no more error now :)


other problem, the preview button show me a broken picture... :)


dougiefresh

Uploaded v2.6 - October 9th, 2017
o Added missing fields in database call in Subs-CustomBBCodeAdmin.php, as mentioned by NekoSensei.




@NekoSensei:  The database fields you mentioned have been added to the code.  Thank you for the bug report!

Quote from: NekoSensei on September 30, 2017, 08:46:18 PM
other problem, the preview button show me a broken picture... :)
I'm looking into this bug report.  Seems some code may have gone missing (or never got implemented).....

mlemke

I am newbie to this Mod: I' sorry, but I can't read the whole thread searching an answere.

Are there some examples, how to code javascript in a custom BBCode? In the package were no examples included (Custom_BBCodes_Manager_v2.6.zip). (I know, Javascript is included since V 2.1), but my javacript solution generates no output :-((

My bbcode should create a link, because the manager can not parse {content} twice:

<script type="text/javascript"><!--
function spec() {
var a="{content}"
document.write("<a href='https://wiki.arages.de/index.php?title="+a+"'><i>"+a+"</i></a>");}
spec()
-->
</script>


or simple:
<script type="text/javascript"><!--
var a="{content}"
document.write("<a href='https://wiki.arages.de/index.php?title="+a+"'><i>"+a+"</i></a>");
-->
</script>


My custom bbcode is named spec, but the output is empty.

Example: [spec]Linyphia triangularis[/spec]

I hope anyone can help me.

Thanks!

Martin

dougiefresh

@mlemke:  You forgot a semicolon on the first line after the function declaration.  Instead of this:
Code (Find) Select
var a="{content}"
You need this:
Code (Replace) Select
var a="{content}";
Yeah, it's a small change, but you just found out how small changes can make a HUGE impact on code.....

You probably also need to change the actual link-building code to read:
document.write("<a href=" + encodeURI("https://wiki.arages.de/index.php?title="+a+"'>") + "<i>"+a+"</i></a>");}

hidaka

Hi,

I just started using SMF and would want to use the custom BBcodes manager but I'm quite confused as there is no exact installation manual for this. I'm not sure which file should I run first in able to install this (which of these: add_remove_hooks.php , settings_install.php , edit_db.php). Also I'm not sure if I should be moving the custom files to their respective folders before or after running an install.

The only thing that is clear to me is the instructions under the Files to Edit, the exact installation is like a black hole. :-\ :'(
Help, please?

And attached is what I always get after probably running the wrong file.

Many thanks in advance! :)

dougiefresh

You really should use Packager Manager to install the mod.  You can install manually, but it's a lot easier to use Packager Manager.

hidaka

Quote from: dougiefresh on January 16, 2018, 04:27:15 PM
You really should use Packager Manager to install the mod.  You can install manually, but it's a lot easier to use Packager Manager.

Oh great, thanks! It's fine now.
Sorry, I'm really new to SMF so I didn't know it has this kind of feature. ;)

-Rock Lee-

I have to be attentive and go reviewing each mod to not skip any translation for confident is already done ... here I leave you with the latest translated line and some improvements!


Regards!

PD: Anything you tell me I've
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v2.7 - February 13th, 2018
o Updated Spanish Latin translation, courtsey of Rock Lee.
o Added translators section to README.txt.
o Added LICENSE.txt to satisfy licensing concerns.




@Rock Lee:  Thank you for updating the Spanish Latin translations.  They have been included in this version!

aegersz

#217
here's trouble (me, always bloody breaking the software)

i felt the need to make the following clumsy first shot of a BBCode for mixcloud:

<iframe width="100%" height="400" src="{option1}/widget/iframe/?feed=%2F{option2}%2F{option3}%2f" frameborder="0" ></iframe>{content}

note the superfluous {content}

[mixcloud=https://www.mixcloud.com, djjamestobin, dj-james-tobin-house-music-22022018][/mixcloud]

I picked up 2 minor bugs (i know that you have a love<>hate relationship with bugs ):

1. the keyword {content} is a constant, should not be there for unparsed_commas

2. i had to comment out the following following 2 lines that were causing the "missing column in DB error message" that is triggered when you try to save the BBCode.

3. NekoSensei added the 2 lines below a few posts back and it makes no sense to me yet it worked.

'css' => 'text',
isset($data['css']) ? addslashes($data['css']) : '',


apart from that she runs like a paid one  :laugh:
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

zushiba

I'm having difficulties with this mod.

Selecting a Tag Type in the Tag Type Combo box doesn't properly update the BBCode Format area. Changing the type doesn't update on the front end upon refresh meaning you have to delete the tag and start over from scratch if you want to change the type.

The Help Text for the HTML area is the same as the Tag Name area, which isn't helpful. I can't seem to get the actual BBCode to work. It's clickable on the post screen and does enter something into the box but it seems random if the options work or not.

aegersz

#219
Introducing the (mouse) "hover" BBCode for non-touch screens

How to configure dougie's Custom BBCodes Manager for "hover"

@dougie THANKS !

re: https://www.simplemachines.org/community/index.php?action=post;msg=3972209;topic=560278.0

How to configure dougie's Custom BBCodes Manager for "hover"

Choose the Create New Tag button >

Tag name = hover

Tag Description for Button = hover

Tag type = Parsed Equals

The HTML used for the tag:

<abbr title="{option1}">{content}</abbr>

Usage:

[hoverBBC=MESSAGE THAT POPS UP SO NO NEED FOR A LINK]hover over me[/hoverBBC]

Example:

https://forum.drugs-and-users.org/index.php/topic,4303
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

Advertisement: