Custom BBCodes Manager

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

Previous topic - Next topic

Yoss

Hi, i can't make a new bbcode tag with 2 variables :-[

I try, for example, a simple bbcode to open a URL in a new window by clicking on a text, and I am using this options in the mod:

  - BBCode: MYBBCODE
  - Tag type: Parsed Equals
  - Tag name: [tag=parsed content]parsed content[/tag]
  - Trim whitespace: (no trim)
  - Trim whitespace: unchecked
  - The HTML used for the tag:
<a href="{content}"onclick="window.open(this.href,'ventana_nueva','width=700,height=500,top=100,left=400'); return false;">{option2}</a>



But when I test the new tag witting in a message [MYBBCODE=Click here]http//:www.google.com[/MYBBCODE] it dosn't work properly

What am I doing wrong? Any idea? I test to change to all other Tag Types and with no results... :-\



Thank you very much

* PD. I know this feature automatically works with [URL] tag. This is only an example that shows I can't create a new bbcode tag with two variables :(





dougiefresh

I am in the process of rewwriting the mod to fix a few issu we and add many more.  I believe the issue you are having has been fixed for the upcoming version....

gorbi


Yoss

Thank you very much dougiefresh :)

Kissaki

#104
So apparently, I can not use {content} twice in my template?
That really sucks ... :'(

And apparently, I can also not specify a template that does not contain {content}.
(I use "dead link" templates for embedded stuff where the service no longer exists)

I don't get this ...
Options don't seem to work either.

I thought I could migrate away from the SMF 1 mod customBBC, but this seems all too broken.

dougiefresh

Well, hopefully I'll get some time off soon to work on these things.  I'm so working something like 12 hour days lately....

dougiefresh

#106
UPDATE:  I've almost got the VERSION 2.0 update completed.  It features AJAX for existing bbcode tag detection, AJAX for uploading and removing bbcode tag, added Help information for most of the fields, a new permission for managing custom bbcodes, and quite a few fixes for this mod!  I should be able to release it to the public in about a week, assuming my work schedule doesn't completely swamp me with multiple long shifts....

EDIT: I just wanted to say I'm sorry for the extremely long wait for some of these fixes to happen....

dougiefresh

#107
Sorry for the long post, however, it is necessary to communicate about bug reports that have gone (possibly) unanswered.....

Quote from: nomadikhan on May 24, 2015, 08:57:21 PM
I didn't see this particular error mentioned anywhere else in the thread.

Everything works fine with the mod with exception to deleting a tag...

Fatal error: Call to undefined function remove_gif_from_themes() in /home/content/63/11766663/html/Sources/Subs-CustomBBCodesAdmin.php on line 138


Is that something on my end or the mod's end?  When I installed every test was successful before installation.
I believe this bug report was addressed in mod version 1.12, if I'm not mistaken....

Quote from: nomadikhan on May 25, 2015, 07:23:17 AM
Since I cannot edit my first post for whatever reason... there's another bug in the mod.  Removing a button doesn't always remove the graphic.  Also, If I've uploaded (example names) Button A but decide I'd rather use Button B and so I upload Button B to replace it... no matter what it shows Button A.  Removing, eventually it works to remove, Button A then uploading Button B only shows Button A again.

Also, when deleting a bbcode via my php panel (as the delete button doesn't work, see error in post previous post above) I notice there's no field for what graphic the button is using... would be nice to have it there so I can manually edit the image location to display the correct image if I need to.
I suspect it has something to do with your browser cache.  However, I'll address these bug report in Version 2.0.....




Quote from: Kissaki on September 26, 2015, 07:55:32 AM
So apparently, I can not use {content} twice in my template?
That really sucks ... :'(
It depends on which tag type you are using.  For example:
o With Unparsed Content, Unparsed Commas Content, and Unparsed Equals Content, you can because the HTML string is treated as a single string.
o With Parsed Equals, Unparsed Equals, Parsed Content, and Unparsed Commas, you cannot because the HTML string is seperated into two strings (before and after) that surround {content}.
o With Closed, you cannot because it is a single tag (aka [tag]) and cannot accept content parameters.

I do understand that the tag system was somehow broken in the version 1.x series of mods.  I have fixed it.

Quote from: Kissaki on September 26, 2015, 07:55:32 AM
And apparently, I can also not specify a template that does not contain {content}.
(I use "dead link" templates for embedded stuff where the service no longer exists)

I don't get this ...
Options don't seem to work either.

I thought I could migrate away from the SMF 1 mod customBBC, but this seems all too broken.
You are right.  A few things are broken within the version 1.x mod.  I'm trying to fix a lot of things....




Quote from: Yoss on September 18, 2015, 07:14:26 AM
Hi, i can't make a new bbcode tag with 2 variables :-[

I try, for example, a simple bbcode to open a URL in a new window by clicking on a text, and I am using this options in the mod:

  - BBCode: MYBBCODE
  - Tag type: Parsed Equals
  - Tag name: [tag=parsed content]parsed content[/tag]
  - Trim whitespace: (no trim)
  - Trim whitespace: unchecked
  - The HTML used for the tag:
<a href="{content}"onclick="window.open(this.href,'ventana_nueva','width=700,height=500,top=100,left=400'); return false;">{option2}</a>


But when I test the new tag witting in a message [MYBBCODE=Click here]http//:www.google.com[/MYBBCODE] it dosn't work properly

What am I doing wrong? Any idea? I test to change to all other Tag Types and with no results... :-\
Okay, I managed to get this bbcode working with mod Version 2.0.  I had to make two changes in order to get it working:
1) Changed {option2} to {option1}.
2) Changed Tag Type to Unparsed Commas Content.
For some reason, SMF screws up the URL within the content, so changing it to an unparsed content tag fixes it.  Why, I don't know...




Quote from: mm21xx on June 08, 2015, 02:22:56 AM
I get an error like this when I try to access this specific mod:
Warning: Cannot modify header information - headers already sent
This bug report has been addressed for Version 2.0!  I think it had something to do with my website being down at that time.

Quote from: nomadikhan on May 25, 2015, 08:55:18 PM
In addition to my posts above lol, no matter what tag type I select, it will not parse anything except the default type.  Therefore, I cannot use any tags that are [tag=anything]..   the only tags that seem to work are plain [tag] types.
This bug report has been addressed for Version 2.0!

Quote from: Walks Tall on April 30, 2015, 02:04:14 PM
I was kind of hoping for a simpleton mod like that found in the phpBB BBCode function, just a real simple name the BBCode add the replacement html and you're done.
Your wish for a "simple mode" will be granted in VERSION 2.0!  Woo-Hoo!  (I'll try to make it smart so it can guess the tag type....)

gorbi


dougiefresh

#109
Quote from: gorbi on November 26, 2015, 11:12:24 AM
when?
At this time, the button uploading stuff is broken, as well as the button preview code.  The button removal stuff hasn't been looked at yet.  The help system is almost done, although there are some gaps in the information....  Still want it now?

Quote from: dougiefresh on November 26, 2015, 10:59:35 AM
Quote from: Yoss on September 18, 2015, 07:14:26 AM
Hi, i can't make a new bbcode tag with 2 variables :-[

I try, for example, a simple bbcode to open a URL in a new window by clicking on a text, and I am using this options in the mod:

  - BBCode: MYBBCODE
  - Tag type: Parsed Equals
  - Tag name: [tag=parsed content]parsed content[/tag]
  - Trim whitespace: (no trim)
  - Trim whitespace: unchecked
  - The HTML used for the tag:
<a href="{content}"onclick="window.open(this.href,'ventana_nueva','width=700,height=500,top=100,left=400'); return false;">{option2}</a>


But when I test the new tag witting in a message [MYBBCODE=Click here]http//:www.google.com[/MYBBCODE] it dosn't work properly

What am I doing wrong? Any idea? I test to change to all other Tag Types and with no results... :-\
Okay, I managed to get this bbcode working with mod Version 2.0.  I had to make two changes in order to get it working:
1) Changed {option2} to {option1}.
2) Changed Tag Type to Unparsed Commas Content.
For some reason, SMF screws up the URL within the content, so changing it to an unparsed content tag fixes it.  Why, I don't know...
I missed one other thing.  Your link that you used in the post should read "http://www.google.com", not "http//:www.google.com".   Notice the LOCATION of the colon.....

ZweinsteinOnline Team

Hello,

I was just wondering, since I was trying to make my own color tags for my forum. Now we need to put in de right code [color=#code ] and end it with [/color ]

But my and my other admin would like to have tags that have the right color but that you only need to type [zwadderich ] your text [/zwadderich ]

And so on for the other hogwarts houses. I know the hexa codes, but I don't exactly know which tag type I need, and if it is really necessary to modify some thing in the Css sheets.

Could some-one please help me, or tell if it's more useful to wait for the next update of this mod.

dougiefresh

Uploaded v2.0 - November 29th, 2015
o Added "Create Simple Mode" to create new bbcodes using just tag, description and HTML.
o Added validation function to force content to start with "http://" or "https://" when option checked.
o Added membergroup permissions to control who can manage custom BBCodes.
o Added AJAX code to assist user in identifying pre-existing bbcode tags.
o Added AJAX code to upload or remove bbcode button images without saving the form.
o Added Javascript code so that file input box can easily be cleared.
o Added JavaScript code so that new bbcode tags with existing names cannot be submitted.
o Fixed "delete", "disable" and "modify" links on Custom BBCode list page.
o Fixed reversed image type detection based on whether mod is running under 2.0.x or 2.1.
o Fixed "bbcode_exists" function so that hook isn't removed for everybody during testing.
o Fixed image type and dimensions checking and made sure they are strictly enforced.
o Modified admin panel code so that bbcode tags are stored in lowercase letters.
o Modified button function so that button image not added to list if button image not present.
o All existing database tags are forced to lowercase.  For unknown reason, it is necessary.
o Added help language strings to clarify how the bbcode types are used.




@Everybody: I've been planning on writing some preview code and a few other features for v2.0, but work decided that I must work long hours right now....  So this update is MOST of what I had planned on giving you.....  Hope it helps someone!

Quote from: ZweinsteinOnline Team on November 27, 2015, 08:32:33 AM
But my and my other admin would like to have tags that have the right color but that you only need to type [zwadderich ] your text [/zwadderich ]
You would create a new tag called zwadderich, which whatever description you want, and a HTML replacement string like so:
<span style="color: $1;" class="bbc_color">{content}</span>
Make sure you replace $1 with your color code.

ZweinsteinOnline Team

Quote from: dougiefresh on November 29, 2015, 06:39:00 PM

You would create a new tag called zwadderich, which whatever description you want, and a HTML replacement string like so:
<span style="color: $1;" class="bbc_color">{content}</span>
Make sure you replace $1 with your color code.

Thank you so much for your help!

gorbi

2.0.11. It does not work, can not download the template

dougiefresh

Quote from: gorbi on November 30, 2015, 02:00:49 PM
2.0.11. It does not work, can not download the template
I can't reproduce this report.  I installed the mod on a clean copy of 2.0.11 and have no problems accessing the template or new admin panel area.....

Kissaki

Thank you for your work despite your long working hours!
I appreciate it.

I did not update yet, but will probably do so at some point this week and take a look. :)
Again, thank you!

ariescapes

#116
I'm having a small issue with the Mod. Over all it works great, but when I add an image for the BBCode, it doesn't show anywhere in the post edit/create view. It's not listed or shown anywhere. Is there a little code that will let me add it into the ~x.php file so they can populate?

(i'm going to do another re-read in case I missed this..)

dougiefresh

Is the button enabled in the modify bbcode screen?  If not, I will need to investigate this bug report.....

ariescapes

Unless I missed where it would be, all the BBCodes are "enabled", and those with buttons are just not showing up. :/

dougiefresh

Uploaded v2.1 - December 8th, 2015
o Fixed issue where bbcode buttons do not show up on the post screen.




@ariescapes: The bug has been fixed.  Thank you for the bug report!

Advertisement: