[Typo3-doc] question about the glossary

Mark Ravitz mark_r at earthlink.net
Wed Dec 8 01:49:10 CET 2004


Having taken a closer at sg_glossary I think it would be an excellent 
place to start.

Here's a list of requirements we have mentioned along with what it would 
take to make sg_glossary meet those requirements.

* word lookup

Already works fine

* system for approving and protecting finished definitions

I see two options here.  The native Typo3 workflow system should work 
nicely.  It could be configured in simple ways such as have an ‘editors’ 
group, or complicated ways such as having ‘editors’ and ‘reviewers’ in 
different technical areas.  A simpler setup would be to use 
sg_glossary’s restriction tools to create ‘editors’ with all rights. 
Another glossary could be created for newly suggested words and 
undefined words.   When a word was defined and approved it could easily 
be moved to the protected glossary.

* system to allow anyone to suggest a word which needs to be defined

Either create an additional sg_glossary for new and undefined words, or 
set up an email form for sending suggestions to the glossary 
administrator.   I kind of like the idea of an email form as it would 
set up a conversation between a user and the glossary admin., who would 
learn more about how users are using the glossary.

* additional fields for: examples, procedures, links, similar terms

This should be a fairly simple matter of making a few changes in the 
tca.php and ext_tables.php .  I expect the Rich Text Editor should be 
enabled for some or all of these fields.

* flexible category functionality (I would like the possibility to have 
an entry appear in more than one category!)

As I recall, there are provisions in the TCA for many to many 
relationships.  This would mean that setting up multiple categories 
would require inserting a categories table and a many to many 
relationship table into ext_tables.php and then making the appropriate 
additions to tca.php .  (Unfortunately this would give us a flat list of 
categories not a hierarchical one.)

* easy linking to other definitions in glossary

I believe this could be accomplished by creating a mode in sg_glossary 
which will display the definition of a word which is passed to it in an 
http get variable, and fooling around with the link processing in the 
Rich Text Editor.  I can't see clearly how to modify the link processing 
at the moment but I'm sure it's possible and will probably be a headache 
(at least for me. In other words <glink>blork</glink> would be 
transformed into 
'http://typo3.org/index.php?id=currentPageId&showDefinition=blork').

* import/export functions (XML?)

I think the simplest way is just to write another display mode into the 
main class (with its own plug-in ‘code’), then insert the plug-in 
content element on a page with restrictions on who will see it.

* different outputs: one letter per page or all letters on one page. 
Maybe even the possibility to show the glossary on four pages (like A-E, 
F-N, O-R, T-X)?

These are more display modes for the main class (see below)

* search functionality

Another display mode for the main class.  Needs to create display based 
on search words in the http get variables.

** writing extra modes for the main class such as different displays 
(including XML), responding to search words,  responding to links from 
other definitions

As far as I can see sg_glossary is well written and well documented with 
one exception.  The main display routine is almost 300 lines long (???) 
and needs to be refactored before new display modes can be added 
efficiently.


Mark Ravitz




More information about the TYPO3-project-documentation mailing list