xoops forums

poehoes

Friend of XOOPS
Posted on: 2011/9/12 14:16
poehoes
poehoes (Show more)
Friend of XOOPS
Posts: 29
Since: 2003/3/27
#1

templates manager

I really love the new Xoops version! Especially the new admin-interface give Xoops the professional look of a serious cms.

I'm trying to use the Templates manager in xoops 2.5.1a (with PHP 5.2.17) to make custom templates for another theme i created. But i can't generate the templates for this theme. It seems it has to do with permissions on the filesystem or so.

What i found out so far:
- all files/directories are owned by me
- if i choose my theme / forced file generation - yes / all modules (only system and fmcontent) i get the message 'no files generated'
-> this is good because file permissions are not set to allow this.

adjustment 1:
- i chmod the directory /themes/mytheme/modules to 757 (apache should be able to write here now)
- if i choose mytheme / forced file generation - yes / Select modules (only fmcontent), i select all shown files, the template-files for fmcontent are generated (owned by apache)
- the templatesmanager shows these files and the subdirectory blocks but inside blocks no files are generated.

adjustment 2:
- i chown the directory /themes/mytheme/modules/fmcontent/blocks to myself and set permission on this directory to 757 again
- after choosing mytheme / forced file generation - yes / Select modules (only fmcontent), i select all shown files, all block-files for fmcontent are generated (owned by apache)
- the templatesmanager shows these files now.

* Is this normal for the Xoops Templatesmanager?
* How should i apply permissions to the files? The template files are now world-writeable, but if i chown them to myself i can't edit the files!

Any comments?

ForMusS

Core Developer
Posted on: 2011/9/12 22:33
ForMusS
ForMusS (Show more)
Core Developer
Posts: 146
Since: 2007/10/19
#2

Re: templates manager

I check your problem for the next release.
Thanks

mboyden

Moderator
Posted on: 2011/9/12 23:19
mboyden
mboyden (Show more)
Moderator
Posts: 484
Since: 2005/3/9 1
#3

Re: templates manager

An easy way to manage templates specific to themes is to put them in the themes themselves (instead of managing through the template manager):

/themes/themeName/modules/modName/modName_template_name.html

After making a template change, you need to clear your cache.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

sabahan

Quite a regular
Posted on: 2011/9/13 1:18
sabahan
sabahan (Show more)
Quite a regular
Posts: 317
Since: 2006/3/4 5
#4

Re: templates manager

more info here about template overriding..implement since xoops 2.014


https://xoops.org/modules/news/article.php?storyid=3367

poehoes

Friend of XOOPS
Posted on: 2011/9/14 14:18
poehoes
poehoes (Show more)
Friend of XOOPS
Posts: 29
Since: 2003/3/27
#5

Re: templates manager

@mboyden: you can see in the listed paths in my previous message that i'm already using those paths.

@sabahan: i'm aware of theme overriding. That is the same thing the templates manager is for. The templates manager generates specific templates (you choose in the templatesmanager) and generates the files you need in the selected theme. After generation you can edit the template online (which is a great enhancement of Xoops2.5, I think).

But what permissions does the webserver need to generate, well actually save, those files on the server. Because if that is 777 than anyone can save new templates including possible some mailicous injections in those template-files.

PS @ForMusS: Thanx, if you want more info, i'm still testing