![]() |
Hmm...I threw together a test page based on your script and it seems to work. I'll post it in case it helps you somehow:
PHP Code:
|
I get
Parse error: syntax error, unexpected $end in /home/midwife/public_html/googlesearch.php on line 1 That when using that? |
Are you sure you got it all? Maybe you missed the } on the last line or something.
|
Sorry I'll try it again, im not that hot with this stuff. I appreciate your help honestly I do. This is something I have wanted for ages!
So the above code is meant to go where? replace my googlesearch.php? if so then what goes here - Code:
echo '<form action="test.php"> |
OK, I'm sorry, I wasn't very clear. That's just a test file, it shouldn't replace anything you have. Put it in a file called test.php, copy it to your forum directory, then go to it in your browser. When you press 'submit query' it should go to the forum search page or just print out "search google", depending on which radio button is selected. It's just supposed to show that the radio buttons and the redirect work.
|
And so it does lol.
Sorry for being a total dim ass. Why wont it work actually on the site then? I did have a play with this before several times and I just couldnt figure it out :( |
So you put this in your googlesearch.php just under the global.php require line?:
Code:
if ($_REQUEST['source'] == 0) If that's true, then temporarily change it to this: Code:
if (1 || $_REQUEST['source'] == 0) that should make it always go to your site search page. |
Just gives me a blank page again on both radio buttons with this as the url -
Code:
http://www.midwiferyonline.co.uk/googlesearch.php?cx=partner-pub-XXXXXXXXXXXXXXXXXXXX&cof=FORID%3A10&ie=UTF-8&q=help&source=0&submit.x=12&submit.y=17&siteurl=www.midwiferyonline.co.uk%2Fforum.php&ref=www.midwiferyonline.co.uk%2Fsearch.php%3Fsearchid%3D115193 Code:
<?php |
Well, I'm puzzled - it looks OK to me. Try commenting out the print_standard_redirect line (put // in front of it)
|
Ah!
Now my search is still giving me the blank page with the funny URL, even though I have removed the edits? My googlesearch.php is back to how it was and I have removed the bit from the template too..? |
All times are GMT. The time now is 11:13 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|