Versionsunterschiede von Git / Einen Patch Beitragen




← Vorherige Änderung
Nächste Änderung →




  1 {{hits}}  
  2  
1 3 Neue Funktionalität beitragen: https://wackowiki.org/doc/Org/GetInvolved
2 4
  5 How2patch > https://www.gitkraken.com/learn/git/git-patch  
3 6
4 7
5 8 =====Neue Funktionalität fßr Dein Wiki erstellen =====
40 43
41 44 commit
42 45
43    
44   ====Bestehende Action verbessern am Beisiel von {{hits}}==  
45   Erstelle eine Lokalisierung  
46    
47   Ändere die Datei /community/action/hits.php  
48   <?php  
49    
50   if (!defined('IN_WACKO'))  
51   {  
52       exit;  
53   }  
54    
55   // {{hits}}  
56   // take $this->page['hits'] in the first place  
57    
58   // set defaults  
59   $page ??= '';  
60   $result = 0;  
61    
62   if ($page)  
63   {  
64       $tag = $this->unwrap_link($page);  
65    
66       $rs = $this->db->load_single(  
67           "SELECT hits " .  
68           "FROM " . $this->prefix . "page " .  
69           "WHERE tag = " . $this->db->q($tag) . " " .  
70           "LIMIT 1");  
71    
72       if (isset($rs['hits']))  
73       {  
74           $result = $rs['hits'];  
75       }  
76   }  
77   else  
78   {  
79       $result = $this->page['hits'];  
80   }  
81    
82   $tpl->result = $result;  
83    
84   ## echo number_format($result, 0, ',', '.');  
85    
86   Erstelle eine Datei /community/action/template/hits.tpl  
87    
88   Erstelle Sprachdateien  
89    
90    
91    
92 46 =====Am eigenen Theme arbeiten=====
93 47
94 48