PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 12-23-2003, 11:31 PM   #1
Nosmada
Orange Mole
 
Join Date: Dec 2003
Posts: 32
.shtml pages and including borders

Can I alter the search results page to include like the header, footer, left side and right side using SSI. I am currently using .shtml on all of my pages.
__________________
Nosmada
Nosmada is offline   Reply With Quote
Old 12-29-2003, 06:26 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Please see this thread.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 01-07-2004, 12:48 AM   #3
Nosmada
Orange Mole
 
Join Date: Dec 2003
Posts: 32
Parse error: parse error in /home/httpd/vhosts/jaspergifts.com/httpdocs/searchsite/search.php on line 560

It doesn't work for me. I am putting including an cgi script and it doesn't like it. This isn't a simple header or footer. Any suggestions?

Here is what it looks like at line 550:

$my_page_searchfeed = get_my_includes("/home/httpd/vhosts/jaspergifts.com/cgi-bin/searchweb/include.cgi?keywords=$query_string&external=1&show=10");

Where $query_string is what the people typed in.
__________________
Nosmada
Nosmada is offline   Reply With Quote
Old 01-07-2004, 01:29 AM   #4
Nosmada
Orange Mole
 
Join Date: Dec 2003
Posts: 32
Getting closer to inserting a dynamic cgi script include

This simple line inserted into search.php does the trick for one word searches:

<? readfile("http://jaspergifts.com/cgi-bin/searchweb/include.cgi?keywords=$query_string&external=1&show=10"); ?>

But when you give phpdig a two word search you get the following:

Warning: readfile("http://jaspergifts.com/cgi-bin/searchweb/include.cgi?keywords=gift baskets&external=1&show=10") - Success in /home/httpd/vhosts/jaspergifts.com/httpdocs/searchsite/search.php on line 558

I am assuming it is the space that it doesn't like. Any ideas?
__________________
Nosmada
Nosmada is offline   Reply With Quote
Old 01-07-2004, 04:49 AM   #5
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Prehaps try the following:
PHP Code:
$query_string urlencode($query_string); 
Depending on where you place readfile in search.php, you may wish to define a new variable and use that instead as $query_string is passed to phpdigSearch. You may also wish to clean that variable too before passing it to readfile.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 01-07-2004, 08:46 AM   #6
Nosmada
Orange Mole
 
Join Date: Dec 2003
Posts: 32
Thanks Charter. I am placing the readfile before the phpdig results in search.php. Quick questions:

1. How and where do I define a new variable? What would the syntax be, what file would I put it in and where in the file would I put it?

2. How do I clean the variable?

Thanks
__________________
Nosmada
Nosmada is offline   Reply With Quote
Old 01-07-2004, 01:54 PM   #7
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Take a look in search_function.php for $query_to_parse and you'll see various things done to clean the $query_string variable. Then in search.php you could do something like the following:
PHP Code:
$query_string_for_readfile $query_string;
// clean the $query_string_for_readfile variable
// readfile line here using $query_string_for_readfile 
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 01-08-2004, 01:04 AM   #8
Nosmada
Orange Mole
 
Join Date: Dec 2003
Posts: 32
It is a wrap

Good work. Between the two of us we have solved another part of this ongoing puzzle - future people will wonder how to do this:-)
__________________
Nosmada
Nosmada is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help including search.php dhoyos Troubleshooting 2 02-02-2007 01:53 PM
.shtml as a template? sparky How-to Forum 6 09-28-2004 07:13 PM
converted from html pages to php pages now no pages will index!!! help!! bigals Troubleshooting 24 04-01-2004 10:34 AM
Adding index.shtml urb How-to Forum 1 02-23-2004 10:24 AM
index only .shtml Nosmada How-to Forum 3 12-23-2003 04:36 PM


All times are GMT -8. The time now is 01:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.