1
Daethian
CBB - img tags case sensitive?
  • 2008/3/5 1:15

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


Users are having issues copying their image links from other sites because if the code is IMG (all caps) it won't work on the forum. They have to edit it to lower case img for it to display. Is there someplace I can edit to make it accept both cases?
hhttp://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

2
hervet
Re: CBB - img tags case sensitive?
  • 2008/4/14 16:11

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


in /xoops/class/module.textsanitizer.php look in the function called xoopsCodeDecode.
You can change the regexp definitions, for example replace:
$patterns[] = "/[img]([^"()?&'<>]*)[/img]/sU";

with :
$patterns[] = "/[IMG]([^"()?&'<>]*)[/IMG]/sU";

or add a new definition.

3
Anonymous
Re: CBB - img tags case sensitive?
  • 2008/4/14 16:51

  • Anonymous

  • Posts: 0

  • Since:


Thank you hervet .. it is common porblem in cbb and I think adding new definition is good solution for work both "img" and "IMG".

Also I hope to add alt for this definition as you know this is important SEO factor.

4
Daethian
Re: CBB - img tags case sensitive?
  • 2008/4/14 21:52

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


So instead of changing I can add that line so it recognizes both?
hhttp://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

5
Daethian
Re: CBB - img tags case sensitive?
  • 2008/4/14 22:06

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


Didn't work for me.
I tried replacing the line as well as adding it and leaving the original. In both cases in the same post and the uppercase IMG is still not working.

I don't know what you mean by adding another definition.
hhttp://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

6
Anonymous
Re: CBB - img tags case sensitive?
  • 2008/4/14 23:20

  • Anonymous

  • Posts: 0

  • Since:


Hi Daethian,

I think you need to modify this file for CBB:

Frameworks/textsanitizer/plugins/image.php

7
phppp
Re: CBB - img tags case sensitive?
  • 2008/4/15 2:06

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Add one more modifier "i":

$patterns[] = "/[img]([^"()?&<>]*)[/img]/isU";

8
Daethian
Re: CBB - img tags case sensitive?
  • 2008/4/15 2:15

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


Mowaffak that didn't work either, I added the line to the file.

phppp adding the i seemed to work but only if don't use the use the 'width' part.
hhttp://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

9
Anonymous
Re: CBB - img tags case sensitive?
  • 2008/5/1 13:58

  • Anonymous

  • Posts: 0

  • Since:


Hi Daethian,

What is your CBB and Frameworks version ?

10
Daethian
Re: CBB - img tags case sensitive?
  • 2008/5/1 17:22

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


3.08 on CBB
Not sure on Frameworks, don't see it on my module list so where else can I check?
hhttp://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

Login

Who's Online

163 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 163


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