Terms Infusion (Dictionary/Glossary) v3.03
PHP-Fusion: v7.00
original author: muscapaul
email: muscapaul@gmail.com
web: www.muscapaul.com
date: 21 August 2008
--------------------------------------------------
This program is released as free software under the
Affero GPL license. You can redistribute it and/or
modify it under the terms of this license which you
can read by viewing the included agpl.txt or online
at www.gnu.org/licenses/agpl.html. Removal of this
copyright header is strictly prohibited without
written permission from the original author(s).
--------------------------------------------------

FEATURES
--------
* This infusion provides the possibility to build a glossary or dictionary with your own chosen terms.
* The infusion mode (Glossary, Dictionary and Default [no choice between the former two made]) can be changed in the infusions's General Settings.
* The terms can be categorized in categories of your own definition.
* Translations/descriptions can be formatted using BBcode (with the exception of [img] [/img]).
* Members can submit terms that will be assigned a status 'Submitted'. The submitted terms can be placed in the approriate category or, if this one is not present, in the category 'Submitted' (which is created upon infusion). Superadmin and Administrators (when assigned the appropriate rights under Admin Panel -> User Admin -> Administrators) can publish submitted terms by changing the term status and transfering it to the appropriate category. A list of terms that were submitted and not yet approved can be seen by choosing the 'Submitted terms' in the drop-down menu 'Show Synonyms'.
* Visibility access can be set for each separate category (enabling 'premium access' to categories for members, if so desired).
* Individual terms can always be commented on, allowing suggestions for alternative translations/explanations.
* Two different display options for the whole list, option to be set in General Settings.
* Terms can be designated as synonyms with fixed format with a link to the correct word. If a certain term is synonymous with two different terms (homonymy), then a synonymy category with free format can be assigned, allowing redirection to the different terms in the way you choose.
* Ratings system for individual terms optional (General Settings, by default set to off).
* Maximum number of displayed items on a page can be changed by the visitor (default: 20; other options: 5, 10, and 50).
* Visitor can choose to view lists with or without the synonyms.
* Upon infusion a Dictionary/Glossary link is added to the Navigation panel.
* A panel can be added that shows the number of submitted Terms including a link to a page with the submitted terms.
* Separate instructions are provided to allow the use of [glos] tags that will lead to the page with the term enclosed between the tags (if created). Primarily aimed at the Glossary but can be used in the Dictionary, too.

CHANGED FILES
-------------
None, unless [glos] tags will be used. See separate instructions.

INSTALL
-------

READ BEFORE INFUSION
In the terms folder in the package you will find three infusion files: infusion.php, Glossary_infusion.php and Dictionary_infusion.php. The first will infuse this infusion without a choice being made whether the infusion will be used as Dictionary or as Glossary. The selected locale files are drafted similarly, giving double descriptions (like 'Terms/Words'). The database information stored (Site Link, infusion information) is similarly drafted.
You can change between the different uses at any time by changing the setting in the General Settings. However, the title information stored in the database is not updated accordingly. So, it is recommended that you decide on the use of the infusion before you infuse it. If you want to infuse it as Glossary or Dictionary, rename infusion.php to Default_infusion.php and rename either Glossary_infusion.php or Dictionary_infusion.php to infusion.php.
If you decide you want to test the infusion first, you can still add categories and terms/words to the database. At any time when you to change the type of the infusion (from default to Glossary, or from Glossary to Dictionary) and make sure that titles in the database are reflecting this, you make a backup of the [fusion]_term_cats and [fusion]_terms tables. Next you defuse the infusion and re-infuse it with the correct infusion file and restore the backup with the [fusion]_term_cats and [fusion]_terms tables.

1. Copy the contents of the files folder to the corresponding folders on your server after you have decided on the infusion type (see above).

2. Go via Admin Panel -> System Admin to Infusions and install the Terms Infusion.

(If you have decided to infuse the infusion as Glossary, continue at step 4. If you ever decide to change from Glossary to the Dictionary, you need to go through step 3 at that time.)

3. Go via Admin Panel -> Infusions to Terms and click the Terms General Settings button. Default language to translate from is the Site Language. Change this if necessary. No language is set to translate to. This should be set now. If so desired, change the setting to allow rating of terms.

4. If you do not want to install the Terms Submissions Panel continue at step 5. If you want to have the panel installed, go via Admin Panel -> System Admin to Panels and create a new side panel. From the Panel Filename drop-down menu choose 'term_submissions_panel', give it an appropriate panel name (e.g., Term Submissions) and set the appropriate access. Save the panel, go back to Panel Management and enable the panel. Re-order as desired.

5. If this is a fresh installation of the infusion you should now remove ../infusions/terms/v7-7upgrade.php.


UPGRADING FROM PHP-FUSION v6 TO PHP-FUSION v7
---------------------------------------------
Upgrading starts by uploading the infusion files, overwriting the existing ones.
PHP-Fusion v7 utilises a somewhat different system for administering admin rights for Infusions. In the v6 it used to be a single setting that gave rights to all Infusions. As it was deemed undesireable for the Terms Infusion to allow all users access to the infusions when they only needed access to the Terms Infusion, access was determined by setting access to a usergroup and adding users to that group. Under the new version every infusion will be given its own code for admin rights. As a result it is necessary to run an upgrade script (../infusions/terms/v6-7upgrade.php) that will at least assign the rights to the Primary Superadministrator. The file has checkboxes to select whether all Superadmins should be given access rights to the Terms Infusion, whether all Admins that were in the previously selected usergroup should be given those rights, and/or whether all members in the previously selected usergroup should be made Admins with those access rights. It should be noted that these users than also gaine the access rights that are by default assigned to Administators. The same upgrade script then removes one field from the settings table because it will not be used anymore and it will add two new ones.
This script only needs to be run if a site is upgraded from PHP-Fusion v6 to v7. Even though a check has been built in to prevent the script from being run after the upgrade has already been performed, it is recommended to delete the script from your server after upgrading.


CHANGELOG
---------
v3.03 (muscapaul)
* Corrections to all infusion.php files: conditional to set infusion version in settings corrected; adding a missing ' in the row inserting data in the settings table and rmoving a redundant field name in the same line (error reported by ytterx).
* Locale file ../2locale/English.php cleaned of definitions that were commented out.

v3.02 (muscapaul)
* Redirect code for Terms Submissions Panel when call from outside the website updated to conform with PHP-Fusion v7 standards.
* Modified core files updated to the final version of PHP-Fusion v7.00.
* Added missing code for parsing glos tags when previewing Articles, Custom Pages and News.
* Some small code optimizations.
* Small update to the v6-7 upgrade script to set administrator rights correctly in the admin table.

v3.01 (muscapaul)
* Added the modified ../maincore.php for parsing glos tags which was forgotten in the previous version. (Even if it had not been forgotten it would have been necessary to update it because of an updated version in the pre-release core of PHP-Fusion v7. ;))

v3.00 (muscapaul)
* Completely updated to run under PHP-Fusion v7.
* Change to the locale system, utilizing single locale file for locale terms common to the different types.
* Administrative rights assigned through Admin Panel -> User Admin -> Administrators, rather than through Terms -> General Settings.
* The two display versions that each were previously reserved for one of the infusion types can now be selected in the General Settings to be used in all types.
* Fixd some bugs in the correct pagination when different selections were made for categories, items per page and whether synonyms should be shown or not.
* Term Submissions panel will only be displayed when there are terms with the status 'Submitted'.

v2.00 (muscapaul)
* Added Glossary feature: Moving the mouse over the question mark image signifying a Glossary Trem will show a popup layer with the Term Title, Explanation and (if given) Image.
* Added Glossary feature: Clicking a marked Term that is not yet included in the Glossary will lead to an error page. (In the popup layer a message will appear with a similar message).
* Added Glossary feature: Clicking a marked Term that has two different explanations in the Glossary will lead to a page with the  the possible options. (In the popup layer the same is noticed and the visitor is requested to click the link to see the options.)
* Previously modiefied core files updated to add above mentioned features. In addition several other core files were modified (see separate instructions).

v1.01 (muscapaul)
* Modified core file ../maincore.php updated for PHP-Fusion v6.01.12.

v1.00
* Modified core files (maincore.php and for forum) updated for PHP-Fusion v6.01.10.
* Removed a superfluous html tag from terms_settings.php.

v1.00 (rc1_19012007)
* Removed some layout niggles for the Terms page and the Admin page.

v1.00 (beta_14112006)
* Separate infusion files updated so that they should work under all MySQL versions.
* Two table format errors on admin pages corrected.
* Missing admin access to Term Categories fixed for Term admins that are not Site admins.
* Bug fixed so that submitted (and thus unapproved) terms are no more visible to all members but only to Terms admins.

v1.00 (beta_06102006)
* Modified maincore.php updated for PHP-Fusion v6.01.6.
* Some code cleaning to comply with W3C standards (hopefully finished).

v1.00 (beta_26092006)
* JavaScript code for button 'Back to previous page' when viewing a single terms made compatible with all major browsers.
* Some code cleaning to comply with W3C standards (not yet finished).

v1.00 (beta_25092006)
* Modified maincore.php updated for PHP-Fusion v6.01.5.
* Bug in page navigation when sorting by starting letter/number fixed.

v1.00 (beta_25072006)
* Link in term_submissions_panel.php adjusted so that the full list with submitted terms is shown, rather than just the list of terms in the category 'Submitted'.

v1.00
* None (first release)

TO DO
-----
* Introduce some kind of image management.

CONSIDERED
----------
* Adding a search function?