(11:57:04 PM) emanuele: So, when are we going to release a beta?
(11:57:17 PM) emanuele: And don't tell me "when you have fixed all the bugs you wrote!" :P
(11:57:36 PM) ***emanuele didn't drink, but is probably drunk
(11:28:34 PM) groundup: Shouldn't preparseCode() take in to account what BBC you have enabled?
(11:29:34 PM) groundup: *preparsecode() (seems like it should have a _ or camelCase)
(11:30:36 PM) emanuele: I *think* preparsecode is to fix any kind of code and nesting and so on, just to be sure It Works(TM)
(11:32:00 PM) groundup: If I don't have any BBC enabled, it screws up all of the formatting. It also doesn't have any hooks in there for preparsing and 'un'-preparsing code
(11:32:43 PM) emanuele: Interesting...
(11:32:48 PM) emanuele: on any text?
(11:34:42 PM) groundup: Okay, mind you, I haven't tested it, but if you look at Post.subs.php it is pretty straight forward. If I have a post "This is the start of a SMF quote block:
[nobbc][quote]" it will remove that block.
(11:35:06 PM) groundup: Based on: // Trim off trailing quotes - these often happen by accident.
(11:36:29 PM) groundup: Lets say you disabled the
[code] tag. It will close any opened ones even if it is disabled.
(11:36:40 PM) groundup: Pretty much, it tries to close open BBC tags that are disabled.
(11:37:18 PM) groundup: On another note this line should have {} around the following foreach: if (preg_match_all('~(\[(/)*code(?:=[^\]]+)?\])~is', $message, $matches))
(11:39:32 PM) groundup: Hmm... you can't stop it from doing /me to [me] conversion. Admins can always add [html] in there or [html] gets removed if you aren't an admin even if it is disabled
(11:39:38 PM) emanuele: yeah, on that respect it is true: it will fix everything even if not necessary...
(11:40:13 PM) groundup: Can't disable [time] I guess?
(11:40:14 PM) emanuele: though...
(11:40:45 PM) emanuele: why not?
(11:41:15 PM) groundup: What I am thinking is that the tags should have a preparse function and an unpreparse method. If the tag isset() and isn't disabled, run the (un)preparse() method
(11:41:38 PM) groundup: $parts[$i] = preg_replace('~\[time(?:=(absolute))*\](.+?)\[/time\]~ie', '\'[time]\' . (is_numeric(\'$2\') || @strtotime(\'$2\') == 0 ? \'$2\' : strtotime(\'$2\') - (\'$1\' == \'absolute\' ? 0 : (($modSettings[\'time_offset\'] + $user_info[\'time_offset\']) * 3600))) . \'[/time]\'', $parts[$i]); <-- that line
(11:41:46 PM) emanuele: the big issue would arise the moment you disable a tag and then you enable it again after a while
(11:42:04 PM) emanuele: preparsecode is run only at post-time
(11:42:13 PM) groundup: Yeah, I thought about that. It should run the method when you enable/disable tags
(11:42:55 PM) emanuele: ...a lot of hassles...
(11:43:02 PM) groundup: That is obviously a lot of work for the database. Otherwise, it is a bug IMO. Might be a bug that won't be fixed for the benefit of the admin/developer heh
(11:44:44 PM) groundup: I think lines like this make it harder for the poster: $parts[$i] = preg_replace('~\[(black|blue|green|red|white)\]~', '[color=$1]', $parts[$i]);
(11:44:54 PM) groundup: We should just have as a BBC
(11:47:31 PM) emanuele: dunno...that means some useless repetition...
(11:47:47 PM) emanuele: parse_bbc is not for noobs anyway...
(11:49:50 PM) groundup: lol
(11:51:15 PM) groundup: I wonder what happens if you just return; early and don't do any preparsing.
(11:52:05 PM) groundup: The reason I am reporting this is because I am going to have a forum where I don't want any BBC
(11:53:03 PM) emanuele: make sense
Oh, hey.
Don't take it badly. I have actually wondered if you were HT, too, to be honest. With no implication. Sorry about that.
Back to the content of the matter. I don't want to comment too much, nor can I spend much time on.
I will say this though.
For arguably the first time in SMF history, childish egotrips without backup have been the excuse for issues to enter the codebase.
No, never thought about you Arantor.