Examples.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <!DOCTYPE html>
  2. <html dir="ltr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  5. <title>Dev/Config files/Examples - XOWA</title>
  6. <link rel="shortcut icon" href="https://gnosygnu.github.io/xowa/xowa_logo.png" />
  7. <link rel="stylesheet" href="https://gnosygnu.github.io/xowa/xowa_common.css" type="text/css">
  8. </head>
  9. <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck="false">
  10. <div id="mw-page-base" class="noprint"></div>
  11. <div id="mw-head-base" class="noprint"></div>
  12. <div id="content" class="mw-body">
  13. <h1 id="firstHeading" class="firstHeading"><span>Dev/Config files/Examples</span></h1>
  14. <div id="bodyContent" class="mw-body-content">
  15. <div id="siteSub">From XOWA: the free, open-source, offline wiki application</div>
  16. <div id="contentSub"></div>
  17. <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
  18. <h2>
  19. <span class="mw-headline" id="Changing_a_keyboard_shortcut">Changing a keyboard shortcut</span>
  20. </h2>
  21. <ul>
  22. <li>
  23. Open xowa.gfs in a text editor.
  24. </li>
  25. <li>
  26. Search for <code>'app_exit'</code> (Note the single quotes).
  27. </li>
  28. </ul>
  29. <dl>
  30. <dd>
  31. The following line should be found:
  32. <dl>
  33. <dd>
  34. <code>.set('app_exit' , 'mod.c+key.q')</code>
  35. </dd>
  36. </dl>
  37. </dd>
  38. <dd>
  39. This line defines Control+Q as the shortcut to exit the application.
  40. </dd>
  41. </dl>
  42. <ul>
  43. <li>
  44. Change the shortcut from Control+Q to Control+Z by changing <code>key.q</code> to <code>key.z</code>.
  45. </li>
  46. </ul>
  47. <dl>
  48. <dd>
  49. When you are done you should have the following line (note the red highlight):
  50. <dl>
  51. <dd>
  52. <code>.set('app_exit' , 'mod.c+key.<span style="color:red;">z</span>')</code>
  53. </dd>
  54. </dl>
  55. </dd>
  56. </dl>
  57. <ul>
  58. <li>
  59. Save xowa.gfs and close the file.
  60. </li>
  61. <li>
  62. Run XOWA. Press Control+Z to exit the application.
  63. </li>
  64. </ul>
  65. <h2>
  66. <span class="mw-headline" id="Changing_the_HTML_view">Changing the HTML view</span>
  67. </h2>
  68. <ul>
  69. <li>
  70. Open xowa.gfs in a text editor.
  71. </li>
  72. <li>
  73. Search for the line <code>.page_read_(</code>
  74. </li>
  75. </ul>
  76. <dl>
  77. <dd>
  78. The following lines define the HTML used for the "Read" tab.
  79. </dd>
  80. <dd>
  81. For now, let's add a "Hello World!"
  82. </dd>
  83. </dl>
  84. <ul>
  85. <li>
  86. Scroll down about 20 lines. You will see the following line:
  87. </li>
  88. </ul>
  89. <dl>
  90. <dd>
  91. <dl>
  92. <dd>
  93. <code>&lt;div id="siteSub"&gt;From XOWA:....</code> .
  94. </dd>
  95. </dl>
  96. </dd>
  97. </dl>
  98. <ul>
  99. <li>
  100. Add a "Hello World!" right before "From XOWA:". When you are done you should have the following line (note the red highlight):
  101. </li>
  102. </ul>
  103. <dl>
  104. <dd>
  105. <dl>
  106. <dd>
  107. <code>&lt;div id="siteSub"&gt;<span style="color:red;">Hello World!</span> From XOWA:....</code> .
  108. </dd>
  109. </dl>
  110. </dd>
  111. </dl>
  112. <ul>
  113. <li>
  114. Save xowa.gfs and close the file.
  115. </li>
  116. <li>
  117. Run XOWA. Note the "Hello World!" text at the top of the page.
  118. </li>
  119. </ul>
  120. </div>
  121. </div>
  122. </div>
  123. <div id="mw-head" class="noprint">
  124. <div id="left-navigation">
  125. <div id="p-namespaces" class="vectorTabs">
  126. <h3>Namespaces</h3>
  127. <ul>
  128. <li id="ca-nstab-main" class="selected"><span><a id="ca-nstab-main-href" href="index.html">Page</a></span></li>
  129. </ul>
  130. </div>
  131. </div>
  132. </div>
  133. <div id='mw-panel' class='noprint'>
  134. <div id='p-logo'>
  135. <a style="background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href="http://xowa.org/" title="Visit the main page"></a>
  136. </div>
  137. <div class="portal" id='xowa-portal-home'>
  138. <h3>XOWA</h3>
  139. <div class="body">
  140. <ul>
  141. <li><a href="http://xowa.org/index.html" title='Visit the main page'>Main page</a></li>
  142. <li><a href="http://xowa.org/screenshots.html" title='See screenshots of XOWA'>Screenshots</a></li>
  143. <li><a href="https://www.youtube.com/watch?v=q0qbXYXEH6M" title="See a video of XOWA Desktop in action">Video</a></li>
  144. <li><a href="http://xowa.org/home/wiki/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
  145. <li><a href="http://xowa.org/home/wiki/Dashboard/Image_databases.html" title='Download offline wikis and image databases'>Download wikis</a></li>
  146. </ul>
  147. </div>
  148. </div>
  149. <div class="portal" id='xowa-portal-started'>
  150. <h3>Getting started</h3>
  151. <div class="body">
  152. <ul>
  153. <li><a href="http://xowa.org/home/wiki/App/Setup/System_requirements.html" title='Get XOWA&apos;s system requirements'>Requirements</a></li>
  154. <li><a href="http://xowa.org/home/wiki/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
  155. <li><a href="http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
  156. <li><a href="http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
  157. <li><a href="http://xowa.org/home/wiki/App/Import/Other_wikis.html" title='Learn how to set up other Wikipedias'>Other Wikipedias</a></li>
  158. </ul>
  159. </div>
  160. </div>
  161. <div class="portal" id='xowa-portal-android'>
  162. <h3>Android</h3>
  163. <div class="body">
  164. <ul>
  165. <li><a href="http://xowa.org/home/wiki/Android/Setup.html" title='Setup XOWA on your Android device'>Setup</a></li>
  166. <li><a href="https://www.youtube.com/watch?v=jsMTBxGweUw" title="See a video of XOWA Android in action">Video</a></li>
  167. </ul>
  168. </div>
  169. </div>
  170. <div class="portal" id='xowa-portal-help'>
  171. <h3>Help</h3>
  172. <div class="body">
  173. <ul>
  174. <li><a href="http://xowa.org/home/wiki/Help/About.html" title='Get more information about XOWA'>About</a></li>
  175. <li><a href="http://xowa.org/home/wiki/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
  176. <li><a href="http://xowa.org/home/wiki/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
  177. <li><a href="http://xowa.org/home/wiki/Help/Feedback.html" title='Questions? Comments? Leave feedback for XOWA'>Feedback</a></li>
  178. </ul>
  179. </div>
  180. </div>
  181. <div class="portal" id='xowa-portal-blog'>
  182. <h3>Blog</h3>
  183. <div class="body">
  184. <ul>
  185. <li><a href="http://xowa.org/home/wiki/Blog.html" title='Follow XOWA''s development process'>Current</a></li>
  186. </ul>
  187. </div>
  188. </div>
  189. <div class="portal" id='xowa-portal-links'>
  190. <h3>Links</h3>
  191. <div class="body">
  192. <ul>
  193. <li><a href="http://dumps.wikimedia.org/backup-index.html" title="Get wiki datababase dumps directly from Wikimedia">Wikimedia dumps</a></li>
  194. <li><a href="https://archive.org/search.php?query=xowa" title="Search archive.org for XOWA files">XOWA @ archive.org</a></li>
  195. <li><a href="http://en.wikipedia.org" title="Visit Wikipedia (and compare to XOWA!)">English Wikipedia</a></li>
  196. </ul>
  197. </div>
  198. </div>
  199. <div class="portal" id='xowa-portal-donate'>
  200. <h3>Donate</h3>
  201. <div class="body">
  202. <ul>
  203. <li><a href="https://archive.org/donate/index.php" title="Support archive.org!">archive.org</a></li><!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning-center-fire-please-help-rebuild/ -->
  204. <li><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title="Support Wikipedia!">Wikipedia</a></li>
  205. <li><a href="http://xowa.org/home/wiki/Help/Donate.html" title="Support XOWA!">XOWA</a></li>
  206. </ul>
  207. </div>
  208. </div>
  209. </div>
  210. </body>
  211. </html>