live627

  • Talking Head
  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,503
Nobbc
« on October 10th, 2012, 01:25 AM »
The following bbcodes do not respect nobbc: media and nb

Arantor

  • With a Box
  • I'm a shooting star leaping through the skies, like a tiger defying the laws of gravity...
  • Posts: 13,999
Re: Nobbc
« Reply #1 on October 10th, 2012, 02:02 AM »
Both are processed separately, interesting. But more importantly, nobbc should be converting them on preparse to not be parseable tags in the first place, strpos or otherwise.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: Nobbc
« Reply #2 on October 10th, 2012, 07:09 PM »
Yes, actually I thought that was how it was done in the first place..?!
Code tags are parsed the same way aren't they...?

Of course, it won't fix existing posts but... Not much of a problem.
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • I'm a shooting star leaping through the skies, like a tiger defying the laws of gravity...
  • Posts: 13,999
Re: Nobbc
« Reply #3 on October 10th, 2012, 07:18 PM »
Code tags are done quite a bit differently :/ There's all kinds of special processing just for code tags.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: Nobbc
« Reply #4 on October 10th, 2012, 09:55 PM »
Well, and has it got anything to do with nobbc not being handled in preparsecode...?

Also, could be simpler to just do something like this at the beginning of parse_bbc:

Code: [Select]
<?php
while (($pos stripos($message'[ nobbc]')) !== false)
{
  
$end stripos($message'[/ nobbc]'$pos);
  if (
$end == false)
    
$end strlen($message);
  
$message substr($message0$pos) . str_replace('[''&something;'substr($message$pos 7$end $pos 7)) . substr($message$end 8);
}

I don't remember the name for the text variable so I used $message.
It's a prototype, typed directly in here... What do you think..?

Woohoo, bug... A code tag gets added at the beginning, and it even hid the beginning of the post in the process. Fixed by adding spaces in nobbc tags. Poetic irony...
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • I'm a shooting star leaping through the skies, like a tiger defying the laws of gravity...
  • Posts: 13,999
Re: Nobbc
« Reply #5 on October 10th, 2012, 10:41 PM »
Well, why isn't nobbc handled in preparsecode? It's supposed to be.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: Nobbc
« Reply #6 on October 10th, 2012, 11:08 PM »
John?
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)