[Home]Actions

UseModWiki | RecentChanges | Preferences

UseModWikiDocumentation: Functions - GlobalVariables - DataBase - Actions - UseModWiki/DeveloperQuestions

List of CGI actions that wiki.pl will accept

For an alternate presentation, more appropriate for users, see the System page.

Search

(handled by DoOtherRequest)

dosearch=1

    [&search=text] - search title and body of all pages

Browsing Actions

(handled by DoBrowseRequest)

action=xxx

    [browse&id=pagename]  - view page
    [rc]                  - recent changes (see MeatBall:RecentChangesOptions for examples)
    [rss]                 - RSS output of recent changes.
    [random]              - random page
    [history&id=pagename] - history of changes
    [browse&id=pagename&revision=number] - view old version

Other Actions

(handled by DoOtherRequest)

action=xxx

    [edit&id=pagename] - edit page
    [index]            - alphabetical index of all pages
    [version]          - show program-version (and options ?)
    [links]            - displays links between pages, in various forms (see MeatBall:LinkDatabase for some examples)

    User
    [login]     - for configured user ids
    [newlogin]  - creates completely new user ID (and overwrite old cookie)
    [editprefs] - edits a users preferences

    Maintenance
    [maintain]  - Does periodic maintenance, such as expiring old kept revisions.
                Non-admins can only use action=maintain once every 12 hours.
    [unlock]    - Attempts to get the edit lock normally.  If this fails, the lock
                is considered "stuck" and is forcibly removed.
    [trimusers] - Trims down the user database, removing users with no useful
                preferences set. You must change the $StartUID? variable in the config afterwards.

Admin only actions (see AdminFeatures for more details):

    [pagelock]   - This will lock a specific page against editing (except by the admin):
                     wiki.pl?action=pagelock&id=HomePage&set=1
                 To unlock:
                     wiki.pl?action=pagelock&id=HomePage&set=0
    [editlock]   - Locks the entire wiki against editing.  Use with set=1 and
                 set=0 like the pagelock command.
    [editbanned] - Edits a list of banned IP addresses/networks which are blocked
                 from editing.
    [editlinks]     - Allows renaming and deletion of pages.

Note that admins can still edit all edit-locked pages. Users with an "editor" password can still edit even if their IP is in the editbanned list, or while the whole-wiki editlock block is active. (Editors can not edit individually-locked pages.) The editor password is useful for restricted-access wikis, or to allow a good user to edit even if they share a network/proxy with an abusive user.


The maintain action has an undocumented feature. If a file "editlinks" exists in the data dir its contents will be run just as if entered from the editlinks action, and then the file will be renamed to "editlinks.old". This doesn't seem very useful, perhaps it is left over from before editlinks had a web interface?

It can be useful for sites that haven't set up an admin password (and can't use the web interface). --CliffordAdams


Is there anything like a "logout" action available? Right now, I'm travelling, and using a variety of computers that either belong to family & friends, or are public access terminals. I don't want to leave cookies scattered all over with my wiki name and info on them, but am not sure how I could clear that. Should I just delete the cookie? If so, where does that cookie get stored? Is it browser-dependent? --PatrickSalsbury

You could just use the "newlogin" action, which will give you a new cookie (overwriting your old one). Cookie storage is browser-dependent. --CliffordAdams

Will do. Thanks for the quick response! :-) --Pat


Q: Hi! How can I add new(my own) action? Is that possible? I would like to create a new page, similar to Preferences. I want this page to act as template page thats why I cannot add this page at usual wiki way. lma

A: All things are possible, but some things are much more difficult than others. Adding a new action requires editing the Perl source code of the wiki to add the action. --CliffordAdams

A2: See MagicContent. -- tarquin


Q: Hi! I'm interested in changing the [links] action to return data in content-type: text/plain, to use with the excellent MeatBall:TouchGraphWikiBrowser, has anyone had a look at that? --TomasKrag?

A: Hi, I am submitting a preliminary patch under WikiPatches/TouchGraphWikiBrowserStyleLinkDatabase? . It works fine for me on my personal Wiki. -- ManpreetSingh


Q: Is there a way to prune the difflog file? One of my wikis has a 4-meg file. "maintain" does not seem to prune any of the reference log files. -- JerryMuelver

A: Not within the wiki. You can simply remove the difflog file--it is not used by the wiki (it is a write-only log). I probably should have disabled it by default in 1.0 The purpose of the difflog file is to allow an admin to track changes (and possibly undo them) if wanted, but the new KeptPages functionality makes this feature almost useless. --CliffordAdams


Q: Is there a parameter to make the wiki spit out the raw wiki text for a page?

A: Yes, there is. :-) More helpfully, you can use the browse action and add the "raw=1" parameter, like http://www.usemod.com/cgi-bin/wiki.pl?action=browse&id=Free_Links&raw=1

Note that spaces in the page name should be replaced with _ (underscore) characters. --CliffordAdams

Q: I want to ban a user that has set up an account (strange thing for a spammer). Can I just add his username or ID to the ban list or do I have to figure out his IP? --[DonRedman]

A: AFAIK there is no possibility to block based on username or id. If you need to block someone, you could use the ip, host name, subnet oder (sub)domain.


Q: Is there a way to restore a page that has been spammed, preferably using one of the backup pages? I saw a reference to "previous author backup", but haven't discovered if this is what I need, and if so how to trigger it.

A: Click "View other revisions" on the bottom of the page. Then choose the revision. Maybe look at the differences between certain revisions. Click on the right revision. Click on "Edit revision XX of this page". Then save that old revision. It's now the new version.

Thanks for the prompt answer! I had found a more awkward way, but that's much better! IMO that should be placed prominently in the UseMod documentation!


Q: I want to use a textbox for filling in a new page. Example. I type "Rover" in the textbox, and get sent to URL: http://www.usemod.com/cgi-bin/wiki.pl?Rover , is there any easy solution?

A: Set your $FooterNote variable (in the config) to this:

  <form method="get" action="wiki.pl" enctype="application/x-www-form-urlencoded">
    Edit page:<br>
    <input type=hidden name=action value=edit>
    <input type=text name=id size=20>
  </form>


Q: I'd like to remove the revision history for a page on my wiki which has been spammed several times. I've found people link to one of the previous versions which contain the spam. Is there a simple way to remove the past revisions? Thank you!

A: You may call the maintain action. This will remove versions older than $KeepDays?. A more radical way would be to delete the file with all the older versions. This is placed somewhere under keep/ in the $DataDir. Maybe make a backup before removing. Why is it a problem, if people link to some older version of a page? --MarkusLude

A2: Thanks for the advice. To answer your question, it's a problem because of this: someone puts a link to porn in a wiki page. I delete this, but the link remains in one of the revisions. A bunch of other people link to that revision from their porn pages. Google indexes these. Now, when someone searches for my wiki in Google, several of the returned hits are pornographic web sites. Also, users who are curious about the diffs in that page will end up seeing links to porn. Given my user base, I'd prefer if neither of these happened. I realize there's a limit to what I can do, but getting rid of old revisions would help.

You can stop Google visiting the action pages by editing your wiki's robots.txt file and adding something like:
/cgi-bin/wiki.pl?action
See [www.usemod.com 's robots.txt file] - CameronDewe

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited April 16, 2014 9:02 pm by MarkusLude (diff)
Search: