Lgtestforum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

[ View the whole list ]


Most users ever online was 37 on Fri Sep 17, 2021 8:43 pm
Statistics
We have 15 registered users
The newest registered user is bilde

Our users have posted a total of 271 messages in 27 subjects
deleted after updated

thanks testing thread

2 posters

Go down

one thanks testing thread

Post by Admin Sat Mar 24, 2012 12:45 am

\sazdgfxhdgfjnyg


Last edited by Admin on Fri Jul 27, 2012 12:16 am; edited 1 time in total
Admin
Admin
Admin

Avacweb
Posts : 231
Points : 282
Join date : 2011-11-07

https://testlg.forumotion.co.uk

Back to top Go down

one Re: thanks testing thread

Post by Admin Sat Mar 24, 2012 12:45 am

4y4utyun
Admin
Admin
Admin

Avacweb
Posts : 231
Points : 282
Join date : 2011-11-07

https://testlg.forumotion.co.uk

Back to top Go down

one Re: thanks testing thread

Post by Admin Sat Mar 24, 2012 12:46 am

4ycrsdv
Admin
Admin
Admin

Avacweb
Posts : 231
Points : 282
Join date : 2011-11-07

https://testlg.forumotion.co.uk

Back to top Go down

one Re: thanks testing thread

Post by tester Sat Mar 24, 2012 1:28 am

umntyjbhvt

tester

Posts : 17
Points : 26
Join date : 2011-11-27

Back to top Go down

one Re: thanks testing thread

Post by tester Sat Mar 24, 2012 1:29 am

yjygf

tester

Posts : 17
Points : 26
Join date : 2011-11-27

Back to top Go down

one Re: thanks testing thread

Post by Admin Wed Apr 11, 2012 11:28 am

Code:

//consider your string as the variable $string

//only do it if there is a code block in the text.
if(preg_match('/\[code\](.|\r|\n)*\[code\]', $string))
{
   //split the string up at each starting [code] tag.
   //so you got 'stuff inside code [/code] more stuff'
   $codes = explode('[code]',$string);
   for($i=0; $i<count($codes); $i++)
   {
      //now split that string at the closing code block. So you have the stuff inside the code block.
      $code_content = explode('[/code]',$codes[$i]);
      
      //fix the stuff in the code block.
      $code_fixed = htmlspecialchars( $code_content[0] );
      
      //Now replace the entry in the codes array with the new fixed content, plus everything after the closing code block.
      $codes[$i] = $code_fixed .'</code></div>'. $code_content[1];
   }
   //join it all together again with the html for the opening code block instead.
   $string = implode( '<div class="codediv"><code>', $codes);
}

Admin
Admin
Admin

Avacweb
Posts : 231
Points : 282
Join date : 2011-11-07

https://testlg.forumotion.co.uk

Back to top Go down

one Re: thanks testing thread

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum