-
AuthorPosts
-
jamjodesign Friend
jamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
September 22, 2009 at 10:32 pm #144495Hi 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.
mihirc Friendmihirc
- Join date:
- December 2008
- Posts:
- 597
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 62
- Thanked:
- 95 times in 39 posts
September 23, 2009 at 5:36 am #318182Hello,
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.1 user says Thank You to mihirc for this useful post
zipper Friendzipper
- Join date:
- January 2006
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 11
- Thanked:
- 30 times in 10 posts
September 23, 2009 at 6:01 am #318183I did exactly the same thing at my website. I placed a small image after the search button. Same way as Mihirc told here.
jamjodesign Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
September 23, 2009 at 8:05 am #318188Hi 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 Friendzipper
- Join date:
- January 2006
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 11
- Thanked:
- 30 times in 10 posts
September 23, 2009 at 8:49 am #318192Sure, 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 Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
September 23, 2009 at 9:22 am #318196Thank 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 Friendzipper
- Join date:
- January 2006
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 11
- Thanked:
- 30 times in 10 posts
September 23, 2009 at 9:38 am #318200Did 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
1 user says Thank You to zipper for this useful post
jamjodesign Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
September 23, 2009 at 9:39 am #318201Ok – 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 Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
September 23, 2009 at 9:52 am #318205So 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 Friendmihirc
- Join date:
- December 2008
- Posts:
- 597
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 62
- Thanked:
- 95 times in 39 posts
September 23, 2009 at 9:54 am #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 Chhatreljamjodesign Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
September 23, 2009 at 9:55 am #318207Thank you mihir, worked great. Much appreciated. 🙂
mihirc Friendmihirc
- Join date:
- December 2008
- Posts:
- 597
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 62
- Thanked:
- 95 times in 39 posts
September 23, 2009 at 9:57 am #318208Hello ,
Use the mark best answer option to mark this thread as read.
Regards,
Mihir Chhatre.zipper Friendzipper
- Join date:
- January 2006
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 11
- Thanked:
- 30 times in 10 posts
September 23, 2009 at 11:54 am #318224Glad it worked out! 🙂
Stupid me, i had to tell you to use the </br> tag 😮
jamjodesign Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
September 23, 2009 at 11:56 am #318225No prob:) thank you very much again – you have been very helpful 😉
jamjodesign Friendjamjodesign
- Join date:
- June 2008
- Posts:
- 432
- Downloads:
- 27
- Uploads:
- 40
- Thanks:
- 59
- Thanked:
- 14 times in 3 posts
November 10, 2009 at 4:45 pm #323121I 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? :-[
AuthorPostsThis topic contains 19 replies, has 4 voices, and was last updated by jamjodesign 15 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum