Topic: Logo Linking to Index
I'm currently using this: http://wiki.punres.org/Add_a_logo_to_the_header_via_css
to put a Logo on my Forum, but I would like my logo to link back to my homepage whenever I click it. Does anyone know how to do this?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → Logo Linking to Index
I'm currently using this: http://wiki.punres.org/Add_a_logo_to_the_header_via_css
to put a Logo on my Forum, but I would like my logo to link back to my homepage whenever I click it. Does anyone know how to do this?
I could be wrong but I don't think this is possible. I've tried and had no success. Maybe someone will have a solution.
Well, if you want to get really sneaky, and I'm not sure this would work. Create an extra link back to you homepage using the link creator in admin cp. Make the link display block with a transparent background. Give it zero height but the same width as your logo and top padding equivelent to the height of the logo then absolutely position it so it sits on top of the logo. You might have to give it zero font-size and line-height as well.
Otherwise you need to add an image link via main.tpl.
No go, any ideas?
open header.php and find <pun_title>
What exactly do you mean why that? I found it, and I tried annexing <a href> onto it, but nothing showed.
you found:
$tpl_main = str_replace('<pun_title>', '<h1><span>'.pun_htmlspecialchars($pun_config['o_board_title']).'</span></h1>', $tpl_main);
and you made it into:
$tpl_main = str_replace('<pun_title>', '<h1><span><a href="http://your website.com">'.pun_htmlspecialchars($pun_config['o_board_title']).'</a></span></h1>', $tpl_main);
Yep, it results in nothing.
http://reviewstash.com/index.php
I took the code off temporarily, but nothing is made clickable
Where do you specify logo.png. If it is not in the css file then you should go to the file where you set logo.png as your header and put the <a> around it there, then it should work.
I think it is in the *.tpl files.
You could always add this to the extra navlinks in the admin CP:
<script type="text/javascript">document.getElementById('brdtitle').onclick = function() { window.location = 'http://reviewstash.com' }</script>
I imagine that could work.
Javascript suprisingly didn't work.
/****************************************************************/
/* 0. HEADER LOGO */
/****************************************************************/
div#brdheader #brdtitle {
height: 60px;
height: 60px;
padding: 3px
}
#brdtitle span, #brdtitle p {
position: absolute;
display: block;
overflow: hidden;
width: 1em;
left: -999em
}
#brdtitle {
width: 800px;
height: 60px;
background: url('/img/Oxygen/logo.png') top left no-repeat;
}
That's whats in my style_cs.css
That's odd.
Try just modifying the templates to put in an image instead of a CSS background image. Then you can put an a tag around it.
How do I do that?
Badass, got it working, this is in my main.tpl
<body>
<div id="punwrap">
<div id="pun<pun_page>" class="pun">
<div id="brdheader" class="block">
<pun_include "googleright.php">
<div class="box">
<a href="/"><div id="brdtitle" class="inbox">
<pun_title>
<pun_desc>
</a></div>
<pun_navlinks>
</div>
</div>
Thanks to everyone who pointed me in the correct direction
PunBB Forums → PunBB 1.2 troubleshooting → Logo Linking to Index
Powered by PunBB, supported by Informer Technologies, Inc.