Skip to:
Content
Pages
Categories
Search
Top
Bottom

Jack Hammer Discussions


  • JeffVoegtlin
    Member

    @jeffvoegtlin

    I don’t know if my forums qualify to be listed here, but I’m going to anyway. Trent has helped me quite a bit and I figured some other things out myself. I’d appreciate any comments, or suggestions.

    http://jackhammr.org/bbpress/

    I’m using Trent’s onvertigo theme, which works well with my blog theme, regulus.

    Does anyone know how I can edit the search_form? I’d like the input box to be shorter and I’d like the button to say “Go!” and be on the same line as the box. And I’d like all of that to be on the same line as the User Information.

    Thanks,

Viewing 5 replies - 1 through 5 (of 5 total)

  • chrishajer
    Participant

    @chrishajer

    For the size of the input text box, you need to change this in your theme’s search-form.php:

    <input size="38" maxlength="100" name="q" value="" type="text">

     

    Change the 38 to something smaller and the size of the box displayed will be smaller.

    Then, right below that in the file, you need to change this:

    <input value="Search ยป" class="inputButton" type="submit">

    to this:

    <input value="Go!" class="inputButton" type="submit" >

    To get everything on one line, you need to remove all the paragraph tags around those two form fields in your search.php. Each form element is in its own paragraph so there are lilne breaks there. Remove the [p] and [/p] tags and see what it looks like. You will most likely need to add a space between the form input and the Go button after that, but I think it will do what you want. It will look something like this when you’re done:

    <form action="<?php bb_option('uri'); ?>search.php" method="get">
    <?php _e('Search:'); ?>
    <input type="text" size="23" maxlength="100" name="q" value="<?php echo attribute_escape( $q ); ?>" />

    <?php if( empty($q) ) : ?>
    <p class="submit"><input type="submit" value="<?php echo attribute_escape( __('Go!') ); ?>" class="inputButton" />

    <?php else : ?>
    <p class="submit"><input type="submit" value="<?php echo attribute_escape( __('Search again &raquo;') ); ?>" class="inputButton" />

    <?php endif; ?>
    </form>


    JeffVoegtlin
    Member

    @jeffvoegtlin

    That helped alot. Thanks. I decided right now it’s better not to have the search box. But I know where it is. Later, if I can figure it out, I’ll add it in.

    I was able to do all the things you suggested and it looked much better. But I still could not get it all on one line when I am logged in.


    chrishajer
    Participant

    @chrishajer

    Look at the rendered source of the page (the HTML source) and look for <br /> or <p> tags – those will cause line wrapping. The other possibility is that the container that is holding the search form (the div) is too small, so it wraps.

    I apologize Jeff for not getting back to you. To be honest, I have a theme there with all kinds of issues that I am “still” working out. I’m thinking there is a better way to do this!

    Trent


    JeffVoegtlin
    Member

    @jeffvoegtlin

    Hey Trent, I can’t complain about free help.

    While there are some things that would be nice to have, I’m fairly happy with the looks of things right now.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.