xoops forums

khalidinho

Just popping in
Posted on: 2013/7/19 16:14
khalidinho
khalidinho (Show more)
Just popping in
Posts: 24
Since: 2009/12/15
#1

bbcode and tinymce

hello everybody

I tried tinymce with bbcode plugin

the problem is tinymce's bbcode is different than xoops bbcode

for example : color code
in tinymce
[color=#3366FF]with #[/color]


in xoops
[color=3366FF]No #[/color]


also in other codes

how can I modify tinymce bbcode to xoops ?

andrey3761

XOOPS Translator
Posted on: 2013/7/20 8:05
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#2

Re: bbcode and tinymce

hello

File:
/class/module.textsanitizer.php

Find
$patterns[] = "/[color=(['"]?)([a-zA-Z0-9]*)\1](.*)[/color]/sU";
        
$replacements[] = '<span style="color#\2;">\3</span>';


Replace

$patterns[] = "/[color=#?(['"]?)([a-zA-Z0-9]*)\1](.*)[/color]/sU";
        
$replacements[] = '<span style="color#\2;">\3</span>';

khalidinho

Just popping in
Posted on: 2013/7/20 16:14
khalidinho
khalidinho (Show more)
Just popping in
Posts: 24
Since: 2009/12/15
#3

Re: bbcode and tinymce

thank it works greatly

but I want change it from tinymce to xoops , not from xoops to tinymce

khalidinho

Just popping in
Posted on: 2013/8/12 22:40
khalidinho
khalidinho (Show more)
Just popping in
Posts: 24
Since: 2009/12/15
#4

Re: bbcode and tinymce

up

Mamba

Moderator
Posted on: 2013/8/13 13:19
Mamba
Mamba (Show more)
Moderator
Posts: 10779
Since: 2004/4/23
#5

Re: bbcode and tinymce

I am not a Regex specialist, so I cannot help you here. But since you have the conversion working into one direction perfectly, try to learn more about Regex and try to see how you can make the change in the reverse direction.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

khalidinho

Just popping in
Posted on: 2013/8/13 14:06
khalidinho
khalidinho (Show more)
Just popping in
Posts: 24
Since: 2009/12/15
#6

Re: bbcode and tinymce

actually, I started to do it by myself and I have changed alignment tags to xoops successfully. I am working for the other tags and trying to solve some problems with bbcode tags.

Mamba

Moderator
Posted on: 2013/8/13 14:48
Mamba
Mamba (Show more)
Moderator
Posts: 10779
Since: 2004/4/23
#7

Re: bbcode and tinymce

Excellent!

When you're done successfully, please share with the rest of us, so some other people can benefit from it!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs