Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • jamjodesign Friend
    #144495

    Hi all, I am hoping someone can give me some pointers. I want to insert a small image under the search are in the header of the site. This will just be a small logo and is important to show in this area!!! I was hoping someone could tell me how to go about this (I am basically a beginner but I do know some basics of coding). Do I:

    Edit the css? or the index.php file?

    I have attached a screenshot to show where I want to put the logo (marked by the red lines). I have increased the space in the header already so there is room for it. I just need to know how to insert this image here. I want to keep the original logo so this in effect is just another extra logo.

    Thanks in advance. Would love some help on this.


    1. example-area
    mihirc Friend
    #318182

    Hello,

    What you can do is directly edit the mod_search module to include the image there. Another thing that you can do is add a css background image to the search bar.

    If you are using the default mod_search module you can edit the follow file.

    yoursite/modules/mod_search/tmpl/default.php
    Go to the end of the file and insert the image there. The code you would add it
    <img src=”” alt=”Your Image”/>

    Hope this helps,
    Mihir Chhatre.

    zipper Friend
    #318183

    I did exactly the same thing at my website. I placed a small image after the search button. Same way as Mihirc told here.

    jamjodesign Friend
    #318188

    Hi all, thanks for getting back to me. I love your site zipper and the logos. Where you google logo is I wish to put a logo under the search. I tried the piece of code in the default.php file and nothing happened. I noticed zipper you have some .css code aswell? Is this the case? Can you point me through exactly how you added the google logo and maybe how you would add it under the search.

    I am a little bit lacking in all this knowledge!! :-[

    I have added the image code ( as you can see to yoursite/modules/mod_search/tmpl/default.php) however not sure if this is the right place and where ever I put it nothing seems to change!!

    [PHP] case ‘left’ :
    default :
    $output = $button.$output;
    break;
    endswitch;

    echo $output;
    ?>
    </div>
    <input type=”hidden” name=”task” value=”search” />
    <input type=”hidden” name=”option” value=”com_search” />
    <img src=”” alt=”Your Image”/>
    </form>[/PHP]

    zipper Friend
    #318192

    Sure, i can help you out. Mihirc posted a code, with an img src there you have to put in your own image of course. I used this:

    <img class=”googlenh” src=”/../images/enh.gif”>

    I used this code in my template.css for making the image appear right next to the search button:

    .googlenh {
    margin-left: 10px;
    padding-top: 4px;
    margin-bottom: -8px;
    }

    Of course this has to be different to yours, that has to be under the search field and button. And i have edited in the ja_teline_iii/html/mod_search/default.php file..

    I made this out of it:

    if ($button) :
    if ($imagebutton) :
    $button = '<input type="image" value="'.$button_text.'" class="button'.$moduleclass_sfx.'" src="'.$img.'"/><img class="googlenh" src="../images/enh.gif">';
    else :
    $button = '<input type="submit" value="'.$button_text.'" class="button'.$moduleclass_sfx.'"/><img class="googlenh" src="../images/enh.gif">';
    endif;
    endif;

    You have to play around a bit on where to place this line:

    <img class=”googlenh” src=”/../images/enh.gif”>

    I don’t know where it appears exactly but i think it has to be just before </FORM>.

    Hope this helps.

    jamjodesign Friend
    #318196

    Thank you so much for posting and trying to point me in the right direction. I am afraid though that I am having no luck.

    I put this into the default.php file in the mod_search module (not the position of the img tag):

    [PHP] echo $output;
    ?>
    </div>
    <input type=”hidden” name=”task” value=”search” />
    <input type=”hidden” name=”option” value=”com_search” />
    <img class=”ulsterlogo” src=”/../images/stories/modules/ulster-bank-logo.gif”>
    </form>[/PHP]

    Then I put some css for the class into my overall template.css file as you have done. Right now I am just trying to get it to show up somewhere even where you have it – and nothing. it does not even show up in the wrong place. The link is correct so not sure what else to do. Sorry for these annoying posts as i guess I am doing something stupid.

    Any other suggestions ?

    zipper Friend
    #318200

    Did you put it in the default.php in templates/ja_teline_iii/html/mod_search/ directory?

    Also try to empty cache, then hit CTRL + F5 or try to put it first in the same place as mine. Or try it out of the form

    jamjodesign Friend
    #318201

    Ok – My mistake I was editing the mod_search in modules and not in the template html folder!!!! :-[

    I am getting closer now thanks to your help. My problem is getting it to go under the search!!! I will try a few things but at the moment even when I change the css to place the logo down under the search it still has them aligned side by side!! I will keep trying and post my results.

    thanks again

    jamjodesign Friend
    #318205

    So to put an image or logo under the search button – thanks to zipper :

    NOTE: I put in a <br> tag before the image to drop it under the search button. Hope this can help others 🙂

    [PHP] if ($button) :
    if ($imagebutton) :
    $button = ‘<input type=”image” value=”‘.$button_text.'” class=”button’.$moduleclass_sfx.'” src=”‘.$img.'”/>’;
    else :
    $button = ‘<input type=”submit” value=”‘.$button_text.'” class=”button’.$moduleclass_sfx.'”/><br><img class=”ulsterlogo” src=”/../images/ulster-bank-logo.gif”>’;
    endif;
    endif;[/PHP]

    mihirc Friend
    #318206

    <em>@jamjodesign 145793 wrote:</em><blockquote>Ok – My mistake I was editing the mod_search in modules and not in the template html folder!!!! :-[

    I am getting closer now thanks to your help. My problem is getting it to go under the search!!! I will try a few things but at the moment even when I change the css to place the logo down under the search it still has them aligned side by side!! I will keep trying and post my results.

    thanks again</blockquote>

    Hello,

    Try adding a <br /> after the button code. That will make it break the line and shift down. Also you can add a class to the img tag so that you can make approx styling for that image itself.

    Regards,
    Mihir Chhatrel

    jamjodesign Friend
    #318207

    Thank you mihir, worked great. Much appreciated. 🙂

    mihirc Friend
    #318208

    Hello ,

    Use the mark best answer option to mark this thread as read.

    Regards,
    Mihir Chhatre.

    zipper Friend
    #318224

    Glad it worked out! 🙂

    Stupid me, i had to tell you to use the </br> tag 😮

    jamjodesign Friend
    #318225

    No prob:) thank you very much again – you have been very helpful 😉

    jamjodesign Friend
    #323121

    I hate to reopen this thread as you have been great finding me the solution to this inserting of the image under the search option. The only issue I now have is that it shows perfectly on all browsers except for IE6 :(( I really need it to work on IE 6 and am just confused as to why this would not show only in this browser. I am using exactly the code as you use above in the last few threads.

    Any ideas as to why it does not show? :-[

Viewing 15 posts - 1 through 15 (of 19 total)

This topic contains 19 replies, has 4 voices, and was last updated by  jamjodesign 14 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum