News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

A little help please - move footer to be framed in theme

Started by petre_vitan, June 21, 2022, 12:00:28 PM

Previous topic - Next topic

petre_vitan

Sorry, I'm writing with google translate.
Recently I also use this wonderful platform but I want to make some changes to a theme and it is beyond me. I want the footer to be framed in the theme, as I tried to explain in the picture.
I probably need to make a change to index.template.php but I don't know where and how.
Thanks for the help.

Kindred

alot of that depends on the theme that you use -- but realistically, you don't need to actually MOVE any code (because what you are asking would actually be moderatedly complicated to do, code-wise).

However, lucky for you -- You can make a few minor edits to the CSS to change the LOOK so that it looks like the footer content is within the same boundaries are the forum content.
Слaва
Украинi

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

Arantor

Um, you're just moving the code inside template_body_below() (it's literally all in there), moving the first echo down. Then changing style to suit.

petre_vitan

A little more explicit if possible. Where exactly should I move the function code template_body_below (), after or before which code?

Arantor

No, you're changing the code inside that function. I'm on mobile so I can't really explain, but template_body_below in the index template file deals with everything from after all the content to the end of the footer. Look in the file, you should see an echo statement ending all the main divs that are the content, then the footer.

Kindred

hmmm.....


Oh yeah, I forgot that the divs closing are in the template_body_below.   I was working under the (mistaken) recall that the divs got closed in the content section.



However, I still think it can be done with only CSS in that theme...
Слaва
Украинi

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

Arantor

Probably, but it's also super fiddly CSS.

petre_vitan

Thank you all for your help. I will make a backup copy of the theme files and then try until I succeed.
I wish you a wonderful day, beautiful people.

Antechinus

Quote from: Kindred on June 21, 2022, 02:27:00 PMHowever, I still think it can be done with only CSS in that theme...
Personally, I would not attempt to do it via CSS only, I would change the markup.

petre_vitan

I leave an answer to solve the problem for which I opened this topic.
The line is searched for in the index.template.php file
global $context, $txt, $scripturl, $modSettings;and immediately after this line the following code is searched, cut and pasted:
  // Show the footer with copyright, terms and help links.
  echo '
  <div id="footer">
      <div class="inner_wrap">';

  // There is now a global "Go to top" link at the right.
  echo '
      <ul>
        <li class="floatright"><a href="', $scripturl, '?action=help">', $txt['help'], '</a> ', (!empty($modSettings['requireAgreement'])) ? '| <a href="' . $scripturl . '?action=agreement">' . $txt['terms_and_rules'] . '</a>' : '', ' | <a href="#header">', $txt['go_up'], ' &#9650;</a>
<br /><div id="elemID031021" style="line-height:16px;text-align:center;position:relative;z-index:100000;"><div><a title="forum visits ip addresses free software" href="https://www.tracemyip.org/pv1-3-39755-2"><img src="//s3.tracemyip.org/tracker/1218/4684NR-IPIB/62897/12/njsUrl/" alt="forum visits ip addresses free software" referrerPolicy="no-referrer-when-downgrade" style="border:0px;" /></a></div><div><a href="https://www.tracemyip.org/pv1-3-39755-2">quick stats</a></div></div>
</li>';
  // Show the load time?
  if ($context['show_load_time'])
      echo '
      <li class="floatright clear">', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</li>';
echo '
        <li class="copyright">', theme_copyright(), '</li>
                  <li>Vag Club Auto &copy 2022</li>
      </ul>';

The result will be the one in the picture below.


(I translate via Google)

Advertisement: