DokuWiki

It's better when it's simple

User Tools

Site Tools


template:vector

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
template:vector [2020-07-17 17:03] – [Sites using this Template] Wirbel78template:vector [2024-02-19 13:00] (current) menix
Line 2: Line 2:
  
 ---- template ---- ---- template ----
-description   : Wikipedia/MediaWiki look and feel for DokuWiki (current)+description   : Wikipedia/MediaWiki look and feel for DokuWiki
 author        : ARSAVA author        : ARSAVA
 email         : dokuwiki@dev.arsava.com email         : dokuwiki@dev.arsava.com
 lastupdate    : 2014-02-09 lastupdate    : 2014-02-09
-compatible    : 2009-12-25 "Lemming"2010-11-07 "Anteater"2011-05-25 "Rincewind"2012-01-25 "Angua"2012-10-13 "Adora Belle"2013-03-06 "Weatherwax"2013-12-08 "Binky", Hrun, 2015-08-10 "Detritus"2016-06-26 "Elenor Of Tsort"+compatible    : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather
 depends       :  depends       : 
 conflicts     :  conflicts     : 
 similar       :  similar       : 
-screenshot_img: http://img832.imageshack.us/img832/8784/dokuwikitemplatevector2.png 
 tags          : monobook, mediawiki, wikipedia, dokubook, vector, sidebar, talk, translation tags          : monobook, mediawiki, wikipedia, dokubook, vector, sidebar, talk, translation
  
Line 17: Line 16:
 sourcerepo    : https://github.com/arsava/dokuwiki-template-vector/ sourcerepo    : https://github.com/arsava/dokuwiki-template-vector/
 donationurl   : https://donate.arsava.com/dokuwiki-template-vector/ donationurl   : https://donate.arsava.com/dokuwiki-template-vector/
 +
 +screenshot_img: https://trello.com/1/cards/659eddb619f591051aec5523/attachments/659eddf02a169266426f686f/download/vector-for-dokuwiki-template-screenshot.png
 ----  ---- 
  
-:!: Problems with this template in **Ponder Stibbons**? Due to a [[https://github.com/splitbrain/dokuwiki/issues/683|bug]] in DokuWiki, you need to **[[config:compress|disable the 'compress' option]]!** :!:+:!: Problems with this template in **Ponder Stibbons**? Due to a [[issue>683|bug]] in DokuWiki, you need to **[[config:compress|disable the 'compress' option]]!** :!:
  
 ===== About ===== ===== About =====
  
-"vector for DokuWiki" brings you the current((Wikipedia used "[[.:monobook|monobook]]" until the [[http://blog.wikimedia.org/2010/a-new-look-for-wikipedia/|mid of 2010]], now "vector" is in use.)) Wikipedia/[[http://www.mediawiki.org/|MediaWiki]] look and feel for [[:DokuWiki]].+"vector for DokuWiki" brings you the current((Wikipedia used "[[monobook]]" until the [[http://blog.wikimedia.org/2010/a-new-look-for-wikipedia/|mid of 2010]], now "vector" is in use.)) Wikipedia/[[http://www.mediawiki.org/|MediaWiki]] look and feel for [[:DokuWiki]].
   * Maintainer: [[https://dev.arsava.com/|ARSAVA]] ([[https://andreashaerter.com/|Andreas Haerter]])   * Maintainer: [[https://dev.arsava.com/|ARSAVA]] ([[https://andreashaerter.com/|Andreas Haerter]])
   * Contact: See "[[.:vector#support|Support]]" and "[[.:vector#contact|Contact]]".   * Contact: See "[[.:vector#support|Support]]" and "[[.:vector#contact|Contact]]".
Line 32: Line 33:
   * **Cite this Article**\\ Allows students, journalists, researchers, and the like to easily reference articles on your site.   * **Cite this Article**\\ Allows students, journalists, researchers, and the like to easily reference articles on your site.
   * **Permanent Link**\\ __Guarantees__ that articles you link to are the same as you saw them that second you link them.   * **Permanent Link**\\ __Guarantees__ that articles you link to are the same as you saw them that second you link them.
-  * **Automatic plugin integration**\\ vector automatically detects and uses some popular, optionally installed plugins. Therefore you don't have to insert any code snippets or stuff when using: [[plugin:translation|Translation]],((via custom box, see ''/vector/user/boxes.php'')) [[plugin:odt|Open Office Export]], [[plugin:dw2pdf|dw2pdf]], [[plugin:html2pdf|html2pdf]]+  * **Automatic plugin integration**\\ vector automatically detects and uses some popular, optionally installed plugins. Therefore you don't have to insert any code snippets or stuff when using: [[plugin:translation]],((via custom box, see ''/vector/user/boxes.php'')) [[plugin:odt|Open Office Export]], [[plugin:dw2pdf]], [[plugin:html2pdf]]
   * All non-page portions (e.g. navigation) of the template can be edited just as if they were pages. How cool is that? 8-)   * All non-page portions (e.g. navigation) of the template can be edited just as if they were pages. How cool is that? 8-)
  
Line 290: Line 291:
         $_vector_tabs_right["ca-watchns"]["text"] = $lang["vector_unsubscribens"];          $_vector_tabs_right["ca-watchns"]["text"] = $lang["vector_unsubscribens"]; 
     }     }
 +}
 +</code>
 +
 +
 +=== Add custom plugin tab ===
 +The vector template doesn't handle [[devel:event:menu_items_assembly|MENU_ITEMS_ASSEMBLY]] event, so plugins that relies on this event to add buttons to [[:devel:menus]] (like [[plugin:deletepagebutton]] and [[plugin:bookcreator]] plugins) doesn't show up it's icon/link (button). But you can foreach each PageMenu item and add it's icon/link manually.
 +<code php>
 +//custom plugin tab
 +$skip_types = ['backlink', 'create', 'edit', 'export_odt', 'export_pdf', 'revs', 'show', 'top'];
 +foreach((new \dokuwiki\Menu\PageMenu())->getItems() as $item) {
 +    if(in_array($item->getType(), $skip_types)) {
 +        continue;
 +    }
 +    
 +    $attr = $item->getLinkAttributes();
 +    $_vector_tabs_right["tab-" . $item->getType()]["text"    = $attr['title'];
 +    $_vector_tabs_right["tab-" . $item->getType()]["href"    = $attr['href'];
 +    $_vector_tabs_right["tab-" . $item->getType()]["class"   = $attr['class'];
 +    if ($item->isNofollow()) {
 +        $_vector_tabs_right["tab-" . $item->getType()]["nofollow"] = true;
 +    }
 +    
 } }
 </code> </code>
Line 342: Line 365:
 Grtz, Theo Grtz, Theo
  
 +=== Add custom plugin toolbox ===
 +The vector template doesn't handle [[devel:event:menu_items_assembly|MENU_ITEMS_ASSEMBLY]] event, so plugins that relies on this event to add buttons to [[:devel:menus]] (like [[plugin:deletepagebutton]] and [[plugin:bookcreator]] plugins) doesn't show up it's icon/link (button). But you can foreach each PageMenu item and add it's icon/link manually. See [[https://github.com/arsava/dokuwiki-template-vector/issues/64|Issue #64]] on GitHub (arsava/dokuwiki-template-vector).
  
 ==== Hacks for /user/screen.css ===== ==== Hacks for /user/screen.css =====
Line 530: Line 555:
 } }
 </code> </code>
 +
 +=== Automatically numbering Headings and Table of Contents (TOC) via CSS ===
 +<code css>
 +/* Automatically numbering Headings via CSS 
 +https://philarcher.org/diary/2013/headingnumbers/ */
 +body {counter-reset: h2}
 +h2 {counter-reset: h3}
 +h3 {counter-reset: h4}
 +h4 {counter-reset: h5}
 +h5 {counter-reset: h6}
 +
 +h2:before {counter-increment: h2; content: counter(h2) ". "}
 +h3:before {counter-increment: h3; content: counter(h2) "." counter(h3) ". "}
 +h4:before {counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4) ". "}
 +h5:before {counter-increment: h5; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "}
 +h6:before {counter-increment: h6; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". "}
 +
 +h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.nocount:before, #dw__toc h3:before, #panel h5:before { content: ""; counter-increment: none }
 +
 +/* Automatically numbering Table of Contents (TOC) via CSS
 +https://www.freecodecamp.org/news/numbering-with-css-counters/ */
 +#dw__toc ul ul {
 +  list-style-type: none;
 +  counter-reset: css-counters 0; /* intializes counter, set -1 for zero-based counters */
 +}
 +
 +#dw__toc ul ul li div.li:before {
 +  counter-increment: css-counters;
 +  content: counters(css-counters, ".") " "; /* generates inherited counters from parents */
 +}
 +</code>
 +
 +=== Images exceed page body width ===
 +By default, images are not scaled to the width of the page body and exceed the visible region of the page, so I added this to ''/vector/**user**/screen.css'':
 +<code css>
 +div#bodyContent.dokuwiki img { max-width: 100%; height: auto; object-fit: cover; }
 +div#bodyContent.dokuwiki svg { max-width: 50%; height: auto !important; object-fit: cover; }
 +</code>
 +
  
 ===== Version history ===== ===== Version history =====
Line 559: Line 623:
  
 ===== Sites using this Template ===== ===== Sites using this Template =====
- 
 Feel free to add yours here: Feel free to add yours here:
  
 === English === === English ===
 +  * [[https://www.campfire.wiki/doku.php?id=start|Campfire Wiki]]
   * [[http://wiki.geany.org|Geany Wiki]]   * [[http://wiki.geany.org|Geany Wiki]]
   * [[http://readm3.org|Readm3.org]]   * [[http://readm3.org|Readm3.org]]
-  * [[http://wiki.slashdir.com|Slashdir.com Wiki]]+  * [[http://wiki.slashdir.com|Slashdir.com Wiki]] FIXME
   * [[http://reganmian.net/wiki|Stian's PhD Wiki]]   * [[http://reganmian.net/wiki|Stian's PhD Wiki]]
 +  * [[http://mantrakshar.co.in/doku.php/hello |Mantropedia]] 
 +  * [[https://wiki.charles.systems|Charles's Wiki]]
  
 === German === === German ===
-  * [[http://davidak.de/wiki/|Davidak Wiki]]+  * [[http://davidak.de/wiki/|Davidak Wiki]] FIXME
   * [[http://www.freibeuter.us|Freibeuter.us]]   * [[http://www.freibeuter.us|Freibeuter.us]]
   * [[http://wiki.campino2k.de|jQuery Programming & Energydinks]]   * [[http://wiki.campino2k.de|jQuery Programming & Energydinks]]
Line 579: Line 645:
 === French === === French ===
   * [[http://wiki.zebrascrossing.org/|Zebracrossing.org Wiki]] (Hybrid with sidebar template)   * [[http://wiki.zebrascrossing.org/|Zebracrossing.org Wiki]] (Hybrid with sidebar template)
 +  * [[http://wikiplante.fr/|Wikiplante]]
  
 === Russian === === Russian ===
Line 592: Line 659:
   * [[http://ngonnguhoc.net|Ngôn ngữ học]]   * [[http://ngonnguhoc.net|Ngôn ngữ học]]
  
-=== Multiple Languages ===+=== Multiple languages ===
   * [[http://www.dieform.info/|Die Form Guides]] (English and French)   * [[http://www.dieform.info/|Die Form Guides]] (English and French)
  
template/vector.1594998217.txt.gz · Last modified: 2020-07-17 17:03 by Wirbel78

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki