Index: openacs-4/packages/clickthrough/clickthrough.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/clickthrough.info,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/clickthrough.info 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/clickthrough.info 3 May 2001 20:38:29 -0000 1.2 @@ -28,8 +28,13 @@ + + + + + Index: openacs-4/packages/clickthrough/sql/postgresql/clickthrough-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/sql/postgresql/clickthrough-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/sql/postgresql/clickthrough-create.sql 3 May 2001 20:38:16 -0000 1.1 @@ -0,0 +1,19 @@ +-- +-- packages/clickthrough/sql/clickthorugh-create.sql +-- +-- @author Philip Greenspun (philg@mit.edu) +-- @creation-date 1997 +-- @cvs-id $Id: clickthrough-create.sql,v 1.1 2001/05/03 20:38:16 domingoa Exp $ +-- + + +create table clickthrough_log ( + -- URLs can't be too long or they won't be indexable in Oracle + local_url varchar(400) not null, -- local URL does not include starting / + foreign_url varchar(400) not null, -- full URL on the foreign server + entry_date date, -- clickthrough counts are daily counts + click_count integer default 0, + package_id constraint ct_log_package_id_fk + references apm_packages(package_id), + constraint ct_log_pk primary key (local_url, foreign_url, entry_date) +); Index: openacs-4/packages/clickthrough/sql/postgresql/clickthrough-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/sql/postgresql/clickthrough-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/sql/postgresql/clickthrough-drop.sql 3 May 2001 20:38:16 -0000 1.1 @@ -0,0 +1,12 @@ +-- +-- packages/acs-messaging/sql/acs-messaging-create.sql +-- +-- @author philg@mit.edu +-- @creation-data 2000-08-27 +-- @cvs-id $Id: clickthrough-drop.sql,v 1.1 2001/05/03 20:38:16 domingoa Exp $ +-- + + +drop table clickthrough_log; + + Index: openacs-4/packages/clickthrough/tcl/clickthrough-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-procs-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/tcl/clickthrough-procs-oracle.xql 3 May 2001 20:38:52 -0000 1.1 @@ -0,0 +1,20 @@ + + + + oracle8.1.6 + + + + + update clickthrough_log + set click_count = click_count + :cached_click_count + where local_url = :cached_local_url + and foreign_url = :cached_foreign_url + and package_id = :cached_package_id + and trunc(entry_date) = trunc(sysdate) + + + + + + Index: openacs-4/packages/clickthrough/tcl/clickthrough-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/tcl/clickthrough-procs-postgresql.xql 3 May 2001 20:38:52 -0000 1.1 @@ -0,0 +1,20 @@ + + + + postgresql7.1 + + + + + update clickthrough_log + set click_count = click_count + :cached_click_count + where local_url = :cached_local_url + and foreign_url = :cached_foreign_url + and package_id = :cached_package_id + and trunc(entry_date) = trunc(current_time) + + + + + + Index: openacs-4/packages/clickthrough/tcl/clickthrough-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/tcl/clickthrough-procs.xql 3 May 2001 20:38:52 -0000 1.1 @@ -0,0 +1,38 @@ + + + + + + select site_node.url(sn2.node_id) + from site_nodes sn1, site_nodes sn2, apm_packages p + where sn1.object_id = :package_id + and sn2.parent_id = sn1.node_id + and sn2.object_id = p.package_id + and p.package_key = 'clickthrough' + + + + + + + + select sn2.object_id as parent_package_id + from site_nodes sn1, site_nodes sn2 + where sn1.object_id = :clickthrough_package_id + and sn1.parent_id = sn2.node_id + + + + + + + + select sn2.object_id as parent_package_id + from site_nodes sn1, site_nodes sn2 + where sn1.object_id = :clickthrough_package_id + and sn1.parent_id = sn2.node_id + + + + +