Posted by Grayside on October 23, 2009 at 6:35am
2 followers
| Project: | freelinking |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Grayside |
| Status: | closed (fixed) |
Issue Summary
This patch changes how freelinking 3 deals with plugins. Instead of a subdirectory of include files, it introduces two new hooks:
- hook_freelinking_syntax: Replaces the old "global" $freelinking variable.
- hook_freelinking_settings: Replaces the freelinking_<plugin>_settings function
Things to Know
- The Nodetitle plugin has been moved into freelinking.module to avoid a cyclic dependency.
- You need to manually enable plugins in this system, as they have become submodules. In the attached tarball are the NID and Wikipedia plugins as examples for conversion. (The NID plugin is my patched "SEO-friendly" version).
Todos/Bugs
- Feature Enhancement: Allow a single module to implement multiple freelinking filters. Currently, the method freelinking.module uses to process settings does not allow this.
- Bug: Freelinking Admin page fieldgroups have the sloppy array index in place of a clean plugin name.
These add up to reworking how the setting form is built.
| Attachment | Size |
|---|---|
| plugins_via_hooks.patch | 6.93 KB |
| freelinking_plugins.tar_.gz | 1.69 KB |
Comments
#1
Tweaking to make it clear- this is for Freelinking 3
#2
Step 1: Apply and untar #1.
Step 2: Apply the Multiplugin patch. This also corrects the setting form fieldgroup names, a stray colon, and a t() concatenation issue. It affects both freelinking_settings() and the return value expected from hook_freelinking_settings.
Todos from #1 should now be resolved.
#3
I woke up and decided the above was confusing. Here is a new, complete, and authoritative patch. It provides all the above changes in one patch and one tarball, applied from the modules/ directory.
hook_freelinking_syntax() has been simplified to hook_freelinking().
The drupalnid and drupalproject plugins have also been converted for use in this version.
#4
Committed with additional cleanup & modification to retain existing plugin architecture alongside the hook.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.