Themes

Create a custom front page for my Moodle installation

 
 
Picture of Thiago Moreira
Create a custom front page for my Moodle installation
 
Hi, everybody.

I'm working on a Moodle customization for a non-governmental organization, and they've asked to customize the installation's front page using the design on the page below:

http://unijuv.aptanacloud.com
(it's pure HTML, with lots of JavaScript for the "sliding tabs" effect).

My question is: is there any way to use this layout on Moodle? I only want this layout for the front page. The other pages (course pages, administration), would be just like the standard themes for Moodle does. (heading, and the columns for course information, blocks, etc.)

Thanks very much, in advance.
Thiago.
 
Average of ratings: -
Picture of Mario Sergio M. Santos
Re: Create a custom front page for my Moodle installation
 
Thiago, think I've got ya.

Well you can use this static page with links referring to moodle's pages, have seen them a lot around the web (even here you can find themes with customized header.html files on it) but you have to grab the exactly php url for it.
 
Average of ratings: -
Picture of Thiago Moreira
Re: Create a custom front page for my Moodle installation
 
"but you have to grab the exactly php url for it."

You're talking about the URLs for the courses, right?

I think I've understood your suggestion, but that doesn't replace the Moodle default front page, I guess. I would like to replace only that. The course pages would be just like they are.

Thanks, Mario.

Thiago.
 
Average of ratings: -
Picture of Mario Sergio M. Santos
Re: Create a custom front page for my Moodle installation
 
Thiago, you cannot do it because the middle of the page is built everywhere else which means that it is a non-static file so, you can't even see it inside your theme directory. It just pops up on your window.

Ok, let me get this straight, you can do it, but (there is always a but) you're going far from your theme directory and touching those files is not recommended!

Why don't you try to create a static page like you have already did and link all of those courses and inner pages on it?

By the way... if you are really interested to mess it up wink (and I presume that you already know what you're doing) keep on reading:

The next line is located inside the header.html file and it calls all your content, I mean, the middle of your page, and inside there somewhere there is a line that calls the footer.html.

php print_container_start(false, '', 'content');

Remember to use the variable $home to check if actual page is the home.

if ($home) { ... }

So if you don't want to have the content you can just delete it, but remember to include the footer.html page inside the header.html file.

php include("footer.html")

PS: I have never tried it and when it is concerned about Moodle I'm a still newbie (been here for ten days so far), but you should at least try and see if it works!

Have fun man!
 
Average of ratings: -
Picture of Mario Sergio M. Santos
Re: Create a custom front page for my Moodle installation
 
Example:

if ($home) { your static html plus the line: php include("footer.html") }

else if ($heading) {php print_container_start(false, '', 'content');}
 
Average of ratings: -
Picture of uma sth
Re: Create a custom front page for my Moodle installation
 
Hello me having the same problem.. have to change the moodle page as its front page but not being able to begin.. as this is my first time with moodle as well as web development??

 
Average of ratings: -
Picture of Mario Sergio M. Santos
Re: Create a custom front page for my Moodle installation
 
Uma, did you read my post?!

First you need to check if the current page is the main page and if that's the case you should implement your own "static html".

There is a simple way to do it, follow the next instructions and you'll get it done. Just remember this have be inside the "header.html" file.

I'll be here if you need more support.

:start php
if ($home) {
your "static html"
login block
etc
}
else if {
everything else from moodle using the function:
print_container_start(false, '', 'content');
}
:close php
 
Average of ratings: -
Picture of Jörg S.
Re: Create a custom front page for my Moodle installation
 
I would like to customize the MyMoodle-site... is there another variable like $home for mymoodle, too?

Schorsch
 
Average of ratings: -
Dogbert rules!
Re: Create a custom front page for my Moodle installation
 
Jorg:

I modified the My Moodle front page using an accordion list. I've attached the file. It queries your Moodle categories and courses, so if you add new courses, it will be updated.

What I recommend you do is rename the existing my folder in your Moodle instance. Unzip the file I've attached and upload it to your Moodle instance. Turn on the My Moodle.

See if it works for you. I know there are a few Hacks, but I'm particularly proud of this one. You may also have to replace the background image for the categories.

Good luck.
 
Average of ratings: -
Anthony Borrow
Re: Create a custom front page for my Moodle installation
Group DevelopersGroup Moodle HQGroup Plugins guardiansGroup Testers
I actually did this with a site by creating a custom and separate home.php which is the default page for that directory which I set in my apache configuration file. Unfortunately there were a few issues in the Moodle code that assumed that index.php was the default and as a result I needed make some simple modifications to the code as detailed in MDL-20063. If you are interested though you can see the fruit of my labors at http://community.jsea.org/ Let me know if you have any questions. Peace - Anthony
 
Average of ratings:Useful (1)
Picture of yonney atsu
Re: Create a custom front page for my Moodle installation
 

Great Work Tony. Must be the most artistic custom built moodle site I have ever seen. Would be interested to know how you went about it.

I am creating a cutom login for my moodle site www.cfttraining.co.uk. This is made up of a background image with a red button embedded at the top as a link. I used apDiv tag in dreamweaver to embed the red button. unfortunately the red button seems to display out of position especially in IE (when you resize your browser) and to some extent the other browsers.

Wonder if anybody has a way of solving this. Please find attached index.html file

 
Average of ratings: -
Picture of Monico Briseño
Re: Create a custom front page for my Moodle installation
Group Moodle Course Creator Certificate holdersGroup Testers

HI, Anthony. I checked the community website out. I think is great. You are included Flash scripts. I was thinking about mobile devices, for example Apple Ipad, Iphone, and Ipod. the web broswers for these devices don't support flash. How to solve this web browser issue. Why not use jquery, for example?

Cheers

Monico

 
Average of ratings: -
Anthony Borrow
Re: Create a custom front page for my Moodle installation
Group DevelopersGroup Moodle HQGroup Plugins guardiansGroup Testers

Monico - That site was actually done a couple of years ago so the mobile market was not so much an issue. Most of the users of the site are Windows users and it has not been an issue for them. Flash was what they wanted so that is what I gave them. I admit that there are many alternatives for accomplishing something similar that would be more universally compatible. Peace - Anthony

 
Average of ratings: -
Picture of Jörg S.
Re: Create a custom front page for my Moodle installation
 
Thanks al lot wink But that's a bit too much for us. Actually I've only planned to use a special JavaScript (jQuery) only on MyMoodle.
Something like this:

if (IS THIS MY MOODLE?){
<script src....>
}

if ($home) {
...
}

Really simple, but I don't know, how to find out "I am on MyMoolde"...

Thanx a lot for your work - looks cools wink
Schorsch
 
Average of ratings: -
Dogbert rules!
Re: Create a custom front page for my Moodle installation
 
Here's a Moodle way of checking to see if the My Moodle is on.

$mymoodle_chk = get_record('config', 'name', 'mymoodleredirect');
if ($mymoodle_chk->value == 1) {
// RUN SOME CODE
} else {
// RUN SOME OTHER CODE
}
 
Average of ratings: -
Picture of Miguel Miní
Re: Create a custom front page for my Moodle installation
 
Hello, Mario Sergio

Please, I am looking for a way to customize my Moodle frontpage. Specially the courses available to show (I would like to choose wich ones to show).

Any ideas will be welcome.
 
Average of ratings: -
Picture of Amit Gupta
Re: Create a custom front page for my Moodle installation
 
I found some ways to create a all together new custom home page in Moodle 1.9.6,. Please see the attached file. The first method I found on the internet and rest of themI discover myself.

Every method is having its own pro and cons please decide on the requirements you have.

Cheers
Amit
 
Average of ratings: -
Mei Pakpahan
Re: Create a custom front page for my Moodle installation
 

Hi guys ! I also need this. I just need to put a bunch of JQuery codes in to the Frontpage scripts. But i can't find the way to put them. Where should i put the JQuery codes ? Which file ?.. Thanks.

Regards,

Mei

 
Average of ratings: -