Size of header and footer

Size of header and footer

by Robert Gajewski -
Number of replies: 35

Hi to Everybody,
I'm using software animations in flash, and their usual size is 800x600. For small laptops with resolution 800x600 users must scroll animations. Is it possible to change size of footer and header? Especially in footer there is 170 pixels high empty space! I checked nearly all available themes for Moodle 2.0.x and 2.1.x.
Robert

Average of ratings: -
In reply to Robert Gajewski

Re: Size of header and footer

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

Hi,

Most themes can be coded to expand to 100% width, but it all depends on the theme.

HTH

Mary

In reply to Mary Evans

Odp: Re: Size of header and footer

by Robert Gajewski -

Hi Mary,
As I wrote the problem is with height of footer! I know that in order to avoid problems in width I can use for instance two columns. But this is height! Look on the picture.
Below my flash animation there is an empty space... Maybe your next hint will help me to solve the problem...
Robert

In reply to Robert Gajewski

Re: Odp: Re: Size of header and footer

by Ann Adamcik -

In most cases, you can adjust the height of the header and footer (how depends on your theme and version).

However, if your primary concern is excess space between your center column content and the footer, just shrinking the footer height might not help you much. In your screenshot, the empty space below your animation is a result of the opened side blocks. What happens if you collapse or dock your blocks?

In reply to Robert Gajewski

Re: Odp: Re: Size of header and footer

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

Hi Robert,

Looking at your image, the scroll bar is showing that the problem is both the width and height of the flash content and not the height of the page - the scroll bar is  on the flash content. The fact that there is empty space below the flash content also suggests that the page itself is not restricting the flash content (although an image does not show what maybe actually in the code and your image does not show us down to include the footer)

This suggests that altering the footer height will make no difference at all. In fact looking at your image, the space appears to be between your content and the footer and the issue creating that space is therefore probably, as Ann suggests, linked to the open blocks pushing the footer down.

Moodle is normally designed so that the footer is not at a fixed location but floats downward depending on the length of content on the page.

Also, although your question appears to be about the flash content on smaller screens your image appears to show that scroll bars are present on the flash content on larger screens as well. In this  case you may be better  looking at the settings for the size of the container for the flash content, rather than trying to adjust the height of the footer.

 

Richard

PS responding sarcastically to someone who has volunteered a suggestion in response to your request for help is not normally considered a good way forward, whether you consider their suggestion valuable or not!

In reply to Robert Gajewski

Re: Odp: Re: Size of header and footer

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

I am sorry but the picture tells me nothing, other than you have embedded a URL inside a page and you are asking me what? To reduce the size of the height of the page? To lose the footer? The page type for this is all wrong.  You should perhaps be adding this as a SCORM package then the whole screen is used to capacity with minimal waste.

In reply to Mary Evans

Odp: Re: Odp: Re: Size of header and footer

by Robert Gajewski -

Hi Everybody,
I'm not a native speaker, so maybe my description was not very clear for native speakers. It was not my intention to be sarcastic to anybody. I am only looking for more than two weeks for solution of the problem. I use flash software animations since 2005. There were no problems in Moodle 1.9.x. Problems appeared when I switched to Moodle 2.0.x and also in 2.1.x. I tried all themes available in Moodle installation package. Without any positive result. Please look on first picture which size is 1147x1172. Whole 800x600 flash animation is visible, so this is not a problem of size of frame or window for such content. On the second picture I changed vertical size of Firefox window - size of picture is 1160x805, similar to typical notebook with resolution 1280x800. As you can see there are no problems with horizontal size of flash. There is only vertical scroll-bar for flash and this empty white space below flash. Maybe this is not footer, I don't know. My problem is - how to get rid of this white empty space below flash. I do hope I was polite and precise. And I hope your hints will help me. This is not sarcastic!
Robert

 

 

In reply to Robert Gajewski

Re: Odp: Re: Odp: Re: Size of header and footer

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

Robert,

As you say you have checked this out in many Moodle2 themes, I would suggest this is probably a flash player issue rather than a theming one.

There is a link here (http://docs.moodle.org/20/en/Flash) to the doc for flash in moodle which has some instructions on changing sizes, and whether you are using the flash filter or embeding the code directly into the html - when you can force the size of the flash container. If you fix the size of the flash container, any other content around it - block, footer etc. should not be an issue.

My one concern is that this seems to be another of the Moodle1.9 documents that has simply been re-labelled as 2.0 and I don't know whether it still applies to Moodle2 or not. That is an issue to take up with the documentation team rather than here though.

HTH

Richard

In reply to Mary Evans

Odp: Re: Odp: Re: Size of header and footer

by Robert Gajewski -

Hi Mary,
I do hope two pictures precisely explain my problem with blank space below flash. I did not embed URL into my page. This is flash file stored directly in Moodle.
...and you are asking me what?
To reduce the size of the height of the page?
No. Height of laptops screen is usually 720, 768 or 800 pixels. I would like to know how to get rid of blank space below flash which height is 150 pixels.
To lose the footer?
Perhaps this is not footer area. I simply want to get rid of 150 pixels high empty space below my flash. There was no such problem in Moodle 1.9.x.
The page type for this is all wrong
I don't understand you. What do you mean by page type? The same problem of "empty space" is for other resources like PDF files or URL - links to webpages. But in this case scrolling is natural. In the case of animation one should have possibility to see whole screen.
You should perhaps be adding this as a SCORM package then the whole screen is used to capacity with minimal waste.
I do hope there is another possibility, because this happens also for resources like external web pages or PDF files.
Please, look on the picture below. This resource is link to web page and I still have blank space.
Robert

In reply to Robert Gajewski

Re: Odp: Re: Odp: Re: Size of header and footer

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

If you have tried my previous suggestion, could you please let me have a temporary login to your site to see these pages so i can try to check it out and see if i can come up with another solution for you.

Richard

(you can send the login by pm on this site if you wish)

In reply to Richard Oelmann

Re: Odp: Re: Odp: Re: Size of header and footer

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

Another suggestion, which I have just tried with a test flash file I downloaded.

Add the swf file as a resource to your course, and set it to open as a popup. If the popup window does not automatically fit the size of the flash animation (mine did), it is resizable and has no other content around it to create space problems.

Richard

In reply to Richard Oelmann

Odp: Re: Odp: Re: Odp: Re: Size of header and footer

by Robert Gajewski -

Hi Richard,
I would like to avoid popup. In my faculty lab they are blocked. Moreover popup is not my favourite tool. Students are always forgetting to close them. So my preferable way is embedding but without this blank space. I know it is reserved for the option "Display resource description". But when I don't use this option it should be freed.
Robert

In reply to Richard Oelmann

Odp: Re: Odp: Re: Odp: Re: Size of header and footer

by Robert Gajewski -

Hi Richard,
Thank you very much for help.
Some of my materials are Open Educational Resorces. So click on that link and... you will hear my ugly english. Please don't laugh too much and too long.
Robert

In reply to Robert Gajewski

Re: Odp: Re: Odp: Re: Odp: Re: Size of header and footer

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

Hi Robert,

Any chance I could loginto your site?

When I said about the page type is all wrong I had assumed you had embedded the Flash. The layout/embedded.php in all Moodle Themes is made with minimal code so have NO header or footer. 

As Richard suggested the Pop-up, then perhaps just chosing Embed into the page should work, the same way you add a PDF or a SCORM package.

I was going to try this on my website but it is running slow today, Thats what come of cheap Hosting! LOL

Sorry for missunderstanding. And your English is better than my Polski smile

dzięki

Mary

In reply to Mary Evans

Odp: Re: Odp: Re: Odp: Re: Odp: Re: Size of header and footer

by Robert Gajewski -

Hi Mary,
As I wrote to Richard some of my courses are Open Educational Resources. You can use this link and... listen to my ugly English. I would like to avoid popups. To my biggest surprise flv player works in Moodle without any problems. There is a nice polish song -

(Dziwny jest ten swiat... means Strange is the world...)
Nice and unexpected feature of Moodle - link to YouTube opens automatically.
Thank you for your interest in my problem
Robert

In reply to Robert Gajewski

Re: Odp: Re: Size of header and footer

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

OK Robert, May be getting somewhere.

Looking directly at your site and using firebug suggests that the issue is that the height for the object on that page is being limited by some inline code :

<object id="resourceobject" width="800" height="600" type="text/html" data="http://pele.il.pw.edu.pl/moodle/pluginfile.php/564/mod_resource/content/1/swf-mcad/mc1.html" style="width: 1000px; height: 400px;">

screenshot

Manually altering that setting live in firebug allows the object to expand as necessary.

But looking at the source code of the page, that inline style does not appear to be there

<object id="resourceobject" data="http://pele.il.pw.edu.pl/moodle/pluginfile.php/564/mod_resource/content/1/swf-mcad/mc1.html" type="text/html" width="800" height="600"> <param name="src" value="http://pele.il.pw.edu.pl/moodle/pluginfile.php/564/mod_resource/content/1/swf-mcad/mc1.html" /> Click <a href="http://pele.il.pw.edu.pl/moodle/pluginfile.php/564/mod_resource/content/1/swf-mcad/mc1.html" >mc1.html</a> link to view the file. </object>

I suspect then that this must be something from output.lib or somesuch and probably needs to be posted as a tracker issue for the developers. I don't think making adjustments in css of the theme will help as an inline element style will (I think) overwrite anything in the css anyway.

Richard

In reply to Richard Oelmann

Odp: Re: Odp: Re: Size of header and footer

by Robert Gajewski -

Hi Richard,
Thank you very much for the excellent job you did. I am afraid you are absolutely right - this inline code changes size of my multimedia from 800x600 to 1000x400 and no changes in css can help to change this situation. So I will post this problem as tracker issue for the developers.
Robert

In reply to Robert Gajewski

Re: Odp: Re: Odp: Re: Odp: Re: Odp: Re: Size of header and footer

by Mauno Korpelainen -

Yes - that's how multimedia plugin filter works...

In fact this issue is not a real theme issue, it's a question about using media files in moodle 2.

To use multimedia plugin filter go to

Site administration > Plugins > Filters > Manage filters

and set Multimedia plugins filter On (enabled)

Next go to your course and from "Add a resource..." dropdown select "Page", give a name and description to your page and in "Content" use "Moodle Media" plugin to add a link to your flash animation file.

Multimedia

If you need to change dimensions of that file you can press the HTML button in editor and add dimensions after link with ?d=800x600 so the link looks like

<p><a href="http://yoursite/yourmoodle/draftfile.php/13/user/draft/556213379/mc5.swf?d=800x600">mc5.swf</a></p>

in editor.

I tested this with one of your great looking swf files and it seems to be working fine.

Note however that you can use multimedia filter in all activities but swf files are not embedded in such activities that requre trusted content - for example you can add links to youtube videos to these forums of moodle.org and they get automatically embedded by multimedia filter but you can't upload swf files/add swf links to moodle.org forum posts because they are not trusted content for all users.

In reply to Mauno Korpelainen

SWF multimedia...

by Robert Gajewski -

Hi Mauno,
Thank you very much for the excellent job you did!
I've been fighting with multimedia in Moodle since 2005. I the very beginnig my SWF animations were sored on separate server. Starting from Moodle 1.8.x they were stored as Moodle file and in order to display them correctly I used this "magic" addition: ?d=800x600. In Moodle 1.9.x this option stopped working! More than one year ago I spent a lot of time trying to solve it. Giving in Moodle full address to... Moodle was in my opinion not the best solution. You could imagine problems during change of the address of the site... I discovered that I can use relative path to the file But this possibility is not legal in Moodle 2.0.x - I obtained comment: This legacy resource type (file) was not yet migrated, sorry. So I decided to manually change all links to multimedia. It works perfect but only to my 1920x1200 screen. Majority of my students use cheap laptops with resolution 1280x800. I feel trapped. Should I go back fife years and store my multimedia on separate server?
Richard gave me a hint - I should address Moodle team. There are so many very sophisticated features in Moodle. Why not to make possible using SWF multimedia? I checked, FLV files are displayed properly! So it is possible!
Robert

In reply to Robert Gajewski

Re: SWF multimedia...

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

Hi Robert,

I am pleased Mauno added a comment. I asked him to look at this discussion, knowing that he is more familar with adding similar multi-media files.

You can set Moodle 2.0 to accept SWF & Embeded files in Site-Administration > Security ->> Allow embedded objects...but there is a certain risk with this as Mauno explained.

As an example, using this setting I added this page on my website for you to see HERE  I added this SWF using the following code.

<object width="900" height="700" type="application/x-shockwave-flash" data="http://visible-expression.co.uk/sandbox/theme/cafemocha/swf/moodle.swf"><param name="movie" value="http://visible-expression.co.uk/sandbox/theme/cafemocha/swf/moodle.swf"><param name="bgcolor" value="#000000"></object>

As you can see from the URL the original SWF file is stored in another theme on my site.

I don't know if any of this is going to help you...but it might.

Mary

In reply to Mary Evans

Odp: Re: SWF multimedia...

by Robert Gajewski -

Hi Mary,
Thank you very much for your efforts and help. Maybe I am very stubborn person but I look for simple and straight solution. As I wrote some time ago I stored all my files not "in Moodle" but on separate server. I would like to avoid this solution. I have absolutely no problems with SWF multimedia using WordPress or QuickCMS. In my opinion multimedia are very important in education.
There is a book about it: Joao Pedro Soares Fernandes, MOODLE 1.9 Multimedia, Packt Publishing, 2009. So why I have to deal with problems with this blank space?
Robert

In reply to Robert Gajewski

Re: Odp: Re: SWF multimedia...

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

Hi Robert,

Like Mauno, I feel that we are perhaps all talking at cross purposes.

I notice that your SWF files are already added to a HTML page. If you made this HTML page then you have a certain amount of flexibility in the way it can be displayed as a HTML page. If this is the case you could just link to that page.

Alternatively you could embed the url of this html page as a URL resource.

With some CSS styling you could then make it look like this page.

I am determined to get this right! smile

HTH

Mary

In reply to Mary Evans

Odp: Re: Odp: Re: SWF multimedia...

by Robert Gajewski -

Hi Mary,
I explained this to Mauno. I use different resources: labels as comments to materials, pages for editing different materials rather in text mode, files to store and embed PDF and SWF files and finally URL to link external resources. I do hope not to confuse these terms and purposes of different resources. Till now I've been using files for my animations. In my opinion this is natural way. I tested Mauno's hint and it works. So till now I used "pure" SWF files with some support of HTML file created by software I use for animations. You can see that in some cases I use labels to embed slide shows.
Once more - linking in my Moodle to URL of my Moodle is not natural for me. Can you imagine what will happen when I change the name of website?
In order to summarize - first of all thank you for your comments and help. And second comment - it's a pity that new versions of Moodle have many fireworks and worse and worse support for multimedia.
Robert

In reply to Robert Gajewski

Re: Odp: Re: Odp: Re: SWF multimedia...

by Mauno Korpelainen -

Support for multimedia has not become worse - the resource module has just gone through some major changes so we need to check how it handles those embedded html files. In your case old versions of resource module of moodle used iframes to embed html documents and the latest versions of moodle use object tags to embed html documents - and your flash files are embedded inside an embedded html document inside object tags.

So to break this you can use local css like

#page-mod-resource-view #resourceobject {min-height:660px;}

for example in some of your local theme css files (found from yourtheme/style folder) or for example in mod/resource/styles.css

This sets minimum height of "object window" for all embedded file resources to 660px so even if you resize the screen height of object tag with id "resourceobject" holding your swf html file won't be shrinken under 660px height...

Remember to set theme designer mode on from theme settings or purge all caches from Site administration > Development

before testing the css changes...

In reply to Mauno Korpelainen

Still problematic...

by Robert Gajewski -

Hi Mauno,
OK, maybe my opinion was too emotional. Support is different and more sophisticated (positive) or complicated (negative). I tried to follow your hint. I found many styles.css files but none of them located in folders you mentioned.
Switching to a bit different subject. Could you explain me philosophy which is behind new structure of files?
Robert

In reply to Robert Gajewski

Re: Still problematic...

by Mauno Korpelainen -

The styles.css is in your moodle /mod/resource/ subfolder and each module can have custom css inside module folder in file styles.css

Supposing that you use in moodle 2.X theme Binarius (just as an example) you can find css files for that theme inside your moodle /theme/binarius/style subfolder. There are 3 css files core.css, editor.css and pagelayout.css and one of these - editor.css - is controlling editor css (if theme config.php has $THEME->editor_sheets) , 2 other css files there are normal css files and you can add your new css to either core.css or pagelayout.css. Each theme can have different names for their css files and they are set in theme config.php with $THEME->sheets = array(...)

My example css was for moodle 2.X.

In moodle 1.9 we had only one resource module but in moodle 2 we have modules "resource", "page" and "url" separately in mod folder. In moodle 1.9 there is no styles.css in folder mod/resource...

And the reason why you need to purge caches after css changes is that moodle 2 is by default using cache for css and otherwise your css changes would not "stick".

In reply to Robert Gajewski

Re: Still problematic...

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

Hi Robert,

Following on from what Mauno has just told you about making the changes to the theme's CSS file.  It looks like you are using Form Factor theme. In this case you can safely add the CSS, which Mauno suggested, to moodle/theme/formfactor/style/core.css, if you add this CSS to the end of that file and upload back to the server, then perform "Purge all caches" you shuold see the differerence.

HTH

Mary

Edit: Some documentation:

Development: Themes 2.0 is also a useful resource for learning all about Moodle 2 theme structure

In reply to Robert Gajewski

Re: SWF multimedia...

by Mauno Korpelainen -

I agree I have had similar feelings sometimes when things change from version to another and some things do not work the same way in different resources.

In Site administration > Plugins > Filters > Multimedia plugins > Settings default setting for swf Flash animations (filter_mediaplugin_enable_swf) has in some versions of moodle been disabled (off/no) and in some versions enabled (On/Yes) and in the latest version of moodle 2 it should be again enabled but use of *.swf with filter is limited for security reasons only to trusted texts (meaning that forum, wiki, glossary, attachments, blog, user profile,... don't change swf-links to embedded swf but normal page resources, labels etc that only teachers can use do - if filter is enabled and swf-setting in "Yes".

So you should be able to use swf files with filter in moodle 2 just like youtube files or flv files with link and dimensions like ?d=800x600 if you are using recently upgraded version of moodle 2 (not older than year smile ) and if multimedia plugins filter is enabled and if swf in settings of multimedia plugins filter is enabled... The editor plugin helps in finding correct paths for files that you add to your page resources.

In moodle 2 the new feature is also that you don't need to enable filters site wide, you can set them available and enable separately on some courses (from course settings menu) for example.

And it is of course possible to use external files and embed/object/xxx tags anywhere on pages of moodle if you know the functional code for all browsers and if you are an administrator/teacher ( and if moodle does not strip untrusted tags and if browser (IE) does not strip the rest of embedding tags... smile )

In reply to Mauno Korpelainen

Odp: Re: SWF multimedia...

by Robert Gajewski -

Hi Mauno,
Thank you very much for your comments and hints. My intuition still says (maybe I am wrong...) this is not only the problem of filters, because problem occurs during resizing web-browser window.
Frankly speaking problem exists all the time but for high vertical resolution it is not visible. Moreover FLV files are displayed correctly!
Robert
PS. Editor from this forum works improperly in my FireFox 6.0.2 - right slider is cut...

In reply to Robert Gajewski

Re: Odp: Re: SWF multimedia...

by Mauno Korpelainen -

Robert,

I think you might be wrong or we are just talking about different things - are you absolutely sure that you tried the PAGE resource in moodle 2 - not FILE resource

Page

For example in your site http://pele.il.pw.edu.pl/moodle/mod/resource/view.php?id=317 is using File resource - not Page resource - and it looks exactly as you explained.

My test site does not have those problems you mentioned with page resources but they do occur with file resources. Address bar should show page resources as .../mod/page/view.php?id=xx

Or the other option is that I am wrong and did not understand at all the original problem with empty space under swf files & scrollbars... Attached a screenshot. If I resize the screen dimensions of swf file stay unchanged and if the resource does not fit to screen vertical/horizontal scrollbars appear - but no empty space is visible under the resource.

No space

The main problem with automatically resizing swf files according to window (not being able to do it without setting dimensions separately) has been in tracker for some time

see http://tracker.moodle.org/browse/MDL-8984 

 

In reply to Mauno Korpelainen

Odp: Re: Odp: Re: SWF multimedia...

by Robert Gajewski -

Hi Mauno,
This should be my misprint. I do hope I correctly distinguish three resources: page this is "internal" HTML page, URL this is link to "external" web page and file this is link to file uploaded to Moodle. From time to time I use page resource but not for multimedia. Do you think that I should use page for my SWF files? OK, I tried it with some trick from version 1.9.x which caused big problems for me while upgrading to 2.0.x (?d=800x624 after the name of SWF file) and it works. Without this parameter size of SWF is not acceptable. OK, this is my problem - I have to change nearly 100 resources and...
I am afraid perhaps this will not work in next versions of Moodle.
http://pele.il.pw.edu.pl/moodle/mod/page/view.php?id=1692
Robert

In reply to Mauno Korpelainen

Strange but tipical!

by Robert Gajewski -

Hi Mauno,
I chcecked what Moodle created when I used page resource and Moodle Media button. Look on the HTML code:
<a href="http://pele.il.pw.edu.pl/moodle/draftfile.php/16/user/draft/367908504/mc1.swf?d=800x624">mc1.swf</a>
There is full URL of my website. So multimedia stored by my Moodle are treated as "external" link.
Of course it works, but can you imagine what will happen when I change the name of server?
Robert

In reply to Robert Gajewski

Re: Strange but tipical!

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

But if you link to a file stored in Moodle, you would normally just provide that link, it is the moodle code that adds the rest, giving the browser the full url. Therefore, in this instance changing the server, or moving the course and resources stored as part of that course to another server should not be an issue, moodle will automatically create the correct full url which is what you will then see on the page source. You would not need to go through every resource/file updating the url if they are linked the way moodle expects them to be. Of course if they were stored on a different server then that's a different matter entirely! smile If you then moved the resources you would expect to have to go through all your links and change them.

the php code that moodle is written in gets translated to html which is what is read by the browser, so viewing the page source just shows what the moodle code is outputing - in this case by adding the server/host etc. to create the full file url for the resources.

At least that's my understanding

Richard

In reply to Richard Oelmann

Moodle philosophy...

by Robert Gajewski -

Hi Richard,
I'm not IT specialist and my programming background is historical - it dates from '70, this is Fortran, Algol... Later I did some programming in C++. My knowledge of PHP is rather theoretical than practical. Perhaps you are absolutely right - the name of the server is added automatically by Moodle, not by me "by hand". Why I'm sceptical about such approach? I faced problems between Moodle 1.8.x and 1.9.x. The only chance for me was to give URL of file stored on my Moodle. In order to avoid problems with change of address I used relative path which was not correctly translated between Moodle 1.9.x and 2.0.x. But in this case I added nothing by hand! Thank you very much for your valuable remark.
Robert