|
11-03-2005, 02:16 PM | #1 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
change PHPDig to get a GET instead of a POST...
Hi CHARTER,
Here is my problem I use a tool that displays AD , depend of the key word put in the search field, it is the same as the adwords of google . You will find under what this tools program ask for me **************** Because you have chosen to use keywords in this zone. No ads will display, unless you have added keywords to each ad in this zone, and have added keyword to the ad code. You must be capable of adding keywords to the ad code(s) shown below to get this to work. If you are using a search engine, you must be able to modify your search engine code, to automatically add keywords to the ad code. The following ad code fragment needs to be modified as follows, if for example, you want to show ads containing the keyword microsoft word: ...index.php?section=serve&zone=2&keyword=micrsoft%20word&output=js... Note that you must encode compound keyword. For example, the phrase microsoft word should be "encoded" any of the possible ways: microsoft+word or even microsoft%20word. ********************** I send to the distributor the gaagle.html template, and ask him if he could do the change, he said yes but he had this problem, this answer : "I looked at the template, and I cannot see where to get the keyword typed in (this is important). If we can change PHPDig to get a GET instead of a POST that would probably fix he problem, but I can't change the form submission type in here." Where do you think the informations he need are ? What do you think he had to change, and what it is better not to change ? What are the files I had to send him to change ? Thank you very much, Noël |
11-05-2005, 02:02 PM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
In function_phpdig_form.php there are three spots to...
Change from: Code:
action='$result_page' method='post' Code:
action='$result_page?query_string='".urlencode(stripslashes($query_string))." method='post'
__________________
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. |
11-05-2005, 06:15 PM | #3 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Hi CHARTER,
I changed code, search still work but is it normal that now searchs takes more time (x2) ? Thank You Noël |
11-06-2005, 08:08 AM | #4 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Hi CHARTER,
Well I changed GET instead of a POST , it seems ok, but the problem that I have it is that I need in the URL of the Internet Explorer (or other) appears the words of the research , now I have : http://www.mysite.com/gaagle/search.php?query_string= But as you can see there aren't the words that I wrote in the search field. I need that : http://www.mysite.com/gaagle/search....y_string=hotel For example I wrote hotel in the search engine. Like that the script of my tool can compare these words with the words it had in his base. Thank You Noël |
11-06-2005, 01:49 PM | #5 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Maybe your ad program takes time to find and display the ads based on query string, so that might account for the extra time. If you are going to use GET instead of POST, use the following instead:
Code:
action='$result_page' method='get' Code:
action='$result_page?query_string='".urlencode(stripslashes($query_string))." method='post' Code:
action='$result_page' method='post' Code:
<script language="javascript"> <!-- function actionModifier() { var qstring = document.forms[0].elements[4].value; qstring = qstring.replace(" ","+"); document.forms[0].action += "?query_string=" + escape(qstring); } // --> </script> Code:
<phpdig:js_for_clicks/> Code:
$result['form_button'] = "<input type='submit' class='phpdiginputsubmit' name='search' value='".phpdigMsg('go')."'/>"; Code:
$result['form_button'] = "<input type='submit' class='phpdiginputsubmit' name='search' onclick='javascript: actionModifier();' value='".phpdigMsg('go')."'/>";
__________________
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. |
11-08-2005, 02:45 PM | #6 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Hi CHARTER,
I tried your code, non errors, but my adwords still doesn't work ;( The developper said : If you are using a search engine, you must be able to modify your search engine code, to automatically add keywords to the ad code. The following ad code fragment needs to be modified as follows, if for example, you want to show ads containing the keyword microsoft word: ...index.php?section=serve&zone=2&keyword=micrsoft%20word&output=js... The entire script line that we have to put in the page where we want that ads appears is : <script src="http://www.mysiteindex.php?section=serve&id=40&keyword=*********&output=js"></script> Where I put ******** it is where a script in the search engine has to put keywords that people put in the search field , and I don't know how to do this script and where I have to put it, in phpdig ?? Thank You Noël |
11-08-2005, 03:09 PM | #7 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Is this information can help you :
If you are using a search engine and you want to enable the dynamic keyword search feature: Follow the few easy steps: 1. Make (or edit) a zone and check the "Enable Keyword Box" OK I DID 2. Make some rates for the zone OK I DID 3. Make an ad for the zone and add some keywords to it as instructed OK I DID 4. Edit the javascript ad code for the zone in #1 as follows: NOT OK I DON'T KNOW You need to replace KEYWORDS with the actual keywords that the user searched for in your search engine HTML code where you will put the ad code. You can replace the KEYWORDS with the actual search query variable that appears in the web address bar when you do a search, for example when you do a search on google for games, you will see in address bar 'q=games'. In that case q is the search query variable. |
11-10-2005, 10:15 PM | #8 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
In function_phpdig_form.php find:
Code:
$query_string2 = urlencode(stripslashes($query_string)); Code:
$result['keyword_ads'] = "<script src=\"http://www.CHANGEME.com/index.php?section=serve&id=40&keyword=".$query_string2."&output=js\"></script>"; Code:
<phpdig:keyword_ads/>
__________________
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. |
11-11-2005, 08:45 AM | #9 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Hi CHARTER you are a CHAMPION
It works , there is just a small problem, when I put 2 words in the search field there is just the first that is take in consideration, it is said in the software : "Note that you must encode compound keyword. For example, the phrase microsoft word should be "encoded" any of the possible ways: microsoft+word or even microsoft%20word " Is it possible ? Thank You Noël |
11-11-2005, 09:58 AM | #10 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Note that $result['keyword_ads'] uses $query_string2 and $query_string2 is already urlencoded.
__________________
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. |
11-11-2005, 03:06 PM | #11 |
Orange Mole
Join Date: Aug 2005
Posts: 44
|
Working very well now, I had to make a little config of my adwords software.
THANK'S A LOT ;-) Noel |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change POST to GET | esconsult1 | Mod Requests | 0 | 11-09-2005 04:56 AM |
My First Post | Elvis | The Mole Hole | 11 | 09-28-2004 04:24 AM |
first post.... | rob1 | The Mole Hole | 0 | 09-18-2004 04:00 PM |
¿Why the label <phpdig:complete_path/> change the width of the tables? | zertiko | How-to Forum | 2 | 07-26-2004 07:49 PM |
Title of the results - how to change from <phpdig:page_link/> | bforsyth | How-to Forum | 12 | 07-15-2004 09:53 PM |