DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:yearbox:discussion

Discussion

go back

MAKE SURE YOU USE

~~NOCACHE~~

ON THE PAGE WITH THE CALENDAR

Request for FUTURE

If one wants to use this for predominantly advertising future events it would be great if recent would gracefully accept a negative number or better allow a range, so you could show last month dates and next 3 months. I found putting in a negative number is treated as an error that is detected and so ignored.

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

Useful calendar, but I just got some html-tags showing up in the toolbox and no real preview. — 2011-04-11

I would like to help but I do not understand exactly what the problem is; can you provide more information?—Symon 2011-04-10 15:32
I had the same problem. I edited the style.css and renamed all div.dokuwiki into .dokuwiki and it looks better now (Firefox 4 - Dokuwiki Anteater). — Andreone 2011-05-05
to solve the popup preview problem download the folder, unzip it, open it, and open syntax.php in a text editor and replace:
if ($current == $today) $wkend_css = ' class="today"';
with
// if ($current == $today) $wkend_css = ' class="today"';

Then save the folder and rezip it and use this as your download (for example from a public dropbox folder). Create a calendar, click on a date, create an entry, save the entry, go back to the calendar, edit the calendar page (you don't have to change anything) and resave it, then one should see the dates with entries in green and the mouse popups!!! Tom S. 2011-11-25

Same here. The calendar does not mark that a page exists and does not show any kind of preview.
It just shows the same tooltip as for empty pages. — 2011-05-02 > with the above mentioned edit by Tom S. it now does

I really like your calendar. I was searching that for a long time. One suggestion: navigation arrows to navigate to previous/next dates/months. — Andreone 2011-05-05

I like the idea, however it is more challenging than it seems. The calendar is built when the wiki page is parsed, and providing dynamic navigation arrows would require rebuilding/rendering it in Javascript instead—quite a large amount of work, unless you would be happy with a page refresh every time you click a navigation button. Symon 2011-05-07 15:45

This is pretty useful for keeping projects organized. I'd like a way to index times shorter than one month though. e.g., I want to use a shorter box (5-7 days) for this week's note taking. — 2011-05-27 Anon.

I watched an unexpected bahavior: In EditMode the Preview links to local Namespace; after saving it links to the rootnamespace until in the calendar-call is any ns specified. So i have to spcify the ns allways (in my case!) Any suggestion for solving? btw: My first impression: I like it and will test ist! Thank you a lot, 12.08.25 utaf

It works on Adora Belle, with the same namespace problem described above. It was also not showing the preview tooltip. However, it seems the tooltips appears if I specify the complete path for the namespace (root:namespace:for:the:calendar) - even if I want the calendar in the current namespace. — Anon 2012-12-11

Download problems [0.3]

Download link error. Access denied. 2011-05-17 FIXED! Sorry about that… Github upload timeout 2011-05-17 19:48

Change a path to a page

How to change a path to a page from <year>-<month>:<name>-<year>-<month>-<day> to <year>:<month>-<day>? — Aleksandr Selivanov 2012-12-21 07:01

Lines 194 and 195 of the syntax.phpAleksandr Selivanov 2012-12-23 13:10
$id = $opt['ns'] . ':' . $year_num. '-' . $month_fmt . ':' . $opt['name'] .'-' .
                        $year_num . '-' . $month_fmt . '-' . $day_fmt;

German 'lang.php'

Just add this file into a folder called 'de' in /lib/plugins/yearbox/lang/ to use german month/day names!

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');

Relative ns= parameter

Relative namespace names didn't work for me. Adding

resolve_pageid(getNS(getID()), $id, $existance);

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 :

$first_weekday = ($first_weekday > $start) ? $start: $first_weekday;

to

$first_weekday = ($first_weekday > $start+1) ? $start+1 : $first_weekday;
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. — Kuranes 2018-05-08 10:13

Namespace-Creation

Works fine now that I understood how to use it correctly with:

{{yearbox>year=2010,2012;name=journal;size=12;ns=diary}}

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 :

        return "$baseNS:$pagename";

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 ;)

A second idea I had is that it maybe usefull if you could define different PageNameStrategies for different YearBoxes.

ooleanderoo 2021-01-24 13:29

plugin/yearbox/discussion.txt · Last modified: 2024-03-09 09:46 by 212.159.116.80

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