#116 legacy_site_closed.html requires folders/files inside themes

open
nobody
None
5
2014-08-23
2012-04-27
Mikhail Miguel
No

The template file html/modules/legacy/templates/legacy_site_closed.html is pointing to files inside the themes, not inside the legacy module or to any core file. The code "<{$xoops_imageurl}>images/logo.png" makes necessary to have a directory called "images" with a file "logo.png" inside all themes folders. Also: <{$xoops_themecss}> requires a style sheet file in selected theme folder with a specific code to "closed site" and with a standard name (style.css, styleNN.css, styleMAC.css).

Discussion

  • HIKAWA Kilica
    HIKAWA Kilica
    2012-05-02

    How do you think the right code ?
    If legacy module or any core file has these files, it become difficult to customize logo image, css by theme designer or site owner because they shouldn't override files under /modules/legacy or /core.

     
  • Mikhail Miguel
    Mikhail Miguel
    2012-05-22

    Hi! :-)

    1) the template file 'legacy_site_closed.html' is not defined in legacy/modinfo.php , and is only defined in:
    \xoopscube\Package_Legacy\trunk\html\modules\legacy\preload\Primary\SiteClose.class.php (line 68):
    $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/legacy/templates/legacy_site_closed.html');
    and
    \xoopscube\Package_Legacy\trunk\html\modules\legacy\preload\Primary\SystemModuleInstall.class.php (line199):
    $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/legacy/templates/legacy_site_closed.html');

    2) is not possible to change this template coping a new 'legacy_site_closed.html' file into the theme folder, and is not possible to change it via AltSys too.

    3) Most themes dont have a file "logo.png" into a "images" folder. Some themes store images in "img" or "imgs" folders, or even in the $xoops_imageurl folder (the theme folder). In the old XOOPS 2.0 system, the site closed image was:
    <{$xoops_imageurl}>logo.gif

    3) Just an idea via Pseudocode:

    if themes/selected_theme/logo.[png|gif|jpg] exists then
    IMAGE = 'themes/selected_theme/logo.[png|gif|jpg]
    else
    IMAGE = ...legacy/images/site-closed.png -- (or xoops_root_url/images/logo.png)
    end

    []'s

    mikhail

     
  • HIKAWA Kilica
    HIKAWA Kilica
    2012-07-21

    • labels: 963736 -->