# This is the forum appearance template file.
# It's evaluated as Perl, so you'll need to escape any $, %, @, | or \ characters in the strings
# with a backslash in front, but you can call other functions etc. to construct your templates.
# Basically this is a large list of "templates", into which the actual forum data is inserted
# to form the displayed output of the script. It works by having strings with many "substitutions"
# like [!NAMEHERE!] in them, which is where the forum information is inserted. The basic format is:
# $forum_template{'templateNameHere'} = qq|
# content content [!SUBSTITUTION!] content
# |;
# Some of the advanced substitutions have multiple options. The format for them is:
# [?SUBSTITUTION^string1^string2?]
# These are used as if/else substitutions, for example highlighting popular topics, when
# string1 is inserted if the forum/topic is popular and string2 if it is not.
# Substitutions that are commonly available in most templates are:
#
# [!HOMEURL!] the address of the forum index page, available everywhere.
# [!NEWTOPICURL!] the address of the "Create New Topic" page for the forum.
# [!FORUMNAME!], [!FORUMTEXT!], [!FORUMURL!] which describe the selected forum.
# [!TOPICNAME!] and [!TOPICURL!] are available when a topic is selected.
#
# [?ISLOGGEDIN^abc^xyz?] will insert "abc" if a user is logged in, otherwise "xyz".
# [!LOGINURL!] is the address to which a login
|;
# Empty forum row -- this is written if there are no topics in the forum, or no search results.
$forum_template{'listTopicsError'} = qq|
No items found.
|;
# Otherwise, write out a row for each topic. Again, we have a special HIGHLIGHTED substitution
# that has two strings in it, the first for topics with more posts than the threshold and the
# second otherwise. There are also special topic "pinned" and "locked" states you can detect, I'm
# labelling rows and also giving pinned rows a different CSS class.
# We also have the page-list substitutions, for multi-page topics. Special substitutions:
# [!ROWHOVERCLASS!], [!ROWNORMCLASS!], [!TOPICURL!], [!TOPICNAME!], [!ORIGAUTHOR!], [!ORIGTIMESECS!],
# [!ORIGTIMEGMT!], [!LASTAUTHOR!], [!LASTTIMESECS!], [!LASTTIMEGMT!], [!POSTS!],
# [?HIGHLIGHTED^...^...?], [?PINNED^...^...?], [?LOCKED^...^...?],
# [?HASPAGES^...^...?], [?PAGELIST^...^...^...?]
$forum_template{'listTopicsRow'} = qq|
Here you can enter details of a new Classifieds item:
|;
# The Message Posting form, used to post replies or create new topics.
# POSTFIELDS must be included somewhere (a couple of hidden input tags).
# ISNEWTOPIC is a conditional test that detects if this is a new topic or not.
# Likewise ISNEWPOST will be false for users or admins re-editing an existing post.
# Some other things: anonymous posters must supply an additional "author" input field,
# and if posting fails, this form will be returned again along with an error message.
# Special substitutions: [!POSTURL!], [!POSTFIELDS!], [?ISNEWTOPIC^...^...?],
# [?ISNEWPOST^...^...?], [!TOPICNAME!], [!AUTHOR!], [!MESSAGE!]
my $max_len = $forum_prefs{'max_post_len'} || '';
$forum_template{'postForm'} = qq|
[?ISNEWPOST^
Add a comment or query:
^?]
[!POSTFIELDS!]
[?ISLOGGEDIN^^
You are not logged in, and will be posting anonymously as a guest.
If you want to post using an account, please login at the top of this page.
?]
[?ISNEWTOPIC^
^?]
Maximum message length is $max_len characters.
|;
# The "Post Error" display, if the script cannot post the user's message (too long, missed
# necessary information, etc. etc.). This is written to the document and followed by the
# posting form in the template above. Special substitutions: [!ERRORMESSAGE!].
$forum_template{'postError'} = qq|
|;
# This forms the top of the post-display pages. Special substitutions:
# [!HOMEURL!], [!FORUMURL!], [!FORUMNAME!], [!FORUMTEXT!], [!TOPICURL!],
# [?HASPAGES^...^...?], [?PAGELIST^...^...^...?], [?PREVPAGE^...^...?], [?NEXTPAGE^...^...?]
$forum_template{'displayTopicTop'} = qq|
|;
# This formats each row in the post display, containing time/author/message/etc.
# Special substitutions:
# [?ISUSER^...^...?] tests if this post is by a logged-in user, or a guest.
# [?USERSIG^...^...?] tests if the post author account has a signature.
# [?ISEDITABLE^...^...?] tests if the current user has rights to edit/delete this post.
# [!EDITURL!] is the URL to the post editing page if applicable.
# [!GROUP!], [!POSTS!], [!JOINED!], [!LOCATION!] and [!SIG!] insert user information.
# [!ROWNORMCLASS!], [!NUM!], [!AUTHOR!], [!TIMESECS!], [!TIMEGMT!], [!IPADDR!], [!MESSAGE!]
$forum_template{'displayTopicRow'} = qq|
|;
# This is shown in locked topics, or topics in which the user isn't allowed to post, in place
# of the "Post A Reply" form.
$forum_template{'displayTopicNoPost'} = qq|
Sorry, this item is not accepting new entries.
|;
# The template for editing or deleting posts. This is followed by the posting form.
$forum_template{'editPost'} = qq|
Please type in your amended message, or delete it all to remove the post entirely.
|;
# The topic locking/deleting template, this is shown after the post form.
# It consists of a form that must contain [!HIDDENFIELDS!] and post back to the topic URL.
# The PINNED and LOCKED substitutions are available to show the current topic state.
$forum_template{'topicSettings'} = qq|
Topic Settings
[!HIDDENFIELDS!]
|;
# The login error page, displayed if a user inputs an incorrect username/password.
$forum_template{'userLoginError'} = qq|
Login Error
The username and password you provided are incorrect.
Make sure you have correctly capitalised and spelt both!
Please try again, or press "Back" to return to the previous page.
|;
# The account editing / signup page. I use one template for both, with some alterations depending
# on whether the user is currently logged in or not. This uses ?ISLOGGEDIN? extensively to switch
# between modes, as logged-out users can never edit their own account. Special substitutions:
# [!ACCOUNTUSER!] is (surprisingly) the account username being edited, if logged in.
# [!ACCOUNTERROR!] contains any error messages (incorrectly filled out form etc) after submittal.
# [!ACCOUNTPOSTURL!] goes in the "action" field for your form.
# [!BIO!], [!LOCATION!] and [!SIG!] are the current values returned for these fields.
# [?ACCEDIT^...^...?] is true if the current user has admin privileges, and is entitled to change
# the privilege level of this account via the [!GROUPSELECT!] select-box.
$forum_template{'userAccountEdit'} = qq|
You don't need an account to post, but if you have one, you can edit your posts later
and display more information with your messages.
Required Fields
Please choose a user name you want to use in these Classifieds. Alphanumeric characters only.
?]
[?ISLOGGEDIN^
If you want to change your existing password, please enter it here, otherwise leave this
field blank:
^?]
Enter your new account password here twice (they must both match)
[?ISLOGGEDIN^^
Optional Fields
?]
Where in the world are you? This gets displayed with your posts.
Say a little about yourself, include some contact information, or just leave it blank.
This will be displayed on your "User Info" page.
A signature will be automatically appended to your posts (max 200 chars).
[?ACCEDIT^
ADMINS ONLY: You can change the privilege type of this account.
^?]
[?ISLOGGEDIN^^
You can change all these account settings later, except for the username.
Plus, you must have cookies enabled in your browser to login.
?]
|;
# The account information display template. Basically it's identical to the one above, but doesn't
# have any editable components. This is used to display other people's profiles.
$forum_template{'userAccountView'} = qq|
|;
# The 'not allowed' template, encountered in that rare situation when a visito tries to pull off
# a stunt they're not entitled to do. [!ACTION!] tells them what went wrong.
$forum_template{'userDisallowed'} = qq|