Warning: preg_match_all() [function.preg-match-all]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/socialne/public_html/wiki/includes/MagicWord.php on line 671

Warning: preg_replace() [function.preg-replace]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all() [function.preg-match-all]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/socialne/public_html/wiki/includes/MagicWord.php on line 671

Warning: preg_replace() [function.preg-replace]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all() [function.preg-match-all]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/socialne/public_html/wiki/includes/MagicWord.php on line 671

Warning: preg_replace() [function.preg-replace]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 675

Warning: preg_match_all() [function.preg-match-all]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 670

Warning: Invalid argument supplied for foreach() in /home/socialne/public_html/wiki/includes/MagicWord.php on line 671

Warning: preg_replace() [function.preg-replace]: Compilation failed: group name must start with a non-digit at offset 4 in /home/socialne/public_html/wiki/includes/MagicWord.php on line 675
Devdoc:Theme Development - Social Networking Software - Online Social Network Software
From Social Networking Software - Online Social Network Software
Jump to: navigation, search
(main_home.php)
(main_home.php)
Line 41: Line 41:
It is actually done with the help of '''assign_vars''' method of '''$template''' object of Template class. For example to assign some HTML code to {PLACEHOLDER}, first generate HTML and store it in some variable or as a constant (say $placeholder_data) and then assign that value to {PLACEHOLDER} by
It is actually done with the help of '''assign_vars''' method of '''$template''' object of Template class. For example to assign some HTML code to {PLACEHOLDER}, first generate HTML and store it in some variable or as a constant (say $placeholder_data) and then assign that value to {PLACEHOLDER} by
  $template->assign_vars(array(
  $template->assign_vars(array(
-
     'PLACEHOLDER'=> $placeholder_data
+
     'PLACEHOLDER'=> $placeholder_html
  ));
  ));
Line 48: Line 48:
<div class="note">Header and footer data can also be populated using this technique but it is not recommended.
<div class="note">Header and footer data can also be populated using this technique but it is not recommended.
-
So following is a deprecated technique:
+
So following is a deprecated technique to replace {HEADER_HTML} and {FOOTER_HTML}:
   
   
  $template->assign_vars(array(
  $template->assign_vars(array(
-
     'HEADER_HTML'=>$header_data,
+
     'HEADER'=>$header_html,
 +
    'FOOTER'=>$footer_html
  ));
  ));

Revision as of 06:43, 20 July 2011

Main Page
About SNS
Developer Documentation
Personal tools