Theme from tutorial doesn't show up

Theme from tutorial doesn't show up

by Ilya Shaisultanov -
Number of replies: 6

A sample theme from here, which I followed to the letter, doesn't show up in the selector.

I searched this forum and found some common problems and solutions, which, unfortunately, don't seem to apply in my case.

My Moodle 2.0.1 installation is running on a server that I have root access to. It's Ubuntu 10.10 server with PHP 5.3 and MySQL. Theme directory is set to 0755 and is used, because I dropped some other themes there and those do work.

I enabled Designer mode and Debugging messages, purge all caches regularly, checked theme's php files syntax etc.

I don't know where else to look for mistakes, really.

Can someone help me out here, please?

Average of ratings: -
In reply to Ilya Shaisultanov

Re: Theme from tutorial doesn't show up

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi llya,

The only thing I can think of which may be stopping this theme from showing up is the fact you might not have the lang/en/theme_yourthemname.php where all the info about your new theme will be stored.

It is not mentioned in the tutorial...but it is in another but it not named correctly.

Can you post the exact list of files and folders you are using in this theme? Then we can look at each one in turn. OK? Perhaps this way we can find out what the problem is.

HTH

Mary

In reply to Mary Evans

Re: Theme from tutorial doesn't show up

by Ilya Shaisultanov -

Folder "themename" contains:

config.php
langlang/enlang/en/theme_themename.php
layout
layout/standard.php
pix
pix/favicon.ico
pix/screenshot.png
style
style/themename.css

theme_themename.php contains this:

$string['pluginname'] = 'themename';
In reply to Ilya Shaisultanov

Re: Theme from tutorial doesn't show up

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I am assuming that this line was missing the link breaks?

langlang/enlang/en/theme_themename.php

it should be this...

lang/en/theme_themename.php

Ok...as long as everywhere you see themename you
have added your theme's real name in lowercase letters
and NO starting numbers?


This leaves the config.php

This has to contain your theme name and the layout of all you
pages as seen in base theme's config.php

If you have done all this, then without seeing your theme,
I am at a loss as to what may be the cause of it not showing up in the theme selector.
Unless you have copied Base config.php and left this line...

$THEME->hidefromselector = true;

Then this line can be deleted.


Mary

In reply to Mary Evans

Re: Theme from tutorial doesn't show up

by Ilya Shaisultanov -

Yes, I missed the line break there, the structure is correct. All lowercase and no numbers.

config.php contains only one line of code, with the name. That's it. Again, I followed the tutorial and didn't copy base theme.

Here's the theme - http://dl.dropbox.com/u/19215639/tutorial.zip. Maybe someone can spot what's wrong with it.

In reply to Ilya Shaisultanov

Re: Theme from tutorial doesn't show up

by John St -

In config.php:

$THEME->parent = array('base');

needs to be:

$THEME->parents = array('base');

What do I win? smile

 

 

In reply to John St

Re: Theme from tutorial doesn't show up

by Ilya Shaisultanov -

That was it!

You win my enormous gratitude smile I would never spot that, amazing!

Thank you!