• Publicity: Public Only All

views-procs.tcl

Tcl library for recoding views

Location:
packages/views/tcl/views-procs.tcl
Created:
2004-05-20
Author:
Jeff Davis
CVS Identification:
$Id: views-procs.tcl,v 1.11 2018/07/26 15:12:22 hectorr Exp $

Procedures in this file

Detailed information

views::get (public)

 views::get [ -object_id object_id ]

Return an array (which you have to set with "array set your_array [views::get -object_id $object_id]") with the elements:

  • views_count
  • unique_views
  • last_viewed

Switches:
-object_id (optional)
ID of the object for which you want to return the views

Partial Call Graph (max 5 caller/called nodes):
%3 test_view_api_test_with_type view_api_test_with_type (test views) views::get views::get test_view_api_test_with_type->views::get test_view_api_test_without_type view_api_test_without_type (test views) test_view_api_test_without_type->views::get db_0or1row db_0or1row (public) views::get->db_0or1row db_foreach db_foreach (public) views::get->db_foreach packages/file-storage/www/folder-chunk.tcl packages/file-storage/ www/folder-chunk.tcl packages/file-storage/www/folder-chunk.tcl->views::get xowiki::Page instproc www-view xowiki::Page instproc www-view (public) xowiki::Page instproc www-view->views::get

Testcases:
view_api_test_without_type, view_api_test_with_type

views::record_view (public)

 views::record_view [ -object_id object_id ] [ -viewer_id viewer_id ] \
    [ -type type ]

Record an object view by viewer_id

Switches:
-object_id (optional)
-viewer_id (optional)
-type (optional)
Returns:
the total view count for the user
Author:
Jeff Davis davis@xarg.net
Created:
2004-01-30

Partial Call Graph (max 5 caller/called nodes):
%3 test_view_api_test_with_type view_api_test_with_type (test views) views::record_view views::record_view test_view_api_test_with_type->views::record_view test_view_api_test_without_type view_api_test_without_type (test views) test_view_api_test_without_type->views::record_view db_exec_plsql db_exec_plsql (public) views::record_view->db_exec_plsql packages/views/lib/record-view.tcl packages/views/ lib/record-view.tcl packages/views/lib/record-view.tcl->views::record_view xowiki::Page instproc www-view xowiki::Page instproc www-view (public) xowiki::Page instproc www-view->views::record_view

Testcases:
view_api_test_without_type, view_api_test_with_type

views::viewed_p (public)

 views::viewed_p [ -object_id object_id ] [ -user_id user_id ] \
    [ -type type ]

Returns whether an object was viewed by specified user.

Switches:
-object_id (optional)
viewed object id
-user_id (optional, defaults to "0")
viewing user id
-type (optional)
filter results by type
Returns:
boolean value

Partial Call Graph (max 5 caller/called nodes):
%3 test_view_api_test_with_type view_api_test_with_type (test views) views::viewed_p views::viewed_p test_view_api_test_with_type->views::viewed_p test_view_api_test_without_type view_api_test_without_type (test views) test_view_api_test_without_type->views::viewed_p ad_conn ad_conn (public) views::viewed_p->ad_conn db_string db_string (public) views::viewed_p->db_string

Testcases:
view_api_test_without_type, view_api_test_with_type
[ show source ]