Index: openacs-4/packages/static-pages/tcl/static-pages-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/tcl/Attic/static-pages-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-pages/tcl/static-pages-sc-create.sql 30 Oct 2001 20:47:57 -0000 1.1 @@ -0,0 +1,25 @@ +-- Implement OpenFTS Search service contracts +-- Dave Bauer dave@thedesignexperience.org +-- 2001-10-27 + +select acs_sc_impl__new( + 'FtsContentProvider', -- impl_contract_name + 'static_page', -- impl_name + 'static_pages' -- impl_owner.name +); + +select acs_sc_impl_alias__new( + 'FtsContentProvider', -- impl_contract_name + 'static_page', -- impl_name + 'datasource', -- impl_operation_name + 'static_page__datasource', -- impl_alias + 'TCL' -- impl_pl +); + +select acs_sc_impl_alias__new( + 'FtsContentProvider', -- impl_contract_name + 'static_page', -- impl_name + 'url', -- impl_operation_name + 'static_page__url', -- impl_alias + 'TCL' -- impl_pl +); Index: openacs-4/packages/static-pages/tcl/static-pages-sc-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/tcl/Attic/static-pages-sc-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-pages/tcl/static-pages-sc-procs-postgresql.xql 30 Oct 2001 20:47:57 -0000 1.1 @@ -0,0 +1,27 @@ + + + + postgresql7.1 + + + + select r.revision_id as object_id, + r.title as title, + '$path_stub' || r.content as content, + 'text/html' as mime, + '' as keywords, + 'file' as storage_type + from cr_revisions r + where revision_id = :object_id + + + + + + select r.content as url + from cr_revisions r + where revision_id = :object_id + + + + Index: openacs-4/packages/static-pages/tcl/static-pages-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/tcl/static-pages-sc-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-pages/tcl/static-pages-sc-procs.tcl 30 Oct 2001 20:47:57 -0000 1.1 @@ -0,0 +1,31 @@ +# static-pages/tcl/static-pages-sc-procs.tcl +# implements OpenFTS Search service contracts +# Dave Bauer dave@thedesignexperience.org +# 2001-10-27 + +# Right now I am leaving the keywords blank +# in the future we should either extract them from the META keyword tag +# or allow assignment of cr_keywords to static_pages + +ad_proc static_page__datasource { + object_id +} { + @author Dave Bauer +} { + + set path_stub [cr_fs_path STATIC_PAGES] + + db_0or1row sp_datasource "" -column_array datasource + + return [array get datasource] +} + +ad_proc static_page__url { + object_id +} { + @author Dave Bauer +} { + + db_1row sp_url "" + return "${url}" +}