Author Topic: FTP MODE: Design your page  (Read 2313 times)

0 Members and 1 Guest are viewing this topic.

Offline fred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3421
  • eFMer
    • View Profile
    • Trails
FTP MODE: Design your page
« on: November 11, 2010, 07:46:13 am »
How it works:

When BoincTasks generates a html file it inserts text blocks at the location of reserved insert words:
The file tasks_template.html is used and the result is placed in tasks.html.
Copy a template.html file from /html/examples folder, to /html and rename it into tasks_template.html.

Reserved insert words:

__TimeStamp__  Here the creation time is inserted, using the BoincTasks date format.
__InsertHeader__ Here the header is inserted
__InsertRow__ Here the rows is inserted. The next row is inserted directly after the last one.

Header:

<!--
__InsertHeaderTemplateBegin__
<tr>
<td BGCOLOR="#C0C0C0">__Project__</td><td BGCOLOR="#C0C0C0">__Application__</td><td BGCOLOR="#C0C0C0">__Name__</td><td BGCOLOR="#C0C0C0">__Percentage__</td><td BGCOLOR="#C0C0C0">__Timeleft__</td><td BGCOLOR="#C0C0C0">__State__</td><td BGCOLOR="#C0C0C0">__Deadline__</td><td BGCOLOR="#C0C0C0">__Computer__</td>
</tr>
__InsertHeaderTemplateEnd__ -->

The text between __InsertHeaderTemplateBegin__ and __InsertHeaderTemplateEnd__ is inserted in the __InsertHeader__ location.
Just before the insertion the reserved words in the header are substituted by the real names, according to the language set in BoincTasks.

Rows:

<!--
__InsertRowTemplateBegin__
<tr>
<td BGCOLOR="#__ProjectColor__">__Project__</td><td BGCOLOR="#__ApplicationColor__">__Application__</td><td BGCOLOR="#__NameColor__">__Name__</td><td BGCOLOR="#__PercentageColor__">__Percentage__</td><td BGCOLOR="#__TimeleftColor__">__Timeleft__</td><td BGCOLOR="#__StateColor__">__State__</td><td BGCOLOR="#__DeadlineColor__">__Deadline__</td><td BGCOLOR="#__ComputerColor__">__Computer__</td>
</tr>
__InsertRowTemplateEnd__ -->

The text between __InsertRowTemplateBegin__ and __InsertRowTemplateEnd__ is inserted in the __InsertRow__ location.
Rows will be inserted depending on the rows in the BoincTasks Tasks view.
Just before the insertion the reserved words in the row are substituted by the actual row text.

Reserved substitution words:

Project
Application
Name
Elapsed
CpuPercentage
Percentage
Timeleft
Deadline
Use
State
Tthrottle
Temperature
Computer
Checkpoint
Debt

Words that are substituted by a text have __ before and behind the word. E.g. __Computer__
Words that are substituted by a color have __ before and Color__ behind the word. E.g. __ComputerColor__

Warning : Words are case sensitive.

But it looks more complicated as it actually is, take the tasks_template as a starting point.

You can place the reserved words, any where you like. But of course the resulting html file must be a valid one.
You may add or remove reserved words as needed.
« Last Edit: July 06, 2011, 02:38:07 pm by fred »