]> git.mxchange.org Git - friendica.git/blobdiff - doc/themes.md
Merge pull request #3110 from tobiasd/20170127-translationdocs
[friendica.git] / doc / themes.md
index ec3a76ac289a472088350110335ee2d60a317062..b553debfd756102942eace6786202f7721ba5a81 100644 (file)
@@ -59,19 +59,7 @@ The same rule applies to the JavaScript files found in
 
 they will be overwritten by files in
 
-    /view/theme/**your-theme-name**/js
-
-### Modules
-
-You have the freedom to override core modules found in
-
-    /mod
-
-They will be overwritten by files in
-
-    /view/theme/**your-theme-name**/mod
-
-Be aware that you can break things easily here if you don't know what you do. Also notice that you can override parts of the module – functions not defined in your theme module will be loaded from the core module.
+    /view/theme/**your-theme-name**/js.
 
 ## Expand an existing Theme
 
@@ -134,10 +122,11 @@ the 1st part of the line is the name of the CSS file (without the .css) the 2nd
 Calling the t() function with the common name makes the string translateable.
 The selected 1st part will be saved in the database by the theme_post function.
 
-    function theme_post(&$a){
+    function theme_post(App $a){
         // non local users shall not pass
-        if(! local_user())
+        if (! local_user()) {
             return;
+        }
         // if the one specific submit button was pressed then proceed
         if (isset($_POST['duepuntozero-settings-submit'])){
             // and save the selection key into the personal config of the user
@@ -179,7 +168,7 @@ The content of this file should be something like
 
     <?php
     /* meta informations for the theme, see below */
-    function duepuntozero_lr_init(&$a) {
+    function duepuntozero_lr_init(App $a) {
         $a-> theme_info = array(
             'extends' => 'duepuntozero'.
         );
@@ -262,7 +251,7 @@ Next crucial part of the theme.php file is a definition of an init function.
 The name of the function is <theme-name>_init.
 So in the case of quattro it is
 
-    function quattro_init(&$a) {
+    function quattro_init(App $a) {
       $a->theme_info = array();
       set_template_engine($a, 'smarty3');
     }
@@ -300,4 +289,4 @@ The default file is in
     /view/default.php
 
 if you want to change it, say adding a 4th column for banners of your favourite FLOSS projects, place a new default.php file in your theme directory.
-As with the theme.php file, you can use the properties of the $a variable with holds the friendica application to decide what content is displayed.
+As with the theme.php file, you can use the properties of the $a variable with holds the friendica application to decide what content is displayed.
\ No newline at end of file