Inheritance diagram for HabariSilo:
Collaboration diagram for HabariSilo:Public Member Functions | |
| action_init () | |
| filter_activate_plugin ($ok, $file) | |
| action_plugin_activation ($file) | |
| action_plugin_deactivation ($file) | |
| silo_info () | |
| silo_dir ($path) | |
| silo_get ($path, $qualities=null) | |
| silo_new ($path) | |
| silo_put ($path, $filedata) | |
| silo_delete ($path) | |
| silo_highlights () | |
| silo_permissions ($path) | |
| link_path ($path, $title= '') | |
| link_panel ($path, $panel, $title) | |
| filter_media_controls ($controls, $silo, $path, $panelname) | |
| filter_media_panels ($panel, $silo, $path, $panelname) | |
| mkdir_validator ($dir, $control, $form) | |
| dir_success ($form) | |
| do_delete ($form) | |
Public Attributes | |
| const | SILO_NAME = 'Habari' |
| const | DERIV_DIR = '.deriv' |
Protected Attributes | |
| $root = null | |
| $url = null | |
Simple file access silo
Definition at line 9 of file habarisilo.plugin.php.
| HabariSilo::action_init | ( | ) |
Initialize some internal values when plugin initializes
Definition at line 21 of file habarisilo.plugin.php.
| HabariSilo::action_plugin_deactivation | ( | $ | file | ) |
| string | $file. The name of the plugin file |
Delete the special silo permissions if they're no longer being used.
Definition at line 62 of file habarisilo.plugin.php.
| HabariSilo::dir_success | ( | $ | form | ) |
This function performs the mkdir and rmdir actions on submission of the form. It is called by FormUI's success() method.
| FormUI | $form |
Definition at line 592 of file habarisilo.plugin.php.
| HabariSilo::do_delete | ( | $ | form | ) |
This function takes the path passed from the form and passes it to silo_delete to delete the file and it's thumbnail if it's an image.
| FormUI | $form |
Definition at line 621 of file habarisilo.plugin.php.
| HabariSilo::filter_media_controls | ( | $ | controls, | |
| $ | silo, | |||
| $ | path, | |||
| $ | panelname | |||
| ) |
Provide controls for the media control bar
| array | $controls Incoming controls from other plugins | |
| MediaSilo | $silo An instance of a MediaSilo | |
| string | $path The path to get controls for | |
| string | $panelname The name of the requested panel, if none then emptystring |
Definition at line 410 of file habarisilo.plugin.php.
| HabariSilo::filter_media_panels | ( | $ | panel, | |
| $ | silo, | |||
| $ | path, | |||
| $ | panelname | |||
| ) |
Provide requested media panels for this plugin
Regarding Uploading: A panel is returned to the media bar that contains a form, an iframe, and a javascript function. The form allows the user to select a file, and is submitted back to the same URL that produced this panel in the first place. This has the result of submitting the uploaded file to here when the form is submitted. To prevent the panel form from reloading the whole publishing page, the form is submitted into the iframe. An onload event attached to the iframe calls the function. The function accesses the content of the iframe when it loads, which should contain the results of the request to obtain this panel, which are in JSON format. The JSON data is passed to the habari.media.jsonpanel() function in media.js to process the data and display the results, just like when displaying a panel normally.
| string | $panel The HTML content of the panel to be output in the media bar | |
| MediaSilo | $silo The silo for which the panel was requested | |
| string | $path The path within the silo (silo root omitted) for which the panel was requested | |
| string | $panelname The name of the requested panel |
Definition at line 448 of file habarisilo.plugin.php.
| HabariSilo::link_panel | ( | $ | path, | |
| $ | panel, | |||
| $ | title | |||
| ) |
Produce a link for the media control bar that causes a specific panel to be displayed
| string | $path The path to pass | |
| string | $path The panel to display | |
| string | $title The text to use for the link in the control bar |
Definition at line 394 of file habarisilo.plugin.php.
| HabariSilo::link_path | ( | $ | path, | |
| $ | title = '' | |||
| ) |
Produce a link for the media control bar that causes a specific path to be displayed
| string | $path The path to display | |
| string | $title The text to use for the link in the control bar |
Definition at line 378 of file habarisilo.plugin.php.
| HabariSilo::mkdir_validator | ( | $ | dir, | |
| $ | control, | |||
| $ | form | |||
| ) |
A validator for the mkdir form created with FormUI. Checks to see if the webserver can write to the parent directory and that the directory does not already exist.
| $dir | The input from the form | |
| $control | The FormControl object | |
| $form | The FormUI object |
Definition at line 569 of file habarisilo.plugin.php.
| HabariSilo::silo_delete | ( | $ | path | ) |
Delete the file at the specified path
| string | $path The path of the file to retrieve |
Implements MediaSilo.
Definition at line 332 of file habarisilo.plugin.php.
| HabariSilo::silo_dir | ( | $ | path | ) |
Return directory contents for the silo path
| string | $path The path to retrieve the contents of |
Implements MediaSilo.
Definition at line 110 of file habarisilo.plugin.php.
| HabariSilo::silo_get | ( | $ | path, | |
| $ | qualities = null | |||
| ) |
Get the file from the specified path
| string | $path The path of the file to retrieve | |
| array | $qualities Qualities that specify the version of the file to retrieve. |
Implements MediaSilo.
Definition at line 155 of file habarisilo.plugin.php.
Referenced by silo_dir().
| HabariSilo::silo_highlights | ( | ) |
Retrieve a set of highlights from this silo This would include things like recently uploaded assets, or top downloads
Implements MediaSilo.
Definition at line 358 of file habarisilo.plugin.php.
| HabariSilo::silo_info | ( | ) |
Return basic information about this silo name- The name of the silo, used as the root directory for media in this silo
Implements MediaSilo.
Definition at line 97 of file habarisilo.plugin.php.
| HabariSilo::silo_new | ( | $ | path | ) |
Create a new asset instance for the specified path
| string | $path The path of the new file to create |
Definition at line 305 of file habarisilo.plugin.php.
| HabariSilo::silo_permissions | ( | $ | path | ) |
Retrieve the permissions for the current user to access the specified path
| string | $path The path to retrieve permissions for |
Implements MediaSilo.
Definition at line 367 of file habarisilo.plugin.php.
| HabariSilo::silo_put | ( | $ | path, | |
| $ | filedata | |||
| ) |
Store the specified media at the specified path
| string | $path The path of the file to retrieve | |
| MediaAsset | $filedata The MediaAsset to store |
Implements MediaSilo.
Definition at line 315 of file habarisilo.plugin.php.
1.7.1