Jump to content

Move Search box to newly created box


Guest chrisyt

Recommended Posts

Guest chrisyt

Hi all,

Have really tried to sort this one myself but am having no luck...

I have created a new box above the content box, no problems! I would like to put the search and login box into this box. I have attached a jpeg of what I have so far just so you can see what I'm on about!

Can anyone help me - much head scratching suffered so far!!?

Link to comment
Share on other sites

Try this:

tested with the Classic or Classic based skin.

1: Open your skins folder and go to skinname/styleTemplates/boxes/searchForm.tpl and back this file up

2: Replace all the code with this code:

<!-- BEGIN: search_form -->

<div class="boxTitleLeft">Search</div>

<div class="boxContentLeft">

<form action="index.php" method="get">

<span class="txtSession"><strong>{LANG_SEARCH_FOR}</strong></span> <input name="searchStr" type="text" class="searchBox" id="searchStr" value="{SEARCHSTR}" size="20" />

<input type="hidden" name="act" value="viewCat" />

<input name="Submit" type="submit" class="searchBtn" value="{LANG_GO}" />

</form>

</div>

<!-- END: search_form -->

3: Move the {SEARCH_FORM} tag from the skinname/styleTemplates/global/index.tpl & cart.tpl to either the left or right columns.

Link to comment
Share on other sites

Guest chrisyt

Try this:

tested with the Classic or Classic based skin.

1: Open your skins folder and go to skinname/styleTemplates/boxes/searchForm.tpl and back this file up

2: Replace all the code with this code:

<!-- BEGIN: search_form -->

<div class="boxTitleLeft">Search</div>

<div class="boxContentLeft">

<form action="index.php" method="get">

<span class="txtSession"><strong>{LANG_SEARCH_FOR}</strong></span> <input name="searchStr"

type="text" class="searchBox" id="searchStr" value="{SEARCHSTR}" size="20" />

<input type="hidden" name="act" value="viewCat" />

<input name="Submit" type="submit" class="searchBtn" value="{LANG_GO}" />

</form>

</div>

<!-- END: search_form -->

3: Move the {SEARCH_FORM} tag from the skinname/styleTemplates/global/index.tpl & cart.tpl to either the left or right columns.

Might help if I help you - I am using the Killer skin!!

It moves to left and right columns ok (even without code replacement) but I want it be in the main content box.

Perhaps if you were to ignore the box I created and try and get the search box displaying in the main box I could work it out from there?!!!! lol

Fingers crossed

Link to comment
Share on other sites

Guest chrisyt

I think I am getting somewhere but someone will be able to improve on this!!

Through the admin site, I have gone to documents, homepage and pasted this:

<div class="boxTitleLeft">&nbsp;</div>

<div class="boxContentLeft">

<div style="text-align: center;">

<form method="get" action="index.php">

&nbsp; <span class="txtSession"></span><input type="text" size="20" value="" id="searchStr" class="searchBox" name="searchStr"/><br/>

<input type="hidden" value="viewCat" name="act"/> <input type="submit" value="Go" class="searchBtn" name="Submit"/>

</form>

</div>

</div>

<!-- END: search_form -->

This is now showing the search box within the homepage title box - and it works!!

If it has shown on your PC like it has mine, you will notice that the search box is enclosed within the title box. It is also not in the middle of the title box.

Of course, my next question is how do I align my newly located search box so that it is in the middle of the title box? Also, how can I remove the box around the search box?

I'm quite pleased I've got this far and thought that somebody could make use of this and possibly make it better.

In a bit...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...