1
Anonymous
xoopsCodeDecode
  • 2008/11/20 23:00

  • Anonymous

  • Posts: 0

  • Since:


Hello,

As we know xoopsCodeDecode function replace XoopsCodes with their equivalent HTML formatting.

But can I use it to replace any text ? for example replace any XOOPS with CMS inside all the articles of news module or replace align="right" with style="float:right".

I need to know what is these signs and codes meaning ?
$patterns[] = "/\[code](.*)\[\/code\]/esU";

2
Anonymous
Re: xoopsCodeDecode
  • 2008/11/21 0:10

  • Anonymous

  • Posts: 0

  • Since:


I'm tring this replacment and it is working:

$patterns[] = "/2008/sU";
$replacements[] = '2007';

Now I need to replace:
$patterns[] = "/]*) what is the right code here ? /sU";
with:
$replacements[] = '';

Any idea ?



3
ghia
Re: xoopsCodeDecode
  • 2008/11/21 1:39

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Maybe
"//esU"
with
"<\/a>"
I think.

4
Anonymous
Re: xoopsCodeDecode
  • 2008/11/21 2:08

  • Anonymous

  • Posts: 0

  • Since:


Hello ghia,

your code working after change esU to sU:

$patterns[] = "//sU";

Thank you



5
Anonymous
Re: xoopsCodeDecode
  • 2008/11/21 19:05

  • Anonymous

  • Posts: 0

  • Since:


Can anyone tell me what these chars meaning ?

(.*)
/\
/sU
/esU
\\1



6
ghia
Re: xoopsCodeDecode
  • 2008/11/21 19:35

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


(.*)
Group of an unknown number of characters
/\
unknown because context is incomplete
/sU
/esU
Pattern modifier
\\1
escaped backreference to group 1

7
Anonymous
Re: xoopsCodeDecode
  • 2008/11/21 19:50

  • Anonymous

  • Posts: 0

  • Since:


thank you ghia

How to do with this?

$patterns[] = "//sU";

xxx and 000 are not fixed values.


8
ghia
Re: xoopsCodeDecode
  • 2008/11/22 0:52

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Likewise:
"//sU"
with
"<\/a>"

9
Anonymous
Re: xoopsCodeDecode
  • 2008/11/22 2:34

  • Anonymous

  • Posts: 0

  • Since:


very clear now

I appreciate the information and advice you have given. your expertise and help have been invaluable.


10
Anonymous
Re: xoopsCodeDecode
  • 2008/11/22 2:53

  • Anonymous

  • Posts: 0

  • Since:


Hello ghia,

What's about ?

How to replace single quotation marks ?

Thank you again

Login

Who's Online

411 user(s) are online (284 user(s) are browsing Support Forums)


Members: 0


Guests: 411


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