![]() |
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 :what: **************** 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 |
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' |
Hi CHARTER,
I changed code, search still work :) but is it normal that now searchs takes more time (x2) ? Thank You Noël |
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 |
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"> 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')."'/>"; |
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 |
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. |
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/> |
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 |
Note that $result['keyword_ads'] uses $query_string2 and $query_string2 is already urlencoded. ;)
|
Working very well now, I had to make a little config of my adwords software.
THANK'S A LOT ;-) Noel |
All times are GMT -8. The time now is 03:53 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.