Removing logo image from 2O11 SMF Theme

Learning that lasts. Online courses from $14.99
After I installed the 2O11 theme (the name of the theme has a capital "O" between the two and the first "1", though it looks like it would be 2011) on a Simple Machines Forum (SMF) web site, I noticed it placed a logo at the top, right-hand side of pages with "SEFFAF Tema" displayed. The logo overlapped a search field. The logo appeared on pages as in the image below:

SEFFAF Tema logo

The image that was displayed was in the Themes directory for the site at Themes/2O11/images/smflogo.png. The relevant section of code in the index.template.php was as follows:

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

I removed the code starting with empty and extending through the first '</div>'. I.e., I deleted the following code:

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

The empty function in the PHP code checks whether the variable $settings['site_slogan'] is empty. If it is then the question mark ternary operator results in the logo image being displayed. If the variable is not empty, it creates a div section in the code where the value of site_slogan is displayed from the array settings. Since the site owner didn't have a site slogan and didn't want the image, I removed the code, which now results in the same page being displayed as shown below.

Without SEFFAF Tema logo

Related:

fcksavedurl
Date: November 6, 2021