1
Vargr
How to modify templates in 2.5.4
  • 2012/3/31 10:54

  • Vargr

  • Not too shy to talk

  • Posts: 130

  • Since: 2003/6/19


I have a number of XOOPS sites and they have been running fine for years.

Now a few of them are running old and I am forced to upgrade them and thus I am getting back into the workings of XOOPS.

Presently I am running version 2.5.4 and trying to migrate a few things from an older site that somehow along the way got pretty messed up. Soo it is really a salvage operation.

Right now I am trying to get the old templates for newbb installed in 2.5.4. But I can not figure out how to work with templates in 2.5.4 and I can not find any documentation (I am probably looking all the wrong places but the XOOPS site seems difficult to navigate these days).

In my old XOOPS installation I had a page with all templates, I could pick one, modify it in XOOPS and save it.

Can I do the same in 2.5.4? And how?

Thank you in advance.
Vargr
- 狼 -

2
Mamba
Re: How to modify templates in 2.5.4
  • 2012/3/31 13:10

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Check out the Operations Guide on page 67.

Hopefully this will help you...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
Vargr
Re: How to modify templates in 2.5.4
  • 2012/3/31 14:21

  • Vargr

  • Not too shy to talk

  • Posts: 130

  • Since: 2003/6/19


Thank you for a quick reply.

I will read it and if I am too dense to comprehend it I will be back.
Vargr
- 狼 -

4
Vargr
Re: How to modify templates in 2.5.4
  • 2012/3/31 14:46

  • Vargr

  • Not too shy to talk

  • Posts: 130

  • Since: 2003/6/19


OK - seems I am too dense...

I want to clone the default templates so I can change the new set to my likings (copy my old files into the new templates).

The instructions say:

Cloning and downloading template sets

If you would like to create a custom template set you can make a copy of the default set (or any other) by selecting the ‘clone’ link (you will be prompted to give the new set a name). Unlike the default, other template sets can be freely edited. You can also save a copy of a template set to disk by selecting the ‘download’ link, or remove it with the ‘delete’ link. You may also sometimes see an additional ‘Generate’ link next to new modules for which templates have not yet been created.

Now, on //...site.../modules/system/admin.php?fct=tplsets (Templates Manager) I don't see any clone button. In fact my site doesn't even look identical to the screen dump on page 67 - I have a "Choose Template" before "Select theme".

Something weird with my installation or did I forget to do something?


Vargr
- 狼 -

5
redheadedrod
Re: How to modify templates in 2.5.4

Without looking at the guide I will mention that the 2.5 series no longer supports database stored templates and last I heard I was under the impression that these customized templates were being phased out altogether.

Personally I always just modify the templates directly and have never used the custom templates. Only issue is that you want to make sure you back them up somewhere in case you upgrade that module and forget you have custom templates.

I don't believe the current versions of Xoops have support for the templates like the older versions do so the operations guide is likely out of date.

I do believe however that 2.5 supports overloading the templates which is done by placing templates in your theme folder. I am unsure of how this is done since I have only seen mention of other people doing this but if you upgrade from an older version to the current versions you will have the templates in your default theme folder. I believe you will find them in a folder called modules with the module they are from having a folder inside that.

The system will then use the templates inside that theme folder if there is one there. This works great if you have one theme but if you have more than one theme it could get interesting. If you don't have the templates in a theme folder then it would default back to the normal module ones.

Hope that helps and at least points you into the right direction.
Attending College working towards Bachelors in Software Engineering and Network Security.

6
Vargr
Re: How to modify templates in 2.5.4
  • 2012/3/31 18:26

  • Vargr

  • Not too shy to talk

  • Posts: 130

  • Since: 2003/6/19


Thank you for helping me to understand it a little better.

Alas, I still don't understand it well enough, for now I succeeded in making XOOPS believe there are no themes at all (and thus nothing is displayed).

It really is too long wince I last dabbled in XOOPS' inner workings...

I will see if I can get the themes back - and hopefully an updated manual will appear in the meantime.
Vargr
- 狼 -

7
redheadedrod
Re: How to modify templates in 2.5.4

Just make sure you back up everything before you start and you can always start over until you get it right.

Just make sure you disable your modules before you upgrade your xoops in case you have problems.

Attending College working towards Bachelors in Software Engineering and Network Security.

8
Vargr
Re: How to modify templates in 2.5.4
  • 2012/3/31 18:53

  • Vargr

  • Not too shy to talk

  • Posts: 130

  • Since: 2003/6/19


Good advice - I didn't know that I could prevent modules from getting updated by disabling them.

Anyway - I am re-installing from scratch now - I am afraid I have tinkered with too much now.

As always, I am pleased that I never feel all alone when I have a problem with XOOPS.
Vargr
- 狼 -

9
Vargr
Re: How to modify templates in 2.5.4
  • 2012/4/14 8:26

  • Vargr

  • Not too shy to talk

  • Posts: 130

  • Since: 2003/6/19


This is just an update in case people come here looking for a solution to the same question.

First thank you to those that answered my call for help and gave me important pointers.

In XOOPS 2.5.4 templates seems (I write "seems" because I don't know if I have understood it 100% correctly) to be located as files in a folder and not in the database as was the method used earlier.

If you want to have your own theme and your own templates this is how it (seemingly ) works (it works at my end anyway):

This is based on a vanilla installation.

At the location my_site/themes you should find the following folders default, suico and zetagenesis

Add a folder for your own theme:

my_site/themes/my_theme


Place your files for your theme here, such as style.css, theme_blockcenter_c.html etc.

Then add a folder called modules:

my_site/themes/my_theme/modules


and add a folder for each module you want a template for (in this case the module newbb):

my_site/themes/my_theme/modules/newbb


Here you place your template files such as newbb_index.html, newbb_thread.html etc. You also make a folder called blocks

my_site/themes/my_theme/modules/newbb/blocks


where the block-templates go (newbb_block.html, newbb_block_author.html etc.).

When your folders are in place you can - if you wish - copy old template files into the new directory structure and they should work - as long as the version of the templates is the same as the version of the module you have installed.

Now, when I go to administration, templates and in the directory listing to the left clicks on my_theme, on modules and then on newbb I will see all the templates for that theme and for that module.

Clicking one of the template files it pops up in the editor window on the right and you can modify as you see fit and the changes carry through.

I assume that XOOPS will default to the templates in the default theme if it can not find the module in your custom theme - it seems to do so here. This means that you only need the templates for the moule(s) you want to modify.

And therefor I suggest you keep the default theme at all times, so XOOPS have something to fall back to.



Now, I still have no clue as to what "Choose template" and "Forced file generation" etc does. Doesn't seem to do anything at all here.


I hope this will be of some help to someone.

Vargr
- 狼 -

10
redheadedrod
Re: How to modify templates in 2.5.4

You are mostly right.

My understanding is that the system will use the templates that are with the module as a fall back. The templates that are included with the themes will be used instead of the module templates if they exist. So if you modify templates and want to use them in more than one theme you have to copy them to every theme.

I have not tried this but you should be able to only install the templates you need to change. You do not need to include ALL of the templates.

As to the disabling modules... This prevents them from being used by the system to make pages. Thus you know if you get a white screen and you have no modules enabled then it HAS to be something with the installation or the Theme that is screwing you up. Once you have verified your system works without the interference of the modules you can enable them one by one and make sure they don't crash the system. If the version you are changing from is close to the one you are changing to then it is not a big deal. But if you are changing branches (Aka 2.4 to 2.5 etc) Then you want to make sure you disable the modules before updating to ensure you don't have compatibilities issues between the core and the modules.
Attending College working towards Bachelors in Software Engineering and Network Security.

Login

Who's Online

239 user(s) are online (154 user(s) are browsing Support Forums)


Members: 0


Guests: 239


more...

Donat-O-Meter

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

Latest GitHub Commits