MyBB Hacks

Full Version: I need help - Logo by category
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys!
I'm new here and I'm searching for a tutorial or instructions to put custom logos on my Forum.
My Forum is it: http://tuotaku.hakome.com/index.php
And my header is it:

Code:
<div id="container">
<a name="top" id="top"></a>
<img class="logoimg" src="{$mybb->settings['bburl']}/images/logobg.png">
<div class="logotipo">
{$welcomeblock}
</div>
<div class="navigationbg">
<navigation>
</div>
<div class="menup"><b>
<a href="{$mybb->settings['bburl']}/index.php">Índice</a> - <a href="{$mybb->settings['bburl']}/portal.php">Portal</a>
</b></div>
			<br />
		<div id="content">
<div class="pm_alert"> <a href="{$mybb->settings['bburl']}/Tema-Windows-Ver-Anime-en-Full-HD-sin-problemas?pid=624#pid624"><b>[Windows]</b>Ver Anime en Full HD sin problemas.</a></div>
			{$comments_alert}
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			{$pending_joinrequests}


I adapt my code to make the logo with a img and not with a custom css background.
I can install php in templates or XThreads without any problem.
Thanks a lot and sorry for basic english, I'm from Spain~

Sorry Staff, can close.
Only and the a prefix for your forum, for example called logoa
And late on Global Templates add a template called logoa_header
Paste your header with the logo edited.
Is it worth creating multiple templates for something as simple as this?

You can use this in your header template:

Code:
<img src="{$mybb->settings['bburl']}/images/logo<if $GLOBALS['fid'] then>_{$GLOBALS['fid']}</if>.png">


Or you can just a plugin for it, there are like three for this Tongue

(07-14-2013 07:12 PM)Sama34 Wrote: [ -> ]Is it worth creating multiple templates for something as simple as this?

You can use this in your header template:

Code:
<img src="{$mybb->settings['bburl']}/images/logo<if $GLOBALS['fid'] then>_{$GLOBALS['fid']}</if>.png">


Or you can just a plugin for it, there are like three for this Tongue


Hey Sama, thanks for the reply.
I will reply you on enligh but explain it on spanish with more details, th both speak spanish you know sensei xD
Can you teach me how to use this code?
I understand it, but, where can I specify the fid?
Spanish:
Sama entiendo que la ruta es logo_FID.png
Pero para eso, necesito el php in templates?
Además, ¿cómo especifico el fid? ¿Y un fid para las cosas que no tienen fid cual sería? Resuelve mis dudas por favor porque me ayudarías bastante teniendo solo una plantilla Header, es desastroso tener que editar 4 o 5 plantillas para editar un carácter nada más xD
A parte también cambio el logo del Portal.
Sin Template Conditionals {$GLOBALS['fid']} debería mostrar el FID de tu foro.

Code:
<img src="{$mybb->settings['bburl']}/images/logo{$GLOBALS['fid']}.png">


Asi seria en el foro con FID "5"

Code:
<img src="{$mybb->settings['bburl']}/images/logo5.png">


Y si {$GLOBALS['fid']} no esta definido (en el portal no lo esta) seria así:

Code:
<img src="{$mybb->settings['bburl']}/images/logo5.png">


{$GLOBALS['fid']} deberia funcionar en paginas como forumdisplay, showthread, newthread, editpost, newreply (básicamente todas las paginas donde puedes usar un estilo por foro).

Si usas Template Conditionals, algo así funcionaria en el portal:

Code:
<img src="{$mybb->settings['bburl']}/images/logo<if $GLOBALS['fid'] then>_{$GLOBALS['fid']}<elseif THIS_SCRIPT == "portal.php" then>_portalX</if>.png">


Espero haberme explicado bien Smile

Sama me has decepcionado, es forum no GLOBAL x'DD
Obviamente es broma, aunque tengo razón.
Así lo hice con un div y dos class(uno fijo y otro según el logo)

Code:
<div class="cabezal<if $forum['fid'] then> bg{$forum['fid']}</if>">


Y el CSS

Code:
.cabezal {
	-webkit-border-bottom-right-radius: 3px;
	-webkit-border-bottom-left-radius: 3px;
	-moz-border-radius-bottomright: 3px;
	-moz-border-radius-bottomleft: 3px;
	border-bottom-right-radius: 3px;
	border-bottom-left-radius: 3px;
	width: 980px;
	height: 199px;
	background: url(http://i.minus.com/ibhb97uFhyLHTT.jpg) -300px -620px;
	margin-left: auto;
	margin-right: auto;
	padding: 0px;
	border-bottom: 1px solid #bbb;
	border-left: 1px solid #bbb;
	border-right: 1px solid #bbb;
}

.bg2 {
background: url(http://i.minus.com/iFnB0jlITHfUM.png) !important;
}



Staff, can close.
Sorry for the spanish suport and thanks Sama for your help~

Reference URL's