Search found 8 matches

by Lundern
Fri Aug 13, 2004 5:59 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

Yes!!! Finally we got it to work :D There was some bugs though: if(preg_match_all('#\['.'php](.*?)\[/'.'php]#is', $r['eksart'],$matches)) { foreach($matches[0] as $k => $str) $r['eksart'] = str_replace($str, '<b>PHP:</b><br><table width="100%" border="0" cellspacing="0"...
by Lundern
Fri Aug 13, 2004 5:18 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

I can upload the files in .phps, so that you can look at the files. This is were the "selective highlight" comes in the picture: http://webportalen.lundern.net/feyd/innlegg.phps This is the action file that put all the info into the database: http://webportalen.lundern.net/feyd/add_art_act...
by Lundern
Fri Aug 13, 2004 4:16 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

Addslashes didnt work so well as stripslashes did, but then I get all these \ all the time :P

EDIT: + a error message similar to the one I posted..
by Lundern
Fri Aug 13, 2004 4:07 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

Nice, it worked great, but (I dont want to spam you down): look at this: http://webportalen.lundern.net/?side=in ... e=artikkel

Why does that come?

PS! Thank you very much for your help, you will get a huge banner/link on the page!
by Lundern
Fri Aug 13, 2004 3:44 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

But that one doesnt highlight, it becomes like this: http://webportalen.lundern.net/?side=in ... e=artikkel
by Lundern
Fri Aug 13, 2004 3:26 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

Yeah, I looked at some codes, this is the best I have found to now: /* Code Format */ $message = eregi_replace('\&#1111;*code](&#1111;^&#1111;]*)\&#1111;/*code]', '<b>Code:</b><blockquote style="width: 100%; margin: 3px 8px 3px 16px; color: #000; background-color: #FFF; border: ...
by Lundern
Fri Aug 13, 2004 2:47 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

I have already tried that, but the codes they are using is to advanced for me :P
by Lundern
Fri Aug 13, 2004 2:24 am
Forum: PHP - Code
Topic: BB code: [code]
Replies: 17
Views: 925

BB code: [code]

Hi, my portal is in the making. But I need some help, how can I use preg_replace to call out an highlighting from the code function on this forum, for example: <?php echo"I want to have this codething on my site.."; ?> My code goes like this: <?php $q = @mysql_query("SELECT * FROM art...