Squishdot Classes, Methods and Variables : What's Available 
Zope Doc Project 
Butch Landingin 
butchland@yahoo.com 
1 
really-dry-stuff 
This article covers the classes, methods, and variables that Squishdot defines. While  
 every effort will be made to make this consistent with the actual sourcecode, if in 
 doubt, UTSL (use the source, luke!). 
%% 
There are actually five classes defined in the Squishdot product:  
<UL> 
<LI> The squishdot site -- the main folder which contains all the data 
<LI> The posting -- a generic class for both main article and comment 
<LI> The article -- a class derived from posting representing a main article 
<LI> The comment -- a class derived from posting representing, well, a comment 
<LI> A squishfile -- a class (copied almost verbatim from confera) representing a file attachment. 
</UL> 
The detailed descriptions of each class method are documented in the source code 
 and will not be discussed in great detail. 
<H3> SquishSite class</H3> 
<P> 
This is the main class of the product. It acts like a tree structure in two ways -- 1) as a regular Zope folder in which you can 
 attach regular zope objects (e.g. dtml methods, folders, tiny tables, etc) and 2) as the root from which all postings  
 (both articles and comments) descend from. In actuality, all postings are stored in a BTree persistent container variable  
 named <I>data</I>. This object is shared by reference to all the descendants. The list of children are stored in the <I>ids</I>  
 variable. 
<P> 
It also maintains a list of subject topics and topic image urls. In addition, it holds the two sets of indexes that are  
 used during searches. One set of indexes contains all indexes that applicable for both articles and comments, while  
 the other set of indexes contains only those indexes which apply to articles. 
<P> 
The more significant methods and services that the main class provides are : 
<UL> 
<LI> the addPosting method -- adds an article  
<LI> item_list - returns the latest articles 
<LI> other_list - returns articles exceeding max_items count but still within current day 
<LI> date_list(X) - returns the articles posted from X previous days ago 
<LI> subject_image - returns the url of the image associated with a particular topic 
<LI> search - returns a list of postings that fulfills some search criteria 
</UL> 
<H3> Posting class</H3> 
<P> 
The posting class is the ancestor class of the Article and the Comment. It represents 
 the common functionality of these two classes. Just like SquishdotSite class, it holds 
 the list of children it has in the <I>ids</I> variable. 
<P> 
Among the more significant methods that the posting provides are : 
<UL> 
<LI> the addPosting method - adds a comment (i.e. a reply) 
<LI> desc_items - returns list of descendants 
<LI> manage_edit - edits the posting 
<LI> index_html - displays the read more page for the posting 
</UL> 
<H3> Article class</H3> 
<P>  
The difference between the article and the posting is that 
 it has a summary text and dept field. Because of this, it  
 has a slightly different method of being validated and 
 edited. 
<H3> Comment class</H3> 
<P> 
The comment (i.e. reply) inherits mostly from the posting class 
 and carries no extended functionality. 
<H3> SquishFile</H3> 
<P> 
The squishfile encapsulates a file attachment. It does not provide 
 much functionality other than its name, size, file type and contents. 
%% 
 
 
