1
Kerzon
Problems with templates_c
  • 2006/12/9 3:57

  • Kerzon

  • Just popping in

  • Posts: 30

  • Since: 2003/6/4 1


I've recently installed version 2.0.15 of XOOPS and all went well. I'm trying to modify the files in templates_c for the following modules:

Forum
Liaise
Tiny Content

In Forum I'm just trying to insert an image for the title and get rid of a couple of display items like the time and date, in Liaise I'm also trying to insert an image and in Tiny Content I'm trying to get rid of the email and print icons. Up until now I've been able to do this successfully with every version of XOOPS I've tried but no matter what I do, my modifications do not show up. I'm emptied my browser cache, deleted and overwritten the files I am modifying in templates_c, and my folder permissions are set to 777. What is going on? Any idea?

Thanks.
Kerzon

Mobius Donut
Rock-Oriented Rock

2
snow77
Re: Problems with templates_c
  • 2006/12/9 4:11

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


well, as a suggestion it would be good to keep your site updated with XOOPS version 2.0.16

about the problems you are having with templates, it seems you are changing the file in the wrong place.

- first you have to open the template you want to change from the module of your choice from the templates folder of the module

- you make changes to it

- then you save the file like this:

themes/MY_THEME/modules/MY_MODULE_NAME/MY_CUSTOM_TEMPLATE.html

so if it were the news_item.html template it would be like this:

themes/MY_THEME/modules/news/news_item.html

This is the template overriding feauture that began with XOOPS V2.0.14 and you can read about it in the release notes:

Release Notes of XOOPS 2.0.14:

Templates overriding

Designers can add custom templates to their themes
, and those will be used instead of the default onesTo exploit this featuretemplates have to be created in subfolders of the themes duplicating the default folders structure and removing the "templates" part:

    * 
To overload system_userinfo.html template located in modules/system/templates/system_userinfo.html you have to create your custom version in <yourthemefolder>/modules/system/system_userinfo.html
    
To overload system_block_login.html template located in modules/system/templates/blocks/system_block_login.html you have to create your custom version in <yourthemefolder>/modules/system/blocks/system_block_login.html

Output resources overriding 
for developers

To allow theme designers to customize images 
or stylesheetsyou have to use the new theme class and xoImgUrl templates plug-in.

    * 
Scripts and stylesheets can be declared to XOOPS using the theme class addScript and addStylesheet methodsThe theme instance is available after the inclusion of header.php by using the $xoTheme global variable, and in a template variable of the same name:
      <{
$xoTheme->addStylesheet('modules/newbb/style.css')}>
    * 
Images and medias URLs have to be generated by using the xoImgUrl plug-in in your templates:
      <
img src="<{xoImgUrl modules/newbb/images/reply.png}>" alt="reply" />

Output resources overriding for designers

Designers can also provide custom versions of most output
-related resources using a mechanism similar to the one available to templates, for modules that support this.

    * 
To create a custom stylesheet that will replace modules/newbb/style.csscreate your customized file in <yourthemefolder>/modules/newbb/style.css
    
To create a custom image that will replace modules/newbb/images/reply.pngcreate your customized file in <yourthemefolder>/modules/newbb/images/reply.png


and the tutorial Alain01 made can guide you to do what you need:
Templates overriding : a small Tutorial
www.polymorphee.com
www.xoopsdesign.com

3
Kerzon
Re: Problems with templates_c
  • 2006/12/10 0:38

  • Kerzon

  • Just popping in

  • Posts: 30

  • Since: 2003/6/4 1


Thanks, I wasn't aware of the template overwriting feature, just been using older versions of XOOPs for a while and was so used to just modifying files in templates_c.

Cheers,
Kerzon

Mobius Donut
Rock-Oriented Rock

Login

Who's Online

158 user(s) are online (53 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits