1
wishcraft
IMG Tag - Suggested fix

How are you here is the quick fix to the DHTML Form XOOPS code [img]

You have to edit /class/module.textsantizer.php

Insert on Line 322

$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";
    
$replacements[] = '\3';
    
$replacements[] = '\1';
    
$replacements[] = '.XOOPS_URL.'/image.php?id=\4" target="_blank">\5';
    
$replacements[] = '.XOOPS_URL.'/image.php?id=\2" target="_blank">\3';


Look up my background sound hack - it would be kewl to have a shockwave playback on that then with tempo control, you could set a preset tempo for the forum and have remixes while you read..

:-])

For example I think the system module should be more exploited with more options like insertable refs' like this for the global system.

For example for bullet point you set:

$patterns[] = "/[li]([^"()?&'<>]*)[/li]/sU";
    $replacements[] = '
<li>\1li>';
    $patterns[] = "/[ul]([^"()?&'
<>]*)[/ul]/sU";
    
$replacements[] = '
    \1
';
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

2
ghia
Re: IMG Tag - Suggested fix
  • 2009/1/12 10:55

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


These image tags, aren't they already added by the extensions from the textsanitiser as defined in /class/textsanitizer/image/image.php?
I believe there is somewhere also a configuration option or preference to allow images in DHTML or not.

But you are right, you can do a lot with this kind of replacements.

PS: Check your code. The code window may be unable to display some sequences properly (as eg \.). Use the quote window instead.

Login

Who's Online

299 user(s) are online (189 user(s) are browsing Support Forums)


Members: 0


Guests: 299


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits