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...
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Editing files in "system\Users\pntemplates"
-
- Rank: Helper
- Registered: Sep 19, 2003
- Last visit: May 25, 2010
- Posts: 612
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
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 -
- Rank: Helper
- Registered: Sep 19, 2003
- Last visit: May 25, 2010
- Posts: 612
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 -
- Rank: Registered User
- Registered: Jun 13, 2004
- Last visit: Feb 27, 2010
- Posts: 45
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 -
- Rank: Helper
- Registered: Sep 19, 2003
- Last visit: May 25, 2010
- Posts: 612
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... -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
-
- Rank: Helper
- Registered: Sep 19, 2003
- Last visit: May 25, 2010
- Posts: 612
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 -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
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! -
- Rank: Registered User
- Registered: Jun 13, 2004
- Last visit: Feb 27, 2010
- Posts: 45
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 -
- Rank: Helper
- Registered: Sep 19, 2003
- Last visit: May 25, 2010
- Posts: 612
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... -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
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 -
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
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 -
- Rank: Registered User
- Registered: Jun 13, 2004
- Last visit: Feb 27, 2010
- Posts: 45
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 -
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
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
It exposes more of your system when a user hits an error.
edited by: uheweb, Jul 15, 2008 - 08:41 PM -
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Apr 02, 2010
- Posts: 1208
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?
- Moderated by:
- Support
