DokuWiki

It's better when it's simple

User Tools

Site Tools


template:a_new_day

A New Day Template

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" unknown

template

Last updated on
2015-10-31

Extension name contains underscore, will not generate popularity points.

Tagged with clean, requires_registration, sidebar, simplistic, topmenu

The BattleHorse template was used as a base for the New Day template. Aside from the visual makeover, additions are a configurable topmenu and some compatibility fixes for more recent DokuWiki versions. Original development was done by Louis Wolf (Chirripó) louiswolf [at] chirripo [dot] nl. Hannes Dorn hannes [at] dorn [dot] cc added small changes to CSS files.

Installation

Get the template directly from Github.

Refer to template on how to install and use templates in DokuWiki.

The following text regarding the sidebar was copied from the Battlehorse template page.

Every namespace can have its own sidebar which can be used to create a namespace specific menu. Simply add a page called sidebar. If no sidebar is found in the current namespace, the sidebar of the parent namespace will be used. If there is no sidebar page in the namespace hierarchy, the index will be used.

In order to use the sidebar you just have to create a page named sidebar for every namespace you want a menu into. Then use normal wiki markup when writing the contents of that page ( use headings, links and so on ).

If a given namespace does not have a sidebar , the sidebar of the parent namespace will be used and so on recursively until the root namespace is reached. If no sidebar is found even there, then the wiki index will be used.

Let's suppose you have the following wiki structure :

start
wiki:page1
wiki:page2
wiki:other:page3

start page belongs to the root namespace , page1 namespace. Then create this wikipages :

sidebar
wiki:sidebar

Now the start page will use the sidebar page as its menu. page1 ,page2 and page3 will use the wiki:sidebar page as their menu ( page3 will inherit it from the above namespace, since no sidebar is defined for wiki:other ) .

Top menu usage instructions

The following text regarding the topmenu was copied from the Simple template page.

The template uses the CSS hover technique to generate the topbar menu from a normal wiki page which contains unordered lists of links. Therefore you have to create a page called “topbar” in your DokuWiki root namespace. Edit it and insert an unordered list of links per menu item. Don't insert anything else than these lists in this page as it will lead to garbage ;-). At the moment only lists with up to 4 levels are supported. You can also have a separate topbar for each namespace. For example, if you browse to wiki:syntax and the page wiki:topbar exists it will be used as the topbar.

  * [[level1]]
    * [[level2]]
      * [[level3]]
        * [[level4]]
    * [[level2]]

  * [[level1]]
    * [[level2]]
    * [[level2]]

The space between those lists is important!

Defining actions

To define a new action, edit tpl_actions.php in the template folder. Add your actions below for others to enjoy. When doing so, please disable your actions ('enabled' ⇒ 0). Downloading the file below is NOT enough to get a link with an image. You'll still need to add an 18×18 gif icon for each action, named after the action value name (so 'action' ⇒ 'digg' needs a digg.gif image). Put your icons in /YOUR/TEMPLATE/DIRECTORY/images/p/actions/.

Note) The template author is willing to create a downloadable icon archive, just send him your icons by e-mail. Alternatively people could externally link their icons here.

tpl_actions.php
<?php
 
/** 
 * Define your actions here.
 * 
 * action: 
 *	Action name. Also the name of the associated gif image. 
 *      Save your icons in /YOUR/TEMPLATE/DIRECTORY/images/p/actions/
 *
 * url: 
 *	The submission link.
 *	%PAGEURL% will be substituted for the wiki page url.
 *      %PAGETITLE% will be substituted for the wiki page title.
 *      
 *      Make sure to use `&amp;` instead of `&` in your URL
 *
 * textlabel:
 *	The link text that will show up in your wiki action menu.
 *
 * enabled:
 *	Turn off actions by setting this to something other then 1 (suggested: 0).
 * 
 *
 * @author:	Louis Wolf <louiswolf [at] chirripo [dot] nl>
 * @homepage:   http://blog.chirripo.nl
 */
 
function tpl_sidebar_actions() {
	$actions = array (
		array (
			'action' => 'digg',
			'url' => 'http://digg.com/submit?phase=2&amp;url=%PAGEURL%&amp;title=%PAGETITLE%', 
			'textlabel' => 'Digg this!',
			'enabled' => 0,
		),
		array (
			'action' => 'delicious',
			'url' => 'http://del.icio.us/post?url=%PAGEURL%&amp;title=%PAGETITLE%', 
			'textlabel' => 'Del.Icio.Us',
			'enabled' => 0,
		),
		array (
			'action' => 'googlebookmarks',
			'url' => 'http://www.google.com/bookmarks/mark?op=add&amp;bkmk=%PAGEURL%&amp;title=%PAGETITLE%',
			'textlabel' => 'Google bookmarks',
			'enabled' => 0,
		),
		array (
			'action' => 'twitter',
			'url' => 'http://twitter.com/home?status=%PAGETITLE%+-+%PAGEURL%',
			'textlabel' => 'Twitter',
			'enabled' => 0,
		),
		array (
			'action' => 'stumbleupon',
			'url' => 'http://www.stumbleupon.com/submit?url=%PAGEURL%&amp;title=%PAGEURL%',
			'textlabel' => 'Stumble upon',
			'enabled' => 0,
		),
		array (
			'action' => 'facebook',
			'url' => 'http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=%PAGEURL%&amp;t=%PAGETITLE%',
			'textlabel' => 'Facebook',
			'enabled' => 0,
		)
	);
 
	return $actions;
}
 
?>

Issues

Imageflow breaks editor toolbar

The imageflow plugin breaks the JavaScript editor toolbar. You won't see any buttons using this plugin. I think the problem is between the imageflow JavaScript and the template prototype library, but while investigating the problem disappeared and I can't seem to reproduce the issue.

Collisions on small windows

If the window size is kind of smallish (less than about 700px), the main text collides with the sidepane. Proposed solution: Make the side pane fixed in size. –k-m.knaak 28.3.2010

This solution introduces new issues (content pops below the sidebar), even on larger screens.
Ever considered to look closer at http://wiki.hedus.fr/? He fixed the problem with small windows. Maybe you take his solution…?
No, I hadn't. But you're right, it's a good solution. It'll be implemented in the upcoming version [written 29/09/2010]

Version History

20151031

  • Updated design.css, layout.css and topbar.css for DokuWiki 2015-08-10a “Detritus”

20100921

  • Fix for IE not centering topmenu

20100828

  • Slight changes in sidebar appearance
  • The sidebar now has a separate CSS file
  • Czech language file set to correct character encoding
  • Fixed print.css
  • Fixed date presentation

20100609

  • The various menu blocks (page actions, user actions, wiki actions and submit actions) can now be hidden while the action palette is enabled
  • New translations: French (thanks to Dlareg) and Spanish
  • A couple of XHTML fixes (thanks to Benjamin Höglinger)
  • IE 7 should now show the dropdown menu correctly

20100327

  • A new topmenu which was taken from the Simple template topmenu. The topmenu is now based on a wiki page and supports submenus.
  • New actions for Facebook, Twitter and StumbleUpon. Also it's easier to add your own actions. Please share your own actions here.
  • The sidebar now has the option to be shown separate from the other wiki actions.
  • New translations for German (thanks to Andrew Law) and Russian (thanks to Ianka Kryukov)
  • Fixed some translation logic.
  • Some CSS fixes for sidebar headers
  • Fixed lower right border image. Again.

20100310

  • fixed the original 'page sidebar'
  • fixed lower right border image

Questions

Is there a way to make the searchbox a little bigger ?

The easiest way to do that is through a CSS adjustment. Something like:

#qsearch__in { width: 300px; }
Is there a way to make the searchbox a little bigger ? What is the file CSS (it's name)?

The line doesn't exist yet. Just add it to layout.css.

Is there a way to fix the width of the sidebar?

Yes there is, just put something like:

width: 250px;


in line 350 of layout.css

How and where to remove the text “This is an index over all available pages ordered by namespaces” from the sidebar ( image: http://s16.radikal.ru/i190/1006/95/a80de2743c99.png )?

Read the documentation. You didn't create a wiki page called sidebar.

I have just upgraded to the Weatherwax version and I do have a sidebar page created but still get the created index. Is this a bug or did I miss something? See http://www.win.tue.nl/coselog/files/sitemapBug.png and http://www.win.tue.nl/coselog/wiki/start (2013-07-05)

Top menu

If no user is logged in, sidebar with wiki structure and menus are visible. Could it be possible to disable sidebar and menus if no user is logged in? Joachim 10.8.2010

Yes, that's possible. But I think it's very un-wiki like. Also, I'm not sure if I want to add this as
another configuration option in the template (people find it hard enough to configure as it is).
However, I could fix this for your situation if you really need this. Just let me know by mail.

Added 14/10/2010 - This is something that I would need as well.. Could you post instructions? Or is it a long progress Craig

….But I think it's very un-wiki like….

The template dokubook has this option: configuration Closed Wiki: If you activate this option the navigation will only show up to logged in users. Joachim 20.12.2010, I sent you an email some days ago

Could I have details of how to do this too please. Above do you mean that the way it's done in dokubook is easy to do in newday as well? If so I'm happy to go and look at dokubook to see how it's done.

Namespace subscribe and RSS feed subscription

How can I add the namespace subscription functionality and rss feed subscription functionality to this template?

This is not template functionality, but Dokuwiki functionality. You should look into the Dokuwiki documentation.

I would like to have the JS exandable indexmenu tree in the sidebar.

{{indexmenu>:#1|js navbar nocookie id#random}}

But it will not work. No JS tree in the sidebar only textversion. Calling the page sidebar directly works perfectly.

Is JS disabled in the sidebar of a_new_ day? Joachim 20.12.2010

Has anybody an idea on how to use indexmenu with this template? Stefano 30.12.2010

W3C validation

I've been testing this template for a while here. I've inserted an image to align to the right. Apparantly this doesn't agree with the W3C-guidelines:

[quote] Line 333, Column 189: there is no attribute “align” …2.jpg?w=250“ class=“mediaright” align=[color=crimson]”[/color]right“ title=“raffael_072.jpg” alt=“raf… [/quote]

The problem is not there when I revalidate using the default template.

other sites with info regarding this template

template/a_new_day.txt · Last modified: 2015-10-31 21:49 by hannesd