Formal white link on logo to home?

Formal white link on logo to home?

by Alex Massey -
Number of replies: 10
Hello All  

Is it possable to make logo.jpg link to home when someone clicks on it? I have made an image in fireworks but when i export it creates a html file along with the logo.jpg.

Alex
Average of ratings: -
In reply to Alex Massey

Re: Formal white link on logo to home?

by Andrea Bicciolo -
Yes it is possible. To do this, you need to edit the header.html in order to create a image map for the logo.

If you create an image map in fireworks, you may want to copy the html image map code.
In reply to Andrea Bicciolo

Re: Formal white link on logo to home?

by Alex Massey -
I tryed editing header.html but i can't seem to find where to put the code?
In reply to Alex Massey

Re: Formal white link on logo to home?

by Andrea Bicciolo -
On the section  <div id="header-home"> of header.html, use the following code, taking care of changing www.yoursite.com/moodle with the address yor home actually is.

<div id="header-home">

        <div class="headermain"><a href="http://www.yoursite.com/moodle"><img src='<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/logo.jpg' border="0" /></a></div>
        <div class="headermenu"><?php echo $menu ?></div>
    </div>

<?php } else if ($heading) {  // This is what gets printed on any other page with a heading
?>
    <div id="header">
        <div class="headermain"><a href="http://www.yoursite.com/moodle"><img src='<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/logo_small.jpg' border="0" /></a></div>

        <div class="headermenu"><?php echo $menu ?></div>

    </div>
In reply to Andrea Bicciolo

Re: Formal white link on logo to home?

by Alex Massey -
Thanks mate that worked great.

Now would it be possible to put a .swf flash in the same spot instead of the jpg?
In reply to Alex Massey

Re: Formal white link on logo to home?

by Andrea Bicciolo -
Not tested, but why not. You need to substitute the code used to embed the  jpg image with an <object> and/or <embed> tag. 
In reply to Andrea Bicciolo

Re: Formal white link on logo to home?

by Alex Massey -
Im looking at the header.html file but can't seem to find the code to put <object>.

Alex
In reply to Alex Massey

Re: Formal white link on logo to home?

by Andrea Bicciolo -
The code where to put the <object> tag is highlighted:

<div id="header-home">

        <div class="headermain"><a href="http://www.yoursite.com/moodle"><img src='<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/logo.jpg' border="0" /></a></div>
        <div class="headermenu"><?php echo $menu ?></div>
    </div>

<?php } else if ($heading) {  // This is what gets printed on any other page with a heading
?>
    <div id="header">
        <div class="headermain"><a href="http://www.yoursite.com/moodle"><img src='<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/logo_small.jpg' border="0" /></a></div>

        <div class="headermenu"><?php echo $menu ?></div>

    </div>

In reply to Andrea Bicciolo

Re: Formal white link on logo to home?

by Alex Massey -
Does this look right?

<div id="header-home">
<div class="headermain"><object="http://www.yoursite.com/moodle"><img src='<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/logo.swf' border="0" /></object></div>
        <div class="headermenu"><?php echo $menu ?></div>
    </div>
In reply to Alex Massey

Re: Formal white link on logo to home?

by Andrea Bicciolo -
Unfortunately no. The syntax for embedidng a swf is different.

Take a look here: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_4150
In reply to Andrea Bicciolo

Re: Formal white link on logo to home?

by Alex Massey -
Thanks mate i will look into it.

I have another question for you.

Currently at my work we are using moodle 1.5.3. We only just upgraded from 1.4 and are having all kinds of troubles. First of which the old theme which was a custom one that we had created did not display fonts correctly. So we moved to a new theme formal_white.

One of the functions of the old theme's in 1.4 was that we could get a separate webpage to hook in and grab the block calander from moodles main page.

We created a special php file to do this.

<STYLE>
.sideblock {
    border-width: 1px;
    border-color: white;
    border-style: solid;
}

.sideblockheading {
    background-image: url(hack_grad.jpg);
    font-family: Arial, Helvetica, sans-serif;
    color: #FFFFFF;
    font-size: 9px;
    font-weight: bold;
}

.sideblockmain {

}

.sideblocklinks {
}

.sideblockmain .cal_event {
    font-size: 0.6em;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
}

.sideblockmain .cal_event_date {
    font-size: 0.6em;
}
body {
    background-color: #FFFFFF;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
.style1 {
    color: #FFFFFF;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
</STYLE><?

    define('BLOCK_L_MIN_WIDTH', 160);
    define('BLOCK_L_MAX_WIDTH', 210);
    define('BLOCK_R_MIN_WIDTH', 160);
    define('BLOCK_R_MAX_WIDTH', 210);

    require_once('config.php');
    require_once($CFG->dirroot.'/course/lib.php');
    require_once($CFG->dirroot.'/lib/blocklib.php');
    require_once($CFG->dirroot.'/mod/resource/lib.php');
    require_once($CFG->dirroot.'/mod/forum/lib.php');





 $setblock = array();
 $setblock[0] = 4;
 print_course_blocks(get_site(), $setblock, BLOCK_LEFT);       
?>

For some reason it can't grab the calander from moodle since the new version.

Alex