MyBB Community Forums
[Flatty] Putting Image Above Forum Name - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: [Flatty] Putting Image Above Forum Name (/thread-188562.html)



[Flatty] Putting Image Above Forum Name - adma - 2016-01-30

I'm currently using the Flatty theme (latest version) and using the Open-ID Steam login plugin.

I've edited the header_welcomeblock_guest template to remove the login with Steam button next to Register button as I don't want it there.

I'd like to have the "Login with Steam" button sitting centered horizontally & vertically above the orange "Welcome to the Chicken Fri Ri Forums" and below the "View new posts" and "View todays post". In the screenshot I want it where the yellow highlighted bit is. How would I achieve this? Big Grin

and I don't know how much of a hassle this would be, but I'd also like to center the "Portal, Forums, Search" etc (menu) items after I get rid of the Login / Register buttons.

**Edit: the Steam (default) login html is
<a href="{$mybb->settings[\'bburl\']}/misc.php?action=steam_login"><img border="0" src="inc/plugins/steamlogin/steam_login_btn.png" alt="Login through Steam" style="vertical-align:middle"></a>


Thanks,
Adma


RE: [Flatty] Putting Image Above Forum Name - .m. - 2016-01-30

what is your forum url ? put back the button code in header_welcomeblock_guest template so that someone can check it


RE: [Flatty] Putting Image Above Forum Name - adma - 2016-01-30

(2016-01-30, 05:27 AM).m. Wrote: what is your forum url ? put back the button code in header_welcomeblock_guest template so that someone can check it

Ok, button code is back in .

url : http://forums.chickenfriri.net/

Be wary that the button image is modified (by default it is a slim Sign into steam button)


RE: [Flatty] Putting Image Above Forum Name - .m. - 2016-01-30

okay. basically there are two methods for your requirement.
you can use template conditionals plugin and add required code segment wrapped with a condition
html code at required place in the header template
<if $mybb->user['uid'] < 1 then>
<div style="text-align: center;">steam button code</div>
</if>

or you can use css method
either fixed div element or hide the code segment for other user groups & display it to guests
html code at required place in the header template
<div class="guestnotice gnote{$mybb->user['usergroup']}">steam button code</div>
css code at the bottom of global.css of the theme (edit through admin panel & in advanced mode)
.guestnotice {display: none;
text-align: center;}
.gnote1 {display: block;}



RE: [Flatty] Putting Image Above Forum Name - adma - 2016-01-30

(2016-01-30, 06:30 AM).m. Wrote: okay. basically there are two methods for your requirement.
you can use template conditionals plugin and add required code segment wrapped with a condition
html code at required place in the header template
<if $mybb->user['uid'] < 1 then>
<div style="text-align: center;">steam button code</div>
</if>

or you can use css method
either fixed div element or hide the code segment for other user groups & display it to guests
html code at required place in the header template
<div class="guestnotice gnote{$mybb->user['usergroup']}">steam button code</div>
css code at the bottom of global.css of the theme (edit through admin panel & in advanced mode)
.guestnotice {display: none;
text-align: center;}
.gnote1 {display: block;}

Thanks for the reply, this wont show the steam button to someone already logged in? Smile
nvm read the post properly

(2016-01-30, 06:30 AM).m. Wrote: okay. basically there are two methods for your requirement.
you can use template conditionals plugin and add required code segment wrapped with a condition
html code at required place in the header template
<if $mybb->user['uid'] < 1 then>
<div style="text-align: center;">steam button code</div>
</if>

or you can use css method
either fixed div element or hide the code segment for other user groups & display it to guests
html code at required place in the header template
<div class="guestnotice gnote{$mybb->user['usergroup']}">steam button code</div>
css code at the bottom of global.css of the theme (edit through admin panel & in advanced mode)
.guestnotice {display: none;
text-align: center;}
.gnote1 {display: block;}
Hi I used the non css method, and its centered horizontally but how would I go about centering it vertically as well? (in the space that is has) Sorry for being an inconvenience if this is a noobie question.

Okay, I used my head and added padding to the top of the Steam button in the styles. Thanks so much .m.