PhpDig.net

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

Reply
 
Thread Tools
Old 10-16-2003, 11:32 PM   #1
sid
Former Member
 
Join Date: Sep 2003
Posts: 34
Charter, Please do me a favour.

Charter,
I need to put this message at the top of the result page:
'Try your query on: Google'
but when they click on Google, it takes them to the Google results page with the keyword that the user searched in my search engine, but it will take it into Google's result page, something similar like in the PHPDIG Demo you have there:

Choose your template : phpdig.html black.html simple.html green.html grey.html yellow.html bluegrey.html terminal.html linear.html lightgreen.html newspaper.html corporate.html

So the HTML Source code of the template will do thanks.

Thanks in advance.
sid is offline   Reply With Quote
Old 10-17-2003, 12:03 PM   #2
Rolandks
Purple Mole
 
Rolandks's Avatar
 
Join Date: Sep 2003
Location: Kassel, Germany
Posts: 119
Hmm, what is the problem:
$query_string is the keyword.

insert this in your google-Link:
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=phpdig&btnG=Google+Search

q=".$query_string."

-Roland-
Rolandks is offline   Reply With Quote
Old 10-17-2003, 04:41 PM   #3
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Also, if you want to include the templates like in the demo, this thread should help.
__________________
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 10-17-2003, 04:52 PM   #4
sid
Former Member
 
Join Date: Sep 2003
Posts: 34
Hi Roland,
I'm not that good at PHP, So I don't know where to put it etc. Please give me a sample template, with that code included because when I try to include q=".$query_string." in the HTML page, it doesn't do it.
sid is offline   Reply With Quote
Old 10-17-2003, 11:40 PM   #5
druesome
Orange Mole
 
Join Date: Oct 2003
Posts: 30
Hi sid, you can try doing the following:

1.) Open up search_function.php, and look for the line:

$search_time = sprintf('%01.2f',$mtime[0]+$mtime[1]-$start_time);

Right under that, insert:

$try_words = str_replace(' ', '+', $query_string);
$try_query = "<p align=\"center\">Try your search on: <a href=\"http://www.google.com/search?sourceid=navclient&q=$try_words\">Google</a></p>";


2.) Then, look for the lines:

if ($template == 'array' || is_file($template)) {
$phpdig_version = PHPDIG_VERSION;


Below that, you can see something like:

$t_mstrings = compact('title_message','phpdig_version','result_message', ....

After 'title_message' insert 'try_query' so it will now look something like:

$t_mstrings = compact('title_message','try_query','phpdig_version','result_message', ....

3. Lastly, open up your template file, and insert:

<phpdig:try_query/>

anywhere you like. If you are using Dreamweaver, make sure you insert it directly into the code or else it will not be recognized. Good luck!
druesome is offline   Reply With Quote
Old 10-18-2003, 03:36 AM   #6
sid
Former Member
 
Join Date: Sep 2003
Posts: 34
Thanks Druesome!
sid 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
For Charter: Serious Problem jinkas Feedback & News 1 03-01-2005 11:53 PM
really dangerous bug!!!! to Charter zaartix Bug Tracker 10 12-12-2004 02:14 PM


All times are GMT -8. The time now is 06:18 PM.


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