Fork me on GitHub

Editing files in "system\Users\pntemplates"  Bottom

  • I want to edit the file "system\Users\pntemplates\users_block_online.htm". How do I go about adding it to my theme\template folder so I don't have to edit the original?

    Thanks...
  • you're not supposed to edit files in /system AT ALL.

    you should use template overrides to do this.
    http://community.zikula.org/Wiki-TemplateOverridng.htm
  • Exactly, as I stated in my post. I don't want to edit my original file.

    I want to make the edit Theme Specific.

    The file I want to edit is located: "system\Users\pntemplates\users_block_online.htm"

    I'm not sure of the path I need to create. I'm assuming it goes into my "\themes\mytheme\templates" folder.

    What would be the correct path to drop the "system\Users\pntemplates\users_block_online.htm" file into to get Zikula to override the original file?

    Thanks...

    I created a path: "themes\mytheme\templates\system\user\pntemplates" and dropped the file "users_block_online.htm" into taht folder and that didn't work. What am I doing wrong?

    Thanks...



    edited by: mesteele101, Jul 11, 2008 - 01:25 PM

    --
    Kindest regards,
    Michael...

    WINSNORT.com Management Team Member
    --
    Pick up your FREE Windows Snort installation guides
    mailto:support@winsnort.com
    Website: http://www.winsnort.com
    Snort: Open Source Network IDS - http://www.snort.org
  • Oooh, I know this one.

    You can put it in "themes/yourtheme/templates/modules/Users/users_block_online.htm"

    That should do the trick.

    Alternatively, you can put it in "config/templates/Users/users_block_online.htm"

    The system looks for templates in this order (from "includes/pnRender.class.php")?

    1. The top level module directory in the requested module folder in the theme directory.
    $themehookpath = "themes/$os_theme/templates/modules/$os_module/$os_pnmodgetname";

    2. The module directory in the current theme.
    $themepath = "themes/$os_theme/templates/modules/$os_module";

    3. The global template directory for the current top level module
    $globalhookpath = "config/templates/$os_module/$os_pnmodgetname";

    4. The global template directory
    $globalpath = "config/templates/$os_module";

    5. The top level module directory in the requested module folder in the modules sub folder.
    $modhookpath = "modules/$os_module/pntemplates/$os_pnmodgetname";

    6. The module directory in the modules sub folder.
    $modpath = "modules/$os_module/pntemplates";

    7. The top level module directory in the requested module folder in the system sub folder.
    $syshookpath = "system/$os_module/pntemplates/$os_pnmodgetname";

    8. The module directory in the system sub folder.
    $syspath = "system/$os_module/pntemplates";

    Thanks,

    matt

    --
    The Peripheral Vision
    Creative Culture : Business : Technology
    www.theperipheralvision.com
  • Now, your just showing off :) I thought the "themes\mytheme\templates\modules" folder would only contain files found in the "mysite\modules" folder. Why is the folder labled modules when you can throw files from the system folder in there, confusing?

    Ok, here is another one:

    How do you override the variable file online.php located in the "mysite\system\Users\pnlang\eng" folder?

    I tried creating "themes/mytheme/templates/modules/Users/pnlang/eng" and dropping the online.php file in there but no go.

    Thanks...
  • probably config/languages/eng/
  • Doesn't that make a global change? I would much rather keep all the mods contained to one theme, unless the path you suggested is theme specific? I'm all new to Zikula and the new format.

    Ok, I dropped the online.php file into "mysite\config\languages\eng" and ho go there :(

    I also created a folder "themes\mytheme\templates\config\languages\eng" and dropped the file in and still no go.



    edited by: mesteele101, Jul 11, 2008 - 03:16 PM

    --
    Kindest regards,
    Michael...

    WINSNORT.com Management Team Member
    --
    Pick up your FREE Windows Snort installation guides
    mailto:support@winsnort.com
    Website: http://www.winsnort.com
    Snort: Open Source Network IDS - http://www.snort.org
  • Theme specific language defines should go into themes/YourTheme/lang/eng (assuming you're using english as default language). But I think you may have to rename the file to global.php, I think this may be the case for config/languages/eng as well.

    mesteele101

    Why is the folder labled modules when you can throw files from the system folder in there, confusing?


    Not really when you consider that /system/ simply holds the system modules.

    --
    Under Construction!
  • Topiatic

    Theme specific language defines should go into themes/YourTheme/lang/eng (assuming you're using english as default language).


    The team will have to correct me, but language defines in this location are for theme localization and translations. They do not override any system or module language defines.

    As far as I know, the only way you can override any language defines is to put your install into development mode using the config.php file and by placing your changes in "config/languages/lang/". There is no real override system for the language defines and this only exists to make it easier for people to develop language packs.

    Core team, please let me know if I'm wrong. I'm also not sure what exactly is happening with the conversion to gettext, but it would sure be nice to be able to override language defines as we do with templates and styles.

    Thanks,

    matt



    --
    The Peripheral Vision
    Creative Culture : Business : Technology
    www.theperipheralvision.com
  • Yes, this worked, adding global.php to the themes/YourTheme/lang/eng folder.

    Topiatic

    Theme specific language defines should go into themes/YourTheme/lang/eng (assuming you're using english as default language). But I think you may have to rename the file to global.php, I think this may be the case for config/languages/eng as well.

    mesteele101

    Why is the folder labled modules when you can throw files from the system folder in there, confusing?


    Not really when you consider that /system/ simply holds the system modules.


    Thanks...
  • mattlt

    The team will have to correct me, but language defines in this location are for theme localization and translations. They do not override any system or module language defines.

    There's no way to override system or module lang-defines...

    mattlt

    As far as I know, the only way you can override any language defines is to put your install into development mode using the config.php file and by placing your changes in "config/languages/lang/". There is no real override system for the language defines and this only exists to make it easier for people to develop language packs.

    You're right, and it's not recommended to use development mode to achieve this; this feature is only for language packs developers as you said.

    About gettext, Bernd Plagge can tell us if there's any way to support this...
    by now, i override the original templates from the theme, and if i need more defines, i add some lang-defines to the theme's global.php ...

    --
    - Mateo T. -
    Mis principios... son mis fines
  • nestormateo


    There's no way to override system or module lang-defines...



    There's not? Ouch...

    What I would like to see is that the MODULE and SYSTEM folders become HANDS OFF. All custom template, custom language defines, and module generated content should reside OUTSIDE of these folders. The module and system folders are just that...folders for the modules and systesm.


    NCM
    UHEweb / SwitchBit




    edited by: uheweb, Jul 15, 2008 - 02:17 PM
  • nestormateo


    There's no way to override system or module lang-defines...


    uheweb


    There's not? Ouch...


    There actually is a way hidden in the post above?

    mesteele101


    Yes, this worked, adding global.php to the themes/YourTheme/lang/eng folder.


    I just tried this and was able to override defines in both the system and modules folder. Not sure about the performance implications either if this file collects a large number of defines. It also probably won't be much fun trying to keep organized but for an override here and there for certain modules this should work great.

    Input from the team on the implications of the above is greatly appreciated.

    Thanks,

    matt


    --
    The Peripheral Vision
    Creative Culture : Business : Technology
    www.theperipheralvision.com
  • That's nice to know. I'll have to test this. Would be nice to have a global override in config, though, rather than rely on theme folders - especially if offering theme switching to users.

    If you're referring to the "hidden" method of setting development = 1,I'd rather avoid that icon_smile It exposes more of your system when a user hits an error.



    edited by: uheweb, Jul 15, 2008 - 08:41 PM
  • To update this thread, I have found that I can override lang files of modules (including system modules) by putting the appropriate files in the config directory, e.g.:

    Code

    config/languages/eng/Users/userapi.php

    Despite the above, I still haven't found a way to override the language file found at language/eng/core.php. Any ideas?

This list is based on users active over the last 60 minutes.