Moodle

Capability for standard logo theme to accept PNG files

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8.2
  • Fix Version/s: None
  • Component/s: Themes
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE

Description

I wrote these lines in moodle/theme/standardlogo/header.html:

...

if (file_exists($CFG->dirroot.'/logo.jpg')) { $standardlogo = $CFG->httpswwwroot.'/logo.jpg'; } else if (file_exists($CFG->dirroot.'/logo.gif')) { $standardlogo = $CFG->httpswwwroot.'/logo.gif'; } else if (file_exists($CFG->dirroot.'/logo.png')) { $standardlogo = $CFG->httpswwwroot.'/logo.png'; } else if (file_exists($CFG->dataroot.'/1/logo.jpg')) {
if (empty($CFG->slasharguments)) { $standardlogo = $CFG->httpswwwroot.'/file.php?file=/1/logo.jpg'; } else { $standardlogo = $CFG->httpswwwroot.'/file.php/1/logo.jpg'; }
} else if (file_exists($CFG->dataroot.'/1/logo.gif')) {
if (empty($CFG->slasharguments)) { $standardlogo = $CFG->httpswwwroot.'/file.php?file=/1/logo.gif'; } else { $standardlogo = $CFG->httpswwwroot.'/file.php/1/logo.gif'; }
} else if (file_exists($CFG->dataroot.'/1/logo.png')) {
if (empty($CFG->slasharguments)) { $standardlogo = $CFG->httpswwwroot.'/file.php?file=/1/logo.png'; } else { $standardlogo = $CFG->httpswwwroot.'/file.php/1/logo.png'; }
} else { $standardlogo = $CFG->httpsthemewww .'/'. current_theme().'/logo.gif'; }

Activity

Hide
Urs Hunkler added a comment -

Do you want to implement this change Martin?

Show
Urs Hunkler added a comment - Do you want to implement this change Martin?
Hide
ISHIKAWA Takayuki added a comment -

I need this change because JPEG and GIF don't have alpha channel.

Show
ISHIKAWA Takayuki added a comment - I need this change because JPEG and GIF don't have alpha channel.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: