Skip to:
Content
Pages
Categories
Search
Top
Bottom

Modifying header to display image issues

  • @merc70

    Member

    Hello everyone, we’ve started a forum about a week ago and decided to use a template to skin the board. After a good couple of hours, we managed to match the forums colors and feel to our main website. I’m not really well-versed with CSS or PHP but i’m familiar enough to experiment, tinker and achieve the results I usually want. And besides, i’m learning as I go!

    But there’s one thing that’s sort of baffling me. I’m trying to add our “logo” image in the header, right where the normal forum name text would appear. Usually, that’s just as simple as going to the header itself and replacing the PHP code used to get the name of the forum with an IMG html tag with width, height, etc.. However, the image won’t appear at all! We’ve double checked the directory, made sure it was pointed to the right place, checked the chmod settings on the image and everything should be fine, but the image still doesn’t appear. The result is in the screen cap below:

    http://marknine.com/image/ioforums.jpg

    Is there something specific i’m supposed to be looking for? In the CSS file or the header.php file itself?

    header.php

    <div class="header-wrapper">
    <div class="header pagewidth">
    <!-- TITLE -->
    <h1><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a></h1>
    <?php if ( bb_get_option('description') ) : ?><h2><?php bb_option('description'); ?></h2><?php endif; ?>
    <!-- END TITLE -->
    </div>
    </div>

    CSS

    /* header & nav */
    div.header-wrapper {
    background:#222 url('images/header.png') repeat-x scroll left top;
    }
    div.header {
    border-top:10px solid #E05900;
    padding:40px 0 40px 10px;
    margin:0 auto;
    }

Viewing 13 replies - 1 through 13 (of 13 total)
  • @michael888

    Participant

    Well can you show us the code that you used? I have a template based on yours (from Spyka.net), and my image appears perfectly. You may just have an error in your code.

    @merc70

    Member

    My tiny modification:

    <div class="header-wrapper">
    <div class="header pagewidth">
    <!-- TITLE -->
    <a href="<?php bb_uri(); ?>"><img src="/images/forumlogo.png" alt="Forums" title="Forums" /></a>
    <?php if ( bb_get_option('description') ) : ?><h2><?php bb_option('description'); ?></h2><?php endif; ?>
    <!-- END TITLE -->
    </div>
    </div>

    Edit: forgot to mention that adding the width=”325px” height=”90px” in the img tag, still doesn’t display the image.

    @michael888

    Participant

    I see – you’re pointing to a file that doesn’t exist. The image is in the theme directory, right? Try using the full path like I have below:

    <div id="headercenter">
    <div class="header-text">
    <a href="http://www.inniosoft.co.cc/devstation"><img style="margin-top: 36px;" border="0" alt="dev:station." height="65" width="336" src="http://www.inniosoft.co.cc/devstation/my-templates/businesslike/images/headerlogo.png"/></a>
    </div>
    </div>

    Peace, Michael

    @merc70

    Member

    the image was indeed in the theme directory and i tried a full path before, but it still didn’t work. however, placing the image in the index of the forum and doing a full path to it worked, oddly enough. thanks very much for the help!

    @michael888

    Participant

    I see – well at least it works now. :)

    You’re welcome. :)

    @uhclem

    Member

    I want to do this but I’m a noob.

    Help?

    @kevinjohngallagher

    Member

    Uhclem, how much HTML do you know?

    I ask not to be rude, but to check the level of support needed. It looks like your website was set up with Microsoft Frontpage and with no hand coding done. Sadly, hand coding is needed for changing things in bbPress, and no amount of help from us can talk you through it if you don’t have the basics.

    Kev

    @uhclem

    Member

    Thanx Kevin, I don’t feel you’re being anything but helpful. No sweat!

    Back before the beginning I used to hand code with a GeoCities website. And long before that I had a Vic20…I hate to admit it but I’m responsible for far too many of those useless Usenet ng’s that still exist (alt.worms.out.of.a.hot.cheese-log ,etc.) So I kind of know a little. Anyway, I’m not scared to break the interwebs. …Algore can just build another one.

    I could probably snag some code from somewhere, paste it *somewhere* and tweak it to work as I desire (or close to it), I just need to know where to do this.

    Like these “php” files; Where are they and how do I edit ’em? (with NotePad like a batch file?)

    I’m a 50+ year old bench jeweler but with a little help from kind folks I learn little bits of other interesting stuff. If I knew where/how to edit these files I’d chance messing up my bbPress board. I can always just make another one and stick it in the same directory on my server. The few people who have joined the various boards I’ve been testing out get a little panicky when everything changes all of a sudden , but they’ll get over it. :)

    Thanx!

    @kevinjohngallagher

    Member

    Ah GeoCities, how i miss all those animated GIFs :)

    Well mate, if you’re up for the challenge I’d start at something like http://www.w3schools.com/ (HTML, then CSS, then PHP sections). 9/10 it’s learning by doing and asking when stuck.

    Also, I’d strongly suggest installing and playing around with WordPress before bbPress. It’s not a requirement at all, but they’ve nailed the separation of Presentation, Data, Logic so it’s easier to know where to edit – while in bbPress it’s all still bundled in together most of the time – making it hard to know where to edit if you’re new.

    Effort will get you very far with bbPress though, it just needs to “click”. Don’t be a stranger :)

    Kev

    @chrishajer

    Participant

    @kevinjohngallagher

    Member

    <FONT COLOR=”# 88FF88″>srsly.</FONT>

    Awesome find!

    @chrishajer

    Participant

    @uhclem – I think you have exactly the right attitude to be involved with bbPress. Some tips:

    1. Don’t modify any core bbPress files. Restrict your modifications to files in the my-templates and my-plugins folders. If you don’t have those folders, create them. They will be at exactly the same level as bb-templates and bb-plugins.

    2. To start modifying the look of your forum, make a folder inside the my-templates folder, call it whatever you want (something unique, but it doesn’t matter. Maybe it a filename with no spaces though, like newtheme.) Now, copy every single file from the kakumei folder into this new folder. Now open up style.css and change the line that says Theme Name: Kakumei to say something like Theme Name: Custom Theme by uhclem. This name can have spaces in it. It’s this Theme Name that will show up in your bbPress admin section when you go to select a new theme in the Appearance tab. The screenshot will be the one from kakumei, but that’s only because you didn’t change it yet. You can worry about that later. If your new theme name does not show up in the bbPress admin, you did something wrong.

    The files that end in .php are just like HTML files, but they are processed by the web server before sending to your browser. If you put just HTML into a file with a php extension instead of a htm or html extension, it will display just as if you had named it with html or htm. Try it.

    Now, you need to look through some of those existing php files and see what’s going on. You will see some plain old HTML but you will also see some stuff inside blocks that look like this:

    <?php do something(); ?>

    PHP code will being with a <?php and end with ?> – the stuff inside those brackets is PHP code that will be interpreted by the web server before sending it to the browser. Any PHP code in a file with a PHP extension will not be sent to the browser. It is processed, for good or bad. If you get a white screen, it means you probably have a syntax error in your PHP code.

    You can edit the PHP files with notepad, just as you did with batch files, but it’s better to use an editor with syntax highlighting, so you can see when you make a mistake in your PHP. Notepad++ is good and free on Windows. http://notepad-plus.sourceforge.net/uk/site.htm

    Once you get to that point, you can learn about all the cool things you can do with PHP and bbPress.

    @chrishajer

    Participant

    @kevinjohngallagher – I wish the STYLE="FORTHRIGHT" didn’t get stripped out of your comment.

    The source of that page was awesome the day they put it up. Here’s an archive of it, I think:

    http://sean.raptorswithhats.com/geoxkcd.html

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Skip to toolbar