MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
May
Sun Mon Tue Wed Thu Fri Sat
23 24 25 26 27 28
29 30 31        
2022
Months
MayJun
Jul Aug Sep
Oct Nov Dec


Sat, Nov 13, 2021 10:25 pm

Removing logo image from 2O11 SMF Theme

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 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.

[More Info]

[/network/web/forums/smf/themes] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo