Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Community > Forum De Bell Tolls > [web] Parser bb code in PHP
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
AlphaGamma
.piano ma pieni.

User info:
Registered: Jun 2002
Posts: 6732 (0.80 al dì)
Location:
Corso: Eh?
Anno: Io cosa?
Time Online: 21 Days, 21:22:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
[web] Parser bb code in PHP

Domanda da 'gnurante. Mi servirebbe un motore (meglio ad oggetti) per gestire il parsing di una form contenente bb code.
Vorrei evitare di spulciare phpbb... non esiste qualcosa che prende in input una variabile $testo in bbcode, e ne esce fuori dell'html?

A me interessa che parsi soltanto:
[b], [i], [color], [size], [url], [image], niente font e niente faccine, non mi servono.

(e non mi si dica "scrivitelo tu")

__________________
Attenzio', concentrazio', ritmo e VITALITÀ

31-01-2004 11:27
Click Here to See the Profile for AlphaGamma Click Here to See the Blog of AlphaGamma Click here to Send AlphaGamma a Private Message Visit AlphaGamma's homepage! Find more posts by AlphaGamma Add AlphaGamma to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
korn
SET FIRE!

User info:
Registered: Jun 2002
Posts: 5793 (0.69 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: 1°! ....fuori corso :(
Time Online: 37 Days, 5:56:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Prova a cercare su www.planetsourcecode.com :)

__________________
» Collect some stars to shine for you, and start today ‘cause there are only a few. _ (In Flames)
» Don't stop for nothing, it's full speed or nothing! I'm taking down, you know, whatever is in my way! _ ('tallica)
» I am my own god, I do as I please. _ (Pain)
» Ninetynine, ninetynine knives! Ninetynine knives inside! Nobody gets out alive! _ (The Haunted)
Web: http://www.negativesignal.com - ICQ# 171585477 - Death to software patents! And TCPA too! "e uno!", diceva il boia.

31-01-2004 11:30
Click Here to See the Profile for korn Click Here to See the Blog of korn Click here to Send korn a Private Message Visit korn's homepage! Find more posts by korn Add korn to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
0m4r
.grande:maestro.

User info:
Registered: Mar 2002
Posts: 7287 (0.86 al dì)
Location: Düsseldorf (DE)
Corso:
Anno: ESAMI FINITI
Time Online: 49 Days, 0:42:50 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Off-Topic:

e ne esce fuori dell'html?

aoo....scendimi la bbbambina che la ggioco! ;P

__________________
http://www.twitter.com/0m4r

31-01-2004 12:43
Click Here to See the Profile for 0m4r Click Here to See the Blog of 0m4r Click here to Send 0m4r a Private Message Find more posts by 0m4r Add 0m4r to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Mino
In pensione :)

User info:
Registered: Mar 2002
Posts: 2997 (0.35 al dì)
Location: Dublin!
Corso: Informatica 3ennale
Anno: Laureato :)
Time Online: 12 Days, 2:11:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Se devi solo sostituire
[b], [i], [color], [size], [url], [image],
con
<b>, <i>, <font color=>, <font size=>, <a href=>, <img src=>
puoi farlo con una banale regexp, roba da 5 righe di codice (ok, se ti servono te le posto)...

Pero' devi aggiungere sempre qualche controllo per evitare che il testo contenga html (se lo vuoi).

__________________
icq: 57553717 - mail: mino@ngi.it - web: www.minux.it - Fattori Arcani

31-01-2004 12:47
Click Here to See the Profile for Mino Click Here to See the Blog of Mino Visit Mino's homepage! Find more posts by Mino Add Mino to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
AlphaGamma
.piano ma pieni.

User info:
Registered: Jun 2002
Posts: 6732 (0.80 al dì)
Location:
Corso: Eh?
Anno: Io cosa?
Time Online: 21 Days, 21:22:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

La seconda che hai detto. Voglio solo quei sei tag, e NIENTE altro (per ora). Siccome non conosco bene html, mi serve un riconoscitore che mi fa passare solo codice corretto e bello pulito.
Poi PHP fa quasi tutto il resto da solo.
A proposito, come funziona quella funzione PHP che parsa i tag html? O forse parsava solo gli url... :pensa:

__________________
Attenzio', concentrazio', ritmo e VITALITÀ

31-01-2004 12:55
Click Here to See the Profile for AlphaGamma Click Here to See the Blog of AlphaGamma Click here to Send AlphaGamma a Private Message Visit AlphaGamma's homepage! Find more posts by AlphaGamma Add AlphaGamma to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.54 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by AlphaGamma
A proposito, come funziona quella funzione PHP che parsa i tag html? O forse parsava solo gli url... :pensa:


Parsare in che senso?
ti riferisci forse a htmlentities ?
Oppure a striptags?
O a htmlspecialchars?

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~

31-01-2004 13:57
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
AlphaGamma
.piano ma pieni.

User info:
Registered: Jun 2002
Posts: 6732 (0.80 al dì)
Location:
Corso: Eh?
Anno: Io cosa?
Time Online: 21 Days, 21:22:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sai che non ricordo... devo rivedere il manuale...

__________________
Attenzio', concentrazio', ritmo e VITALITÀ

31-01-2004 17:20
Click Here to See the Profile for AlphaGamma Click Here to See the Blog of AlphaGamma Click here to Send AlphaGamma a Private Message Visit AlphaGamma's homepage! Find more posts by AlphaGamma Add AlphaGamma to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 00:08.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.056 seconds (70.62% PHP - 29.38% MySQL) con 23 query.