Skip to content

Customization

Arne Claus edited this page Jun 15, 2014 · 8 revisions

Raidplaner customization

Creating custom themes

Themes are described via XML and have to be placed in the "images/themes" folders.
Lets have a look at an example file:

<?xml version="1.0" encoding="UTF-8" ?>
<theme>
    <banner>cataclysm.jpg</banner>
    <bgimage>cataclysm.jpg</bgimage>
    <bgrepeat>repeat-x</bgrepeat>
    <bgcolor>#8a8a8a</bgcolor>
    <portalmode>false</portalmode>
</theme>

The first line is the standard XML header. Leave this as-is (unless you know what you're doing).
The root element is called "theme". There are no additional attributes, so this can be left unchanged, too. Next are the elements describing the different parts of the theme.
All nodes (as in <node></node>) are mandatory should be written all lowercase.

banner
The image named here has to exist in the folder "images/banner" and will be displayed at the top of the page. The image has to be of the dimensions 1024x141.
If you set the banner to none, a black area will be displayed. If you set the banner to disable the banner will not be shown.

bgimage
This image will be displayed in the background of the raidplaner and has to exist in the folder "images/background". It can be of any dimension but should work well with whatever repeat pattern is defined with the bgrepeat node.
If set bgimage to none no background will be displayed.

bgrepeat
This node defines the repeat mode of the background patterns.
The values entered have to be compatible with the css attribute "background-repeat". Possible values are no-repeat, repeat-x, repeat-y, repeat.

bgcolor
The color of the page behind the background image.
This can be useful if you don't want to use a background image, the image should blend into a single color or you want to use a transparent image.
If set bgcolor to none the background color will be transparent.

portalmode
When set to true this setting will move the raidplaner window to the top left of the document.
This might be useful when integrating the raidplaner into a portal/cms.

family 1.1
Required as of version 1.1.0. Add a comma separated of list of game families this theme is compatible to.
Default families are wow and ff14, but gameconfig files can define other values, too.

logout 1.1
Set to false to hide the logout button.
This might be useful when using automatic login.

style 1.1
Set this to the name of a file located in themes/styles to include an additional CSS file to your theme.
You can add multiple style elements.

random 1.1
Random blocks may contain the tags banner, bgimage, bgrepeat and bgcolor.
You can define multiple blocks, the active block is selected on page reload.
The settings defined inside a random block will overwrite the default settings.

Changes beyond theme files

Modifying script files

As of version 1.0.0 the raidplaner loads a unified, compiled javascript by default. This script is packed, so reading or modifying it can be quite hard.
To use the separate script files included in every raidplaner installation, open the file "index.php" and change the SCRIPT_DEBUG define to true like this:

define("SCRIPT_DEBUG", true);

This will load each file separately.

Stylesheets

With version 1.1.0 CSS loading has changed to be a bit more flexible.
You can overwrite styles by defining theme styles, several CSS files have been dropped or merged and CSS3 is used wherever possible.
Like scripts, styles are loaded in one big block. For debugging reasons this can be disabled by changing the STYLE_DEBUG define in the file "index.php" to true like this:

define("STYLE_DEBUG", true);

If you want to overwrite the standard style in your theme, you might want to have a look at the original styles to e.g. use standard values or see what's available.

Style Content
calendar.css Styles for the calendar view
combobox.css Styles for dropdown boxes
default.css Common styles used throughout the raidplaner
frame.css 1.1 Styles that define the outer frame of the raidplaner
login.css Styles for the login and register page
profile.css Styles for the profile view
raid.css Styles for the raid detail view
raidlist.css Styles for the raid list view
settings.css Styles for the settings view
sheet.css Styles used for sheets (e.g. new raid)
tooltip.css Styles used in tooltips
shadow.css deprecated Styles used for elements with shadows
shadowIE.css deprecated Internet Explorer specific style-overwrites for shadows
sheetIE.css deprecated Internet Explorer specific style-overwrites for sheets
tooltipIE.css deprecated Internet Explorer specific style-overwrites for tooltip

Iconsets

Game related icons are collected in so called icon sets.
These files can be found in "themes/icons" where each folder contains the equally named iconset.
And iconset contains four folders for raid and class icons of different sizes.
Images contained in a "<type>small" folder most exist in a "<type>big" folder with the same name and extension, too. So if you want to add a new "mylocation.png" you should place a 32x32 version called "mylocation.png" in "raidsmall" and a 64x64 version called "mylocation.png" in "raidbig".

folder content
classesbig Class icons of size 64x64
classessmall Class icons of size 32x32
raidbig Raid location icons of size 64x64
raidsmall Raid location icons of size 32x32

The images in "raidbig" and "raidsmall" will automatically become available in the location image chooser.
Images placed in "classesbig" and "classessmall" follow the same rule but have to be referenced from a theme file.

Configuring the raidplaner for other games

If you are using Raidplaner 1.0.x, continue to this page.
If you are using Raidplaner 1.1.x, continue to [this page] (https://github.com/arnecls/raidplaner/wiki/Gameconfig-1.1.x).

The links above will show you how to add classes, roles and group sizes to the raidplaner.
The method to do this has changed with version 1.1.0. If you want to upgrade an 1.0.x gameconfig, you can either use the repair tool or make sure the gameconfig.php stays in place when upgrading from 1.0.x to 1.1.0.

Configuring forum posts

The content of forum post can be changed by editing the file "lib/config/config.post.xml".
By default this file has the following content:

<post>
    <subject>
        <![CDATA[
            {Location:Name} ({Raid:Size}) - {Raid:Start:%A, %x}
        ]]>
    </subject>
    <message timezone="Europe/Berlin">
        <![CDATA[
            <b>{Location:Name} ({Raid:Size})</b>
            <i>{Raid:Start:%A, %x}</i>
            <i>{Raid:Start:%X (%Z)} {L:to} {Raid:End:%X (%Z)}</i>
            <a href="{URL}index.php#raid,{Raid:RaidId}">{L:LinkToRaid}</a>
            
            {Raid:Description}
        ]]>
    </message>
</post>

The following attributes are available for subject and message:

attribute description
locale Set to your locale, e.g. "de_DE" or do not set for using the browser's locale. See http://www.w3.org/WAI/ER/IG/ert/iso639.htm and http://www.php.net/manual/en/function.setlocale.php
timezone Set to the timezone you want to use, e.g. "CET". Defaults to "UTC". See http://www.php.net/manual/en/timezones.php

You can use tags in your messages to access fields from the tables "raids_Raid" and "raids_Location". Tags are written inside curly braces, parameters are separated by a colon. Not all tags have parameters.
While in theory you can access all fields from the two database tables, the following fields are the most useful:

tag description
URL Base URL of the raidplaner (e.g. http://www.myserver.com/raidplaner/)
L:loca key Localized string (see lib/private/locale for available tags). Note that strings are localized to the language of the user creating the raid.
Raid:RaidId Id of the raid
Raid:Size Size of the raid (e.g. 25)
Raid:Description The description entered for this raid
Raid:Start:format Start of the raid format must be a valid strftime format. See http://www.php.net/manual/en/function.strftime.php
Raid:End:format End of the raid format must be a valid strftime format. See http://www.php.net/manual/en/function.strftime.php
Location:Name Name of the location
Location:Image Filename of the icon used for this raid

Some forums (like MyBB) will refuse to display HTML, so certain parts will be converted to BBCode automatically. Note that tags that span multiple lines won't be affected.
The following BBCode replacements will be done:

HTML BBCode
<a href="x"></a> [url]x[/url]
<a href="x">y</a> [url='x']y[/url]
<b>x</b> [b]x[/b]
<i>x</i> [i]x[/i]
<br/> \n aka. linebreak
<img src="x"/> [img]x[/img]