1
koralex90
How to edit templates??
  • 2006/11/12 11:51

  • koralex90

  • Just popping in

  • Posts: 97

  • Since: 2005/3/15


Hi. I am trying to edit my template to delete the subcategories of my "myalbum-p" module as stated here , but I am VERY confused on how to edit the templates. GIJOE's explanation doesnt seem that clear, and I searched XOOPS on ho w to edit templates but there was no "clear" step by step explanation. In one topic, someone just said duplicate it, and the next person says yay it worked...

I tried cloning my templates and editing the cloned templates but there was no change, the change GIJOE said would happen if i erased the specified portion of the categories template of the myalbum-p module. I would greatly appreciate it if someone could explain the template editing process (general) for me in a step by step, specific fashion.

Thank you!!

2
Quest
Re: How to edit templates??
  • 2006/11/12 15:57

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


You can read more on Themes and Templates in the FAQ. In short you need to go to:
-xoops administration/system/templates
-clone your default template set and give it a new name
-next go to XOOPS administration/system/preferences/generalsettings and set the newly named/cloned template set as your default template set also set the Check for Changes to Templates to "YES" and scroll to the bottom then click GO.
-now go back to XOOPS administration/system/templates and go into your newly named cloned template set where you want to edit a file for a particular module.
- make your changes
- submit

Go see if your changes took affect.

If your site is open to public then you should go back in to your XOOPS administration/system/preferences/general settings and reset the Check for changes to Templates back to "NO" then scroll to bottom and click GO.

HTHs
Quest

3
snow77
Re: How to edit templates??
  • 2006/11/13 6:13

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


This tutorial can be usefull:
Templates overriding : a small Tutorial


And reading XOOPS V2.0.14 release notes:

Quote:

Templates overriding

Designers can add custom templates to their themes, and those will be used instead of the default ones. To exploit this feature, templates 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 /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 /modules/system/blocks/system_block_login.html

Output resources overriding for developers

To allow theme designers to customize images or stylesheets, you 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 methods. The 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:
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.css, create your customized file in /modules/newbb/style.css
* To create a custom image that will replace modules/newbb/images/reply.png, create your customized file in /modules/newbb/images/reply.png


4
koralex90
Re: How to edit templates??
  • 2006/11/13 9:41

  • koralex90

  • Just popping in

  • Posts: 97

  • Since: 2005/3/15


Thank you so much! You are a lifesaver!! =) hope this clears up how to edit templates for other people too! Thanks again!

5
jeffgr
Re: How to edit templates??
  • 2006/11/13 13:39

  • jeffgr

  • Quite a regular

  • Posts: 263

  • Since: 2004/2/22


Here's a template-editing tip for you...

...when I am editing my templates, I select the template code that I want to edit, and then cut and paste this code into Dreamweaver, where I have created a new, empty html page (make sure you go into "code view" in Dreamweaver, and delete all the default html code that appears when you create a new page, so that you are not going to add in extra code to the template code when you paste it in).

Because Dreamweaver has both a "code view" and a "design view", pasting in the template code like this allows me to get a better idea of what the template looks like visually...so if I want to insert a table in the middle of the template page for example, I can see where to do so much more easily then if I was just editing the template code by hand in the XOOPS administration window.

Once I have made the changes to the template that I want to make in Dreamweaver, and change the Dreamweaver view to "code view", so that I am looking at the template code again, hit "select all", and then "copy". I then head back over to the correct template page, cut/delete out the old template code from the window, and paste in my new, modified template code, and hit save.


Make sure when you hit save that the message says "database updated"...sometimes, if you take too long to make the changes, it will say "taking you back to where you were..."...this means that the new code you just pasted in the box did not save, so you have to open up the template file again, paste the new code, and hit save again.

Here's another hint as well. Once I have set up my initial XOOPS site, I make sure all the modules I have installed have generated templates, then I clone this template set and set it as default in the general preferences. I make a new template set clone, and set it as the default every week or so, or when ever I have done alot of template editing. I always keep the previous version of the template set as a backup, and then delete everything else...so at anytime, I have the default template set (which you cannot delete?), the latest cloned version that I am using at the moment, and then the previous cloned version, which I keep as a back up. Hope that makes sense!

http://www.myottawa.ca

Login

Who's Online

262 user(s) are online (181 user(s) are browsing Support Forums)


Members: 0


Guests: 262


more...

Donat-O-Meter

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

Latest GitHub Commits