2. Console Command Reference

Arguments are defined on a per command basis, and some arguments are required for the command to work. If you are ever stuck, just type help command in the console for a short explanation of command.

Note

Included with the installation is a live reference located at the URI: /admin/console/reference.bml

Administrative Console Commands

allow_open_proxy

Marks an IP address as not being an open proxy for the next 24 hours.

Arguments:

  • ip. The IP address to mark as clear.

  • forever. Set to 'forever' if this proxy should be allowed forever.

ban_list

List banned users.

Arguments:

  • user. Optional; list bans in a community you maintain, or any user if you have the 'finduser' priv.

ban_set

Ban another user from posting in your journal.

Arguments:

  • user. This is the user which the logged in user wants to ban.

  • community. Optional, to ban a user from a community you run.

ban_unset

Remove a ban on a user.

Arguments:

  • user. The user that will be unbanned by the logged in user.

  • community. Optional, to unban a user from a community you run.

change_community_admin

Change the ownership of a community.

Arguments:

  • community. The username of the community.

  • new_owner. The username of the new owner of the community.

change_journal_status

Change the status of an account.

Arguments:

  • account. The account to update.

  • status. One of 'normal', 'memorial', 'locked'. Memorial accounts allow new comments to entries, locked accounts do not allow further comments. Entries are blocked either way.

change_journal_type

Change a journal's type.

Arguments:

  • journal. The username of the journal that type is changing.

  • type. Either 'person', 'shared', or 'community'.

  • owner. This is required when converting a personal journal to a community or shared journal, or the reverse. If converting to a community/shared journal, 'owner' will become the maintainer. Otherwise, the account will adopt the email address and password of the 'owner'. Only users with the 'changejournaltype' priv can specify an owner for an account.

comment

Manage comments in a user's account.

Arguments:

  • action. The action to take on the comment: screen, unscreen, freeze, unfreeze, delete, delete_thread.

  • url. The URL to the comment. (Use the permanent link that shows this comment topmost.)

  • reason. Reason this action is being taken.

community

Add or remove a member from a community.

Arguments:

  • community. The username of the community.

  • action. Only remove is supported right now.

  • user. The user you want to remove from the community.

deletetalk

Delete a comment.

Arguments:

  • user. The username of the journal comment is in.

  • itemid. The itemid of the post to have a comment deleted from it.

  • talkid. The talkid of the comment to be deleted.

disable_comm_promo

Sets the disabled status of community promos for a given community

Arguments:

  • user. Username of community for which status should be modified

  • status. 'on' to disable community promos, 'off' enable community promos

expunge_userpic

Expunge a user picture icon from the site.

Arguments:

  • user. The username of the picture owner.

  • picid. The id of the picture to expunge.

faqcat

Tool for managing FAQ categories.

Arguments:

  • command. One of: list, delete, add, move. 'list' shows all the defined FAQ categories, including their catkey, name, and sortorder. Also, it shows all the distinct catkeys that are in use by FAQ. 'add' creates or modifies a FAQ category. 'delete' removes a FAQ category (but not the questions that are in it). 'move' moves a FAQ category up or down in the list.

  • commandargs. 'add' takes 3 arguments: a catkey, a catname, and a sort order field. 'delete' takes one argument: the catkey value. 'move' takes two arguments: the catkey and either the word "up" or "down".

find_user_cluster

Finds the cluster that the given user's journal is on.

Arguments:

  • user. The user to locate.

finduser

Find a user by a criteria.

Arguments:

  • criteria. Currently the only known criterias are 'email', 'userid', or 'user'

  • data. The thing you know about the user, either their username, userid, or their email address.

friend

List your friends, add a friend, or remove a friend. Optionally, add friends to friend groups.

Arguments:

  • command. Either 'list' to list friend, 'add' to add a friend, or 'remove' to remove a friend.

  • username. The username of the person to add or remove when using the add or remove command.

  • group. When using command 'add', this optional parameter can list the name of a friend group to add the friend to. The group must already exist.

  • fgcolor. When using command 'add', this optional parameter specifies the foreground color associated with this friend. The parameter must have the form "fgcolor=#num" where 'num' is a 6-digit hexadecimal number.

  • bgcolor. When using command 'add', this optional parameter specifies the background color associated with this friend. The parameter must have the form "bgcolor=#num" where 'num' is a 6-digit hexadecimal number.

gencodes

Generate invite codes.

Arguments:

  • username. User to be given the codes

  • quantity. Number of codes to generate

get_maintainer

Finds out the current maintainer(s) of a community or the communities that a user maintains. If you pass a community as the argument, the maintainer(s) will be listed. Otherwise, if you pass a user account, the account(s) they maintain will be listed.

Arguments:

  • community or user name. The username of the account you want to lookup.

get_moderator

Finds out the current moderator(s) of a community or the communities that a user moderates. If you pass a community as the argument, the moderator(s) will be listed. Otherwise, if you pass a user account, the account(s) they moderate will be listed.

Arguments:

  • community or user name. The username of the account you want to lookup.

getemail

Get a user's email address. (for emailing them about TOS violations)

Arguments:

  • user. The username of the person whose email address you'd like to see.

help

Get help on admin console commands

Arguments:

  • command. The command to get help on. If ommitted, prints a list of commands.

infohistory

Retrieve the infohistory of a given user

Arguments:

  • user. The user whose infohistory is being retrieved.

moodtheme_create

Create a new mood icon set. Return value from this command is the moodthemeid that you'll need to define pictures for this theme.

Arguments:

  • name. Name of this theme, to appear in various places on the site

  • des. Some description of the theme

moodtheme_list

List mood themes, or data about a mood theme

Arguments:

  • themeid. Optional mood theme ID. If given, you view the data for that theme, otherwise you see just a list of the available mood themes

moodtheme_public

Make a mood theme public or not. You have to be a moodthememanager to do this.

Arguments:

  • themeid. Mood theme ID number.

  • setting. Either 'Y' or 'N' to make it public or not public, respectively.

moodtheme_setpic

Change data for a mood theme. If picurl, width, or height is empty or zero, the data is deleted.

Arguments:

  • themeid. Mood theme ID number.

  • moodid. Mood ID number.

  • picurl. URL to picture to show for this moodid in this themeid. If a public one, use /img/mood/themename/file.gif

  • width. Width of picture

  • height. Height of picture

print

This is a debugging function. Given an arbitrary number of meaningless arguments, it'll print each one back to you. If an argument begins with a bang (!) then it'll be printed to the error stream instead.

priv

Grant or revoke user privileges.

Arguments:

  • action. 'grant', 'revoke', or 'revoke_all' to revoke all args for a given priv

  • privs. Comma-delimited list of priv names or priv:arg pairs, or package names (prefixed like '#mypkg')

  • usernames. Comma-delimited list of usernames

priv_package

Moderate packages of admin privs. Basic workflow: priv_package create mypkg "Test Package", priv_package add mypkg admin:*, priv_package list. To actually grant a package to someone, priv grant #mypkg username. Works for revoke as well.

Arguments:

  • command. One of "list", "create", "add", "remove", "delete".

  • package. The package to operate on. Use the short name.

  • arg. If command is "list", no argument to see all packages, or provide a package to see the privs inside. For "create" and "delete" of a package, no argument. For "add" and "remove", arg is the privilege being granted in "privname:privarg" format.

reset_email

Resets the email address for a given account

Arguments:

  • username. The account to reset the email address for.

  • value. Email address to set the account to.

  • reason. Reason for the reset

reset_password

Resets the password for a given account

Arguments:

  • username. The account to reset the email address for.

  • reason. Reason for the password reset.

set

Set a userprop.

Arguments:

  • community. Community to set property for, if you're a maintainer.

  • propname. Property name to set.

  • value. Value to set property to.

set_badpassword

Change a journal's badpassword prop.

Arguments:

  • journal. The username of the journal that type is changing.

  • on/off. Either 'on' or 'off' which is whether to mark them as having a bad password or not.

  • note. Required information about why you are setting this status.

set_underage

Change a journal's underage flag.

Arguments:

  • journal. The username of the journal that type is changing.

  • on/off. Either 'on' or 'off' which is whether to turn it on or off.

  • note. Required information about why you are setting this status.

shared

Add or remove access for a user to post in a shared journal.

Arguments:

  • sharedjournal. The username of the shared journal.

  • action. Either add or remove.

  • user. The user you want to add or remove from posting in the shared journal.

suspend

Suspend a user's account.

Arguments:

  • username or email address. The username of the person to suspend, or an email address to suspend all accounts at that address.

  • reason. Why you're suspending the account.

syn_editurl

Changes the syndication URL for a syndicated account.

Arguments:

  • username. The username of the syndicated journal.

  • newurl. The new URL to syndicate the journal from.

syn_merge

Merge two syndicated accounts into one, keeping an optionally specified URL for the final. Sets up redirection between from_user and to_user, swapping feed URLs if there will be a conflict.

Arguments:

  • from_user. syndicated account to merge into another.

  • to_user. syndicated account to merge 'from_user' into.

  • url. URL to use for 'to_user' once merge is complete. You should use the direct URL to the feed, not the URL to a blog even if it supports auto-discovery.

tag_display

Set tag visibility to S2.

Arguments:

  • tag. The tag to change the display value of. This must be quoted if it contains any spaces.

  • value. A boolean value: 1/on/true/yes or 0/off/false/no.

tag_permissions

Set permission levels for the tag system.

Arguments:

  • add level. Accounts at this level are allowed to assign pre-existing tags to entries. Accounts are not allowed to define new tags or remove tags from entries. The value can be one of "public", "private", "friends", or the name of a friend group already defined.

  • control level. Accounts at this level have full control over tags and can define new ones, delete old ones, rename, merge, and perform all other functions of the tags system. Potential values are the same as in the add level.

unsuspend

Unsuspend a user's account.

Arguments:

  • username or email address. The username of the person to unsuspend, or an email address to unsuspend all accounts at that address.

  • reason. Why you're unsuspending the account.