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?

Re: Logo Linking to Index

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.

Re: Logo Linking to Index

open header.php and find <pun_title>

4

Re: Logo Linking to Index

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.

5

Re: Logo Linking to Index

No go, any ideas?

Re: Logo Linking to Index

What is no go? Did you try everything in this topic?

7

Re: Logo Linking to Index

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.

Re: Logo Linking to Index

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);

9

Re: Logo Linking to Index

Yep, it results in nothing.

http://reviewstash.com/index.php

I took the code off temporarily, but nothing is made clickable

Re: Logo Linking to Index

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.

Re: Logo Linking to Index

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.

12

Re: Logo Linking to Index

Javascript suprisingly didn't work. hmm

/****************************************************************/
/* 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

Re: Logo Linking to Index

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.

14

Re: Logo Linking to Index

How do I do that?

15

Re: Logo Linking to Index

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