logo

TNG - custom themes

Resources - Website

Requirements:

  • Adhere to site standards, look as much like Joomla and Zenphoto as possible
  • Customized files in my own separate directory, not to be overwritten in an upgrade, not mixed in with core directories
  • Minimize overhead - don't load what isn't needed
  • Maximize security - put private/configuration stuff outside web root

Customconfig.php

  • Admin-Setup-Paths and Folders
    config path = home/mysitename/private/tng/config/
    and then my config.php and customconfig.php go here, keeps them away from evil prying eyes, and also out of MY sight so I'm not going to accidentally futz with them
  • The file itself creates some variables
    $theme['path'] which is the name of the directory where my theme files are stored
    $theme['pagestyle'] to be an ID for the body tag on some pages, allowing custom styling
  • HARDCODES some variables so that admin-setup doesn't screw things up, also makes the theme kind of portable, it's a step towards it anyway
    $customheader
    $customfooter
    $custommeta
    $tngconfig['tabs']
    are all set to files located in my theme directory
  • calls "my_vars.php"  which will be located in theme directory, for any new variables I may want to create. I will NOT customize any cust_text.php files anywhere

genealogy/lptextheme directory

All my custom files go here, create "css" "img" "js" and "utilities" subdirectories for support files. The utilities directory is for any scripts that I may have to create in order to do my image manipulation functions. Those scripts would be one-off things, and not part of everyday system operations.

genealogy/index.php

This is new, and totally generic. The TNG included index.php got overwritten with this one. It does the initial processing, loads the config variables, connects to the database, checks for login status, and then goes to the theme's index.php file. Note that it does not load templateconfig.php. In the themed environment, this file is completely unnecessary and represents loading of a bunch of unneeded variables. Skip it. But it means you can not use any of the template stuff in the Admin screens.

Hack to genlib.php, v8.1.1

Rem out lines 92-96 which are the calls to genstyle.css, tabs.css, templatestyle.css, and mytngstyle.css. These are TNG's standard CSS files, and will not be used at all. If they were going to be used, they would be loaded in the meta file, AFTER the loading of the Yahoo reset and sitestd css files


blog comments powered by Disqus
Copyright © 2012 American Roots. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.