News:

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

Main Menu

How to move the "Latest messages" block to the top?

Started by Butiks, March 30, 2023, 08:35:51 PM

Previous topic - Next topic

Butiks

The "Latest Posts" block, which is displayed on the main page, at the bottom inside the "Information Center" block.

How to move the "Latest messages" block to the top so that it is under the menu. (Example, after <div id="upper_section">...</div>)

SMF: v2.1.3
Theme: Default

Kindred

It's not really that simple... it involves editing the template,  but just moving the little bit of code used to display that won't be enough,  You'll have to restyle a bunch of it
Сл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."

Butiks

I assumed that this would require changing the template code and style. I take responsibility.

Can you tell me what files need to be changed and in what lines of code in the "Default" theme?

webtiryaki

Quote from: Butiks on March 30, 2023, 08:35:51 PMThe "Latest Posts" block, which is displayed on the main page, at the bottom inside the "Information Center" block.

How to move the "Latest messages" block to the top so that it is under the menu. (Example, after <div id="upper_section">...</div>)

SMF: v2.1.3
Theme: Default

at BoardIndex.template.php

find
echo '
<div id="boardindex_table" class="boardindex_table">';

change

echo '
<div id="boardindex_table" class="boardindex_table">';
template_ic_block_recent();

Kindred

yes... that's "the little bit" of code that I mention.   Moving that will likely affect the layout of the page in a way that requires CSS modification as well
Сл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."

Antechinus

Just be aware that if you want to move it to somewhere which is not covered by BoardIndex.template.php you will be up for a lot of coding. As long as it stays within BoardIndex.template.php it is a fairly trivial job (move the HTML/PHP chunk and roll your own CSS).

Advertisement: