View Single Post
Old 12-12-2003, 08:01 AM   #1
JÿGius³
Green Mole
 
Join Date: Oct 2003
Posts: 17
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³



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?

Last edited by JÿGius³; 12-13-2003 at 03:28 AM.
JÿGius³ is offline   Reply With Quote