News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Move Footer

Started by Low, August 08, 2015, 11:26:56 AM

Previous topic - Next topic

Low

2.0.10 - I need to move the footer (inside the wrapper div) to outside/below the wrapper.
   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   echo '
   <div id="footer_section"><div class="frame">
      <ul class="reset">
         <li class="copyright">', theme_copyright(), '</li>
         <li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
         ', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
         <li><a href="http://google.com/" rel="nofollow">PRIVACY</a></li>
         <li class="last"></li>
      </ul>';

   // Show the load time?
   if ($context['show_load_time'])
      echo '
      <p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

   echo '
   </div></div>', !empty($settings['forum_width']) ? '
</div>' : '';
}


I was hoping to paste the footer code after the end wrapper div but this part has me confused:
', !empty($settings['forum_width']) ? '
</div>' : '';


Any help is much appreciated

Deaks

It's not that complicated move the final 2 lines above the

// Show the

After the div remove the ';

and add it to the now end div would show you but mobile atm
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Gary

Actually, that's liable to cause a Parse Error. You shouldn't remove the closing ';

I'm going to assume you want to move to outside the overall scope of the wrapper so that it's not constrained by the typical 95% margins of the layout.

The code you're alluding to is an if statement that checks to see if there is a value set in Forum Width in the Current Theme section of your admin center.

You can place content outside of this by placing it like this:

', !empty($settings['forum_width']) ? '
</div>' : '';
echo'
<div style="text-align: center;">Your Content Here</div>';
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Deaks

Your way will also provide error specially with what he wishes to move, as high chances of op also moving the comments so why not use all code he gave and provide step by step guide :-P
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Low

I fiddled around with the code last night and managed to get it "working"/looking how I want (footer outside of the wrapper).
   echo '
   ',!empty($settings['forum_width']) ? '
</div>' : '';

   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   echo '
   <div id="footer_section"><div class="frame">
      <ul class="reset">
         <li class="copyright">', theme_copyright(), '</li>
         <li><a href="http://google.com/" rel="nofollow">PRIVACY</a></li>
         <li class="last"></li>
      </ul>';

   // Show the load time?
   if ($context['show_load_time'])
      echo '
      <p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p> </div></div>';
}


Does this code look OK or is there obvious warnings? Also should I have moved the bottom curly-bracket up with the other code?

Deaks

Cant see any issues looking at it
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Low

Thanks for your help Poύνικ and gary

Advertisement: