Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Products.PloneGlossary
Advanced tools
Highlight Plone content terms, mouseover shows the term definition as tooltip.
By Ingeniweb_.
.. contents:: Table of contents
.. image:: https://travis-ci.org/collective/Products.PloneGlossary.png
PloneGlossary is a Plone content type that allows you to manage your own glossaries, propose definitions and search in one or more glossaries. Any word defined is instantly highlighted in the content of your site.
After adding a glossary, you can add your definitions to it. Definitions are a simple content type. Enter the word you want to define as the title, and the definition of the word in the text body. You can also specify variants of the word. For example if you define the word yoghurt, you may also want to allow the variants yogurt or yoghourt to be valid. Definitions will be highlighted (like an acronym) when they appear elsewhere in your site. (Also see the ploneglossary configlet.)
Once you have a large number of definitions in your glossary, you can browse the glossary by the means of an alphabetic index, or perform a search in the glossary. Each glossary has an integrated search engine, which is simply a ZCatalog.
Plone 3.x or 4.x
Of course use zc.buildout. Just add this line to your buildout.cfg::
[instance] recipe = plone.recipe.zope2instance ... eggs = ... Products.PloneGlossary
We assume that your instance has been built with the plone3_buildout
template for the paste script (otherwise you should change
instructions accordingly)::
$ cd $BUILDOUT_HOME/src $ git clone git@github.com:collective/Products.PloneGlossary.git $ cd Products.PloneGlossary $ python setup.py develop
Then edit your buildout.cfg
::
[buildout] ... develop = ... src/Products.PloneGlossary
And change the [instance]
section as described in Installing the latest release
_ above.
If you use an old version of Plone (< 3.2), you'll encounter this issue <http://dev.plone.org/plone/ticket/7522>
_: using non ASCII characters in
your glossary requires to change the default encoding of your Zope.
To do this, add a sitecustomize.py
file to your $SOFTWARE_HOME with
these two lines::
import sys sys.setdefaultencoding('utf-8')
Then replace "utf-8" above with the value of the "default_charset" property in your "portal_properties/site_properties".
Visit in ZMI the portal_setup
object of your site, click Upgrades
and select Products.PloneGlossary:default
.
If you're upgrading from PloneGlossary 1.2 or older you may force upgrades using "Show old upgrades".
Use the portlets manager to display a portlet of all definitions found in the displayed content.
PloneGlossary assumes that your site charset is UTF-8.
PloneGlossary views have a batch size of 30 terms. You might prefer another size.
If you need another batch size, you might append this to your zope.conf
::
Highlight content: if this option is chosen, all defined words are highlighted in the chosen content types (see further).
Description length : Choose the maximum length of the given definition in the highlights.
Description ellipsis: Choose an ellipsis. It is used in the highlight when the defined term exceeds the description length.
Not highlighted tags: Define the html tags in which definitions should not be highlighted. Default: h1, a, input, textarea
Allowed portal types: Select the portal types for which defined words are highlighted.
Use glossaries globally for all content?: When checked, all glossaries will be used to highlight terms globally for all of the site's content. By unchecking this option, only the first glossary found while traversing upwards from the content is used.
General glossaries: Select glossaries used to check related terms of content.
A tool is installed by the installer. It provides a few configuration options (managed in the configlet) so that you can customize and manage your glossaries.
Since version 1.5.0 there is support for switching the highlighting on
of off per object. The default behaviour is still that the tool
simply checks if the current object is in the allowed portal types
that are set in the configuration. Version 1.5.0 introduces an
interface IOptionalHighLight
. The tool tries to adapt the current
object to that interface. If this succeeds, the decision to highlight
terms is given to the do_highlight
method of the found adapter.
The canonical implementation is in an optional package
zest.ploneglossaryhighlight
_; when installed this gives an extra
field in the settings tab of content items where you can switch
highlighting on or off. See that package for more info.
.. _zest.ploneglossaryhighlight
: http://pypi.python.org/pypi/zest.ploneglossaryhighlight
Please read ./tests/README.txt
.
See ./doc
.
Stay in tune with the freshest (maybe unstable) versions:
https://github.com/collective/Products.PloneGlossary
Please read all the documentation that comes with this product before asking for support, unless you might get a RTFM reply ;)
Localisation issues - other than french - should be reported to the relevant translators (see Credits_ below).
Report bugs using the tracker (the Tracker
link from
http://plone.org/products/ploneglossary). Please provide in your
bug report:
Note that we do not support bug reports on git master or branches checkouts.
Mail to Ingeniweb support <mailto:support@ingeniweb.com>
_ in English or
French to ask for specific support.
Donations are welcome for new features requests <http://sourceforge.net/project/project_donations.php?group_id=74634>
_
Cyrille Lebeaupin <mailto:cyrille.lebeaupin@ingeniweb.com>
_Bertrand Mathieu <mailto:bertrand.mathieu@ingeniweb.com>
_Maik Roeder <mailto:maik.roeder@ingeniweb.com>
_Gilles Lenfant <mailto:gilles.lenfant@ingeniweb.com>
_Maurits van Rees <mailto:m.van.rees@zestsoftware.nl>
_Tom Gross <mailto:itconsense@gmail.com>
_Lukas Zdych <mailto:lukas.zdych@corenet.cz>
_Anton Stonor <mailto:anton@headnet.dk>
_Piotr Furman <mailto:piotr.furman@webservice.pl>
_Hector Velarde <mailto:hvelarde@jornada.com.mx>
_Ralph Jacobs <mailto:ralph@fourdigits.nl>
, Maurits van Rees <mailto:m.van.rees@zestsoftware.nl>
Giacomo Spettoli <mailto:giacomo.spettoli@gmail.com>
_Copyright (c) 2005 - 2007 Ingeniweb_ SAS
This software is subject to the provisions of the GNU General Public License, Version 2.0 (GPL). A copy of the GPL should accompany this distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE
See the LICENSE
file that comes with this product.
.. _Ingeniweb: http://www.ingeniweb.com/
Remove dangerous escaped characters from definitions. <script>
and other tags were already filtered out. Now we also filter out
code like <script>
. Text like 1 < 2
is still fine.
I have not seen this go wrong, but it seems better to fix.
Added upgrade step to update cataloged descriptions if needed.
[maurits]
Fixed bad definition display for non-ascii characters. Fixes issue https://github.com/collective/Products.PloneGlossary/issues/7 [maurits]
Do a better split on words in the document text. Things like
T<sub>one</sub>
were wrongly viewed as one word. Other html
tags could also remain part of the word, making it less likely that
a match was found. [maurits]
Set the Content-Type
header of ploneglossary_definitions.js
to Javascript when loaded standalone instead of inline. This eases
debugging: with the standard html header Diazo would needlessly try
to parse it and fail. Also this showed up ugly in your browser.
[maurits]
Title \t
when you have a space and a tab in it,
so we would not find anything.
[maurits]Add Products.PloneTestCase
to the test
extra requirements.
[maurits]
Add an option in the Glossary control panel to highlight only the first word found on a page. This is useful in for example scientific documents where the same terms are used a lot, which can cause excessive highlighting. Disabled by default to keep default behaviour (highlight all terms found). [fredvd]
If terms are not highlighted in the content area of a portal_type, do not show the definitions in a portlet either. [maurits]
Use the SearchableText indexer to see which text to highlight. Fall
back to SearchableText. This supports dexterity, if an indexer is
defined explicitly for a content type (like is done in
plone.app.contenttypes
) or dynamically with a behavior
(collective.dexteritytextindexer
). Note that it is better to
not activate glossary highlighting for files, because then every
time you view a file, the indexer will likely call an external
program to convert the file to plain text.
[maurits]
Do not require a ploneglossary.txt
in our ploneglossarytool
import step for importing settings. The glossary.xml
file
already functions as a flag file. The text file is only needed as
flag file for our ploneglossary-reg
import step.
Fixes http://plone.org/products/ploneglossary/issues/8
[maurits]
Change the condition for ploneglossary.css
so it does not give
an error when accessing the Dexterity control panel, which does not
allow access to meta_type
. Note that if you have customized
PloneGlossary and kept the same meta_type but have given it a
different portal_type, you will need to change the condition
accordingly. Includes upgrade step.
Fixes https://github.com/collective/Products.PloneGlossary/issues/3
[maurits
Removed use of linkOpaque.gif. It failed in Plone 4.3 and was not actually needed. Fixes https://github.com/collective/Products.PloneGlossary/issues/1 [maurits]
Removed relatedItems slot for Plone 4.3 compatibility [tom_gross]
Add Plone 4.3 compatibility by avoiding hard dependency on zope.app packages. [maurits]
Moved to https://github.com/collective/Products.PloneGlossary [maurits]
do catalog dispatching right [tom_gross]
added uninstall profile [micecchi]
Added support for switching highlighting on or off per object. You need to write an adapter if you want to use this. See for example https://github.com/zestsoftware/zest.ploneglossaryhighlight [maurits]
PeP8, Pyflakes and i18n cleanup. [maurits]
fixed: Removing special chars from descriptions [ristow]
fix imports for Plone 4.1 [zworkb]
fixed problem in PloneGlossaryTool with uid_catalog and simplified code. [jensens]
consider Contributor
role
[jensens]
Fixed the tool ZMI access (properties tab) [glenfant]
Fixed conflicts with Kupu stuffs http://plone.org/products/ploneglossary/issues/5 [glenfant]
GS schema version 2 and upgrade steps [glenfant]
Return empty string when reading search_letter from request as default to avoid .lower() crash in GlossaryMainPage.init. [rnix]
IE8 compatibility fix - thanks to Francesco Manna [glenfant]
Condition to add CSS class "selected" to the Abcedaire didn't match. http://plone.org/products/ploneglossary/issues/2 Thanks to Martin Stadler [glenfant]
Call portal_catalog.n_indexObject instead of BaseObject.n_indexObject. Latter one causes collective.indexing crash due to recursion error. [rnix]
Fix upgrade step version. [kdeldycke] 2009-04-29
Refactor to avoid errors in tests tearDown [tdesvenain]
Fix portlet's HTML tags to please IE6 (see http://dev.plone.org/plone/ticket/9027 for details). [kdeldycke] 2009-05-06
Upgrades moved to the GenericSetup way, and removed (useless) "Migration" tab. [glenfant]
i18n of schemas using message factory. [glenfant]
Fixed test fixtures and associated GS profile. [glenfant]
Added metadata.xml to profiles, provision for future upgrades. [glenfant]
Fixed sorting of terms in glosary view using unicode normalization. [glenfant]
Eggification. [glenfant]
Added "add permissions" for content types instead of generic "Add portal content" [bmathieu]
Using unicode normalization to get first letter of the term. This allows to find terms starting with non-ascii characters. [naro]
use the standard PropertyManager API to handle properties on the tool [wichert]
clean up imports and remove some unneeded bbb code to make pyflakes happy [wichert]
improve the English wording in a few places [wichert]
Using Zope 3 "page" technology to speed up complex templates [glenfant]
Using KSS style views for fast edit. [glenfant]
Full GenericSetup installation [glenfant]
Changed portlet into Plone 3 style [glenfant]
Fixed unit tests (new worflow doesn't allow anon to grab into glossary) [glenfant]
Adding a /browser for new style views [glenfant]
Fix bug causing html entities in definition title/description to appear as entity code instead of char ( ie. & instead of & )
Install: check for scripts/CSS before registering them
Added support for Generic setup for the main tool
Refactored as it can be overloaded
Manages many types of glossaries
Added interfaces
Added test environment
Don't set to debug in config.py by default. [roeder] Otherwise there would be a bogus content type cluttering up portal_types.
Batch navigation in glossary view added [roeder]
Fixed highlighting : all glossaries are used if no glossary explicitly selected
Added czech translation (Lukas Zdych)
Added a patch for ZCTextIndex _apply_index method: search terms with synonymous found in global glossaries are replaced by an equivalent "OR". By default this is done only for 'SearchableText' . This patch is disabled by default (see config.py). [bmathieu]
Fill portlet by template construct instead of javascript [bmathieu]
Dropped plone 2.0 compatibility: use css and javascript registries. Portlet structure complies with plone 2.1/2.5 standard structures. Improved: highlight definitions whether portlet is displayed or not. [bmathieu]
Configure Glossary and Definitions to be managed by portal_factory [bmathieu]
Added support for rename after creation for glossary and definition contents [bmathieu]
Added german translation thanks to Richard M. Kues
Added spanish translation thanks to Hector Velarde
Added share tabs [zegor]
Added a screenshot in the docs folder
Added polish translation thanks to Piotr Furman
Fixed a problem in htm2text. Carriage returns were not interpreted as white space. This resulted in combined words to be merged. For example: "
Added 'alpha_sort' parameter on tool.getObjectRelated*, for getting terms sorted by title [b_mathieu] 2006-02-06
In encode ascii function, normalize char by char, to make sure unicode string has the same length as ascii string
Added functionality to allow true local glossaries. It includes a config setting in the configlet. [ender] 2006-01-30
Changed the definition view so that it also shows the variants. [ender] 2006-01-30
Fix bug in encode ascii method
For AT content, analyse only string and text fields
Object words with accents are highlighted even if the glossary term is a little bit different
Improve find_word function
Changed Title and Description indexes to be ZCTextIndex based.
Added a special latin lexicon class. The lexicon is initialized when adding the GlossaryCatalog and used by the ZCTextIndex indexes.
Use the same normalizer of lexicon to parse SearchableText
Add method rebuildCatalog on PloneGlossary to rebuild all glossary catalog
Update javascript highlighting words to work on Firefox and IE
Fixed access problem to glossary's catalogs for anonymous users - [zegor]
Use AddPortalContent permission to add Glossary and definitions
Remove highlight for input or textarea tags
Check permissions in plone glossary portlet
FAQs
Highlight Plone content terms, mouseover shows the term definition as tooltip.
We found that Products.PloneGlossary demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.