Not sure what board to post this in.
I have a parts search form that I'm trying to place directly under the user login info are of the index.template.php.
Here is the code I'm using for the form.
<div>
<strong>Shop for Parts</strong><br/>
<!-- RC SmartSearch -->
<form name="SmartSearch" method="get" target="_blank" action="http://www.repairclinic.com/Shop-For-Parts">
<input type="hidden" value="24039" name="RCAID" />
<input type="text" id="searchText" name="searchText" size="35" maxLength="60" />
<Input type="submit" value="Search" name="Search" title="RC SmartSearch" class="button_submit">
</form><IMG width="1" height="1" border="0" src="http://appliancejunk.com/images/rc1x1blank.png"><br/>
<a href="http://www.repairclinic.com/General/Help-Me-Find-My-Model-Number?RCAID=24039" title="Help me find my model number" target="_blank">Help me find my model number</a>
<!-- RC SmartSearch -->
</div>
I would like the parts search box to show up for everyone, guest and members.
I have been trying to place the code in a number of different locations in index.template.php, but just can't seem to get it right.
I have attached a screenshot of my closest attempt. That is how I want it to look, but the problem with the way it is there is a scroll bar shows up as I pointed out with the red arrow.
So close, yet so far...
Any help would be greatly appreciated.
Thanks,
Try this...
Find:
</div>
<br class="clear" />';
// Define the upper_section toggle in JavaScript.
Add before:
<div id="search_parts">
<strong>Shop for Parts</strong><br/>
<!-- RC SmartSearch -->
<form name="SmartSearch" method="get" target="_blank" action="http://www.repairclinic.com/Shop-For-Parts">
<input type="hidden" value="24039" name="RCAID" />
<input type="text" id="searchText" name="searchText" size="35" maxLength="60" />
<Input type="submit" value="Search" name="Search" title="RC SmartSearch" class="button_submit">
</form><IMG width="1" height="1" border="0" src="http://appliancejunk.com/images/rc1x1blank.png"><br/>
<a href="http://www.repairclinic.com/General/Help-Me-Find-My-Model-Number?RCAID=24039" title="Help me find my model number" target="_blank">Help me find my model number</a>
<!-- RC SmartSearch -->
</div>
index.css add at the very end...
#search_parts
{
float: left;
margin-top: 20px;
}
Tried it and the attachment shows how it ends up looking.
No scroll bar, but it's not under the login/member area anymore.
did you the css part?
Yes, I added the css part.
When I remove the css part it looks the this attachment.
Notice the text below the text box shift back over to the left.
ok. Try above....
<br class="clear" />';
tried that and it moves it over to the left, but has a big empty space below the login area.
lol, now try where i said earlier...
before this...
</div>
<br class="clear" />';
http://idesign360.com/dev/index.php
Look..
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>';
echo '
</div>
<div id="search_parts">
<strong>Shop for Parts</strong><br/>
<!-- RC SmartSearch -->
<form name="SmartSearch" method="get" target="_blank" action="http://www.repairclinic.com/Shop-For-Parts">
<input type="hidden" value="24039" name="RCAID" />
<input type="text" id="searchText" name="searchText" size="35" maxLength="60" />
<Input type="submit" value="Search" name="Search" title="RC SmartSearch" class="button_submit">
</form><IMG width="1" height="1" border="0" src="http://appliancejunk.com/images/rc1x1blank.png"><br/>
<a href="http://www.repairclinic.com/General/Help-Me-Find-My-Model-Number?RCAID=24039" title="Help me find my model number" target="_blank">Help me find my model number</a>
<!-- RC SmartSearch -->
</div>
</div>
<br class="clear" />';
Well now I'm going crazy...
Still back in the middle. Just to make sure I did not have something messed up in index.template.php and index.css I started with fresh copies and tried again. Same results for me, displays the search box back in the middle, lol...
I'm attaching my index.template.php and index.css
Maybe you can take a look and see what I have screwed up as I see it works just fine in the example you posted a link to.
Thanks,
index.template looks fine. Remove the margin-top bit from the css.
Quote from: Mick. on February 04, 2013, 11:41:36 PM
index.template looks fine. Remove the margin-top bit from the css.
It moved it up a little higher, but it's still in the center, crazy.. lol..
I see what the prob is.
I have my test site set to 80% width in theme settings. You?
It was at 90% but I just tried changing it to 80% and it's still displayed towards the center.
I found the problem, don't know the solution.... but if I put some text in the news box (copy and pasted your news) then it looks good.
Oh.. let me try without the news t4ext.
ok, on my live site sometimes I have news and sometimes not.
Thanks for all the help with this...
here you go...
find:
</div>
<div class="news normaltext">
add before:
<br />
<div id="search_parts">
<strong>Shop for Parts</strong><br/>
<!-- RC SmartSearch -->
<form name="SmartSearch" method="get" target="_blank" action="http://www.repairclinic.com/Shop-For-Parts">
<input type="hidden" value="24039" name="RCAID" />
<input type="text" id="searchText" name="searchText" size="35" maxLength="60" />
<Input type="submit" value="Search" name="Search" title="RC SmartSearch" class="button_submit">
</form><IMG width="1" height="1" border="0" src="http://appliancejunk.com/images/rc1x1blank.png"><br/>
<a href="http://www.repairclinic.com/General/Help-Me-Find-My-Model-Number?RCAID=24039" title="Help me find my model number" target="_blank">Help me find my model number</a>
<!-- RC SmartSearch -->
</div>
and add to the css bit..
overflow: hidden;
That did the trick, thanks a million!
I never would have figured that one out by myself.
Quote from: ApplianceJunk on February 05, 2013, 12:18:31 AM
That did the trick, thanks a million!
I never would have figured that one out by myself.
Glad it worked. My fault tho. Darn text in the news area threw me off. lol
Thanks again, much appreciated.