{* * $Revision: 1.16 $ * 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. *}

{g->text text="URL Rewrite System Checks"}

{if $SetupRewrite.apacheCode != REWRITE_STATUS_OK} {/if} {if $SetupRewrite.htaccessCode != REWRITE_STATUS_HTACCESS_READY} {/if}

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

{capture name=mod_rewrite_anchor} mod_rewrite {/capture}

{g->text text="In order for this Gallery module to work you need %s enabled with your Apache server." arg1=$smarty.capture.mod_rewrite_anchor}

{if $SetupRewrite.apacheCode == REWRITE_STATUS_OK}

{g->text text="Success"}

{else}

{g->text text="Warning"}

{/if}
{if $SetupRewrite.apacheCode == 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:"}

{$SetupRewrite.customFile}
{g->text text="Line 6:"} {$SetupRewrite.customLine}

{$SetupRewrite.customFileNoOptions}
{g->text text="Line 6:"} {$SetupRewrite.customLineNoOptions}

{/if} {if $SetupRewrite.apacheCode == REWRITE_STATUS_MULTISITE}

{g->text text="Multisite setup"}

{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="The tests below will only show if mod_rewrite works for your Gallery codebase. If you experience broken links chances are that mod_rewrite does not work."}

{/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="Test mod_rewrite"}
{g->text text="Test mod_rewrite with Options directive"}

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

{include file="gallery:modules/rewrite/templates/Troubleshooting.tpl"}

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

{g->text text="Gallery's URL rewriting works by creating a new file in your gallery directory called .htaccess which contains rules for how short urls should be interpreted."}

{if $SetupRewrite.htaccessCode == REWRITE_STATUS_HTACCESS_READY}

{g->text text="Success"}

{else}

{g->text text="Error"}

{/if}
{if $SetupRewrite.htaccessCode == REWRITE_STATUS_HTACCESS_MISSING}

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

touch {$SetupRewrite.htaccessPath}
chmod 666 {$SetupRewrite.htaccessPath}
{/if} {if $SetupRewrite.htaccessCode == REWRITE_STATUS_HTACCESS_CANT_READ}

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

chmod 666 {$SetupRewrite.htaccessPath}
{/if} {if $SetupRewrite.htaccessCode == REWRITE_STATUS_HTACCESS_CANT_WRITE}

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

chmod 666 {$SetupRewrite.htaccessPath}
{/if}