CustomizingManual/CreateTemplateSet

Creating templates for the application

To create templates for the application, you need at least some HTML knowledge - all the layout is done by HTML and CSS, as it is with web pages. Besides from that, there is not that much to explain - the tasks are clear:

  1. Guess a good name for the new template set you are going to create. To have an example to explain, let's call it "babylon5" here
  2. Go to the templates/ subdirectory of your phpVideoPro installation and create a subdirectory by this name. So based in the applications main directory, in our example this would be templates/babylon5
  3. To have something to start with, you may copy the contents of the templates/default directory to your new directory. This way you make sure you don't forget a file, and also have the required placeholders (the tokens in the {curly braces} which will later be replaced by the applications data) already mentioned in the right files. Also you have the definition of data blocks where they belong (that is what looks like HTML comments - don't remove them, they are essential! ).
  4. Now you can start your favorite HTML editor and modify the HTML code within these files. Again: Make sure to keep the place holders and block marks - or the templates won't work!
  5. If your new template set needs some JavaScript code to be present for all pages, there are two special files that can be used: if there's a file called top.js present in the templates directory, it will be linked into the page header. A file named foot.js in the same place will be linked to the end of each page.
  6. Once you finished editing these files (i.e. your new template set has been created), you may go to the UserPreferences page and activate your template set. phpVideoPro will automatically detect the new directory and offer the new template set to you, so there's nothing else to do in the configuration.
  7. If you are satisfied with your work, please consider packing the directory into an archive (*.zip, *.tar.gz, or whatever you use) and send it to the developers, so it may be distributed and other people can use it as well. Of course, credits would go to you!
Last modified by izzy, 02/24/09 16:00:06 (17 months ago)