Skip to content

Hooks and other Modules

craigh edited this page May 2, 2012 · 3 revisions

PostCalendar v8.0.0 Hooks and Support for Other Modules

Hooks Support

General Hook Support

PostCalendar supports the following Core 1.3.x-based Subscriber hooks:

  • display_view
  • form_edit
  • form_delete
  • validate_edit
  • validate_delete
  • process_edit
  • process_delete
  • filter

Therefore, any module that offers a Core 1.3.x-compatible hook is available in PostCalendar.

Provided Hooks

PostCalendar provides Core 1.3.x Provider hooks that are useful for other modules. Support is included for the News module. In this case, the admin and/or item creator is able to assign the PostCalendar category or able to opt-out of the hook.

  • News: when hooked, will create an event per article published. Scheduled publishing of articles is supported.

Other modules can create their own API to create events as well. See the Developer Docs for more information.

Needle Usage (MultiHook)

MultiHook development has ceased for the moment and so this is currenlty non-functional

PostCalendar provides two needles that can be used in any module hooked with the MultiHook module. In order to use these (or any needles) you must have the MultiHook module installed and then hook MultiHook to that other module (for example, News). Then in that other module, you can type these needles and they will be auto-replaced by this content.

  • POSTCALEVENT-{eventid-displaytype} (example: POSTCALEVENT-263-NDL) replaces needle with a PostCalendar event title and link. Can include the date and time of the event with an icon if desired. Date is presented in PostCalendar-defined format.
    • eventid = the integer event id of the event you wish to insert. this is shown in the browser addressbar as eid=####. It is also shown in the title header of each event when viewing the event details.
    • displaytype = any or all of the following capital letters, in any order.(default: NLI)
      • N (shows the event name)
      • D (shows the date of the event)
      • T (shows the time of the event)
      • I (adds a small icon)
      • L (replaced content is a link instead of just text)
  • POSTCALDATE-{date-displaytype} (example: POSTCALDATE-20091225-DL) replaces needle with a PostCalendar date and link. Can include an icon if desired. Date is presented in PostCalendar-defined format.
    • date = the date you wish to link to in format 'YYYYMMDD'
    • displaytype = any or all of the following capital letters, in any order.(default: DIL)
      • D (shows the date of the event)
      • I (adds a small icon)
      • L (replaced content is a link instead of just text)

Content Support

PostCalendar provides support for the Content Module API with two block types.

  • Upcoming Events
  • Featured Event

These two block types are identical in function to standard the Zikula blocks documented above with the exception that the Upcoming block merges today's events with all upcoming events and does not display the navigation calendar.