DiscusWare, LLC.
Download Purchase Contact Us
Home
Support Home Documentation Knowledge Base Support Forums Support Request Advanced Services
Discus Template Language :: Global Option

This document describes how several 'Global Options' defined in the Options Manager can be used within skins and templates. Unless you hold a support contract that includes support for customization, DiscusWare does not provide support for the procedures in this section.
Support Site Search
 
Manuals and Docs
  Installation
  Upgrade
  Administration - 4.0
  Administration - 3.1
  Customization
    Skin Primer
    Skin Editing
    Interface Customization
    Templates: Variables
    Templates: Substitution
    Templates: IF-THEN
    Templates: FOREACH
    Templates: FOR
    Templates: DEFINE
    Templates: Arrays
    Templates: Skins
    Templates: Text Ops
    Templates: Subroutines
    Templates: Flow Control
    Templates: Math
    Templates: Global Options
    Templates: Colors
    Templates: Language Files
Synopsis

The "Global Options" for your board are stored in the options.txt file and are mostly set up through the Options Manager. It is frequently useful to have your template check to see whether a particular option has been turned on or not, so the special hash $GLOBAL_OPTIONS contains all of the Global Options that the program has stored.

Operations With Options

$GLOBAL_OPTIONS->{key} will give the value of the "key" global option. The value of most global options is 0 or 1, generally corresponding to option disabled or enabled, respectively. Sometimes global options have a text value, however.

<#option_defined: "key"#> will tell you whether or not the option "key" is defined. This tells you whether there is an entry for "key" in the options.txt file. If there is such an entry, this function returns 1. If there is no such entry, this function returns 0. Note that this 1 and 0 do not depend at all on what the value of the global option "key" is -- they simply tell you whether or not "key" is defined at all.

Some Important Options

The administration instructions for Options Manager describe each option in detail that can be set in Options Manager. Advanced template designers may look at the options.tmpl template in the "admin" subdirectory to correlate option names with descriptions. The following options are just some of the options that may be of interest to template designers:

    Option Description
    $GLOBAL_OPTIONS->{admin_contact_email} The e-mail address that users are told to contact on error screens
    $GLOBAL_OPTIONS->{admin_contact_name} The name that users are told to contact on error screens
    $GLOBAL_OPTIONS->{allow_selfreg} In Discus Pro, whether or not user self-registration is enabled
    $GLOBAL_OPTIONS->{capitalize} Capitalize the first letter of user-created subtopics
    $GLOBAL_OPTIONS->{capitalize_username} Capitalize the first letter of usernames
    $GLOBAL_OPTIONS->{format_panel} Whether or not the JavaScript-based formatting panel is on
    $GLOBAL_OPTIONS->{message_icons} Whether or not top/up/down/bottom icons appear next to messages
    $GLOBAL_OPTIONS->{name_length_limit} Whether or not limit on length of full names is imposed
    $GLOBAL_OPTIONS->{name_length_limit_number} If $GLOBAL_OPTIONS->{name_length_limit} is 1, this is the maximum number of characters in a full name
    $GLOBAL_OPTIONS->{new_conv_limit} Whether or not limit on length of user-created subjects is imposed
    $GLOBAL_OPTIONS->{new_conv_limit_number} If $GLOBAL_OPTIONS->{new_conv_limit} is 1, this is the maximum number of characters in a user-created subject line
    $GLOBAL_OPTIONS->{post_ratings} In Discus Pro, whether or not post ratings are enabled
    $GLOBAL_OPTIONS->{posting} In Discus Pro, whether or not post ratings are enabled
    $GLOBAL_OPTIONS->{prevent_long_posts} Whether or not limit the length of single words in messages
    $GLOBAL_OPTIONS->{prevent_long_posts_threshold} If $GLOBAL_OPTIONS->{prevent_long_posts} is 1, this is the maximum number of characters in a single word within a message
    $GLOBAL_OPTIONS->{pwchange} Whether or not users can change their own passwords
    $GLOBAL_OPTIONS->{skinchoice} The selected skin (e.g., "tables2" or "classic")
    $GLOBAL_OPTIONS->{user_paren} Whether or not to put usernames in parentheses on posts
    $GLOBAL_OPTIONS->{usersdel} In Discus Pro, whether or not users can delete their own messages
    $GLOBAL_OPTIONS->{usersedit} In Discus Pro, whether or not users can edit their own messages

Download Purchase Contact Us
Privacy Policy
Copyright © 2005, DiscusWare, LLC, All Rights Reserved