DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:yearbox:discussion

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
Last revision
plugin:yearbox:discussion [2012-12-23 13:12]
Aleksandr [Change a path to a page]
plugin:yearbox:discussion [2021-01-24 13:29]
ooleanderoo [Namespace-Creation]
Line 7: Line 7:
  
 ON THE PAGE WITH THE CALENDAR ON THE PAGE WITH THE CALENDAR
 +
 +===== Wrapping =====
 +Sorry if this is not the right place to ask! And I also don't know much about any of this!\\
 +So, the calendar produced looks fine and is, in my opinion, very adequate for desktop viewing, thanks! However, when I checked on mobile it "maintained its width" and "stuck out" of the new adjusted width/layout of the mobile version of the page (sorry, I don't know how to describe this in a more technical way). I suspect that this is not a problem of this plugin but that it has to do with the template I use (bootstrap3). In any case, I haven't been able to find any way to fix this; I would be content if I could somehow put the calendar in a box with a horizontal scrollbar, for example. I've tried to do this fiddling with other plugins such as "box" or "wrap" but it doesn't work (if I try to wrap the calendar in a smaller box the calendar simply appears cut). Is there anything else I can try? Sorry for the terrible explanation! --- **Branmabon 2017-03-22**
  
 ===== Preview ===== ===== Preview =====
Line 40: Line 44:
 How to change a path to a page from ''<year>-<month>:<name>-<year>-<month>-<day>'' to ''<year>:<month>-<day>''? --- [[user>Aleksandr|Aleksandr Selivanov]] //2012-12-21 07:01// How to change a path to a page from ''<year>-<month>:<name>-<year>-<month>-<day>'' to ''<year>:<month>-<day>''? --- [[user>Aleksandr|Aleksandr Selivanov]] //2012-12-21 07:01//
 > Lines [[https://github.com/MrBertie/yearbox/blob/master/syntax.php#L194|194 and 195]] of the ''syntax.php'' --- [[user>Aleksandr|Aleksandr Selivanov]] //2012-12-23 13:10// > Lines [[https://github.com/MrBertie/yearbox/blob/master/syntax.php#L194|194 and 195]] of the ''syntax.php'' --- [[user>Aleksandr|Aleksandr Selivanov]] //2012-12-23 13:10//
 +> <code php>$id = $opt['ns'] . ':' . $year_num. '-' . $month_fmt . ':' . $opt['name'] .'-' .
 +                        $year_num . '-' . $month_fmt . '-' . $day_fmt;</code>
 +
 +
 +                        
 +===== German 'lang.php' ===== 
 +
 +Just add this file into a folder called 'de' in /lib/plugins/yearbox/lang/ to use german month/day names!
 +
 +<file php lang.php>                       
 +<?php
 +/**
 + * German language file
 + *
 + * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 + * @author     Thor Weinreich
 + */
 +
 +// custom language strings for the plugin
 +
 +$lang['yearbox_months'] = array('Jan', 'Feb', 'M&auml;r', 'Apr', 'Mai', 'Jun',
 +                                'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez');
 +// week begins on Sunday in PHP...
 +$lang['yearbox_days'] = array('So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa');
 +
 +</file>
 +
 +===== Relative ns= parameter ===== 
 +
 +Relative namespace names didn't work for me. Adding 
 +
 +<code php>
 +resolve_pageid(getNS(getID()), $id, $existance);
 +</code>
 +
 +to the **syntax.php** at line 201 (before //if (page_exists($id))//) fixed it for me.
 +//
 +sieber, 2014/07/04//
 +
 +===== Display Monday as first day of the week =====
 +
 +in syntax.php I changed : 
 +
 +<code php>
 +$first_weekday = ($first_weekday > $start) ? $start: $first_weekday;
 +</code>
 +
 +to
 +
 +<code php>
 +$first_weekday = ($first_weekday > $start+1) ? $start+1 : $first_weekday;
 +</code>
 +
 +> Thanks for that! However it omits a day the end of some months. How could this be fixed? See for example year 2006, the 31st of October isn't displayed even though it existed.  --- [[user>Kuranes|Kuranes]] //2018-05-08 10:13//
 +
 +===== Namespace-Creation =====
 +
 +Works fine now that I understood how to use it correctly with:
 +
 +<code>{{yearbox>year=2010,2012;name=journal;size=12;ns=diary}}</code>
 +
 +One thing is that I want to combine your plugin with the bureaucracy plugin. In the Bureaucracy-Plugin it seems not easily manageable to create the pages the same structure you are providing. I now changed one of your PageNameStrategies with : 
 +
 +<code>        return "$baseNS:$pagename";</code>
 +
 +and now I can create with the bureaucracy plugin a form wich directly picks a site your yearbox-plugin already is looking at. 
 +Maybe an idea to extend the possibilities of your namespace-strategies so this is possible directly out of the box. Surely there are thousand ways to do so but for me this was the simplest way ;)
 + --- [[user>ooleanderoo|ooleanderoo]] //2021-01-24 13:29//
plugin/yearbox/discussion.txt ยท Last modified: 2021-01-24 13:33 by ooleanderoo