themes.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Custom Themes &#8212; phpMyAdmin 4.8.5 documentation</title>
  7. <link rel="stylesheet" href="_static/classic.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: './',
  12. VERSION: '4.8.5',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="index" title="Index" href="genindex.html" />
  22. <link rel="search" title="Search" href="search.html" />
  23. <link rel="copyright" title="Copyright" href="copyright.html" />
  24. <link rel="top" title="phpMyAdmin 4.8.5 documentation" href="index.html" />
  25. <link rel="up" title="User Guide" href="user.html" />
  26. <link rel="next" title="Other sources of information" href="other.html" />
  27. <link rel="prev" title="Import and export" href="import_export.html" />
  28. </head>
  29. <body role="document">
  30. <div class="related" role="navigation" aria-label="related navigation">
  31. <h3>Navigation</h3>
  32. <ul>
  33. <li class="right" style="margin-right: 10px">
  34. <a href="genindex.html" title="General Index"
  35. accesskey="I">index</a></li>
  36. <li class="right" >
  37. <a href="other.html" title="Other sources of information"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="import_export.html" title="Import and export"
  41. accesskey="P">previous</a> |</li>
  42. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.5 documentation</a> &#187;</li>
  43. <li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
  44. </ul>
  45. </div>
  46. <div class="document">
  47. <div class="documentwrapper">
  48. <div class="bodywrapper">
  49. <div class="body" role="main">
  50. <div class="section" id="custom-themes">
  51. <span id="themes"></span><h1>Custom Themes<a class="headerlink" href="#custom-themes" title="Permalink to this headline">¶</a></h1>
  52. <p>phpMyAdmin comes with support for third party themes. You can download
  53. additonal themes from our website at &lt;<a class="reference external" href="https://www.phpmyadmin.net/themes/">https://www.phpmyadmin.net/themes/</a>&gt;.</p>
  54. <div class="section" id="configuration">
  55. <h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
  56. <p>Themes are configured with <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_ThemeManager"><code class="xref config config-option docutils literal"><span class="pre">$cfg['ThemeManager']</span></code></a> and
  57. <span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_ThemeDefault"><code class="xref config config-option docutils literal"><span class="pre">$cfg['ThemeDefault']</span></code></a>. Under <code class="file docutils literal"><span class="pre">./themes/</span></code>, you should not
  58. delete the directory <code class="docutils literal"><span class="pre">pmahomme</span></code> or its underlying structure, because this is
  59. the system theme used by phpMyAdmin. <code class="docutils literal"><span class="pre">pmahomme</span></code> contains all images and
  60. styles, for backwards compatibility and for all themes that would not include
  61. images or css-files. If <span class="target" id="index-2"></span><a class="reference internal" href="config.html#cfg_ThemeManager"><code class="xref config config-option docutils literal"><span class="pre">$cfg['ThemeManager']</span></code></a> is enabled, you
  62. can select your favorite theme on the main page. Your selected theme will be
  63. stored in a cookie.</p>
  64. </div>
  65. <div class="section" id="creating-custom-theme">
  66. <h2>Creating custom theme<a class="headerlink" href="#creating-custom-theme" title="Permalink to this headline">¶</a></h2>
  67. <p>To create a theme:</p>
  68. <ul class="simple">
  69. <li>make a new subdirectory (for example &#8220;your_theme_name&#8221;) under <code class="file docutils literal"><span class="pre">./themes/</span></code>.</li>
  70. <li>copy the files and directories from <code class="docutils literal"><span class="pre">pmahomme</span></code> to &#8220;your_theme_name&#8221;</li>
  71. <li>edit the css-files in &#8220;your_theme_name/css&#8221;</li>
  72. <li>put your new images in &#8220;your_theme_name/img&#8221;</li>
  73. <li>edit <code class="file docutils literal"><span class="pre">layout.inc.php</span></code> in &#8220;your_theme_name&#8221;</li>
  74. <li>edit <code class="file docutils literal"><span class="pre">theme.json</span></code> in &#8220;your_theme_name&#8221; to contain theme metadata (see below)</li>
  75. <li>make a new screenshot of your theme and save it under
  76. &#8220;your_theme_name/screen.png&#8221;</li>
  77. </ul>
  78. <div class="section" id="theme-metadata">
  79. <h3>Theme metadata<a class="headerlink" href="#theme-metadata" title="Permalink to this headline">¶</a></h3>
  80. <div class="versionchanged">
  81. <p><span class="versionmodified">Changed in version 4.8.0: </span>Before 4.8.0 the theme metadata was passed in the <code class="file docutils literal"><span class="pre">info.inc.php</span></code> file.
  82. It has been replaced by <code class="file docutils literal"><span class="pre">theme.json</span></code> to allow easier parsing (without
  83. need to handle PHP code) and to support additional features.</p>
  84. </div>
  85. <p>In theme directory there is file <code class="file docutils literal"><span class="pre">theme.json</span></code> which contains theme
  86. metadata. Currently it consists of:</p>
  87. <dl class="describe">
  88. <dt>
  89. <code class="descname">name</code></dt>
  90. <dd><p>Display name of the theme.</p>
  91. <p><strong>This field is required.</strong></p>
  92. </dd></dl>
  93. <dl class="describe">
  94. <dt>
  95. <code class="descname">version</code></dt>
  96. <dd><p>Theme version, can be quite arbirary and does not have to match phpMyAdmin version.</p>
  97. <p><strong>This field is required.</strong></p>
  98. </dd></dl>
  99. <dl class="describe">
  100. <dt>
  101. <code class="descname">desciption</code></dt>
  102. <dd><p>Theme description. this will be shown on the website.</p>
  103. <p><strong>This field is required.</strong></p>
  104. </dd></dl>
  105. <dl class="describe">
  106. <dt>
  107. <code class="descname">author</code></dt>
  108. <dd><p>Theme author name.</p>
  109. <p><strong>This field is required.</strong></p>
  110. </dd></dl>
  111. <dl class="describe">
  112. <dt>
  113. <code class="descname">url</code></dt>
  114. <dd><p>Link to theme author website. It&#8217;s good idea to have way for getting
  115. support there.</p>
  116. </dd></dl>
  117. <dl class="describe">
  118. <dt>
  119. <code class="descname">supports</code></dt>
  120. <dd><p>Array of supported phpMyAdmin major versions.</p>
  121. <p><strong>This field is required.</strong></p>
  122. </dd></dl>
  123. <p>For example, the definition for Original theme shipped with phpMyAdnin 4.8:</p>
  124. <div class="highlight-json"><div class="highlight"><pre><span></span><span class="p">{</span>
  125. <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;Original&quot;</span><span class="p">,</span>
  126. <span class="nt">&quot;version&quot;</span><span class="p">:</span> <span class="s2">&quot;4.8&quot;</span><span class="p">,</span>
  127. <span class="nt">&quot;description&quot;</span><span class="p">:</span> <span class="s2">&quot;Original phpMyAdmin theme&quot;</span><span class="p">,</span>
  128. <span class="nt">&quot;author&quot;</span><span class="p">:</span> <span class="s2">&quot;phpMyAdmin developers&quot;</span><span class="p">,</span>
  129. <span class="nt">&quot;url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://www.phpmyadmin.net/&quot;</span><span class="p">,</span>
  130. <span class="nt">&quot;supports&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;4.8&quot;</span><span class="p">]</span>
  131. <span class="p">}</span>
  132. </pre></div>
  133. </div>
  134. </div>
  135. <div class="section" id="sharing-images">
  136. <h3>Sharing images<a class="headerlink" href="#sharing-images" title="Permalink to this headline">¶</a></h3>
  137. <p>If you do not want to use your own symbols and buttons, remove the
  138. directory &#8220;img&#8221; in &#8220;your_theme_name&#8221;. phpMyAdmin will use the
  139. default icons and buttons (from the system-theme <code class="docutils literal"><span class="pre">pmahomme</span></code>).</p>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  147. <div class="sphinxsidebarwrapper">
  148. <h3><a href="index.html">Table Of Contents</a></h3>
  149. <ul>
  150. <li><a class="reference internal" href="#">Custom Themes</a><ul>
  151. <li><a class="reference internal" href="#configuration">Configuration</a></li>
  152. <li><a class="reference internal" href="#creating-custom-theme">Creating custom theme</a><ul>
  153. <li><a class="reference internal" href="#theme-metadata">Theme metadata</a></li>
  154. <li><a class="reference internal" href="#sharing-images">Sharing images</a></li>
  155. </ul>
  156. </li>
  157. </ul>
  158. </li>
  159. </ul>
  160. <h4>Previous topic</h4>
  161. <p class="topless"><a href="import_export.html"
  162. title="previous chapter">Import and export</a></p>
  163. <h4>Next topic</h4>
  164. <p class="topless"><a href="other.html"
  165. title="next chapter">Other sources of information</a></p>
  166. <div role="note" aria-label="source link">
  167. <h3>This Page</h3>
  168. <ul class="this-page-menu">
  169. <li><a href="_sources/themes.txt"
  170. rel="nofollow">Show Source</a></li>
  171. </ul>
  172. </div>
  173. <div id="searchbox" style="display: none" role="search">
  174. <h3>Quick search</h3>
  175. <form class="search" action="search.html" method="get">
  176. <div><input type="text" name="q" /></div>
  177. <div><input type="submit" value="Go" /></div>
  178. <input type="hidden" name="check_keywords" value="yes" />
  179. <input type="hidden" name="area" value="default" />
  180. </form>
  181. </div>
  182. <script type="text/javascript">$('#searchbox').show(0);</script>
  183. </div>
  184. </div>
  185. <div class="clearer"></div>
  186. </div>
  187. <div class="related" role="navigation" aria-label="related navigation">
  188. <h3>Navigation</h3>
  189. <ul>
  190. <li class="right" style="margin-right: 10px">
  191. <a href="genindex.html" title="General Index"
  192. >index</a></li>
  193. <li class="right" >
  194. <a href="other.html" title="Other sources of information"
  195. >next</a> |</li>
  196. <li class="right" >
  197. <a href="import_export.html" title="Import and export"
  198. >previous</a> |</li>
  199. <li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 4.8.5 documentation</a> &#187;</li>
  200. <li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
  201. </ul>
  202. </div>
  203. <div class="footer" role="contentinfo">
  204. &#169; <a href="copyright.html">Copyright</a> 2012 - 2018, The phpMyAdmin devel team.
  205. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
  206. </div>
  207. </body>
  208. </html>