-
Notifications
You must be signed in to change notification settings - Fork 10
FileViewerEditor plugin
File viewer and editor plugin is built-in plugin that provides file view, preview and edit. Different file types are handled by viewers or editors, which can be added separately.
Client side needs the plugin registered in the application initialization:
<script type="text/javascript">
$(document).ready(function() {
mollify.App.init({
...
}, [
new mollify.plugin.FileViewerEditorPlugin(),
...
]);
});
</script>
Plugin is registered with name "FileViewerEditor".
File viewer has following settings:
- "viewers"
- "previewers"
- "editors"
Both list viewer/previewer plugins and file extensions they handle, in format of [NAME] => [FILE_TYPE_LIST].
For example:
$CONFIGURATION = array(
...,
"plugins" => array(
"FileViewerEditor" => array(
"viewers" => array(
"Image" => array("gif", "png", "jpg"),
"TextFile" => array("txt", "php", "html")
),
"previewers" => array(
"Image" => array("gif", "png", "jpg")
),
"editors" => array(
"TextFile" => array("txt")
)
)
)
);
Provides image viewer for gif, png and jpg files.
Configuration:
"Image" => array("gif", "png", "jpg")
Provides file viewer for PDF, DOC and TIFF.
NOTE! All sites using this service must agree to the [https://docs.google.com/viewer/TOS?hl=en Google Viewer Terms of Service]
Configuration:
"Google" => array("pdf", "tiff", "doc")
Using Google Viewer requires that files can be accessed from internet (as the Google service needs to download the file). When Mollify is used in a closed network (ie. intranet), this viewer cannot be used.
Provides video viewer for mov and mp4 video files.
Configuration:
"Quicktime" => array("mov", "mp4")
File viewer plugins are installed by unzipping installation package to "backend/plugin/FileViewerEditor/viewers".
Additional viewers can be found from Downloads section with label "Viewer" [http://code.google.com/p/mollify/downloads/list?can=2&q=Viewer&colspec=Filename+Summary+Uploaded+Size+DownloadCount]
Provides text file viewer with syntax hilighting. Viewer uses [http://alexgorbatchev.com/wiki/SyntaxHighlighter SyntaxHighlighter] from Alex Gorbatchev. See ReadMe.txt in the package.
Configuration:
"TextFile" => array("txt", "js", "css", "xml", "html", "xhtml", "py", "c", "cpp", "as3", "sh", "java", "sql", "php")
Provides music player for mp3 and ogg files, and uses [http://www.happyworm.com/jquery/jplayer/ JPlayer] by Happyworm. See ReadMe.txt in the package.
Configuration:
"JPlayer" => array("mp3")
Provides video player for mp4, flv and f4v files, and uses [http://flowplayer.org/ FlowPlayer] by Flowplayer Ltd. See ReadMe.txt in the package.
Configuration:
"FlowPlayer" => array("f4v")
Provides image previewer for gif, png and jpg files.
Configuration:
"Image" => array("gif", "png", "jpg")
File previewer plugins are installed by unzipping installation package to "backend/plugin/FileViewer/previewers".
Additional previewers can be found from Downloads section with label "Previewer" [http://code.google.com/p/mollify/downloads/list?can=2&q=Previewer&colspec=Filename+Summary+Uploaded+Size+DownloadCount]
Provides text file editing.
Configuration:
"TextFile" => array("txt")
File editor plugins are installed by unzipping installation package to "backend/plugin/FileViewerEditor/editors".
Additional editors can be found from Downloads section with label "Editor" [http://code.google.com/p/mollify/downloads/list?can=2&q=Editor&colspec=Filename+Summary+Uploaded+Size+DownloadCount]
Provides HTML file editing, and uses [http://ckeditor.com/ CKEditor] by CKSource. CKEditor is released under GPL, LGPL and MPL open source licenses, for more info see [http://ckeditor.com/license].
Configuration:
"CKEditor" => array("html")