New Flexi version 2 theme added

New Flexi version 2 theme added

by Richard Oelmann -
Number of replies: 84
Picture of Core developers Picture of Plugin developers Picture of Testers

I have just added flexi version 2 (flexi_ii) to the themes database.

This theme follows on from the work done on the original flexi theme and is intended to allow moodle admins who have restricted access to the server files (and therefore the theme files) to have some control over the look of their site from within the site admin pages.

Theme database entry HERE

Download HERE

Richard

Average of ratings: -
In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Liz Renshaw -

This theme is brilliant. Thanks for sharing it and right at the right moment!

I'm one of those administrators needing the flexibility you describe. Cant wait to get it downloaded and to experiment. You have made my day smile

 

 

In reply to Liz Renshaw

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Glad you like it and that it's helpful for you Liz. Hope it will be for many others too.

Let me know how you get on with it - all feedback welcome for further development smile

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by William Ratto -

Hi Rich,

Just wanted you to know that I love te theme.

William

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Nagi Saeed -

Hi Richard,

Thank ou very much for posting it. Big fan of Flexi i too smile

I had a challenge with Flex ii though. It works fine when I have the designer mode on,  but as soon as I turn the designer mode off the moodle site loses the side block bars and stacks everything on one long page and it also loses the bg images and colours.

I wonder is that happened to any one. I'm running version 2.0.2.

Any help would be much appreciated.

Thanks,
Nagi

In reply to Nagi Saeed

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Nagi,

Thank you for pointing this out. When I tried it, this also happens in 2.0.3, although I'm sure I tested without the designer mode on when I created the theme in an earlier version of Moodle2.

Temporary fix, leave designer mode turned on.

Long term fix - I'm investigating to try to find out what the real problem is! smile

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Nagi Saeed -

Hi Richard,

Thanks for the prompt reply. Please let me know if you need a tester, would be glad to help smile

Nagi

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Help from any other theme designer/developer smile

Where have I gone wrong?

As Nagi has reported Flexi_ii appears to be losing all css from the theme itself when theme designer mode is turned off.

I have purged all caches, enabled developer mode error reporting (no errors are reported) and tried using firebug - but the only thing that tells me is that the theme css files are not being picked up correctly, as already shown by the fact that none of it is being displayed sad

I've tested this on FF4 and on Chrome with the same effect.

Any help or pointers would be greatly appreciated as the temporary solution of leaving theme designer enabled is obviously not suitable for a production environment

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by John St -

I'm getting a fatal PHP error message (related to memory exhaustion) from this line:

echo $topsettings->navigation_tree($this->page->navigation);

This occurs for me regardless of whether theme designer mode is turned on or off.  If I comment out the navigation, all seems to work okay...

In reply to John St

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi John,

Thanks very much for the quick response.

I'm not getting that message on my sytem, either my local host or my web page, but even if I comment out that line in the navigation in Flexi_ii I still have the issue that with theme designer mode off, the css is not being picked up thoughtful

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by John St -

Hmm, I get the same error with Decaf, so maybe it is my hosting's PHP settings. If I have time tonight I'll try it out some more and see what I can find.

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by John St -

I think I found the problems. In core.css:

.header {background-image:url(setting:secheadbgimage);background-repeat: repeat-x;background-color:setting:secheadbgcolour;}

You were missing the extra }

In flexi_ii.css:

.navbar {height:25px;         background-image:url(setting:breadcrumbimage);background-repeat: repeat-x;background-color:setting:breadcrumb;         color: setting:navbartext !important;         font-size: setting:navbartxtsize;         font-weight: setting:navbartxtweight;         font-style: setting:navbartxtstyle;}

You were missing the extra }

Fixing those two css sheets fixed things...

Average of ratings: Useful (1)
In reply to John St

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Many thanks for your help John. Couldn't see the wood for the trees or is that the {} for the [ ]and () big grin

Strange how theme designer mode hid these 2 issues and allowed the theme to work as expected, but then collapsing it when disabled.

Rich

PS to anyone looking for this fix - don't just copy John's lines, the forum has cut the brackets out, just add the } at the end of the lines John has identified - I will post the corrected version of the theme asap.

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

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

Does this mean there are some css parse errors in Decaf too?

This is very interesting if you think about it...how css can screw up Moodle LOL

Can't beat the old Validator...

http://jigsaw.w3.org/css-validator/#validate_by_upload

Glad this has come to light as it's a warning for us all to get thing right!

Cheers

Mary

In reply to Mary Evans

Re: New Flexi version 2 theme added

by John St -
The issue I had with decaf is unrelated (I think). It was the custom settings in combination with the missing bracket that amplified the issue. Without the setting, the missing bracket would not do that, I think.
In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Peter Birdsall -

After installing Lexi version 2 the following error is given:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3145728 bytes) in /var/www/html/lib/navigationlib.php on line 154154

In reply to Peter Birdsall

Re: New Flexi version 2 theme added

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

I get that often no matter which theme! I think it is a Moodle thing.

Mary

In reply to Peter Birdsall

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Peter,

John St recently reported this as well, but suggested it may be due to the setup of the server as I (and other users) have set up flexi_ii with no problems at all, and as Mary has said, some users have had the same problem with other themes.

I have tried to replicate the error in order to investigate it, but have never come across it myself so unfortunately have not able to help anyone solve this issue or identify the actual source of it

I will continue to look and if I come up with a solution I will post it here for everyone.

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Χρήστος Τζέτζιας -

Hi, I'm new with Moodle and trying to make my site. I find Flexi_ii very useful, but when i use it i cannot neither see the AwesomeBar nor the CustomMenu. Should i do something?

In addition when do you plan to release the customisable side menu version?

Thank you for the good job,

Christos

In reply to Χρήστος Τζέτζιας

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Christos,

Have you selected the menu options on the settings page?

flexi_ii menus

This image shows menus added in all three option places - combined menu at the page top, awesomebar at the top of the header and custom menu at the bottom of the header. Oh and the custom menu will only show if you have put something in it on the Theme Settings page - that's the main theme settings page not the flexi_ii settings. There is an example menu there that can be copied into the box to check things are working.

The settings for column widths are on the back-burner at the moment as I had a few issues with the pagelayout working as I expected it to - and life tends to get in the way wink, but I'll take another look at it later this week for you if I get chance.

 

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Χρήστος Τζέτζιας -

Thank you Richard! Yes, i have selected the menu options (I'm not that new smile). Probably it's that i haven't put enything in it. I'll try it later tonight and see...

In reply to Χρήστος Τζέτζιας

Re: New Flexi version 2 theme added

by Χρήστος Τζέτζιας -

... and here I am again, just to confirm that you were right. I had to add some menu items at the bottom of the Themes settings page.

Thanks again and hope that you will find some time! Being able to customise side menus will be great!

 

Christos

In reply to Χρήστος Τζέτζιας

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Christos,

Glad you got it sorted :D

Now I've got the krystle2 theme done, I'll do my best to make the side block widths part of flexi_ii my next task - in between everything else lol!

Richard

In reply to Richard Oelmann

Cant Download Flexi 2

by allan hardy -

Follow the links ot the Edit Consultants page and download gets error:

Invalid course module ID

In reply to allan hardy

Re: Cant Download Flexi 2

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Allan,

The zip file itself was available under the text on the page, but I have now corrected the links in the text on my page and it should be working correctly

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Nigel Metcalfe -

Hi Richard, 

Great theme. I had just started cloning another theme so that I could modify it and then I happened across Flexi 2 which does most of what i wanted. A great time saver!

One thing I would like to include is the complete course name in the header. Is this possible? It used to be possible in the standard_white theme in 1.9, but I am not certain how to achieve this in Flexi 2 in Moodle 2.

Nigel 

In reply to Nigel Metcalfe

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

The Course Name is set to appear in the header already Nigel. the colour, size, position etc. can then be set in the settings page. On non-course pages, the $PAGE->heading code will pick up the site name or whatever else is set as the heading for that page, but on course pages, it should display the Course name.

screenshot

 

I'm glad you are finding flexi_ii useful Nigel, but one comment for the next few days - Moodle2.1 broke Lei's awesombar code. That has been fixed in Lei's decaf theme, but I will be doing it in Flexi_ii and Krystle2 where i used Lei's great code in the next few days (I hope). In the meantime, with the menu options available in the settings page, please don't select any of the options which include the awesomebar (custom menu only and custom menu with home links etc. I think are fine and not affected) and I will post on this forum when I have updated the theme with the ammendments for Moodle2.1

 

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

As I am still having problems with the moodle2.1 upgrade breaking the awesomebar code used as an option in flexi_ii, the download now removes that as an option from the settings page.

While I really like awesomebar, the aim of this theme was to provide an interface for admins who are not technical and frequently do not have access to servers and do not want to play around with the code itself. It then seemed sensible for the moment to take out options which could discourage those users by potentially presenting them with error messages following upgrades to moodle2.1

I realise a lot of hard work has been done on making awesomebar compatible with 2.1 (as well as backwards compatible with 2.0.x), but I am still experiencing difficulties with it and while I am happy to keep working (as and when other commitments allow) to resolve those issues, I prefer to temporarily remove the awesomebar options for now to ensure a stable theme across all 2.X versions for those admins this theme is primarily aimed at.

Please note: this is not intended as a detrimental comment to awesomebar and its code, which i love, and which has been worked on to get it working following the upgrade breaking it initially - it is a comment on the time commitment I would be able to put in at the minute having already tried to implement the fixes put in place and still seeing error messages on my system and the benefits of that time against the main purpose of the theme.

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by gohhong gohhong -

Hi, i have used Flexi v2 and it is great!. However i notice that there is a difference in height between the center region and the blocks on left and right. How can I synchronise the heights of both (center vs left-right block) easily? Should I shift the blocks or the center? Which css file should I make changes to? Have tried the "region-center" css configuration but dont seems to work.

 

Thanks!

In reply to gohhong gohhong

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi,

I've just tried a fresh download of flexi_ii on Moodle2.1 (Firefox5/Ubuntu) and the columns seem fine (see screenshot). Can you let me kknow what changes you have made and what browser/platform you are using?

There should be no need to make any changes to the css itself as the premise for the theme is that everything can be done through the settings page. All I did for the screenshot below was to set each of the pre-, post-, center, heading and footer areas to a different bright colour on the settings page.

I have also tested with the side columns longer than the center and that also works fine.

screenshot

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Reinhard Kolowrat -

Hi Richard,

thanks for your flexi_ii-theme. It works fine with my Moodle 2.1 and has made customization really easy for a newbie like me.

There's just one thing I would like to ask: On the login screen the greeting "Welcome, Login here!" is in English, but I would like address users in German here as this is the default language for my moodle site.
In "theme_flexi_ii.php" I've already changed the "$string['welcome'] = 'Welcome, {$a}';" but that doesn't seem to work.

Any hints are highly appreciated! smile

Reinhard



In reply to Reinhard Kolowrat

Re: New Flexi version 2 theme added

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

Hi Reinhard,

At the moment there will be only one language folder in the lang directory and this is en (english). So the theme_flexi_ii.php you changed was in...

lang/en/theme_flexi_ii.php

What you need to do is add another language folder  'de' (German) into the lang directory and paste a copy of theme_flexi_ii.php in it like so...

lang/de/theme_flexi_ii.php

So in the lang directory you would have...

lang/

en/theme_flexi_ii.php
de/theme_flexi_ii.php

Now you can change the $strings in lang/de/theme_flexi_ii.php to the German equivalent for each string...

Example:

$string['welcome'] = 'Willkommen, {$a}';

and leave the lang/en/theme_flexi_ii.php as it was...

$string['welcome'] = 'Welcome, {$a}'

When you have changed all the string names in lang/de/theme_flexi_ii.php

You need to load the language pack for German (de) if it is not already loaded. Then you need to 'update' the files, this will add to the language files what you have just added, so that the strings get picked for the German language.

You also need to enable the Language filter in Site Administration > Plugins > Manager Filters

Also if you make any changes to your theme  files you need to Purge cache...

Site Administration > Developement > Purge all caches

HTH

Mary

In reply to Mary Evans

Re: New Flexi version 2 theme added

by Reinhard Kolowrat -

Hi Mary,

thanks for your help. My Moodle speaks German now right from the start smile

Reinhard

In reply to Reinhard Kolowrat

Re: New Flexi version 2 theme added

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

Hi Reinhard,

das ist, was ich hier wie ... Erfolgsgeschichten!

glücklich Moodling!!!

Mary

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Flexi_ii now added to the new plugins database here

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Francis Feytout -

Hi,

Can you help me with a some css points in flexi_ii ?

- First, I wish to add a custom rule for .coursebox but the custom css field is overridden by the default rule. Is it a bug as we cannot set it anywhere else ? 

- Second, the header div of a block is larger than the block itself, resulting in alignment problems (cf. the attached picture) with the block border (top, left and right) and the round corner. In the exemple the bloc is 195.8 px wide without the border while the header is 199.7

- Third, where can i set the no-repeat rule for the page wrapper backgound ?

Thanks smile

Attachment css horror.jpg
In reply to Francis Feytout

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Francis,

1. The actual css for .coursebox is set in the courses.css file in flexi_ii/styles. This should be overwitten by anything set in in the custom css setting as this comes at the bottom of the flexi_ii.css file which is called after the courses.css. You could try adding !important to your rule to try to force it.
Can you tell me where .coursebox is actually used on the site, as having written this theme some time ago, with the basic css based on standard theme, I can't actually find the class .coursebox in use on my localhost pages (admittedly only a small installation and not covering all areas!) so I'm probably not looking in the right places to actually see the effects and then I can look at this more closely.

2. As I recall, the issue here was that, because of the border width, the heading for the block is actually smaller than the block itself, so that when rounded corners are added the radius for the corners has a slightly different effect on the main block box as the header. At the time, I tried to counter this as best I could without adding separate corner settings for the header (or any more settings anywhere, in fact I was trying to reduce them from the enormous settings page that there still is!! :D)
Try adding the following to the custom css setting - you may need to adjust the corner radius depending on what you have set for the main block, this was for a 10px radius on the block itself, set on the settings page of flexi_ii
.block .header {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-left: 0;
    margin-top: -0.3em;
    width: 100%;
}

3. The page wrapper background is set in the pagelayout.css file as
#page-wrapper {
    background: setting:pwrapbkcolour url(setting:pwrapbkimage) repeat-x left top !important;

...

}


You should again be able to override that in the customcss setting, although you may have to then set the background colour and the image that is not being repeated there as well, rather than in the pagewrapper section of the settings page.


HTH
Richard

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Francis Feytout -

Hi Richard and thanks for your answer,

Sorry for the delay, I didn't get to work on the theme until today, but I have a surprise for you :  theme_flexi_ii.php in french wink

.coursebox is the course description box (eg. on the main page list of courses). !important did the trick.

It is indeed defined in course.css line 9 .coursebox {border:1px solid #DDD;border-color:#DDDDDD;}. But firebug shows my custom rule as line 92, which is .course_category_tree .category {...}.

I found a workaround for the rounded border : we will use the same background color for the block and it's title zone, so the color shift will be invisible.

In reply to Francis Feytout

Re: New Flexi version 2 theme added

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

Hi Francis,

The CSS for course box is not written correctly.

.coursebox {border:1px solid #DDD; border-color:#DDDDDD;}

As the border: width/style/color are given in border: 1px solid #DDD; the added border-color:#DDDDDD; might be forcing the issue you are having. Kind of the CSS being declared then re-enforced.

The custom CSS should over-ride it but if the custom setting is not written using the same class selector then the custom settings will be lost.

But as a rule, as Richard says, it should overwrite the theme CSS. However, I have found this to be the opposite in another theme. But this was caused by the way the setting was placed in the CSS file.

By the way, the French translation is fantastic!

Regards

Mary

In reply to Mary Evans

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Mary

Thanks for that spot on the border color - I will get it fixed in flexi asap. For your information, in your role where you are correcting bugs in the core themes, the same is true in standard theme (as that's where the flexi css originally came from) unless you have already updated since my last download (which was a couple of weeks ago, and I know you have been working hard making bug fixes etc. to some of the themes so you may have already done it.

Do you need a tracker raised for it? I need to have a look to see how to do the pull (or push, whichever it is!) requests too smile

Francis - many thanks for the French translation, I'll add it to the theme as soon as I can this weekend.

Rich

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

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

Hi Richard,

That's news to me about the code coming from the standard theme! WOW! That's Sam Hemelryk's domain smile

I will go an take a look at that.

As far as I know anyone can open a Moodle Tracker and suggest a patch for a given problem. If you use GIT and I know you are just starting out on that, you can link to a section of your GIT hub where the patch is for others to try it.

However the PULL REQUESTS or Request for Integration, as it is now known, can only be done by authorised personnel. The fact I have authority to do this is because of my role within NSL as a Moodle Partner.

You will find this document useful Development: Git_for_developers. However there is rather more to GIT than this, but it is a start in the right direction. As for the CSS in standard theme I'll go take a look.

Thanks for the tip-off

Cheers

Mary

In reply to Mary Evans

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Mary,
Yes, the original flexi started life as a way of adding the settings page to the most standard (forgive the pun) theme I could find - standard - and because of all the settings going into it, rather than using standard as a parent, I began with a clone of standard to work from. And as you know, flexi_ii grew then from that original flexi theme via the work we did on flexilite smile I wasn't sure, but went back just before posting to check the standard theme itself incase it had been updated since, simply because I couldn't remember creating that area of the css - most of the work I did concentrated on adding the massive (too massive!?) settings page to the theme. But that aside - I stand by my comment in any of my theme releases, it doesn't matter where the original comes from - if its in my theme, its my mistake :D.

I'll take a look at that doc and continue my learning curve on GIT (as well as the rest!!! lol!)

Rich

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

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

With regards GIT have you set up your local repository on your PC?

If you have, then think of it like a railway and so shunting stuff to and fro is great fun! Get's even better when you start making branch lines. One begins to feel like Ivor the Engine. LOL

Mary

In reply to Mary Evans

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Mary,

Yes I've got the local repository on my laptop. It's up and runningrunning with an initial upload of the themes. Time to dig a bit deeper and get shunting big grin

Rich

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Francis Feytout -

Hi there,

You're quite welcome, Flexi is such a terrific concept I'm glad I could help. smile I will give you a screenshot of my moodle site once it is polished. Just to show what can be done without too much effort.

Rich, I forgot to credit myself (and my institution) for the translation, could you use this one please? Thanks smile

In reply to Francis Feytout

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

no problem Francis - I haven't uploaded it yet, so I'll use the new one when I do it this weekend smile

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Francis,

Been having sporadic internet connection problems over the weekend so have only just managed to upload this to Moodle plugins database and github, but now done smile

 

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Francis Feytout -

Hi Richard,

Is the dock overlaying the page and hiding the menus a Moodle feature or is it a bug ?

Cheers,

Francis

Attachment Capture-1.png
In reply to Francis Feytout

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

That would definitely be a bug Francis, but I'm not seeing it on mine

screenshot

I will redownload the theme later this evening to check that i haven't made any crucial changes without uploading them, but I don't believe I have made any layout changes in flexi_ii for some time.

Does this happen all the time or just with blocks only in side-pre? or just with any particular combination of blocks?

Can you also let me know where (and when) you downloaded the theme from so I can check that my download page and my github have the same version and that an old layout file hasn't crept in by mistake when I was setting up my Git repository or some such error - I'm quite sure they are the same, but to help me check!

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Francis Feytout -

I started charting the dock today, so i can't tell you if it's new or not. I downloaded the theme sometime in september, it should be your last update before my translation.

The overlaying only appear with a docked item and for any docked block.

I'll look deeper into it but i don't really know when.

Francis

In reply to Francis Feytout

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Thanks Francis - I'll try to look into this for you as soon as I can.

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Douglas Peloquin -

I've been using flexi_ii since I upgraded to Moodle 2.0.  Thank you for your work!

Recently, there was a security release, and I applied 2.0.5 (upgrading from 2.0.3+)  After the upgrade, I'm getting a  "Coding error detected, it must be fixed by a programmer: PHP catchable fatal error" from the "home" (but not the /admin) page.

This site is still a WIP with very little defined.  So, maybe this is just a lack of data.  However, when I turn on debug, I see these error messages on "home:"

Notice: Trying to get property of non-object in /hermes/bosweb/web006/b64/ipw.gracious/academy/theme/flexi_ii/lib.php on line 1932

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /hermes/bosweb/web006/b64/ipw.gracious/academy/theme/flexi_ii/lib.php on line 1932

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Brad Knox -

Hi All,

I'm having (what i think) is a local and basic problem with the Flexi ii theme and was hoping for some advice. I am able to enter various options in the (very detailled) settings page and when i click 'save changes' those options are retained, but do not appear as changes in the site appearance.

Is there something other than 'save settings' that I need to do to implement these options? 

Awesome idea for a theme by the way. Ideal for admins with no access to the host server, a real problem with some commercial Moodle hosting.

Thanks in advance

In reply to Brad Knox

Re: New Flexi version 2 theme added

by Brad Knox -

...please ignore, friday afternoon of a long week...

"Clear theme caches" works nicely!

In reply to Brad Knox

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Glad you got it sorted, Brad - but can I suggest 'Purge All Caches' on the Site Admin>Development menu can sometimes be a better way to go as it clears more than the Theme caches

- alternatively if you are making a lot of changes, it is worth temporarily turning on Theme Developer Mode in the Themes Settings page (Site Admin>Appearance>Themes>Theme Settings) as you don't then have to keep clearing the cache. Just bear in mind that this should be turned off afterwards on a production server as this can slow down page access.

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Brandon Blackmoor -

I have modified flexi_ii to add two new settings: "Breadcrumb root text" and "Breadcrumb root URL". This permits a site such as ours, which has a "parent" site of the Moodle installation, to add a link to that site to the breadcrumbs. For example, let's say the Moodle site is "http://moodle.somesite.com" and the parent web site is "http://www.somesite.com". Using these new settings, you can prepend a link to the parent site, like so:

Somesite >> Home >> Courses >. etc.

Making "Somesite" into a link is optional. If the URL is left blank, the "Somesite" will just be text.

(On our Moodle, we have changed "Home" to "Somesite Live".)

Unfortunately, I can't upload it here, because the zip file is 248k. Any suggestions?

In reply to Brandon Blackmoor

Re: New Flexi version 2 theme added

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

The quickest and easiest way would be for you to just add those files which have been changed rather than the whole theme.

Cheers

Mary

In reply to Mary Evans

Re: New Flexi version 2 theme added

by Ray Green -

Not sure if this is the right area.

I love the theme, but I cannot get the logo to show or the gradients to work.

I am assuming that the logo is refered to as just logo, no extension but I have tried both versions.

I have also tried including a path, but it then tells me this in an incorrect value.

The logo and the gradients are stored in the pix directory.

I am trying to use the theme via a XAMP installation, as I use this to develop from, before I transfer to my server.

I am clearly missing something simple.

Look forward to hearing from you.

Thanks, Ray.

In reply to Ray Green

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi ray,

I'm glad you like the theme smile

Do you have theme designer turned on so that css is not cached? (Site Admin>Appeanace>Theme settings).

The settings page is looking for images to be stored on the site itself (e.g. the main menu block) or even externally (such as flikr) I'm not sure if it can handle a path to within the theme itself, such as the pix folder.

The settings page was primarily designed for people who do not have regular access to the site files and so would be unable to change the theme itself. For someone like yourself who can change the theme files, consider going into the lib.php file and changing the default filenames to match your new files (If you have used the same file names as the originals then I would definitely say this is about caching)

HTH

Richard

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Ray Green -

Thanks for getting back to me.

I have looked at the lib.php file and I cannot get my head around it.

I am unsure (no idea, really) which lines to edit. I will look at changing the headerbackground.

This is in the lib.php

// Set the header background image     if (!empty($theme->settings->headerbackgroundimage)) {         $headerbackgroundimage = $theme->settings->headerbackgroundimage;     } else {         $headerbackgroundimage = null;     }     $css = flexi_ii_set_headerbackgroundimage($css, $headerbackgroundimage);

To me it looks like this gets it's values from settings.php in this section:

// Header background image setting $name = 'theme_flexi_ii/headerbackgroundimage'; $title = get_string('headerbackground','theme_flexi_ii'); $description = get_string('headerbackgroundimage', 'theme_flexi_ii'); $setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL); $settings->add($setting);

But (if this is the correct bit of code) I cannot work out what to edit.

Looking forward to hearing from you.

 

 

In reply to Ray Green

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Ray,

You are right in that the lib.php gets its value from the settings page - if a value is set. The code works like this:

// Set the header background image Comment describing the section
  if (!empty($theme->settings->headerbackgroundimage)) { If the headerbackgroundimage setting is not empty (!empty)  then do the bit in brackets
        $headerbackgroundimage = $theme->settings->headerbackgroundimage; set the headerbackgroundimage variable to be whatever is entered on the settings page
    } else { else -> if the headerbackgroundimage setting is empty
        $headerbackgroundimage = null; set no headerbackgroundimage ie null
    } end if statement
    $css = flexi_ii_set_headerbackgroundimage($css, $headerbackgroundimage); add a value in the css variable from a function section later in the lib.php file

*** *** *** ***

*** *** *** ***

 
function flexi_ii_set_headerbackgroundimage($css, $headerbackgroundimage) { identify the function name
    global $OUTPUT;
call the global variable OUTPUT
    $tag = '[ [setting:headerbackgroundimage] ]';
identify the placeholder in the css file
    $replacement = $headerbackgroundimage;
set the replacement variable to be whatever is set in the earlier part of the lib.php file
    if (is_null($replacement)) {
if no value was set (ie if the settings page was empty and a null value returned
         $replacement = $OUTPUT->pix_url('header_transparent', 'theme'); use this value - in this case it points to a transparent image used as a place-holder which is in the pix folder of the theme
     } end the if statement
    $css = str_replace($tag, $replacement, $css); add the replacement value to the css variable which will actually put all these values into the theme css
    return $css; send that css variable back from the function
} end function

 So there are actually several ways to set the image in the files themselves

1. If you change the null value in the top part of the lib.php file, then the function will see that the variable has a value and will use that, whether that value is set here or overridden in the settings page

2. Change the green highlighted line in the function part of the lib.php file to point at your replacement image in the pix folder instead of the transparent placeholder file

3. If you don't want to be able to use the settings page at all in the future, go into the css files and manually change the [ [setting:headerbackgroundimage] ] for the correct image call.

**Note in each occurance above spaces have been manually added between the square brackets [ [ and ] ] to prevent the forum detecting them as a wiki page smile

 

I hope this explanation helps Ray,

 

Richard

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Kim Lloyd -

Hi!

I've downloaded the Flexi v2 theme which is fab, and have been playing around with it for a couple of days. I've come across a problem with the calendar though and am unsure of how to solve it.

When I click on the current calendar month (e.g March) it shows the calendar with a border around the days. However, every other month has no border and i'd like to get the border the same on all the calendar months. I've included a picture below to help my explanation. Do you know how i'd go about this?

Thanks!

In reply to Kim Lloyd

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Kim,

I'm glad you like the theme. To add the lines to the other months, in the custom css box on the settings page add the following rule

.calendartable .nottoday {
    border-color#EEEEEE;
    border-width1px;
}
changing the #EEEEEE and 1px for whatever values you need to fit in with your other settings. If you want to change that permanently, its on about line 50 of the calendar.css file

Hope that helps
Richard
Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Kim Lloyd -

I've tried adding the rule you gave me but unfortunately nothing has changed, and i'm still without the lines on the other months.

In reply to Kim Lloyd

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Kim,

Do you have theme designer mode enabled (Site Admin>Appearance>Theme Settings) or have you Purged All Caches?

I did this when investigating for you by changing it in the css file itself and it worked there on my local copy

Richard

Edit: Just tried this using the customcss box on the settings page as well and confirmed the rule given works on my local host - I have Theme Designer enabled permanently on there though as it is not a live production site and is used solely for 'messing about' with things smile

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Kim Lloyd -

Yeah I've just realised that theme designer wasn't on, which is strange as i'm sure it was before! Anyway i've put it back on now and all is working well. Thanks! smile

In reply to Kim Lloyd

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Great - I'm glad that's all it was! - Those are the easy solutions, I like those!!! lol :D

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Kim Lloyd -

I've noticed a problem with the dock and awesome bar. The docking area seems to overlap the awesome bar. Is there a way to sort this out?

In reply to Kim Lloyd

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Kim,

thanks for that spot - the issue is that the custommenu in position1 (where you have it) is taking 100% page width. It needs to be adjusted when the dock is in use - unfortunately my old laptop that I use as my home webserver with my moodle on it has crashed this afternoon so it may take me a day or two to get the correct code sorted for you.

A quick fix though would be to put the menu in position2 from the flexi_ii settings page. this puts it into the main content (above the header) rather than fixed to the top of the page, until i do manage to get my local host back online to sort this out for you.

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Kim Lloyd -

Ah right I see. I've switched the custommenu to position2 as you suggested and I've actually decided to leave it there as I prefer it. Thanks!

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Kim Lloyd -

I've been able to customize the theme and put it on our test moodle site. The only problem is that when the theme was copied over to the the test moodle all the customization was lost. Is there anyway to keep the customization when copying over the theme? Thanks!

In reply to Kim Lloyd

Re: New Flexi version 2 theme added

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

Hi,

You will find all the customisation data for this theme, and any other theme that uses custom-settings, in your Moodle database under:

mdl_config_plugins

here you will find page after page of settings data.

If you know SQL you could probably list it, but that's not my forte but when Richard sees your question I am sure he has this all to hand! smile

As for transporting setting data with a theme...now that has not been achived as yet...but who knows...one day!

Cheers

Mary

In reply to Mary Evans

Re: New Flexi version 2 theme added

by Kim Lloyd -

I found a file called 'designer.ser' in MoodleData>Cache>Theme>Flexi_ii. It seems to have all the customisation in it so i'm assuming that's probably it.

In reply to Kim Lloyd

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Kim - nice spot smile Have you tried copying that file into your new installation? Please let us know how you get on!

I don't have any way of transferring settings as a part of the theme at the moment. It is something I've looked at off and on (most recently when I was creating the lagomorph theme) but couldn't get it working as well as I wanted then (it worked, but slowed page load speed down quite a bit so I disabled it)

However, I have just started work on redeveloping flexi and this idea is definitely high on my priority list for features to add, so fingers crossed over the next couple of weeks big grin

Richard

In reply to Kim Lloyd

Re: New Flexi version 2 theme added

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

Hi Kim,

If you open that file you will only find CSS not settings as such, although only you will know if these contain the settings css for your theme.

Cheers

Mary

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Leo Gregorc -

Hello Richard,

thanks for this theme (like everybody else, i have the same sentiments - great stuff).  I am new to moodle and am only just starting out.  I am using this theme and just above where i have inserted my logo, the name of the institution where i work is overrideing the theme (to be clearer, the text of the organisation is ontop of the logo i uploaded)  is there any way to remove the text name of the organisation and just have the logo?

thanks.  I am sure i may have other simple questions, hope this is ok

again, thanks

In reply to Leo Gregorc

Re: New Flexi version 2 theme added

by Miriam Laidlaw -
Picture of Plugin developers

Hi Leo,

Try adding to the custom CSS box on the settings page the following CSS:

#page-header .headermain {
    display: none;
}
In reply to Miriam Laidlaw

Re: New Flexi version 2 theme added

by Leo Gregorc -

Miriam, Thank you so much. I am new to the back end of things and for this help I am grateful.

I will let u know how it goes.  Would it be ok if I placed a couple of other questions here also?  

In thanks

Leo

In reply to Leo Gregorc

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Leo,

I'm glad you like the theme smile

Miriam's solution is correct - but there is a simpler alternative as well. In the flexi_ii settings page near where you added your logo you will find the settings for controlling how the header text looks. You should find a note next to the size option there which suggests setting that to 0% in order to hide it.

As I said, Miriam's solution is the correct way to hide something using css, the 0% size in the setting is a simplified way for people unfamiliar with css.

HTH

Richard

Oh and your other questions - feel free to ask, only to happy to help, as are many of the other contributors here, such as Mary, Miriam (and others too numerous to mention individually - but all very much appreciated!)

Rich

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Leo Gregorc -

Richard, thanks for the support.  This forum is perfect for total novices like myself who are learning new skills and pushing our ownprofessional development.  I feel more confident already.  I attempted the 0% optionbout for some reason it did not work for me.  I will try again before I add the new CSS rule.  

I will post my additional questions shortly.

Once again, thanks smile 

In reply to Leo Gregorc

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Leo,

Have you remembered to either enable theme designer mode (Settings-> Site Admin-> Appearance-> Theme Settings) or to Purge all Caches (Settings-> Development-> Purge All Caches)?

Because Moodle caches all css (and other parts of the page - javascript, language strings etc) you need to clear these if you make any changes. Purge all cahces is useful if you are making one or two changes, Theme Designer mode if you are making more, or just experimenting with changes. Theme Designer Mode is not recommended for a production site once you have it how you want it though as it can slow down page loading times (which is why Moodle caches things in the first place!! smile)

Richard

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Miriam Laidlaw -
Picture of Plugin developers

Hey Richard,

Yep, saw that option as well. Stuart and I came across an interesting... loophole?... when using 0% on the size of text (I had used this in my first theme instead of the display:none rule). Some browsers let you set the minimum size for text (Stuart had his set to 10pt minimum or something), which overrides 0% in the CSS. I didn't notice it myself, since I don't have my browser set up like that haha. :D

In reply to Miriam Laidlaw

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Miriam,

Thanks for that - I've never come across that before, but will be aware of it in my rebuild I've been working on smile

Rich

PS a progress report if anyone is looking out for this as I've been saying I'm working on this for a few weeks now: Technical side of using an external user saved file to override defaults in the settings page is done after a few issues learning more about php includes etc- but I'm still looking at implementing several other features, such as layout options and the wonderful work done recently on hiding the editing icons etc. Didn't manage to get everything finished while I was on Easter break (amazing how things like family and holidays get in the way of a good project lol!!!big grin) and now back in work, but hoping to make more progress soon - hoping to finalise it once 2.3 is complete so I can test it against the finished 2.3 before releasing it.

Rich

In reply to Richard Oelmann

Re: New Flexi version 2 theme added

by Christophe Bareille -

Hello, I've been using Flexi II theme for over one year now and I've been very happy with it.

But I can't get it working with Moodle 2.4 or later. I got an Unknown exception error when trying to log in.

I read about the new layout which appeared in Moodle 2.4 and that it can cause theme compatibility problem. So I tried to add the new theme code in the Flexi II files but I got the same error.

Is there a way for using Flexi II theme with the last versions of Moodle ? Or do I have to wait for a new version of the Flexi theme ? Or even to change themes ?

Thanks in advance for your answers.

Chris.

In reply to Christophe Bareille

Re: New Flexi version 2 theme added

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Flexi has not yet been updated for the later moodle version, but if there is sufficient demand I may try to get it looked at over Christmas. However, this is likely to mean a complete rewrite rather than an update so may note be feasible without some sort of funding. Current demand (and already on the to-do list) is for Krystle to be updated for 2.6 and my own wish to create a bootstrap/flexbox powered theme.

Willing to be guided by the community though - perhaps others could respond and let me know if there is sufficient demand for a flexi for Moodle2.5/2.6+. The way settings pages are now it could be neatened up A LOT! but there are also so many themes out there now that have many settings available (if not quite the number that flexi had) while the original flexi was one of the early adopters of settings which made it stand out more at the time.

If demand is there, perhaps my bootstrap/flexbox theme could become the new flexi for 2.6 :D