Boolean Operations on Page Listings

The possibility to combine two or more listings of pages before output in such a way as to generate a new list based on a selectable operator like

After thinking more about this: Wikka needs on one side a generic output action which accepts some content to be displayed.
{{output content="some content here" col="3"}}


As it wouldn't be convenient to manually enter content, Wikka needs some kind of database query facility (which must not be SQL). Currently, Wikka supports listings of pages according to:

Combining these elements should allow something like recent changes of a category, a list of pages that are in two or more categories, all pages linked by the homepage in alphabetical order, and so on. This means two things: Wikka must be able to retrieve different collections of pages, and Wikka must be able to sort them in different ways before the result will be displayed.

to be continued
Comments
Comment by DarTar
2006-11-02 16:58:32
Masin, it's not clear to me what you mean by 'listings' in this context.
Comment by MasinAlDujaili
2006-11-03 02:22:34
Well, I haven't defined it yet. One of the major problems concerning these operations is that there aren't any listings in their pure form yet. All actions like category, pageindex or recentchanges just output formatted lists of links. Currently, just simple arrays or linked lists are missing which could be combined to result in different lists.

Page listings are any way of getting just a simple set of pages which could be used for such operations. My idea is to have an action, e.g. call it 'intersection', which gets any parameters like
{{union set[0]="category[DarTarsFavorites]" set[1]="recentlychanged[days='7']" set[2]="recentlycommented" show="pages" col="3"}}

The output should consist of all pages (but no subcategories) from category DarTarsFavorites that are also in the set of pages from recentlychanged (in the last 7 days) which have been recently commented.

As I do not think, this is the perfect solution I still tinkering, what might work. Perhaps an action like set work:

{{set operation="DarTarsFavorites && recentlychanged[days='7'] && recentlycommented" show="pages" col="3"}}

Where 'show' has the same function as in the categories action and col, well, col is the number of columns to output. The action should return the same output as the example above.

As you see, it is a general page output action, which takes result from other sources and combines it. My motivation behind it is that I am working on a Wiki whose pages are really good categorized, even multiply. And now I want a way to get all pages output which belong to two categories, e.g. all users from Berlin. All user pages are in the CategoryUsers, all Berlin related pages are in the CategoryBerlin. Both categories include users from Berlin and this is the intersection I want to output. As I thought about this problem, I found out, that this could be generalized, as people already have asked for recentlychanged pages from a single category. and these is my idea: We need a way for operations on sets of pages. We need a way to access sets of pages in actions and use operations on them. The problem is, at least in my second example above, that I don't know what security holes might be opened this way.

What do you think of it?
Comment by DarTar
2006-11-03 11:50:53
Basically what you want is a flexible handler to send custom SQL queries to the DB. I like the idea but it needs some thoughts. It might require, for instance, a better DB layout or category system to be feasible from the point of view of performance. For a related ticket, see: http://wush.net/trac/wikka/ticket/143 (I don't remember if I already pointed you to this).
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki