• Welcome to Simple Machines Community Forum. Please login or sign up.

SMF Logo (2.1RC3) (I should know this.....)

Started by Grammy, May 17, 2021, 10:46:23 AM

Previous topic - Next topic

Grammy

I'm kicking the tires on 2.1RC3 on my test forum.  I wanted to remove the SMF logo, not replace it with a slogan or anything.  I made it go away, but there's a strange number 1 sitting on the page now, where the logo was.  (screenshot)  Something to do with an empty field?  It's a head scratcher for me, this early.   :)

I found this in index.template.php:

echo '
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.svg" alt="Simple Machines Forum" title="Simple Machines Forum">' : '<div id="siteslogan">' . $settings['site_slogan'] . '</div>', '';


And replaced it with this:

echo '
', empty($settings['site_slogan']) ?  : '<div id="siteslogan">' . $settings['site_slogan'] . '</div>', '';


Doesn't throw any errors, no white page of death. Image disappears.

Also edited Index.css

First this:

#siteslogan{
padding-right: 2px;
font-size: 1.4em;
}


Then edited again to this (current edit) just trying to at least hide the number 1:

#siteslogan{
     margin: 0;
padding: 0;
float: right;
line-height: 3em;
display: none;
}


I also moved the svg image from the images directory.

I've emptied the cache, forced refresh.  But there it is, mocking me. 

Maybe it's still a botched edit, even though it removes the logo and doesn't give errors?




Kindred

you have written the code incorrectly...
the way you rewrote it breaks the conditional....

try this


echo '
', empty($settings['site_slogan']) ? '' : '<div id="siteslogan">' . $settings['site_slogan'] . '</div>', '';
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Grammy

Quote from: Kindred on May 17, 2021, 10:51:12 AM
you have written the code incorrectly...
the way you rewrote it breaks the conditional....

try this


echo '
', empty($settings['site_slogan']) ? '' : '<div id="siteslogan">' . $settings['site_slogan'] . '</div>', '';



I rushed back here when I saw "Kindred" cause I knew it was SORTED!   :D

Thanks so much, that's awesome!  Quotations actually mean something, ha!

Advertisement: