xoops forums

kamax

Friend of XOOPS
Posted on: 2007/9/20 13:52
kamax
kamax (Show more)
Friend of XOOPS
Posts: 44
Since: 2005/1/15
#1

cbb 3.0.8 Pictures only visible in preview mode

If i try to publish pictures on a post with the
xoops picture manager, i see it correct in preview mode. After i push the publish button, i only see the path to the uploads directory. All html and xoopscode settings are correct. (xoops 2.0.17, cbb 3.0.8)

DarinAllan

Friend of XOOPS
Posted on: 2007/9/20 14:03
DarinAllan
DarinAllan (Show more)
Friend of XOOPS
Posts: 477
Since: 2005/5/18
#2

Re: cbb 3.0.8 Pictures only visible in preview mode

You can attach pictures in CBB, I think there is a setting somewhere when you create a forum where you can say what files are allowed to be uploaded and displayed. eg. .jpg .gif .png

Have a look at all the settings eg. in CBB admin preferences as well.

Cheers....Darin ;o)

kamax

Friend of XOOPS
Posted on: 2007/9/20 14:15
kamax
kamax (Show more)
Friend of XOOPS
Posts: 44
Since: 2005/1/15
#3

Re: cbb 3.0.8 Pictures only visible in preview mode

Thanks, Darin, finally i did it with attached files, but it's not the solution for my problem with the invisible pics from the picture manager ...

DarinAllan

Friend of XOOPS
Posted on: 2007/9/20 14:23
DarinAllan
DarinAllan (Show more)
Friend of XOOPS
Posts: 477
Since: 2005/5/18
#4

Re: cbb 3.0.8 Pictures only visible in preview mode

I think we are all waiting for a better general picture manager lol, for me at least the existing one can be a bit hit and miss, although I admit I have not played with it extensively, for some things it is good enough though ;o)

frankblack

Just can't stay away
Posted on: 2007/9/20 20:23
frankblack
frankblack (Show more)
Just can't stay away
Posts: 830
Since: 2005/6/13
#5

Re: cbb 3.0.8 Pictures only visible in preview mode

Here is my "obscure" solution:

Edit file Frameworks / textsanitizer / module.textsanitizer.php and add under following line:

$replacements[] = '<del>\1</del>';


this code:

$patterns[] = "/[img align=(['"]?)(left|center|right)\1]([^"()?&'<>]*)[/img]/sU";
        
$patterns[] = "/[img]([^"()?&'<>]*)[/img]/sU";
        $patterns[] = "/[img align=(['"]?)(left|center|right)\1 id=(['"
]?)([0-9]*)\3]([^"()?&'<>]*)[/img]/sU";
        
$patterns[] = "/[img id=(['"]?)([0-9]*)\1]([^"()?&'<>]*)[/img]/sU";
        if (
$allowimage != 1) {
            
$replacements[] = '<a href="\3" target="_blank">\3</a>';
            
$replacements[] = '<a href="\1" target="_blank">\1</a>';
            
$replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\4" target="_blank">\5</a>';
            
$replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\2" target="_blank">\3</a>';
        } else {
            
$replacements[] = '<img src="\3" align="\2" alt="" />';
            
$replacements[] = '<img src="\1" alt="" />';
            
$replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\4" align="\2" alt="\5" />';
            
$replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\2" alt="\3" />';
        }


Seems stupid to me, because this pattern-replacement should be executed in the included normal textsanitizer. But what do I know?

kamax

Friend of XOOPS
Posted on: 2007/9/20 20:59
kamax
kamax (Show more)
Friend of XOOPS
Posts: 44
Since: 2005/1/15
#6

Re: cbb 3.0.8 Pictures only visible in preview mode

Whow, indeed, that is it. Thanks to all for help and frankblack for an exotic solution for an exotic problem...

DarinAllan

Friend of XOOPS
Posted on: 2007/9/21 2:45
DarinAllan
DarinAllan (Show more)
Friend of XOOPS
Posts: 477
Since: 2005/5/18
#7

Re: cbb 3.0.8 Pictures only visible in preview mode

Quote:

frankblack wrote:

Seems stupid to me, because this pattern-replacement should be executed in the included normal textsanitizer. But what do I know?


hehehe excellent thanks frankblack and kamax for asking the question ;o)

hervet

Friend of XOOPS
Posted on: 2007/9/22 11:57
hervet
hervet (Show more)
Friend of XOOPS
Posts: 2267
Since: 2003/11/4
#8

Re: cbb 3.0.8 Pictures only visible in preview mode

We had exactly the same problem here :
http://www.parent-solo.fr/modules/new ... t_id=90791#forumpost90791

Thank you for the solution (to this strange problem) !