sponsored links, logged clicks...
Hi people :)
I've implemented some features. All the code is in phpdig-1.6.5.zip For each modification I've provided the line number. 1) search.php - Added a $template_name variable in order to avoid to put the entire template's path in form/link. 2) libs/search_function.php - 18 Added a $template_name - 352 Added $table_results['page_link'] onmousedown=\"return clk(".$spider_id.",this)\" This javascript function (you can see it in template/phpdig.html) call the php script (url.php) responsible to log clicks as well. - 383 Added &template_name=".trim($template_name). to $url_bar - 453 Replaced $template with $template_name - 458 Added sponsored links. These links are generated from banners(). Sponsored links can be turned off with the SPONSORED_LINK constant in includes/config.php - 470 I've moved the page at the end of function in a separate file called rescue_page.php; it'a a wasting time to parse it every time. - 475 If you want sponsored links you have to implement banners(). 3) libs/function_phpdig_form.php - 36 The form method can be obtained from a FORM_METHOD constant? - 37 Changed template_demo in template_name - 52 Changed some form element - 60 After a search, for each result there is a link to limit the search to a specific site. I've added a form element for this function. 4) locales/it-language.php - Added some little translation. 5) includes/config.php - 17 Added the possibility to choose a template using url 6) sql/phpdig_log_click.sql - Table to log clicks 7) template/phpdig.html - At the beginning I've added the javascript code called when a user click on a results link. 8) It would be nice if the logged clicks could be linked with the most searched terms. You can compare my code with the official one with ease using a diff tool. Let me know if some feature is so nice to put it in the next release. Best regards. JÿGius³ :angry: ps. I've just replaced the template. I've deleted my previous attachment; when I edit the post I can't add an attachment? Why? |
1 Attachment(s)
The replaced code.
|
Hi. Thank you for the mods. Do you have a site setup with these mods for public view?
I'm not sure about the attachment problem. Maybe once deleted it won't accept a new attachment in an edited post? |
Quote:
Unfortunately we haven't yet a working demo online. Most probably our Phpdig powered website will be online after Xmas holidays. We published our mods because is long time we are working on it and we already had to import twice our mods in the new Phpdig releases. For that reason we decided to send the code now, instead of waiting to finish all the things we are working on. We hope you will import our mods in the next release of Phpdig so we can continue to develop new features for it. Long time ago I suggested using a CVS server to mantain the code synchronized. Without CVS you have to manually import changes from many developers. I know it's a little tricky for you. :( Anyway, if you have questions about our changes, pleas ask :) |
what have does I to make thereby the sponsoren links functioned and which must I edit exactly and which syntax?
sorry for my bad english :rolleyes: |
Hi. In search_function.php from the above attached file, it looks like you'd need to fill in the below function.
PHP Code:
|
Quote:
you need to fill the banners function with specific queries for your ads server. The steps are: 1) select text banners using $query_string (search keywords) 2) put the result in a string variable 3) output the html code in the template |
i dont unterstand :(
can you write an example |
Hi All!
PHP Code:
Best regards. Gius |
i dont unterstand
|
Hi, let me help you with some code (very simplified):
PHP Code:
That function is called during a search and the html code is passed to the template: PHP Code:
<!-- sponsored link --> <phpdig:adbanner/> that's all :) |
So basicly this is the example content for adbanners.php?
Quote:
|
Quote:
The most simplified version of banner() contains a single query to the ads table ("text ads" if you want Google-style Sponsored links) and returns the formatted code of sponsored links. |
All times are GMT -8. The time now is 11:03 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.