News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Display time taken to create every page - Want to move

Started by Shades., September 21, 2021, 10:58:42 AM

Previous topic - Next topic

Shades.

How do I move the "Page created in" at the bottom left to the bottom right under the terms and rules?

Reason: When I install mods, most of their copyrights automatically appear at the bottom left so I wanted to move the Page created time over to the right to make it look uniform for me. I know I can turn it off but I want to keep it on and just move it. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

shadav

in index.template.php find
// Show the load time?
if ($context['show_load_time'])
echo '
<p>', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</p>';
delete it

now we can move it to under the Help|Terms and Rules|Go Up bit
find, right above where we just removed that code
// 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="#top_section">', $txt['go_up'], ' &#9650;</a></li>
<li class="copyright">', theme_copyright(), '</li>
</ul>';
replace with
// 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="#top_section">', $txt['go_up'], ' &#9650;</a></li>
<li class="copyright">', theme_copyright(), '</li>';
// Show the load time?
if ($context['show_load_time'])
echo '
<li class="floatright">', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</li>';
echo '
</ul>';

Shades.

Thanks shadav! Can I get rid of that space in between?
You cannot view this attachment.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

shadav

there shouldn't be a space
can you send me the link to your site?

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

shadav

sorry yeah, some mods added to the copyright line
try adding a clear in there
so what I posted above
    // 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="#top_section">', $txt['go_up'], ' &#9650;</a></li>
            <li class="copyright">', theme_copyright(), '</li>';
    // Show the load time?
    if ($context['show_load_time'])
        echo '
        <li class="floatright">', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</li>';
echo '
        </ul>';

find
<li class="floatright">', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</li>';replace
<li class="floatright clear">', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</li>';
I think that should work

shadav


shadav

let's move that line up  :laugh:

find what I posted above
';
    // 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 '
cut and add before
<li class="copyright">', theme_copyright(), '</li>
so the end result should be
    // 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="#top_section">', $txt['go_up'], ' &#9650;</a></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>
        </ul>';

Shades.

Didn't work that time, maybe my fault but here's what I have please change it to the way you suggested?

// 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="#top_section">', $txt['go_up'], ' &#9650;</a></li>
<li class="copyright">', theme_copyright(), '</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 '
</ul>';

echo '
</div>
</div><!-- #footer -->';

}
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Arantor


shadav

Quote from: Shades. on September 21, 2021, 01:55:34 PMDidn't work that time, maybe my fault but here's what I have please change it to the way you suggested?

// 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="#top_section">', $txt['go_up'], ' &#9650;</a></li>
<li class="copyright">', theme_copyright(), '</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 '
</ul>';

echo '
</div>
</div><!-- #footer -->';

}

find what you posted and change it to this
// 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="#top_section">', $txt['go_up'], ' &#9650;</a></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>
</ul>';

echo '
</div>
</div><!-- #footer -->';

}

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: