Standalone Page Buttons

Description

Somehow it might be convenient to hide the default page options and present only selected buttons to the users. The syntax for it is:

[[button type options]]

Where the type is:

  • edit
  • edit-append
  • edit-sections
  • history
  • print
  • files
  • tags
  • source (view page source)
  • backlinks
  • talk — works similar as in MediaWiki/Wikipedia, e.g. links to the talk: page (if someone wants it)

Possible attributes are:

  • text — alternative text to be displayed
  • class — CSS class of the A element
  • style — CSS style definition

Code

For some nice "view source" and "print" buttons with icons you can use the following code:

[[>]]
[[button source style="background-image: url(http://www.wikidot.com/local--files/files/view-source.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]]
[[button print style="background-image: url(http://www.wikidot.com/local--files/files/document-print.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px;color: #444"]]
[[/>]]

to get:

A very nice set of icons can be found at the Tango Project.

Another Example

The following code creates four buttons with a very brief text description:

[[button edit text="edit" style="background-image: url(http://community.wikidot.com/local--files/nav:side/accessories-text-editor-32x32.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]] [[button edit-sections text="sec" style="background-image: url(http://community.wikidot.com/local--files/nav:side/accessories-text-editor-32x32.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]] [[button source text="src" style="background-image: url(http://www.wikidot.com/local--files/files/view-source.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]] [[button print text="prt" style="background-image: url(http://www.wikidot.com/local--files/files/document-print.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px;color: #444"]]

This set of four buttons will fit nicely into most sidebars:

Some speculations

You can use the buttons in a number of ways — e.g. if you want to make clear that your pages are Wiki pages (editable by anyone) — you can place a large edit button somewhere in the side bar. You could also add buttons to the nav:top bar.

With option text="Imprimer" you can translate "print" into French.
With option text=" " the icon appears alone, without text.

Or you could hide the default options at the bottom of each page and present only your hand-made buttons. If you decide to use icons (via the CSS option background-image as shown above) you could ultimately tweak your Wiki! ;-)

Rate this solution

If you think this solution is useful — rate it up! Or dump it otherwise.

rating: +35+x

Comments

Non user-friendly error messages with a page being created
gerdamigerdami 1169981343|%e %b %Y, %H:%M %Z|agohover

Thanks for these buttons.

However, I got non user-friendly error messages when using buttons on a page being created.
Consider this page:

The page does not (yet) exist.
The page hhhhhh you want to access does not exist.
* create page

Error was (when using button print on left side):

A nasty error has occurred. If the problem repeats, please fill (if possible) a bug report.
exception 'ProcessException' with message 'No such page' in /var/www/www.wikidot.com/wikidot/php/screens/PrinterFriendly.php:32 Stack trace: #0 /var/www/www.wikidot.com/wikidot/php/utils/WikiFlowController.php(189): PrinterFriendly->render(Object(RunData)) #1 /var/www/www.wikidot.com/wikidot/web/index.php(85): WikiFlowController->process() #2 {main}

Also, button types [[button edit-append]] , [[button edit-sections]] were not recognized.


Aide Wikidot en Français ? Handbook !!!

Re: Non user-friendly error messages
michal frackowiakmichal frackowiak 1171926523|%e %b %Y, %H:%M %Z|agohover

This is fixed now.


Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalfrackowiak.com

unfold Re: Non user-friendly error messages by michal frackowiakmichal frackowiak, 1171926523|%e %b %Y, %H:%M %Z|agohover
Re: Non user-friendly error messages
vadavada 1174996001|%e %b %Y, %H:%M %Z|agohover

how about go-top go-home buttons? I can't add them - they are not recognized or maybe I'm doing something wrong

unfold Re: Non user-friendly error messages by vadavada, 1174996001|%e %b %Y, %H:%M %Z|agohover
Re: Non user-friendly error messages
leiger40leiger40 1200822586|%e %b %Y, %H:%M %Z|agohover

go-top and go-home are not recognized. Look at the list above for the possibilities, or they are here:

  • edit
  • edit-append
  • edit-sections
  • history
  • print
  • files
  • tags
  • source
  • backlinks
  • talk

CycloDS.tk - Firmware, skins, homebrew reviews and downloads for the CycloDS

unfold Re: Non user-friendly error messages by leiger40leiger40, 1200822586|%e %b %Y, %H:%M %Z|agohover
Adding a discussion button
CarlitoxCarlitox 1182531540|%e %b %Y, %H:%M %Z|agohover

I'm trying to add the discuss button, but keep getting a "The button type is not recognized" error.
What's the type of the discuss button?

unfold Adding a discussion button by CarlitoxCarlitox, 1182531540|%e %b %Y, %H:%M %Z|agohover
Re: Adding a discussion button
leiger40leiger40 1218503375|%e %b %Y, %H:%M %Z|agohover

talk


CycloDS.tk - Firmware, skins, homebrew reviews and downloads for the CycloDS

last edited on 1218503392|%e %b %Y, %H:%M %Z|agohover by leiger40 + show more
unfold Re: Adding a discussion button by leiger40leiger40, 1218503375|%e %b %Y, %H:%M %Z|agohover
buttons for links to pages
ethical patriotethical patriot 1183062276|%e %b %Y, %H:%M %Z|agohover

Hello,

I'd quite like to use buttons (i.e. clickable images) to link to pages in my wiki, this is to increase accessibility for dyslexics and speakers of other languages.

There doesn't seem to be a type for that.

I'm stuck with just putting text links underneath images, and the " _ " option in tables doesn't seem to work.

Jack

unfold buttons for links to pages by ethical patriotethical patriot, 1183062276|%e %b %Y, %H:%M %Z|agohover
Re: buttons for links to pages
leiger40leiger40 1218503554|%e %b %Y, %H:%M %Z|agohover

Try this:

[[>]]
[[button source style="background-image: url(http://www.wikidot.com/local--files/files/view-source.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]]
[[button print style="background-image: url(http://www.wikidot.com/local--files/files/document-print.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px;color: #444"]]
[[/>]]

Then alter as needed.

  • Replace the url parameter of background-image with the url of your image.
  • If you only want images and no text, replace the text parameter with text=" "

CycloDS.tk - Firmware, skins, homebrew reviews and downloads for the CycloDS

unfold Re: buttons for links to pages by leiger40leiger40, 1218503554|%e %b %Y, %H:%M %Z|agohover
Does it have for PARENT button?
xenogewxenogew 1213418743|%e %b %Y, %H:%M %Z|agohover

I want to use it because it frequency use for my wiki.

unfold Does it have for PARENT button? by xenogewxenogew, 1213418743|%e %b %Y, %H:%M %Z|agohover
ms0815ms0815 1236093418|%e %b %Y, %H:%M %Z|agohover

I'd also love to see the parent button added to the list.

unfold by ms0815ms0815, 1236093418|%e %b %Y, %H:%M %Z|agohover
Backlinks without clicking
WikiKragWikiKrag 1240844789|%e %b %Y, %H:%M %Z|agohover

I think I found what I was looking for over here: http://www.wikidot.com/doc:backlinks-module
I' leaving my original question here in case anyone else ends up here with the same question. Feel free to delete it if that's more appropriate, thanks.

Hello, I'm trying to display in a page the list of pages that link to it. In essence, the same list displayed when I click the
Options > Backlinks button.
For this, I am using
[[button backlinks text="Click here to get the list of backlinks"]]
However, I'd love to be able to display the list without requiring the user to click on the button.
Also, are there ways I can customize the result produced by clicking the backlinks button (e.g.: the "Other pages that
depend on this page" text at the top of the backlinks list, perhaps its position, and so on) ?

last edited on 1240845606|%e %b %Y, %H:%M %Z|agohover by WikiKrag + show more
unfold Backlinks without clicking by WikiKragWikiKrag, 1240844789|%e %b %Y, %H:%M %Z|agohover

Add your comment

Add a new comment
page tags: buttons edit print
page_revision: 4, last_edited: 1217321652|%e %b %Y, %H:%M %Z (%O ago)
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License