{* * $Revision: 15342 $ * If you want to customize this file, do not edit it directly since future upgrades * may overwrite it. Instead, copy it into a new directory called "local" and edit that * version. Gallery will look for that file first and use it if it exists. *}
{if $TestResults.gallery.modRewrite != $TestResults.gallery.trueModRewrite} {/if} {if $TestResults.gallery.modRewrite != REWRITE_STATUS_OK} {/if} {if $TestResults.gallery.htaccess != REWRITE_STATUS_OK} {/if} {if isset($TestResults.embedded)} {if $TestResults.embedded.htaccess != REWRITE_STATUS_OK} {if $TestResults.embedded.htaccessPath == '/.htaccess'} {else} {/if} {/if} {/if}

{g->text text="Apache mod_rewrite"}

{capture name=mod_rewrite_anchor} mod_rewrite {/capture}

{g->text text="Testing if %s is supported by the server." arg1=$smarty.capture.mod_rewrite_anchor}

{if $TestResults.gallery.modRewrite == REWRITE_STATUS_OK}

{g->text text="Success"}

{else}

{g->text text="Warning"}

{/if}

{g->text text="The current status may not be accurate, you have forced the test to pass."}

{if $TestResults.gallery.modRewrite != REWRITE_STATUS_MULTISITE} {if $TestResults.gallery.modRewrite == REWRITE_STATUS_APACHE_UNABLE_TO_TEST}

{g->text text="Custom Gallery directory test setup"}

{g->text text="Gallery tries to test mod_rewrite in action. For this to work you need to edit each of these two files accordingly:"}

{$TestResults.gallery.customFile1}
{g->text text="Line 6:"} {$TestResults.gallery.customLine1}

{$TestResults.gallery.customFile2}
{g->text text="Line 6:"} {$TestResults.gallery.customLine2}

{/if}

{g->text text="Test mod_rewrite manually"}

{g->text text="For whatever reason, Gallery did not detect a working mod_rewrite setup. If you are confident that mod_rewrite does work you may override the automatic detection. Please, run these two tests to see for yourself."}

{g->text text="Works"} {g->text text="Test"}
{g->text text="mod_rewrite configuration 1 (with global Options +FollowSymlinks)"}
{g->text text="mod_rewrite configuration 2 (with local Options +FollowSymlinks)"}

{g->text text="If one of the two tests gives you a page with the text PASS_REWRITE you are good to go."}

{else}

{g->text text="Apache mod_rewrite and Gallery multisite"}

{g->text text="Gallery tries to test mod_rewrite in action. This does not work with multisite since Gallery lacks the complete codebase."}

{g->text text="Force"} {g->text text="Test"}
{g->text text="mod_rewrite configuration 1 (with global Options +FollowSymlinks)"}
{g->text text="mod_rewrite configuration 2 (with local Options +FollowSymlinks)"}
{/if}

{g->text text="Gallery .htaccess file"}

{g->text text="Testing if Gallery can write to the .htaccess file."}

{if $TestResults.gallery.htaccess == REWRITE_STATUS_OK}

{g->text text="Success"}

{else}

{g->text text="Error"}

{/if}
{if $TestResults.gallery.htaccess == REWRITE_STATUS_HTACCESS_MISSING}

{g->text text="Please create a file in your Gallery directory named .htaccess"}

touch {$TestResults.gallery.htaccessPath}
chmod 666 {$TestResults.gallery.htaccessPath}
{/if} {if $TestResults.gallery.htaccess == REWRITE_STATUS_HTACCESS_CANT_READ}

{g->text text="Please make sure Gallery can read the existing .htaccess file"}

chmod 666 {$TestResults.gallery.htaccessPath}
{/if} {if $TestResults.gallery.htaccess == REWRITE_STATUS_HTACCESS_CANT_WRITE}

{g->text text="Please make sure Gallery can write to the existing .htaccess file"}

chmod 666 {$TestResults.gallery.htaccessPath}
{/if}

{g->text text="Embedded .htaccess file"}

{g->text text="Testing if Gallery can write to the embedded .htaccess file."}

{if $TestResults.embedded.htaccess == REWRITE_STATUS_OK}

{g->text text="Success"}

{else}

{g->text text="Error"}

{/if}

{g->text text="Please configure the embedded htaccess path."}

{if $TestResults.embedded.htaccess == REWRITE_STATUS_HTACCESS_MISSING}

{g->text text="Please create a file in your Gallery directory named .htaccess"}

touch {$TestResults.embedded.htaccessPath}
chmod 666 {$TestResults.embedded.htaccessPath}
{/if} {if $TestResults.embedded.htaccess == REWRITE_STATUS_HTACCESS_CANT_READ}

{g->text text="Please make sure Gallery can read the existing .htaccess file"}

chmod 666 {$TestResults.embedded.htaccessPath}
{/if} {if $TestResults.embedded.htaccess == REWRITE_STATUS_HTACCESS_CANT_WRITE}

{g->text text="Please make sure Gallery can write to the existing .htaccess file"}

chmod 666 {$TestResults.embedded.htaccessPath}
{/if}