How do i keep the same site-logo on all pages in Gumax 3.3?

Use this forum to ask questions about how to do things in GuMax skin.
Post Reply
User avatar
brammie28
Rank 0
Rank 0
Posts: 2
Joined: December 10th, 2007, 10:09 am

How do i keep the same site-logo on all pages in Gumax 3.3?

Post by brammie28 »

I want to keep the same site-logo on all pages. At this moment the site logo is only displaying if i call the images the same at the pages like: main_page.jpg. But i just want 1 image for all pages. I already tried default.jpg like it was in the older versions but that does not seem to work.

Hope to hear from somebody soon.

Cheers B
User avatar
Paul
Development Team Leader
Development Team Leader
Posts: 1132
Joined: October 20th, 2007, 2:23 pm

Re: How do i keep the same site-logo on all pages in Gumax 3.3?

Post by Paul »

You need to open file GuMax.php and find section:

Code: Select all

    <!-- ===== dynamic site logo ===== -->
    <?php $str1 = $this->data['pageclass']; $str2 = str_replace("page-", "", $str1); $pagename = strtolower($str2) ?> <!-- Get page name -->
    <?php
        $file_ext_collection = array('.gif', '.png', '.jpg');
        $found = false;
        foreach ($file_ext_collection as $file_ext)
        {
            $filename = $_SERVER['DOCUMENT_ROOT'] . '/' . $this->data['stylepath'] . '/' . $this->data['stylename'] . '/images/header/' . $pagename . $file_ext;
            if (file_exists($filename)) {
                $sitelogo = $this->data['stylepath'] . '/' . $this->data['stylename'] . '/images/header/' . $pagename . $file_ext;
                $found = true;
                break;
            }
        }
        if($found) {
            // $sitelogo = $this->data['stylepath'] . '/' . $this->data['stylename'] . '/images/header/' . 'default.jpg';
    ?>
        <div id="gumax-site-logo">
            <a style="background-image: url(<?php echo $sitelogo ?>);" <?php
                ?>href="<?php echo htmlspecialchars( $GLOBALS['wgTitle']->getLocalURL() )?>" <?php
                ?>title="<?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>"></a>
        </div>
    <?php } ?>
    <!-- ===== end of dynamic site picture ===== -->
You need to change if($found) section, use GuMax 3.2.1 as reference.
User avatar
brammie28
Rank 0
Rank 0
Posts: 2
Joined: December 10th, 2007, 10:09 am

Re: How do i keep the same site-logo on all pages in Gumax 3.3?

Post by brammie28 »

Thx Paulgu, That I didn't see that before :oops: . Love your work! Keep on going :D Grz. B
Post Reply