User Tools

Site Tools


g2:featureset

This is an old revision of the document!


Back to G2 main

G2 paths

Defined by G2

  • admin/block/configure/g2/<delta> : the settings for the G2 blocks
  • admin/help/g2 : the description of the G2 module
  • admin/settings/g2 : the global settings page for G2
  • g2 : a page containing an intro to the local G2 implementation (node), along with the alphabar linking to
  • g2/autocomplete/<start> : the AJAX field setter by start for entries
  • g2/entries/<entry> : the page of entries matching <entry> (can contain slashes)
  • g2/initial/<urlencoded initial segment> : the page of entries starting by “initial segment” (starting substring).

individual first pages of definitions by initial

Used by g2 but not defined by it

  • node/<nid> : the page for an individual G2 entry
  • taxonomy/term/<tid>[/0/feed] : the page or RSS feed for the entries in G2 (and elsewhere) matching a taxonomy term

Settings

Most settings are located in the feature blocks, but G2 also has a few global settings.

  • Node containing text of main page, typically unpublished. Is used for the glossary home page, wrapped between two alphabars
  • Toggle activation of XML-RPC services

G2 XML-RPC API

g2.alphabar

  • function g2.alphabar() array
    • parameters:
      • none
    • return:
      • array
        • struct
          • string initial
          • string link to a page of entries by initial (g2/initial/<urlencoded initial>)

g2.top

  • function g2.top(int n) array
    • parameters
      • int n : the maximum number of values returned by the function. This number will be site-limited by the value defined for the top block, to prevent API abuse
    • return:
      • array
        • struct
          • string entry
          • int nid

g2.random

  • function g2.random () struct
    • parameters
      • none
    • return:
      • struct
        • string entry
        • int nid
        • string teaser

g2.wotd

  • function g2.wotd () struct
    • parameters
      • none
    • return:
      • struct
        • string entry
        • int nid
        • string teaser

Blocks defined by G2

Blocks

  • G2 Alphabar : displays the initial selector pointing to glossary pages
  • G2 Random word : displays term, teaser, and link to definition
  • G2 Top 10 : displays list of n most requested terms
  • G2 Word of the day

Blocks configuration

  • G2 Alphabar
    • list of initials to be included in alphabar. Defaults to ascii lowercase letters and arabic numerals.
    • maximum length of each row in the alphabar
  • G2 Top 10
    • number of elements in top (default 10)
  • G2 WOTD
    • the word of the day
    • number of characters from the definition body displayed in the block.
    • auto-change the word of the day

For all G2 blocks, it is also possible to change both the title and name of the block.

g2/featureset.1135896064.txt.gz · Last modified: 2020/11/23 17:23 (external edit)