Topic on Project:Support desk

79.118.22.67 (talkcontribs)

Would it be possible that I receive help from you on this code: http://pastebin.com/WWnNG96g?

Here is how it works. Using this function <span class="listpages">category (without category:)</span>, the script retrieves all the pages from the specified category one under each other in a bulleted list. It also makes them linkable.

Here is the best example I can come up with

* Page 1

* Page 2

* Page 3

so forth and so on.

What I would like this code to do (apart form what it already does) is to have options to retrieve pages that are in a category and are not in other specified categories. i.e. They are in category 1, category 2 and 3, but I only want to retrieve them if they are in the first category. In addition, I would also wish for a reverse function. i.e. Only if they are in the categories I specify.

That's number 1. Number 2 would be for the list to sort itself automatically on rows after it reaches a certain number. Example: let us say there are 30 pages in there. I would want for those 30 pages to sort themselves 10 on a row (so 3 rows).

Example:

* Page 1

* Page 2

* Page 3

|

* Page 4

* Page 5

* Page 6

Any help is much appreciated and I would be very grateful for it.

Ciencia Al Poder (talkcontribs)
92.82.28.212 (talkcontribs)

But that doesn't sort it on rows...

And neither does it make exceptions (i.e. page is in category 1, but is also in category 2 = don't show it).

Ciencia Al Poder (talkcontribs)

That's what I said, you must do the filtering on client side. There's no API that does that automatically for you.

92.82.28.212 (talkcontribs)

Well, but isn't there a code/function that can be added to the above script? It would be much easier to just use <span class="listpages">category (without category:)</span>.

Anyway, how is the filtering done?

Reply to "Category retrieval"