moodle 2.0 Splash missing logo

moodle 2.0 Splash missing logo

by Chad Parmentier -
Number of replies: 4

Hi all,

I have a site where the splash theme does not show the logo. The logo does show up if install the same theme on a different site. might this mean the $description string in core code is missing from this install....any thoughts?

Average of ratings: -
In reply to Chad Parmentier

Re: moodle 2.0 Splash missing logo

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

Hi,

As Splash is a core theme you don't need to upload it, it's already installed on your Moodle version. However, which logo are you talking about? The one you add or one which is part of the theme? If you are adding a logo, first you need to be in Theme Designer Mode which you can enable that on Theme settings page @ >> Site Administration > Appearance > Themes > Theme settings...

Once enabled this stops the theme caching. Now you can set the Logo in the Splash settings page @ >> Site Administration > Appearance > Themes > Splash

HTH

Mary

In reply to Mary Evans

Re: moodle 2.0 Splash missing logo

by Chad Parmentier -

This site I am working on duplicated the splash theme then modified it. all was ok until they upgraded to the newest version of moodle 2.0. At that point the logo.gif file does not show even though its in the correct spot. The theme loads fine on earlier versions of moodle 2.0. you can see it here as you dont need a login. http://idealliance.ostiarydev.com/courses/

The permissions are ok aswell when I right click view image I get a "The requested URL could not be retrieved" error from the server. some how it seems maybe the lang string is not correct im not a php guru so...

In reply to Chad Parmentier

Re: moodle 2.0 Splash missing logo

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

Hi,

The process which Moodle 2.0 employs to adds images to a page is quite different than one would expect coding in HTML. But the end result is the same providing the URL is correct. The URL for this image seems to be pointing to http:// dev . ipa.org /courses / theme /ipa_xerox / pix/logo.png (jpg or gif). I could not fine a logo.png, jpg, or gif at that location, so either the logo is in the wrong folder or url is wrong in the php file.

I could do with that little snipit of code that tells the server where to look, which is in a layout file...default.php, general.php or frontpage.php...whatever...so that I can see if you have the correct syntax. Also if this theme was updated then the way you have it may well be done in a different way now.

The code normally used for a logo if you are adding this directly to the header...

<?php if ($hasheading) { ?>
<div id="logo"><a href="<?php echo $CFG->wwwroot ?>"><img src="<?php echo $OUTPUT->pix_url('logo', 'theme')?>" alt="Logo" /></a>
</div><?php } ?>

Where Logo.png in this case is in the www.root/theme/themename/pix/Logo.png

In reply to Mary Evans

Re: moodle 2.0 Splash missing logo

by Chad Parmentier -

Hi,

Thanks for your reply. I have just now had some to look at this again and I think this is just a matter of pointing to the correct location. This server is set up funny with virtual hosts. Anyway here is the first bit of general.php. I will also attach. If you see anything out of context let me know. Im going to work on trying to map this out on the server.

 

<?php
// SMD HACK JKM: re-enabling error reporting... somehow got turned off
ini_set('error_reporting', 6143);

$hasheading = ($PAGE->heading) ? TRUE : FALSE;

$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()) ? 1 : 0;

$hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);

$custommenu = $OUTPUT->custom_menu();

$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));

$bodyclasses = array();
if ($hassidepre && !$hassidepost) {
$bodyclasses[] = 'sidebar-pre';
}
else if ($hassidepost && !$hassidepre) {
$bodyclasses[] = 'sidebar-post';
}
else if (!$hassidepost && !$hassidepre) {
$bodyclasses[] = 'no-sidebars';
}
else {
$bodyclasses[] = 'two-sidebars';
}

if (!empty($PAGE->theme->settings->logo)) {
$logourl = $PAGE->theme->settings->logo;
}
else {
$logourl = $OUTPUT->pix_url('logo', 'theme');
}
$hasfootnote = (!empty($PAGE->theme->settings->footnote));
$hidetagline = (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1);

if (!empty($PAGE->theme->settings->tagline)) {
$tagline = $PAGE->theme->settings->tagline;
} else {
$tagline = get_string('defaulttagline', 'theme_ipa_xerox');
}

echo $OUTPUT->doctype();
?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
<link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
<meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
<div id="page-wrapper">
<div id="page">
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<?php if ($hasheading): ?>
<div id="header">
<div class="section clearfix">
<div id="header-top">
<div id="headermenu">
<?php
if (isloggedin()) {
echo html_writer::start_tag('div', array('id'=>'userdetails'));
echo html_writer::tag('h1', get_string('usergreeting', 'theme_ipa_xerox', $USER->firstname));
echo html_writer::start_tag('p', array('class'=>'prolog'));
echo html_writer::link(new moodle_url('/user/profile.php', array('id'=>$USER->id)), get_string('myprofile')).' | ';
echo html_writer::link(new moodle_url('/login/logout.php', array('sesskey'=>sesskey())), get_string('logout'));
echo html_writer::end_tag('p');
echo html_writer::end_tag('div');
echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>55)), array('class'=>'userimg'));
}
else {
echo html_writer::start_tag('div', array('id'=>'userdetails_loggedout'));
$loginlink = html_writer::link(new moodle_url('/login/'), get_string('loginhere', 'theme_ipa_xerox'));
echo html_writer::tag('h1', get_string('welcome', 'theme_ipa_xerox', $loginlink));
echo html_writer::end_tag('div');;
}
echo $OUTPUT->lang_menu();
?>
</div>
<div id="logobox">
<?php echo html_writer::link(new moodle_url('/'), '<img class="sitelogo" src="'.$logourl.'" alt="Custom logo here" />'); ?>
</div>
</div>
<div id="header-bottom">
<p class="tagline"><img class="taglogo" src="<?php echo $OUTPUT->pix_url('ipa_elearning_logo', 'theme'); ?>" alt="<?php echo $tagline; ?>" /></p>
<h4 class="headermain inside"><?php echo $PAGE->heading ?></h4>
</div>
</div>
</div>
<?php endif; ?>

<div id="main-wrapper">
<div id="main" class="clearfix <?php echo ($hasnavbar ? ' with-navigation' : ''); ?>">

<div id="page-content">
<div class="section">
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</div>
</div>

<div id="navigation">
<div class="section">
<?php if ($hasnavbar): ?>
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?> </div>
<?php endif; ?>
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
</div>
</div>

<?php if ($hassidepre): ?>
<div id="region-pre" class="block-region">
<div class="section">
<?php echo $OUTPUT->blocks_for_region('side-pre'); ?>
</div>
</div>
<?php endif; ?>
<?php if ($hassidepost): ?>
<div id="region-post" class="block-region">
<div class="section">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div>
</div>
<?php endif; ?>
</div>
</div>