1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Docs] Organizing your Files for a Hassle-free Upgrade

Discussion in 'Getting Started with Hotaru CMS' started by Nick, Jul 22, 2009.

  1. Nick

    Nick Well-Known Member

    Hotaru has been designed to allow an extraordinary level of customization. However, the last thing you want after customizing your site is to lose everything when you upgrade to the latest version.

    Upgrading Hotaru is easy. All you have to do is overwrite all your current files with new ones from the latest version. However, to ensure a safe upgrade that maintains all your changes, you need to understand the Content folder:

    Overwriting the Content folder

    A fresh Hotaru installation includes a default admin theme, a default language pack, some default plugins and a default theme. All of these will be overwritten during an upgrade.

    Content
    --- --- admin_themes
    --- --- --- --- admin_default
    --- --- language_packs
    --- --- --- --- language_default
    --- --- plugins
    --- --- --- --- default plugins
    --- --- themes
    --- --- --- --- default

    However, the following folders in orange would be safe during an upgrade:

    Content
    --- --- admin_themes
    --- --- --- --- admin_default
    --- --- --- --- my_custom_admin
    --- --- language_packs
    --- --- --- --- language_default
    --- --- --- --- my_custom_language
    --- --- plugins
    --- --- --- --- default plugins
    --- --- themes
    --- --- --- --- default
    --- --- --- --- my_custom_theme

    So all you need to do is leave the defaults alone, but customize copies of them (or find ready-made themes and language packs in these forums).

    Customizing plugins

    Much of Hotaru is powered by plugins that provide their own templates and language files which you will probably want to customize. However, unlike above, you can't customize copies of plugins because the filenames won't match and the plugins will break. Fortunately, there's an easy way to maintain your customizations. Let's imagine a plugin named oozleflopper which has a template called oozle_show.php

    Move:

    /content/plugins/oozleflopper/templates/oozle_show.php

    To:

    /content/themes/
    my_custom_theme/oozle_show.php

    Hotaru will find
    oozle_show.php in your theme folder, which we know won't be overwritten during an upgrade.

    Likewise you can move language, CSS and JavaScript files to a safe place and everything should still work normally:

    Move:

    /content/plugins/oozleflopper/css/
    oozleflopper.css
    /content/plugins/oozleflopper/javascript/oozleflopper.js
    /content/plugins/oozleflopper/languages/oozleflopper_language.php

    To:

    /content/themes/
    my_custom_theme/css/oozleflopper.css
    /content/themes/my_custom_theme/javascript/oozleflopper.js
    /content/language_packs/my_custom_language/plugins/oozleflopper_language.php


     
    Last edited: Sep 23, 2009
  2. carlo75

    carlo75 Design & Development

    Tip for a masterpiece:
    if exist a new folder named my_custom_folder, Hotaru will recognize immediately this folder as the default... what do you think?
     
  3. Nick

    Nick Well-Known Member

    That's probably *too* clever, and would be tricky if there were more than two themes in the themes folder.
     

Share This Page