View Full Version : Search form in menu header
jeronimo
12th of March 2007 (Mon), 16:55
I am trying to put the search from in to the header menu. Not so diffcult, at first sight. But it works only on the pages where the search form is already included. Like the index.php and list.php.
On all the other pages it simply doesn't show up.
How can I make it work?
I allready tried with
<?php
@include_once("./basecode/SCRIPT_common_items.php");
?>
In to the header file, but this doesn't work. And also putting it directly in the files for the photo.php and so on, doesn't give good results.
I am thinking of moving the form_simple_search_htm to the SCRIPT_indexfunctions.php. Is this possible?
jeronimo
20th of March 2007 (Tue), 11:16
anyone?
vadkim
22nd of March 2007 (Thu), 07:38
Hello!
As I know search module can be included only in pages have they own template. For example - /templates/pages/ee_default/list/
You can found folder = "vars" and css+content php files there. Try to look php structure.
In my mind, you should make header similar to other templates, but I'm not sure.
jeronimo
27th of March 2007 (Tue), 16:19
I do not fully understand what you mean with this. If the search form can not find any CSS code it will be displayd without any css stuf (just white). Or am I wrong with this?
If so, what is the way it should be done then?
Adding the "form_simple_search_html", to the var files doesn't help me
vadkim
31st of March 2007 (Sat), 07:50
Sorry for a long time answer. I try to do the same thing just now and there's no result :(
If you look the list.php file structure you'll see there isn't so simple as header.php. I'm not goot at PHP-code, but I think we can find problem solve here.
Maybe we should try to make header.php like list.php with his own CSS?
jeronimo
31st of March 2007 (Sat), 16:39
I think it doesn't have to do anything with the CSS. If the page can not find any css code, then the search form wil be displayed normal (completely white) I think.
At the moment I have some idea what can help, it indeed has to do with the var files. But you should also include the file basecode/SCRIPT_common_items.php as mentioned above. If you do not do that, then the page (eg photo.php) does know it has to write the search form, but is un able to find how to do it.
Right now I don't have the time to trie, but maybe tomorrow I can give it a trie.
If succeeded, I whil let you know
jeronimo
31st of March 2007 (Sat), 17:21
-update-
I've tried both;
First i added form_simple_search_html to the var file belonging to photo.php
The 2nd step was adding the
<?php
@include_once("./basecode/SCRIPT_common_items.php");
?>
To the header.php. The result; no search form in the header of photo.php
Then I cut the code from the header file and pasted it in to the sourcecode of photo.php
If I look at the page then, the photo.php file is not loaded at all. So there is something happening, but what happens, is not the way it should.
Hopefully someone knows..... (PEKKA?)
jeronimo
7th of April 2007 (Sat), 08:45
The trick with moving the code from SCRIPT_common_items.php to SCRIPT_indexfunctions.php did work. Although I don't know if this is safe to do, it works fine for me
Tini72
7th of November 2008 (Fri), 14:51
@jeronimo: you seem having got the search form working but somehow I am struggling getting it working for both list.php and photo.php. For all other pages including custom pages it works perfectly. I just moved the code of the simple search form from SCRIPT_common_items.php to SCRIPT_indexfunctions.php. Is there anything more I have to do to get the code working for all pages including photo.php?
jeronimo
8th of November 2008 (Sat), 08:05
It's allready some time ago. But I think I did not more then I described above.
Tini72
9th of November 2008 (Sun), 09:57
Well, it doesn't seem to work for me that way. Meanwhile I found a way around it using different search forms for the list and photo page (using the if... else statement in the header). It's not perfect that way but at least it's working.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.