Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function remove_formatting( $string ) {
  2. $find = array();
  3. $find[] = '/width="\d+(px|%)?"\s*\|/';
  4. return preg_replace($find, "", $string);
  5. }
  6.  
  7. function add_multiple_view( $box ){
  8. global $wgUser,$wgServer,$wgScriptPath;
  9.  
  10. if (!$box || !is_object($box)) trigger_error("An error has occured.\n", E_USER_ERROR);
  11.  
  12. $string = "<h4>Instructions</h4>
  13. Enter data in the Text area. Each row should be an a new line and fields should
  14. be delimited by \"||\" (double pipes) or tabs.";
  15.  
  16. $sample_line = "";
  17. if (trim($box->headings) != "" ) {
  18. $sample_line = str_replace("\n", '||', $box->headings);
  19. $string .= "For example, a sample line of input looks like:<br />
  20. <pre>$sample_line</pre><br />";
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement