Utility forms and functions
This page describes how to access the following forms and functions:
vsget - import file from anywhere on internet
vsdiscussionswitch - switch allow discussions property on or off
vschangecreator - change creator of web document
vslinkreplace - replace many instances of same link
vscreate_folder_property - set property for all subfolders
vsanalyze_len and vs_analyse_ref - returns pages with size and no of links outside preset range.
vsanalyze_depth and vsanalyze_tree shows all folders, ordered by tree level, and the # of items per folder.
vscatinfo - Get Catalog info for current Plone object without going to ZMI.
vsprivate/vspublic - makes private/public a list of URLs.
All these forms and functions are called by adding the name to the URL: for example to call vsget in the folder mysite.com/myfolder, type in mysite.com/myfolder/vsget
vsget
vsget allows an authenticated user to import a file from anywhere on the Internet into the current Plone folder. Calling vsget via the URL above will display the File Import Form.
You must first have a path specified in file_temp_path in your vsCore preferences (see above); the requested file will be temporarily downloaded to the specified path, and will be deleted after the import has been completed.
This was called vsGet in vsCore 1.1; all vsCore scripts have since been standardised to lower case.
vsdiscussionswitch
vsdiscussionswitch allows the user to switch the “allow discussions” property on or off for a folder and all its subfolders. (Manager Role only) It is called via the URL as in mysite.com/myfolder/vsdiscussionswitch. This will display the Allow Discussion Switch Form.
vschangecreator
vschangecreator allows the user to change the creator property for all the documents of a folder and all its subfolders. (Manager Role only)
vschangecreator is called via the URL as in mysite.com/myfolder/vschangecreator; this will display the Change Creator Form.
vslinkreplace
vslinkreplace allows the user to replace links (actually, any kind of strings). Opening the URL mysite.com/myfolder/vslinkreplace will display the Link Replace Form.
vscreate_folder_property
vscreate_folder_property allows the user to create and set a property for all the subfolders of the current folder. (Manager Role only) It is called via the URL as in mysite.com/myfolder/vscreate_folder_property; this will display the Property Create Form.
vsanalyze_len and vsanalyze_ref
SEO considerations require a page to be not too long and not too short, and also to not have too many or too few links.
vsanalyse_len and vsanalyze_ref allow the user to identify which pages fall outside the constraints set in the vsCore configlet in Preferences.
vsanalyze_len is called via the URL (as in mysite.com/myfolder/vsanalyze_len) and shows all documents with size outside the min_len and max_len range.
vsanalyze_ref is called via the URL (as in mysite.com/myfolder/vsanalyze_ref) and shows all documents with the number of links outside of the min_ref/max_ref range
The names of these scripts have been standardised to lower case since v1.1.
vsanalyze_depth
vsanalyze_depth shows the # of folders per level of the folder tree. It is called via the URL as in http://www.mysite.com/myfolder/vsanalyze_depth.
vsanalyze_tree
vsanalyze_tree shows all folders, ordered by tree level, and the # of items per folder. It is called via the URL as in http://www.mysite.com/myfolder/vsanalyze_tree.
vslink and vsunlink
Calling the URL /myfolder/mydoc/vslink brings up the link insertion form which allows to transform some or all occurrences of a keyword (or keyphrase) in document mydoc into a link to a specified URL. One can also use the URL /myfolder/vslink, to do the same to all documents of /myfolder and to all documents of all its subfolders.
Calling the URL /somefolder/mydoc/vsunlink revokes all links created by vslink (see above) in document mydoc. As with vslink, one can also use the URL /myfolder/vslink, to do the same to all documents of /myfolder and to all documents of all its subfolders.
The names of these scripts have been standardised to lower case since v1.1
vsdocstats
vsdocstats shows an activity stats page for the current folder. (Manager Role only) It is called via the URL as in mysite.com/myfolder/vsdocstats.
vspublic and vsprivate
Both are called via the URL as in mysite.com/myfolder/vspublic or vsprivate. This takes you to a form where you can enter a list of absolute URL's to be published. It is preferable to use the ZMI address rather than the site address.
Note:
- the 'publish' transition must be open to the documents being published, and the 'hide' (make private) transition must be open to any documents being privatised.
- when publishing huge numbers of documents using these scripts, there is always a possibility that a small few have had their workflow damaged somehow so that even privatising/publishing manually leads to site errors. Running the script in this case will also generate a site error and abort without changing the state of any documents.
vscatinfo
Gets the index values and metadata from the portal_catalog for the Plone object you're looking at right now. It is called via the URL as in mysite.com/myfolder/vscatinfo
This code was written by Lupa Zurven and is available in the Zope Cookbook.
