We have moved to Github. Please open tickets there.

Opened 3 years ago

Closed 2 years ago

#2519 closed Enhancement (fixed)

Add library loading API

Reported by: cash Owned by: cash
Priority: normal Milestone: Elgg 1.8.0
Component: Core Version: Github Master
Severity: minor Keywords:
Cc: brettp, ewinslow Difficulty: moderate

Description

It would be great if a plugin could do something like:

elgg_use_library('image_processing');

on pages or actions that require that library rather than doing a include_once in the start.php of the plugin.

Following the class loading design, plugins would have a lib directory that is automatically scanned. In addition, for external libraries (in a vendors directory for example), it would be beneficial to have an explicit registration function:

elgg_register_library('vendors/Zend/ZendMail/ZendPOP3.php');

Change History (5)

comment:1 Changed 3 years ago by brettp

  • Difficulty set to moderate

comment:2 Changed 3 years ago by ewinslow

  • Owner set to ewinslow
  • Status changed from new to assigned

comment:3 Changed 2 years ago by ewinslow

  • Owner ewinslow deleted
  • Status changed from assigned to new

comment:4 Changed 2 years ago by cash

  • Owner set to cash
  • Status changed from new to assigned

comment:5 Changed 2 years ago by cash

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [svn:7532]) Fixes #2519 we can now register and load php libraries - blog plugin is using this

Note: See TracTickets for help on using tickets.