Revision history for RalphThesen


Revision [18471]

Last edited on 2008-01-28 00:11:41 by RalphThesen [Modified links pointing to docs server]

No Differences

Revision [8846]

Edited on 2005-06-05 15:36:30 by RalphThesen [Modified links pointing to docs server]
Additions:
----
CategoryUsers


Revision [8790]

Edited on 2005-06-03 15:35:53 by RalphThesen [Modified links pointing to docs server]
Additions:
This htaccess file allows the Browser to fetch existing files below the wikka root, even if rewrite is enabled. If you want to place subfolders below your wikka root with other projects/files/whatever, you can use this .htaccess too. For more Details see HtaccessConfig.
Deletions:
This htaccess file allows the Browser to fetch existing files below the wikka root, even if rewrite is enabled. If you want to place subfolders below your wikka root with other projects/files/whatever, you can use this .htaccess too.


Revision [8789]

Edited on 2005-06-03 14:31:47 by RalphThesen [Modified links pointing to docs server]
Additions:
http://redimp.de/ImageActionUpload
====Suggestion for a new htaccess File====
Deletions:
=====A new htaccess File=====


Revision [8788]

Edited on 2005-06-03 13:54:06 by RalphThesen [added Suggestion for ImageAction, Suggestion for a new htaccess file.]
Additions:
=====""RalphThesen"" - Code Snippets=====

====Suggestion fpr ""FilesAction""====

FilesAction with the correct MIME Header (based upon mimes.txt)

Replace line 16:
%%(php)
Header("Content-Type: application/x-download");
%%
with the following lines :
%%(php)
// Examine Suffix
if (preg_match("/.*\.(\w+)$/i",$filename,$res))
$suffix=$res[1];
// Search MIME Type
if (!$suffix || $suffix=="" || !$this->config['mime_types']
|| !$mimes=implode("\n",file($this->config['mime_types'])))
$content_type="application/x-download";
else {
if (preg_match("/([A-Za-z\/-]*).*$suffix/i",$mimes,$result))
$content_type=$result[1];
else
$content_type="application/x-download";
}
Header("Content-Type: ".$content_type);

====Suggestion for ""ImageAction""====

A feature for the ImageAction would be, if you can use (via FilesAction) uploaded Images. To implement this add the following line after line 26 in action/image.php

%%(php)
// Enable upload='uploadedimage.extension'
if ($param == 'upload' and $vars['url'] == '')
$vars['url']=$this->GetConfigValue('upload_path').'/'.$this->GetPageTag().'/'.$value;

''Example''
""{{image class="center" alt="Uploaded Image" title="The Image Title" upload="imagename.extension"}}""

To use this, you need a different htacces file.

=====A new htaccess File=====
This htaccess file allows the Browser to fetch existing files below the wikka root, even if rewrite is enabled. If you want to place subfolders below your wikka root with other projects/files/whatever, you can use this .htaccess too.

### STOP REFERRER SPAM
SetEnvIfNoCase Referer ".*(adultsite|picturesplace|learnthebiz|pi-o|erotica|ghettoinc|port5|bulk-email|camgirls|paris-hilton|modelos|kredit|handyflirt24|versicherung|wwww|erotower|krank|x-1000|flirtnet|blowjob|agedwife|in-the-vip|boysfirsttime|milf|captain-stabbin|tranny|Kontakt|erotik|fetish|frauen|hardcore|fick|krankenversicherung|jinnan-cross|8thstreet|xxx|XXX|ficken|fuck).*" BadReferrer

order deny,allow
deny from env=BadReferrer

## Enhanced Rewrite
<IfModule mod_rewrite.c>
RewriteEngine on
## If the target is a directory and the trailing Slash is missing, append a Slash
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*/[^\./]*[^/])$ $1/ [L]
## If the file doesn't exist, forward to wikka.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
</IfModule>
Deletions:
====RalphThesen====

FilesAction with the correct MIME Header (based upon mimes.txt)

Replace line 16:
%%(php)
Header("Content-Type: application/x-download");
%%
with the following lines :
%%(php)
// Examine Suffix
if (preg_match("/.*\.(\w+)$/i",$filename,$res))
$suffix=$res[1];
// Search MIME Type
if (!$suffix || $suffix=="" || !$this->config['mime_types']
|| !$mimes=implode("\n",file($this->config['mime_types'])))
$content_type="application/x-download";
else {
if (preg_match("/([A-Za-z\/-]*).*$suffix/i",$mimes,$result))
$content_type=$result[1];
else
$content_type="application/x-download";
}
Header("Content-Type: ".$content_type);


Revision [5244]

The oldest known version of this page was created on 2005-01-26 20:49:06 by RalphThesen [added Suggestion for ImageAction, Suggestion for a new htaccess file.]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki