Not logged in. · Lost password · Register
Page:  1  2  3 ... 11  12  13  next 

All posts by Ashtagon (186)

topic: Table formatting  in the forum: General Help and Support Plugins
Avatar
Ashtagon #1
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
I use the mediawiki plugin to give the table a class. That does mean using the mediawiki table syntax rather than the dokuwiki table syntax though.
topic: Does DW integrate Open Graph meta tags?  in the forum: General Help and Support Features and Functionality
Avatar
Ashtagon #2
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 61332
[snark deleted]
This post was edited on 2018-06-14, 23:41 by Ashtagon.
topic: Does DW integrate Open Graph meta tags?  in the forum: General Help and Support Features and Functionality
Avatar
Ashtagon #3
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
Subject: Does DW integrate Open Graph meta tags?
Relevant: https://meetedgar.com/blog/facebooks-new-link-previews-nee…

Support for this would be really helpful for sharing wiki pages to social media sites.
topic: Possible bug in image alt text handling code  in the forum: General Help and Support Syntax and Usage
Avatar
Ashtagon #4
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
Subject: Possible bug in image alt text handling code
{{picture.jpg|Standing on the corner. Hopalong where the sun never shines. Five dollars poor boy that skillet good and greasy, in bed with a hog-\`eyed man peg and awl when I was a little boy. Sittin' on top o' the world black as coal hot corn wildwood flower John Henry standing on the corner pickle my bones in alcohol walking boss you've robbed my poor pocket run. Lonesome, went a court'n loved another man in my sweet baby's arms? They're gonna take Sadie to the burying ground? A poor wayfaring stranger lonesome coming down the track the salt, salt sea? Willie soldier's joy, in my sweet baby's arms gravy. Where the sun never shines Jack-a-Diamonds where the sun never shines, peg and awl...}}

The above code (precise details changed to anonymise data)) fails to load, and results in DW failing to load at all (browser reports page not found). I think I have isolated the critical failure point to the "\`" bit. That is an entry in my local entities conf file (I use it to generate a non-breaking space). It creates no issues within body text, but it seems the image handler does not like this. I can easily work around it, but it was surprising to find this broken, as I know it worked in older versions of DW.
topic: Which Wrap box and note types do you use?  in the forum: General Help and Support Plugins
Avatar
Ashtagon #5
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 60407
Quote by Michaelsy:
[Off topic:]

Quote by Ashtagon:
... which I can then address using a custom css page ...
... include plugin to insert a page that contains nothing but a grandiose set of customised css...

Oh, sounds very interesting. How can I generate such a "grandiose set of customised css" which i can include with the Include-plugin?

Thanks in advance for the answer
   Michael Sy.

(Still off-topic)

At the end of each page that uses customised css, I have something similar to the following:


{{page>5e css}}

This snippet of dokuwiki code use of the include plugin.

This specific example is written to emulate the look and feel of D&D 5th edition role-playing game books, and doesn't something conceptually similar to this website. The "5e css" page used in the example above, as I have currently written it, looks like this (scroll to bottom).

The key points to note from this are:

 :-) All headers have an alternate method of being formed, using, for example, <div h3> for a level 3 header. I occasionally found it necessary to create level 6 headers (or at least the appearance of level 6 headers; dw doesn't support this natively), and decided it was simpler to create the code to support both methods, should dw ever catch up.
 :-) Dropcaps are formatted by wrapping the paragraph in <div dropcap>.
 :-) Inline "sidebars" are formatted by wrapping the entire "sidebar" in <div sb>, or more usually, something like <div sb right 50%> to emulate the layout better.
 :rolleyes: Sidebar "headers" use <div sbh3> in this code snippet (quite why I started sidebar header numbering from three is ayone's guess, but I'm used to it now).

This whole thing could easily be done by editing userstyle.css, but that would mean that either the entire site  would have the same look and feel across all pages, or the css coding would get hideously complex (e.g., I know of no way to have different header styles in different pages if all the css is in userstyle.css and not in included pages).

  1. <html>
  2. <style type="text/css">
  3. /*
  4. header dark: rgb(88,23,13)
  5. header medium: rgb(201,173,106)
  6. */
  7.  
  8. @font-face {
  9.  font-family: 'Olde_English';
  10.  font-weight: normal;
  11.  font-style: normal;
  12.   src:
  13.     local('Olde_English'), /* not a valid font name */
  14.     url('http://127.0.0.1/doku/lib/exe/fetch.php/font/Olde_English.ttf') format('truetype');
  15. }
  16.  
  17. div.page.group {
  18.  background-color: hsl(39,28.4%,92.1%); /* rgb(240,236,229); */
  19.  color: black;
  20.  text-align: justify;
  21. }
  22.  
  23. /* ****************** lists ************ */
  24.  
  25. div.page.group ul {
  26.  list-style: disc outside;
  27. }
  28. div.page.group ul li {
  29.  color: black;
  30.  margin-left: 1.5em;
  31. }
  32. div.page.group ul li div.li {
  33.  color: black;
  34.  text-align: justify;
  35. }
  36.  
  37. /* ****************** headers ************ */
  38.  
  39. h3, div.wrap_h3 p, h4, div.wrap_h4 p {
  40.  color: rgb(88,23,13);
  41.  font-family: serif;
  42.  font-variant: small-caps;
  43.  font-weight: bold;
  44. }
  45.  
  46. h1, div.wrap_h1 p {
  47.  color: rgb(88,23,13);
  48.  font-family: serif;
  49.  font-size: 267%;
  50.  font-variant: small-caps;
  51.  font-weight: bold;
  52.  text-shadow: 1px 1px rgb(208,210,199), -1px -1px rgb(208,210,199), -1px 1px rgb(208,210,199), 1px -1px rgb(208,210,199);
  53. }
  54. h2, div.wrap_h2 p {
  55.  color: rgb(88,23,13);
  56.  font-family: serif;
  57.  font-size: 222%;
  58.  font-variant: small-caps;
  59.  font-weight: bold;
  60.  text-shadow: 1px 1px rgb(208,210,199), -1px -1px rgb(208,210,199), -1px 1px rgb(208,210,199), 1px -1px rgb(208,210,199);
  61. }
  62. h3, div.wrap_h3 p { font-size: 166%; border-bottom: 2px solid rgb(201,172,105); width: 100%; }
  63. h4, div.wrap_h4 p { font-size: 133%; }
  64. h5, div.wrap_h5 p { font-size: 122%; color: black; font-weight: bold; }
  65.  
  66. /* ****************** boxes ************ */
  67.  
  68. div.wrap_sb,
  69. div.wrap_table,
  70. div.wrap_inline,
  71. div.wrap_col2, div.wrap_col3 {
  72.  margin-bottom: 1em;
  73.  padding: 0.5em;
  74. }
  75. div.wrap_col2 div.wrap_sb,     div.wrap_col3 div.wrap_sb,
  76. div.wrap_col2 div.wrap_table,  div.wrap_col3 div.wrap_table,
  77. div.wrap_col2 div.wrap_inline, div.wrap_col3 div.wrap_inline {
  78.  display: table;
  79.  width: 100%
  80. }
  81.  
  82. div.wrap_sb {
  83.  background-color: rgb(224,229,193);
  84.  border-top: solid 3px black;
  85.  border-bottom: solid 3px black;
  86.   box-shadow: 0px 4px 4px 0px hsl(0,0%,50%), 4px 4px 4px 0px hsl(0,0%,50%), -4px 4px 4px 0px hsl(0,0%,50%);
  87. }
  88. div.dokuwiki div.wrap_sb {
  89.  background-color: transparent;
  90.  background:
  91.     linear-gradient(150deg, hsl(39,28.4%,92.1%) 0em, hsl(39,28.4%,92.1%) 1em, rgba(0,0,0,0) 1em, rgba(0,0,0,0) 70%) top left,
  92.     linear-gradient(210deg, hsl(39,28.4%,92.1%) 0em, hsl(39,28.4%,92.1%) 1em, rgba(0,0,0,0) 1em, rgba(0,0,0,0) 70%) top right,
  93.     linear-gradient(330deg, hsl(39,28.4%,92.1%) 0em, hsl(39,28.4%,92.1%) 1em, rgba(0,0,0,0) 1em, rgba(0,0,0,0) 70%) bottom right,
  94.     linear-gradient(30deg,  hsl(39,28.4%,92.1%) 0em, hsl(39,28.4%,92.1%) 1em, rgba(0,0,0,0) 1em, rgba(0,0,0,0) 70%) bottom left,
  95.     -moz-linear-gradient(top,    rgba(0,0,0,0) 0em, rgba(0,0,0,0) 0.8em, rgb(0,0,0) 0.8em, rgb(0,0,0) 1em, rgb(224,228,192) 1em, rgb(224,228,192) 60%, rgba(224,228,192,0) 70%),
  96.     -moz-linear-gradient(bottom, rgba(0,0,0,0) 0em, rgba(0,0,0,0) 0.8em, rgb(0,0,0) 0.8em, rgb(0,0,0) 1em, rgb(224,228,192) 1em, rgb(224,228,192) 60%, rgba(224,228,192,0) 70%),
  97.     -moz-linear-gradient(left,   rgb(0,0,0) 0em, rgb(0,0,0) 2em, rgba(0,0,0,0) 2em, rgba(0,0,0,0) 70%),
  98.     -moz-linear-gradient(rightrgb(0,0,0) 0em, rgb(0,0,0) 2em, rgba(0,0,0,0) 2em, rgba(0,0,0,0) 70%);
  99.  border: 0px;
  100.   box-shadow: none;
  101.  margin: 0.5em;
  102.  padding: 1.5em;
  103.  padding-left: 0.5em;
  104.  padding-right: 0.5em;
  105. }
  106. div.dokuwiki div.wrap_readout {
  107.  background-color: rgb(224,228,192);
  108.  border-left: 1px solid black;
  109.  border-right: 1px solid black;
  110.   box-shadow: none;
  111.  margin: 0.5em;
  112.  padding: 1.5em;
  113.  padding-left: 0.5em;
  114.  padding-right: 0.5em;
  115. }
  116.  
  117. div.wrap_table {
  118.  border-left: solid 4px rgb(88,23,13);
  119.  border-right: solid 4px rgb(88,23,13);
  120.  border-top: double 8px rgb(88,23,13);
  121.  border-bottom: double 8px rgb(88,23,13);
  122.   border-radius: 20px;
  123. }
  124.  
  125. div.wrap_inline {
  126.   box-shadow: 2px 2px 4px 2px hsl(356,9.6%,50%);
  127. }
  128.  
  129. /* ****************** text styles ************ */
  130. div.wrap_fluff {
  131.  font-style: italic;
  132.  margin-left: 1.5em;
  133. }
  134. div.wrap_fluff span.bbcode_smallcaps {
  135.  font-style: normal;
  136. }
  137. div.wrap_sig {
  138.  text-align: right;
  139. }
  140. div.wrap_dropcap p:first-child:first-letter {
  141.  float: left;
  142.  font-size: 4.62em;
  143.  font-family: Olde_English, Primitive, serif;
  144.  font-style: normal;
  145.  padding-top: 3px;
  146.  padding-right: 3px;
  147.  /* text-shadow: 0px 0px 4px black; */
  148.  vertical-align: text-top;
  149. }
  150.  
  151.  
  152.  
  153. div.wrap_sbh3 p {
  154.  font-size: 122%; /* estimate */
  155.  font-weight: bold;
  156.   line-height: 1.2;
  157.  margin-top: 0;
  158.  padding-top: 0;
  159. }
  160.  
  161. </style>
  162. </html>
topic: Which Wrap box and note types do you use?  in the forum: General Help and Support Plugins
Avatar
Ashtagon #6
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 60167
I use the wrap plugin heavily. However, I don't use ANY of the default box/note styles.

Instead, I use it as a way to generate my own <DIV> elements, which I can then address using a custom css page. Often, that custom css page is specific to a single group of pages, in which case I use the include plugin to insert a page that contains nothing but a grandiose set of customised css.

The wrap plugin tags I actually use are:

col2, col3, col4
em, hi (I always use these together, as a sort of highlighter to indicate bits that are in need of work)
clear
widths (almost always one of 30%, 50%, or 65%)
wrap and div (I don't use "WRAP", because my headspace doesn't distinguish lettercase too easily).
topic: Missing Image  in the forum: General Help and Support Features and Functionality
Avatar
Ashtagon #7
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
Subject: Missing Image
I have an image uploaded in dokuwiki (Windows localhost installation). It won't display in a page (or the media manager, whee an entry appears for it but no image), even when it is correctly pointed to. Other images in the folder display normally. I can rename the image and the corresponding image pointer code in the wiki page, and that self-same image will display normally.

I believe there is something in DW's media records that has bad metadata about the image.

I have tried deleting the cache and reloading the page, but the problem persists. Any possible solutions?
topic: Как вывести компонент  in the forum: General Help and Support Templates and Layout
Avatar
Ashtagon #8
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 58774
Ask here: https://forum.dokuwiki.org/forum/29
topic: Page curl shadows (css)  in the forum: General Help and Support Templates and Layout
Avatar
Ashtagon #9
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
Subject: Page curl shadows
Related:
http://cssdeck.com/labs/page-curl-box-shadow
https://paulund.co.uk/learn-css-box-shadow

Tangentially Related:
https://leaverou.github.io/bubbly/
http://nicolasgallagher.com/pure-css-speech-bubbles/demo/

I'm trying to create boxes using css that have shadows as described in the above two articles. Essentially, they use the :before and :after css markup to allow for box shadows that only cover a fraction of the width and/or height of the overall box, creating the illusion of a piece of paper with a slight curl in it.

However, it seems that the core technique requires using z-index: -1;, which then causes the shadow effect to render not just behind the box (intended), but also behind the overall dokuwiki template background (making it hidden, and not intended). Setting z-index: 1; makes it render above the main box, but also seems to clip it to the inside of the box.

Anyone have a solution?

Dokuwiki code test sample (uses WRAP plugin):

  1. <div sb postit right 30%>
  2. This is a test of the sidebar postit style. Had this been a real test, the test would have worked.
  3.  
  4. This is a test of the sidebar postit style. Had this been a real test, the test would have worked.
  5.  
  6. This is a test of the sidebar postit style. Had this been a real test, the test would have worked.
  7. </div>

css code test sample:

  1. div.dokuwiki div.page.group div.wrap_sb.wrap_postit {
  2.  background-color: hsl(59,45%,66%);
  3.  background: linear-gradient(45deg, hsl(57,54%,72%) 0%, hsl(59,45%,66%) 50%, hsl(63,38%,59%) 100%);
  4.  border: solid 1px hsl(0,0%,77.5%);
  5.   // box-shadow: 2px 2px 2px 1px hsl(0,0%,70%), 0px 0px 20px 40px hsla(60,45%,60%,0.2) inset;
  6.   box-shadow: none;
  7.  margin-bottom: 1.5em;
  8.  padding: 1em 1em .5em;
  9.  position: relative;
  10. }
  11. div.dokuwiki div.page.group div.wrap_sb.wrap_postit:after {
  12.  content: "";
  13.  display: block; /* reduce the damage in FF3.0 */
  14.  position: absolute;
  15.  z-index: 1;
  16.  
  17.  bottom: 0.5em;   left: 0em;
  18.  height: 1em;     width: 50%;
  19.  
  20.  border-width: 15px 15px 0;
  21.  border-style: solid;
  22.  border-color: #f3961c transparent;
  23.  overflow: visible;
  24.   transform: rotate(-30deg);
  25. }
  26. div.dokuwiki div.page.group div.wrap_sb.wrap_postit p {
  27.  color: hsl(240,80%,20%);
  28.  font-family: "ArchitectsDaughter", serif;
  29.  font-size: 100%;
  30.  font-style: normal;
  31.  font-variant: normal;
  32.  font-weight: normal;
  33.   line-height: 1.2;
  34.  border: none;
  35. }
This post was edited on 2017-11-24, 11:37 by Ashtagon.
topic: Can include or templater plugins do this? (transclusion)  in the forum: General Help and Support Plugins
Avatar
Ashtagon #10
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 56335
Given that the existing plugins that I am aware of can't do this, are there any others that can emulate the functionality of wikipedia-style data boxes? (That is to say, a transclusion page that allows for variables to be omitted and adjusts its formatting accordingly, and does not require additional pages in addition to the template and the main page.) Or is there a technical reason why this would not be possible in dokuwiki?
topic: Can include or templater plugins do this? (transclusion)  in the forum: General Help and Support Plugins
Avatar
Ashtagon #11
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 56321
The templater plugin ends up with two pages created in total: the template page, and the main page (which contains both the main page proper and the data that gets merged into the table).

Unless I've completely misunderstood, you've confirmed that the newpagetemplate ends up with three pages total: the template page, a page that contains the merged table/data, and the main page proper.

I know dokuwiki is reasonably happy with having (potentially) a few thousand extra microfiles in one folder, but the reality of my computer setup is that I do experience performance slowdowns when I have too many files in one folder.

I'm probably going to have to go back to using no plugin at all, if the end result is either something that won't render well, or something that creates noticeable hits on performance.
topic: Can include or templater plugins do this? (transclusion)  in the forum: General Help and Support Plugins
Avatar
Ashtagon #12
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 56306
(Please use female pronouns for me; it gets confusing otherwise)

With the newpagetemplate plugin, it looks like what is intended to happen is that I use that plugin to create a separate page (one page for each instance of a transclusion [so one page for each book to continue the earlier example]), which then needs to be included into the main page. Is that correct? If that's the case, it's not really ideal either.

If it worked similar to how wikipedia handles transclusions with variables, I could then use a slightly different transclusion template page to have the data render as a list instead of a table (or otherwise quickly and easily change the formatting) and not have to edit the base data going into the transclusion page (and so risk transcription errors cropping up).
topic: Can include or templater plugins do this? (transclusion)  in the forum: General Help and Support Plugins
Avatar
Ashtagon #13
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 56285
I don't think that's a practical solution, as the number of use-cases is arbitrarily large.
topic: Can include or templater plugins do this? (transclusion)  in the forum: General Help and Support Plugins
Avatar
Ashtagon #14
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
Subject: Can include or templater plugins do this?
I'm looking for some advanced transclusion (most likely a plugin) functionality. plugin:include lets me transclude a whole pager (or a section of a page). plugin:templater lets me send variables to that page to adjust text as needed per page that uses the transcluded page.

Using the templater syntax, I could have the following in the main page:

{{template>indexcard|Author=Asimov|Title=Foundation and Empire}}

Suppose the contents of the indexcard page are:


| Title | @Title@ |
| Author | @Author@ |
| Published on | @Published@ |
| Publisher | @Publisher@ |


In this example, the last two rows (for publisher and published date) would appear as two rows with blank cells in the second column. However, Ideally I would like it to render only those rows of the table (title and author in this example) for which data exists.

Is there a way to do this in dokuwiki? Mediawiki appears to use a {{variablename|what to render if variable exists|what to render if variable is empty}} syntax.
topic: Display page file size  in the forum: General Help and Support Features and Functionality
Avatar
Ashtagon #15
Member since Jan 2010 · 186 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
In reply to post ID 56065
Subject: SOLVED
Fixed version

Inserted in line 64 of main.php, after <div class="docInfo"> and before <?php tpl_pageinfo() ?>

  1. <?php
  2.  function formatSizeUnits($bytes) {
  3.     if ($bytes >= 1073741824) { $bytes = number_format($bytes / 1073741824, 2) . ' GB'; }
  4.     elseif ($bytes >= 1048576) { $bytes = number_format($bytes / 1048576, 2) . ' MB'; }
  5.     elseif ($bytes >= 1024) { $bytes = number_format($bytes / 1024, 2) . ' kB'; }
  6.     elseif ($bytes > 1) { $bytes = $bytes . ' bytes'; }
  7.     elseif ($bytes == 1) { $bytes = $bytes . ' byte'; }
  8.     else { $bytes = '0 bytes'; }
  9.     return $bytes;
  10.  }
  11.  $page = wikiFN($ID);
  12.  if(file_exists($page)) {
  13.     echo formatSizeUnits(filesize($page));
  14.     echo ' · ';
  15.  }
  16.  /* echo formatSizeUnits(filesize($page)); */
  17.  /* echo filesize_h(filesize($page)); */
  18. ?>
Close Smaller – Larger + Reply to this post:
Special characters:
Page:  1  2  3 ... 11  12  13  next 
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-11-17, 12:19:46 (UTC +01:00)