Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

II.1.e. site

Andrey Bogdanov edited this page Jun 4, 2016 · 7 revisions

Contents

Options

site.dateFormat

The date and time format used by the site (posting date, etc.).

Default: MM/DD/YYYY hh:mm:ss.

site.domain

Used for the same purpose as the site.protocol.

Default: localhost:8080.

site.extraScripts

An object-map of extra scripts (JavaScript), that will be inserted into the page. The keys of the map correspond to the page (template name), and values are arrays, specified using one of the following format:

  • { source: theSource } The src attribute of a script tag will be set to theSource exactly.
  • { fileName: theFileName } The src attribute of a script tag will be set to theFileName prefixed by the site path prefix (see I.4. Basic configuration) and the "js/" suffix.
  • { value: theValue } The value will be used as a raw script tag content.

Note: A special key "_global" is used to include scripts into all pages.

Example:

{
    "site": {
        "extraScripts": {
            "boardPage": [
                { "fileName": "custom/myScript.js" },
                { "source": "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js" }
            ]
        }
    }
}
site.locale

The locale used for loading corresponding translation files to translate the user interface.

Default: en.

See also: II.6.c. Translations.

site.maxSearchQueryLength

Maximum post search field length (in symbols).

Default: 50.

site.protocol

The preferred protocol (either http or https). Used for links in the generated RSS feed, and for providing file links to external image search engines (such as TinEye).

Default: http.

site.timeOffset

Global time offset from the UTC time for the server (specified in minutes, may be positive or negative). Useful if your server is located in another time zone than the target country.

Default: 0.

site.tripcodeSalt

A salt used to generate tripcodes out of user hashpasses.

Default: "ololo".

Important: You ought to change this to prevent your user hashpass hacking.

site.twitter.integrationEnabled

Enables Twitter integration, so that the twit links are transformed into embedded twit containers.

Twitter integration is enabled by default.

See the /markup.html page for explanation.

site.vkontakte.integrationEnabled

Enables Vkontakte (Russian Phacebook analog) integration, so that the post links are transformed into embedded post containers.

Vkontakte integration is disabled by default.

See the /markup.html page for explanation (you will have to configure Vkontakte integration to see it on the /markup.html page).

site.vkontakte.appId

Vkontakte application ID. An integer.

Default: 0.

site.vkontakte.accessToken

Vkontakte access token required to access Vkontakte services from the server.

Aquiring the token is a bit tricky, so here is a mini-howto:

Use this link:

https://oauth.vk.com/authorize?client_id=YOUR_VK_APP_ID&scope=audio,offline&redirect_uri=https://oauth.vk.com/blank.html&display=mobile&response_type=token

and then copy the token from the address line:

https://oauth.vk.com/blank.html#access_token=ACCESS_TOKEN&expires_in=0&user_id=YOUR_VK_USER_ID
site.ws.transports

SockJS WebSocket emulation transports. See official manual for details.

Default: "" (an empty string; SockJS will try all protocols consequently).

Clone this wiki locally