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

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
(left.php)
(Theme Development)
 
Line 1: Line 1:
=Theme Development=
=Theme Development=
-
<p class="note">Note: This is a technical document. It discusses technical aspects of theme module and developing a custom theme which requires a good knowledge of advanced PHP, HTML, CSS and Javascript and is not meant for non-technical users. Know more about themes: [[Help:Themes|What are themes?]] | [[Help:Using Themes|Using Themes]] | [[Help            :Templating Engines]].</p>
+
<p class="note">Note: This is a technical document. It discusses technical aspects of theme module and developing a custom theme which requires a good knowledge of advanced PHP, HTML, CSS and Javascript and is not meant for non-technical users. Know more about themes: [[Help:Themes|What are themes?]] | [[Help:Themes#How to change Themes|How to change Themes]].</p>
__TOC__
__TOC__
Line 7: Line 7:
==Nature of themes==
==Nature of themes==
-
Themes are neither solid, liquid or gas. They are collection of PHP scripts, HTML/CSS files and images, living under themes folder at root with folder name same as theme name. For Example: Theme '''Demo''' will be at ROOT/themes/demo. Theme files are interlinked and hooked together to form the actual website.
+
Themes are collection of PHP scripts, HTML/CSS files and images, living under themes folder at root with folder name same as theme name. For Example: Theme '''Demo''' will be at ROOT/themes/demo. Theme files are interlinked and hooked together to form the actual website.
-
 
+
-
==Why develop themes?==
+
-
 
+
-
These are the reasons why should you learn theme development of Social Network Software.
+
 +
==Why learn developing themes?==
*Complete control over layout, presentation and various design elements.
*Complete control over layout, presentation and various design elements.
*Tweaking already existing themes according to you and your community taste.
*Tweaking already existing themes according to you and your community taste.
Line 170: Line 167:
==Miscellaneous theme files==
==Miscellaneous theme files==
 +
 +
Absence of any of these files do not lead to any problem and they provide additional features which do not alter theme functionality or theme development.
===index.php===
===index.php===
 +
 +
This file do not contribute to theme development but is a security feature. It contains a simple line:
 +
<?php header('../'); ?>
 +
It simply redirects anyone trying to reach the theme folder one directory back. e.g. user trying to go to folder of default theme i.e. {ROOT}/themes/defaulttheme will bounce back to {ROOT}/themes.
 +
 +
As {ROOT}/themes again have identical index.php redirection script, so user is redirected again one directory back to homepage i.e. at {ROOT}/index.php.
 +
 +
<div class="note">Though directory listing in Apache is prevented by setting directory permissions which shows an Apache's untidy access denied error, so this is just a nice and friendly way to tell user that he is not allowed to do so.</div>
===screenshot.gif===
===screenshot.gif===
 +
 +
This contains the screenshot of the theme's homepage which is shown as a thumbnail in admin panel theme choosing screen so that a particular theme can be visually recognized.
 +
 +
If absent, no thumbnail is shown.
===info.txt===
===info.txt===
 +
 +
This text contains information about theme which is displayed again in admin panel theme selection screen. Information contains, theme's name, description and version in following format.
 +
 +
Theme Name: Default theme
 +
Description: This is default theme for social network software.
 +
Version: 1.0
 +
 +
If absent, theme folder name is displayed as theme name and rest information is not displayed.
===theme specific images===
===theme specific images===
 +
 +
Theme related images can be stored inside a separate folder named '''images''' inside respective theme directory.
 +
 +
<div class="note">Only theme dependent images (e.g. bullets, backgrounds, buttons and icons etc.) must be stored inside images folder and images which are part of website instead (e.g. logo and products images) must be put at {ROOT}/images so that they can be shared among all themes.</div>

Latest revision as of 12:26, 28 July 2011

Main Page
About SNS
Developer Documentation
Personal tools