Home
The Toolkit for Online Communities
15936 Community Members, 0 members online, 2263 visitors today
Log In Register

static-pages-procs.tcl

OpenACS Home : ACS API Browser : Static Pages 5.2.0d4 : static-pages-procs.tcl
Publicity:
[Public Only | All]

static-pages-procs.tcl

Utilities for static pages.
Location:
packages/static-pages/tcl/static-pages-procs.tcl
Created:
2001-01-22
Author:
Brandoch Calef <bcalef@arsdigita.com>
CVS Identification:
static-pages-procs.tcl,v 1.11.2.13 2003/02/06 13:05:51 jeffd Exp

Procedures in this file

Detailed information

sp_change_matching_display (public)

sp_change_matching_display root_folder_id contained_string \
    show_full_comments_p
Set all files below root_folder_id whose filenames contain contained_string to have comments either shown (full contents of comments are displayed on the page) or summarized (title line of comments are listed).

Parameters:
root_folder_id
contained_string
show_full_comments_p
Author:
Brandoch Calef <bcalef@arsdigita.com>
Created:
2001-02-23
 

sp_change_matching_permissions (public)

sp_change_matching_permissions root_folder_id contained_string \
    grant_or_revoke
Grant or revoke permissions on all files below root_folder_id whose filenames contain contained_string.

Parameters:
root_folder_id
contained_string
grant_or_revoke
Author:
Brandoch Calef <bcalef@arsdigita.com>
Created:
2001-02-23
 

sp_flush_page (public)

sp_flush_page page_id
Flushes the cache entry for a static page. This should be done whenever the page title or show_comment_p setting change.

Parameters:
page_id
Author:
Brandoch Calef <bcalef@arsdigita.com>
Created:
2001-02-23
 

sp_package_key_is (public)

sp_package_key_is
Simply returns the package key string for this package.

Author:
Andrew Piskorski <atp@piskorski.com>
Created:
2001/08/26
 

sp_root_folder_id (public)

sp_root_folder_id package_id
Returns the id of the root folder associated with package_id, creating one if necessary.

Parameters:
package_id
Author:
Brandoch Calef <bcalef@arsdigita.com>
Created:
2001-02-23
 

sp_serve_html_page (public)

sp_serve_html_page
Registered proc to serve up static pages.

Author:
Brandoch Calef <bcalef@arsdigita.com>
Created:
2001-01-23
 

sp_sync_cr_with_filesystem (public)

sp_sync_cr_with_filesystem [ -file_add_proc file_add_proc ] \
    [ -file_change_proc file_change_proc ] \
    [ -file_unchanged_proc file_unchanged_proc ] \
    [ -file_read_error_proc file_read_error_proc ] \
    [ -folder_add_proc folder_add_proc ] \
    [ -folder_unchanged_proc folder_unchanged_proc ] \
    [ -package_id package_id ] fs_root root_folder_id \
    [ static_page_regexp ]
Synchronize the content repository with the file system. This creates entries in sp_folders and static_pages, so the static_page functions must be used to delete entries.

Switches:
-file_add_proc (optional)
The name of a Tcl proc to be called for each file added. The full file path and the page_id will be passed to it.
-file_change_proc (optional)
The name of a Tcl proc to be called for each file changed in the database.
-file_unchanged_proc (optional)
The name of a Tcl proc to be called for each file unchanged in the database.
-file_read_error_proc (optional)
-folder_add_proc (optional)
The name of a Tcl proc to be called for each folder added. The full file path and the folder_id will be passed to it.
-folder_unchanged_proc (optional)
The name of a Tcl proc to be called for each folder unchanged in the database.
-package_id (optional)
Optionally, the package id of the Static Pages instance. If not specified, determined from ad_conn.
Parameters:
fs_root - The starting path in the filesystem. Files below this point will be scanned.
root_folder_id - The id of the root folder in the static-pages system (and in the content repository) obtained from static_page.get_root_folder.
static_page_regexp (optional) - A regexp to identify static pages.
Author:
Andrew Piskorski <atp@piskorski.com>
Created:
2001/08/27
 

sp_sync_cr_with_filesystem_scheduled (public)

sp_sync_cr_with_filesystem_scheduled
Sync the filesystem and the content repository in a scheduled procedure, rather than manually. Calls sp_sync_cr_with_filesystem just like the www/admin/fs-scan-progress.tcl page does.

Note that if you have comments turned on, be very carefull running this, as the current implementation of sp_sync_cr_with_filesystem will destroy any user contributed comments on the file if you temporarily delete the file, then run that procedure.

Author:
Andrew Piskorski <atp@piskorski.com>
Created:
2002/09/12