kumarsivarajan / mollify

Automatically exported from code.google.com/p/mollify
0 stars 0 forks source link

FileViewerPlugin html code problem #209

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi my DW says that line 29 and 39 is wrong and after upload the login page goes 
away.
Can you help edit the code?.

?php

    $CONFIGURATION_PROVIDER = 'mysql';

    $DB_HOST = "mysql";
     $DB_DATABASE = "xxx";
     $DB_USER = "xxx";
     $DB_PASSWORD = "xxx";

     $SETTINGS = array(
        "timezone" => "Europe/Stockholm"
    );
     $SETTINGS = array(
                "enable_zip_download" => TRUE
    );
     $SETTINGS = array(
                "enable_description_update" => TRUE
    );
     $SETTINGS = array(
                "enable_file_upload_progress" => TRUE
    );
    $SETTINGS = array(
                "debug" => TRUE
    );
    $PLUGINS = array(

    "Archiver" => array()

    "FileViewer" => array( // here is a failure 
            "viewers" => array(
            "Image" => array("gif", "png", "jpg"),
            "TextFile" => array("txt", "php", "html"),
            "Google" => array("pdf", "xls", "doc"),
            "Quicktime" => array("mov", "mp4")
),
                "previewers" => array(
                "Image" => array("gif", "png", "jpg")

); // here is a failure 

?>

Original issue reported on code.google.com by i...@boresha-photo.com on 24 Feb 2011 at 9:17

GoogleCodeExporter commented 8 years ago
Well, there are many problems.

First you should merge your settings into one array, for example:

$SETTINGS = array(
    "timezone" => "Europe/Stockholm",
    "enable_zip_download" => TRUE,
    "enable_description_update" => TRUE,
    ...and so on
);

But the error you are getting, is that you are missing a comma after archiver 
plugin. Make it like this:

$PLUGINS = array(
    "Archiver" => array(),

    "FileViewer" => array(
        "viewers" => array(
            "Image" => array("gif", "png", "jpg"),
            "TextFile" => array("txt", "php", "html"),
            "Google" => array("pdf", "xls", "doc"),
            "Quicktime" => array("mov", "mp4")
        ),
        "previewers" => array(
            "Image" => array("gif", "png", "jpg")
        )
);

Original comment by samuli.j...@gmail.com on 25 Feb 2011 at 8:58

GoogleCodeExporter commented 8 years ago
Thanks, I do still have 1 failure the close up ); its the line line before ?>

my code looks like this now

$SETTINGS = array(
        "timezone" => "Europe/Stockholm",
        "enable_zip_download" => TRUE,
        "enable_description_update" => TRUE,
        "enable_file_upload_progress" => TRUE,
        "debug" => TRUE
    );
    $PLUGINS = array(
        "Archiver" => array(),
        "FileViewer" => array(
        "viewers" => array(
        "Image" => array("gif", "png", "jpg"),
        "TextFile" => array("txt", "php", "html"),
        "Google" => array("pdf", "xls", "doc"),
        "Quicktime" => array("mov", "mp4")
),
        "previewers" => array(
        "Image" => array("gif", "png", "jpg")
    )
);

?>

Original comment by i...@boresha-photo.com on 25 Feb 2011 at 9:45

GoogleCodeExporter commented 8 years ago
Yes, you miss one closing bracket. You really should indent the code properly, 
otherwise it's very hard to keep track what's closing what. Like this:

$PLUGINS = array(
    "Archiver" => array(),

    "FileViewer" => array(
        "viewers" => array(
            "Image" => array("gif", "png", "jpg"),
            "TextFile" => array("txt", "php", "html"),
            "Google" => array("pdf", "xls", "doc"),
            "Quicktime" => array("mov", "mp4")
        ),
        "previewers" => array(
            "Image" => array("gif", "png", "jpg")
        )
    )
);

Original comment by samuli.j...@gmail.com on 25 Feb 2011 at 9:50

GoogleCodeExporter commented 8 years ago
Thank you for your program, advise and support.

It works now.

Original comment by i...@boresha-photo.com on 25 Feb 2011 at 10:50