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
(First level structure)
(Second level structure)
Line 37: Line 37:
===Second level structure===
===Second level structure===
-
Which is controlled by main_home.php.
+
Which is controlled by main_home.php. It substitutes whatever HTML code needs to be substituted for placeholders inside index.htm.
-
[[Image:Second_Level_Structure.gif|Second level structure is defined by main_home.php]]
+
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
 +
<syntaxhighlight lang="php">
 +
$template->assign_vars(array(
 +
    'PLACEHOLDER'=> $placeholder_data
 +
));
 +
</syntaxhighlight>
 +
 
 +
[[Image:Theme-structure-main-home-php.gif|Second level structure is defined by main_home.php]]

Revision as of 10:25, 19 July 2011

Main Page
About SNS
Developer Documentation
Personal tools