Revision [16761]

This is an old revision of Mod032bModRewrite made by HjgD5o on 2007-05-31 10:45:02.

 

Wikka Mod 032

Type: Bug Fix

Credit:

JoeD -- Joe Delaney -- http://www.wakkawiki.de/RewriteMode
Jason Tourtelotte -- Minor improvements.


Note: These are not the exact coding changes used in Wikka....but the ideas and file pointers are pretty much right on.



When rewrite mode is off, the base url will contain "wakka.php?wakka=" and this will cause a series of problem for dependent files (stylesheets, graphics) and generated links (the revisions page and backlink page search).

Here is a solution that I came up with. It works for me, but use at your own risk.

Replace actions/header.php with this version:
%%(php)
<?php
$message = $this->GetMessage();
$user = $this->GetUser();
$site_base = $this->GetConfigValue("base_url");
if ( substr_count($site_base, 'wakka.php?wakka=') > 0 )
$site_base = substr($site_base,0,-16);
?>
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title><?php echo $this->GetWakkaName()." : ".$this->GetPageTag(); ?></title>
<base href="<?php echo $site_base ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="<?php echo $this->GetConfigValue("meta_keywords") ?>" />
<meta name="description" content="<?php echo $this->GetConfigValue("meta_description") ?>" />
<link rel="stylesheet" type="text/css" href="css/wakka.css" />
<script language="JavaScript" type="text/javascript">
function fKeyDown()
{
if (event.keyCode
9)
{
event.returnValue = false;
document.selection.createRange().text = String.fromCharCode(9);
}
}
</script>
</head>

<body
<?php echo (!$user
($user["doubleclickedit"] Y))
There are no comments on this page.