+

Search Tips   |   Advanced Search

Administer Blogs using wsadmin.sh

As an alternative to modifying the Blogs site settings from the Blogs user interface via the Administration tab, we can also modify settings using wsadmin.sh.

Blogs site-wide configuration information is stored in the Blogs database, rather than in an XML file. Therefore, you do not need to check out (or check in) the Blogs site-wide configuration file because any configuration changes made are written directly into the database.

Use the BlogConfigService.showConfig and BlogsConfigService.updateConfig commands to view and make site-wide configuration changes to Blogs configuration settings. Changing a Blogs site-wide configuration setting from wsadmin session requires the following procedures:

  1. Start the Blogs Jython script interpreter ...

  2. To view the current values of the editable configuration property keys for Blogs and note its output. The following output is a sample; the output may differ.

    BlogsConfigService.showConfig()
    
    Blogs configuration properties:
     ACFEnabled = true
     CustomThemeAllowed = false
     EditingPollInterval = 15
     InboundTrackBacksEnabled = True
     OutboundTrackBacksEnabled = True
     SiteDescription =
     SiteFrontPageweblogHandle = home  
     SiteName = Blogs Home  
     SiteNewsFeedsDefaultEntries = 30
     SitePagesMaxEntries = 30
     SiteShortName = Blogs Home  
     UploadsDirMaxSize = 4.0  
     UploadsEnabled = true
     UploadsFileMaxSize = 1.0
     UploadsTypesAllowed = jpg,jpeg,gif,png,  
     UploadsTypesForbid =
     UsersCommentsEmailNotify = true
     UsersCommentsEnabled = true
     UsersModerationRequired = false

The following tables list the commands available for changing Blogs configuration settings.

To change a setting, enter the appropriate property and a new value into the following command:

where:

Example: wsadmin>BlogsConfigService.updateConfig("EditingPollInterval", "20")

Configuration updates take effect immediately and do not require a server restart.

Option Type Description UI Field Equivalent
SiteName String Update the name of the site (displayed on the front page) Site Name
SiteShortName String Update the name used for the page tab in browsers Short name
SiteDescription String Update the site description (used on the front page) Site Description
SiteFrontPageweblogHandle String Update the handle of the blog home page Handle of blog to serve as frontpage blog
ACFEnabled String

Turns on / off the Active Content Filter (The Active Content Filter removes unsafe HTML from Blog posts that could be used for a XSS attack.) Valid values are: true or false.

Enable active content filtering
EditingPollInterval Integer

Automatically saves content in the editor when a user is creating an entry or a comment. Set this to the number of minutes between saves.

Automatic save when editing (minutes)

Option Type Description UI Field
SitePagesMaxEntries Integer Maximum number of posts that a blog can have on its home page Max number of entries to allow per page
SiteNewsFeedsDefaultEntries Integer Maximum number of posts that can be in a blogs feed Number of entries to provide in newsfeeds

Option Type Description UI Field
UsersCommentsEnabled String Turns on and off the ability to add any comments in the site. Valid values are: true or false. Allow blog comments
TrackBacksEnabled String Turns on and off the ability to add any trackbacks across the site. Valid values are: true or false. Allow blog trackbacks
UsersCommentsEmailNotify String Whether users can get email notifications when comments are added to their blog. Valid values are: true or false. Email notification of comments
UsersModerationRequired String Indicates whether comments always require moderation before being added to a blog. Valid values are: true or false. Require comment moderation for all blogs

Option Type Description UI Field
UploadsEnabled String If enabled, file uploads are allowed for this site. Valid values are: true or false. Enable File Uploads
UploadsTypesAllowed String Comma delimited list of allowed file type extensions. Only files with these extensions are allowed to be uploaded. Allowed Extensions
UploadsTypesForbid String Comma delimited list of file type extensions that are not permitted. Files with these extensions are not allowed to be uploaded. Forbidden Extensions
UploadsFileMaxSize Double Maximum file size that can be uploaded by any user Max File Size (MB)
UploadsDirMaxSize Double Maximum size of total uploaded file directory for a given blog Max Directory Size (MB)

Option Type Description UI Field
CustomThemeAllowed String Determines if custom themes are allowed. Valid values are: true or false. Allow Custom Themes


Parent topic:
Administer Blogs


Related:

Start the wsadmin client