Here is a great short code for Bryce's version of the set-tag button: http://css3.wikidot.com/blog:set-tags-button-first-look
CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +
Here is a great short code for Bryce's version of the set-tag button: http://css3.wikidot.com/blog:set-tags-button-first-look
CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +
The feature works, have used this in a couple of places now. One problem is that you can't create multiple buttons on a single line, using iftags (which you always need). I'd suggest a tweak, where a button will automatically disappear if it sets a single tag and the page already has that tag. This covers the majority of normal cases, and makes them much simpler, as well as allowing buttons to be listed along side each other.
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
I certainly have multiple buttons on a single line using iftags:-
[[div style="text-align: right"]]
[[iftags -_sticky]][[span class="forum-button"]][[button set-tags +_sticky text="Pin"]][[/span]][[/iftags]] [[iftags +_sticky]] [[span class="forum-button"]][[button set-tags -_sticky text="Un-pin"]][[/span]][[/iftags]] [[iftags -_closed]][[span class="forum-button"]][[button set-tags +_closed text="Close"]][[/span]][[/iftags]] [[iftags +_closed]] [[span class="forum-button"]][[button set-tags -_closed text="Re-open"]][[/span]][[/iftags]] [[iftags -_nocomment]][[span class="forum-button"]][[button set-tags +_nocomment text="Disable Comments"]][[/span]][[/iftags]] [[iftags +_nocomment]] [[span class="forum-button"]][[button set-tags -_nocomment text="Enable Comments"]][[/span]][[/iftags]]
[[/div]]
Our internal issue tracker (created on Wikidot of course) uses the following tags: _open, _wip, _rtt, _pushed, _closed and _cancel.
The code to show status and let us change it we use is as follows:
[[module CSS]]
div.set-status-buttons a, div.set-status-buttons span {
color: #000;
background: #fff;
border: 1px solid #999;
padding: 2px 10px 3px;
text-decoration: none;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
text-shadow: 1px 1px 1px #bbb;
}
div.set-status-buttons a:hover {
background: #ddf;
}
div.set-status-buttons span {
display: none;
}
div.set-status-buttons a.button%%_tags%% {
display: none;
}
div.set-status-buttons span.status%%_tags%% {
display: inline;
background: #666;
border-color: #333;
color: #fff;
text-shadow: 1px 1px 1px #000;
}
[[/module]]
[[div class="set-status-buttons"]]
Status: \
[[button set-tags -_* +_open text="Open" class="button_open"]] \
[[span class="status_open"]]Open[[/span]] \
[[button set-tags -_* +_wip text="WIP" class="button_wip"]] \
[[span class="status_wip"]]WIP[[/span]] \
[[button set-tags -_* +_rtt text="RTT" class="button_rtt"]] \
[[span class="status_rtt"]]RTT[[/span]] \
[[button set-tags -_* +_pushed text="Pushed" class="button_pushed"]] \
[[span class="status_pushed"]]Pushed[[/span]] \
[[button set-tags -_* +_closed text="Closed" class="button_closed"]] \
[[span class="status_closed"]]Closed[[/span]] \
[[button set-tags -_* +_cancel text="Canceled" class="button_cancel"]] \
[[span class="status_cancel"]]Canceled[[/span]]
[[/div]]
And this looks like this:
Note iftags isn't used, but the buttons are shown and hidden by CSS (also using %%_tags%%).
Piotr Gabryjeluk
visit my blog
Oh, nice! It looks great, and leaving them up there to be always visible makes it clear what the options are - preventing any confusion.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)