]> git.mxchange.org Git - friendica.git/blobdiff - doc/themes.md
Merge remote-tracking branch 'upstream/develop' into develop
[friendica.git] / doc / themes.md
index 03a6b447f951cb1b6ec8a5155505d6670e575907..0b8f6cb83dc03aefd95a860b61609488a821c276 100644 (file)
@@ -6,12 +6,15 @@ To change the look of friendica you have to touch the themes.
 The current default theme is [duepunto zero](https://github.com/friendica/friendica/tree/master/view/theme/duepuntozero) but there are numerous others.
 Have a look at [friendica-themes.com](http://friendica-themes.com) for an overview of the existing themes.
 In case none of them suits your needs, there are several ways to change a theme.
+If you need help theming, there is a forum @[ftdevs@friendica.eu](https://friendica.eu/profile/ftdevs) where you can ask theme specific questions and present your themes.
 
-You can either directly work on an existing theme.
+So, how to work on the UI of friendica.
+
+You can either directly edit an existing theme.
 But you might loose your changes when the theme is updated by the friendica team.
 
 If you are almost happy with an existing theme, the easiest way to cover your needs is to create a new theme, inheritating most of the properties of the parent theme and change just minor stuff.
-The beloow for a more detailed description of theme heritage.
+The below for a more detailed description of theme heritage.
 
 Some themes also allow users to select *variants* of the theme.
 Those theme variants most often contain an additional [CSS](https://en.wikipedia.org/wiki/CSS) file to override some styling of the default theme values.
@@ -119,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
@@ -164,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'.
         );
@@ -202,13 +206,13 @@ Basically what you have to do is identifying which template you have to change s
 Adopt the CSS of the theme accordingly.
 And iterate the process until you have the theme the way you want it.
 
-*Use the source Luke.*
+*Use the source Luke.* and don't hesitate to ask in @[ftdevs](https://friendica.eu/profile/ftdevs) or @[helpers](https://helpers.pyxis.uberspace.de/profile/helpers).
 
 ## Special Files
 
 ### unsupported
 
-If a file (which might be empty) exists in the theme directory, the theme is marked as *unsupported*.
+If a file with this name (which might be empty) exists in the theme directory, the theme is marked as *unsupported*.
 An unsupported theme may not be selected by a user in the settings.
 Users who are already using it wont notice anything.
 
@@ -247,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');
     }