We're developing a new page manager that will eventually let us "manage all pages (rename, delete, tag) from one place", as weneed:55 says. In this slow series of tutorials I'll explain some of the advanced Wikidot features we're using to make it. You can play with the work in progress as we develop it.
Before we start, some acknowledgements. I did the grunt work but took a lot of ideas and bits of code from gerdami's list of themes, and ErichSteinboeck's file manager package. The best way to learn advanced Wikidot techniques is to study the work of gurus like these.
Most of the techniques I'm going to show depend on some custom CSS. Right now, you need to add this to your site's custom CSS. If you use the admin:themes trick, it's pretty simple. We may add some of this CSS to the standard themes but I'm really waiting for the CSS module and cross-site includes, so it becomes possible the necessary styling right into the code.
0. Before you start
The simplest way to try out these techniques is to clone a fresh site, if you did not already do that, from the Iron Giant default template. You can always delete it when you're done.
1. Building the table
ListPages and HTML tables are natural friends. ListPages does not directly generate tables but it turns out to be quite easy to add. This is what you need to do:
- Use separate="no" so that the list is not broken into divisions but creates a single block.
- Use prependLine to provide the table header.
- Use appendLine to provide the table footer.
- Create a row for each item in the ListPages output.
Here is how it works (this is the stripped-down page manager code):
[[module ListPages separate="no" \
prependLine="[[include system:page-manager-header]]" \
appendLine="[[/table]]" ]]
[[row]]
[[cell]]
[/%%fullname%%/noredirect/true %%title%%]
[[/cell]]
[[cell]]
%%updated_at|%y/%m/%d%%
[[/cell]]
[[cell]]
%%size%%
[[/cell]]
[[/row]]
[[/module]]
We need to put the table header into a separate page because there's no way to put that code directly into prependLine - it contains quotes and would be too unreadable in any case. The system:page-manager-header page contains this (again, the stripped-down code):
[[table]]
[[row]]
[[cell]]
Title
[[/cell]]
[[cell]]
Date
[[/cell]]
[[cell]]
Size
[[/cell]]
[[/row]]
Note how there is no closing table tag - this is provided in the appendLine argument to the ListPages.
I'm using the system: category for this because it's useful to remove the side bar, for this page. Do that in the site manager, under Appearance and Navigation elements. Select the 'system' category, uncheck the box, and clear the side-bar field.
We need to add some code to the site's custom CSS. Here we set the styling on all tables in the wiki. You could put this into the table tags as well. I prefer putting it into admin:themes (the page that holds your custom CSS, if you use that), it's less work:
table {
border-collapse:collapse;
table-layout:fixed;
width: 100%;
}
OK, so now we have our basic table layout, and we'll improve it step by step over the coming days.
Also, a histroy/revert ability might be needed if the css module is developed so that vandalism can be reversed with out having access to a page that custom css disables.
You can already do things like [/pagename/edit/true/norender/true/noredirect/true Edit] to force-edit a page that is otherwise inaccessible. These special arguments are not properly documented, nor really consistent, but we'll get that done at some stage.
Portfolio
i did not know about norender/true thx
Okay, but what if a CSS Module was developed, and the problematic code was in a comment?
Sure, we could use /norender/true and disable comments, but that would lose all of the valid comments as well.
Is it possible for /norender/true to actually render part of the comments module? i.e. a list of comments, but with the actual comment source not rendered, so that we can edit individual comments and fix issues there as well.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, made for Wikidot users (available early 2023)
Indeed, this is a functionality that I pushed forward on the Pro Wishlist. It's very important, especially for the use of iframing foreign javascript that could cause the page to redirect elsewhere. (Helmuti knows what I'm talking about XD)
I don't think we would want to, for that would defeat the purpose of /norender/true. Because people have the capacity to use iframes in their wikidot comments, they have the capacity to…
Jesus, I've just realised a way to destroy forum threads…
λ James Kanjo
Blog | Wikidot Expert | λ and Proud
Web Developer | HTML | CSS | JavaScript
TRhis works near perfect - even the norender.. noredirect is working..
http://forum.wikidot.com/forum/t-185954/forum-problem#post-599094/norender/true/noredirect/true does not help!
I have quick fingers from piano play and could stop the rendering by hand ( on my old machine - this is very slow rendering and I waas fast enough to stop the browser in the best moment..
This is not a good idea to use the redirect module….
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 have to say — you guys find a new way to impress me around nearly every turn. Which normally takes some doing. Makes me wish I had time to do much more than look on.
The page looks beautiful, particularly for a work-in-progress.
I am using XP and FF 3.0.11 and I find it difficult to access the popupinfo… lets say I wanted to edit a page from the list. if the popup appears and I move my pointer down to click on *edit… the next popup appears…
I would suggest make the popup visible at the same height but right from the link. If you move right you can access the popup, if you move down you get the next one
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
I found the same problem, and fixed it by moving the popup just a little higher. But your solution is better. Do you want to provide the CSS changes so I can incorporate them?
Portfolio
I know that you want me to give you the CSS-code, but I need to see what is in there… I am more a trial and error person with a risk-calculator on my desk.
Will change nothing but I need to see admin:manage SO…
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
There is a forum thread for this (Applications/faq.wikidot.com). The CSS is on admin:themes and the hover comes from the standard rainbox theme set.
Portfolio