Orbiter-Forum  

Go Back   Orbiter-Forum > Projects > Site Support > Feature
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Request: Update BB Code List with custom tags Issue Tools
issueid=381 05-27-2010 12:13 PM
orb orb is offline
O-F Administrator
Ninja
Request: Update BB Code List with custom tags
A basic description and syntax of custom tags of LaTeX and Event Timer should be added to BB Code List.

I don't use WYSIWYG editor for posting, and instead I use basic simple text box editor, but some tags don't have their buttons in WYSIWYG editor too.

I find this page in the Bulletin Board's FAQ very useful if I don't remember the syntax of either BB-Code tag. However, this list isn't complete. It lacks relatively recently added "LaTeX Math & Chemical Typesetting" and "Event Timers/Countdown Timers" custom tags.

I'd like the template for this page to get updated with [math] and [eventTimer] tags, and with some basic syntax usage/example, like:

LaTeX:
[math]expression[/math]and some examples can be taken from here
Event Timer:
[eventtimer]ISO8601_date_time[[?beforeafter];format][/eventtimer]where violet square brackets delimit optional fields; and an example can be got from here or here

(I noticed that pipe "|" in eventTimer is parsed by a [table] tag, so I used a box drawing "│" character instead - it's a bug reported elsewhere).


Another thing I often forget is when I don't use [table] tags for some time. It's the format of defining column span - {colsp=number}. Usually, I mistake "colsp" with "colspan", and sometimes instead of "=" I place ":". Could the description and examples of [table] tag be updates with usage of "{colsp=}"?
Issue Details
Issue Type Feature
Project Site Support
Status Implemented
Priority 10 - Lowest
Suggested Version Unknown
Implemented Version (none)
Votes for this feature 0
Votes against this feature 0
Assigned Users (none)
Tags (none)

05-27-2010 12:40 PM
Webmaster
 
Thanks orb. I must admit this was on my todo list but it managed to drop off the bottom somewhere along the line
Reply
06-15-2010 07:12 AM
Webmaster
 
I've added the Event Timer.
Reply
06-15-2010 10:10 AM
orb orb is offline
O-F Administrator
Ninja
 
Quote:
Originally Posted by tblaxland
 I've added the Event Timer.
There are 2 things though. First is a copy&paste typo of BB-code title at the description / usage. The title says "table". The other is Example Output, which says "No code has to be inserted here.".

Tested with all available forum skins.
Reply
06-15-2010 11:08 PM
Webmaster
 
Interesting, the admin control panel shows the correct timer in the example output section...
Reply
06-15-2010 11:37 PM
orb orb is offline
O-F Administrator
Ninja
 
Now, the "Example Output" is empty for me.
Reply
06-16-2010 12:09 AM
Webmaster
 
Fixed now.
Reply
06-16-2010 12:17 AM
orb orb is offline
O-F Administrator
Ninja
 
Quote:
Originally Posted by tblaxland
 Fixed now.
I confirm.
Reply
06-16-2010 05:00 AM
Webmaster
 
LaTeX is done too, except I can't get it to print the backslash in either the example or the image alt text. The code is in a php double quoted string so "\\" should result in a backslash being printed. I get no character at all instead . Here's the code, I'm open to ideas:
Code:
$db->query_write("INSERT INTO ".TABLE_PREFIX."bbcode (`bbcodeid`, `bbcodetag`, `bbcodereplacement`, `bbcodeexample`, `bbcodeexplanation`, `twoparams`, `title`, `buttonimage`, `options`) VALUES (NULL, 'math', '<img src=\"http://www.orbiter-forum.com/latexcache/img/3eb5868155b0edaf69f3e02b4b59e586-1.gif\" alt=\"v(t) = v_0 + \\frac{1}{2} a t^2\"</img>', '[math]v(t) = v_0 + \\frac{1}{2} a t^2[/math]', 'With this vB code, LaTex formatted text can be inserted into posts. For more example, refer to <U><a href=\"http://www.orbiter-forum.com/showthread.php?t=10839\">this announcement</a></U>.', 0, 'LaTeX', '', 1);");
EDIT: I just checked the db and can confirm that it is not just a display problem - the "\\" gets reduced to "" when before the string is sent to the database.
Reply
06-16-2010 05:30 AM
Webmaster
 
EDIT2: I inserted the backslash directly into the db using MySQL:
Code:
update bbcode
set bbcodeexample="[math]v(t) = v_0 + \\frac{1}{2} a t^2[/math]"
where bbcodetag="math"
limit 1
Problem solved, but a little frustrating.
Reply
06-16-2010 12:49 PM
orb orb is offline
O-F Administrator
Ninja
 
Quote:
Originally Posted by tblaxland
 The code is in a php double quoted string so "\\" should result in a backslash being printed. I get no character at all instead . Here's the code, I'm open to ideas:
Code:
$db->query_write("INSERT INTO ".TABLE_PREFIX."bbcode (`bbcodeid`, `bbcodetag`, `bbcodereplacement`, `bbcodeexample`, `bbcodeexplanation`, `twoparams`, `title`, `buttonimage`, `options`) VALUES (NULL, 'math', '<img src=\"http://www.orbiter-forum.com/latexcache/img/3eb5868155b0edaf69f3e02b4b59e586-1.gif\" alt=\"v(t) = v_0 + \\frac{1}{2} a t^2\"</img>', '[math]v(t) = v_0 + \\frac{1}{2} a t^2[/math]', 'With this vB code, LaTex formatted text can be inserted into posts. For more example, refer to <U><a href=\"http://www.orbiter-forum.com/showthread.php?t=10839\">this announcement</a></U>.', 0, 'LaTeX', '', 1);");
It's fixed, however the installer can be updated to use 4 backslashes, i.e. "\\\\".
I tested that on event timer installer on friend's forum, and four backslashes made one backslash added to the database.
Reply
06-17-2010 12:51 AM
Webmaster
 
Quote:
Originally Posted by orb
 It's fixed, however the installer can be updated to use 4 backslashes, i.e. "\\\\".
I tested that on event timer installer on friend's forum, and four backslashes made one backslash added to the database.
Thanks . That makes sense now - php parses the four backslashes into two backslashes which MySQL then parses into one.
Reply
07-06-2010 07:20 AM
Webmaster
 
[math] bbcode undone until I can find a proper fix. For more info, see this issue: http://www.orbiter-forum.com/project.php?issueid=477
Reply
07-07-2010 06:13 AM
Webmaster
 
Fixed.
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 09:13 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.