Code: Select all
[id kontakt]click for page kontakt[/id]Code: Select all
[id kontakt]click for page kontakt[/id]Code: Select all
//Rewrite functions / modded 02.03.04
function url_search($query)    
{ 
   if ( subStr($query,0,4) == "?id=") 
   { 
      // this is for id=0,0,0,0,0 
      $noid = substr($query, 4); 
      $file = str_replace(",", ".", $noid).".html"; //further use 
   } 
   else 
   { 
      // this is for mypage.html 
      $noid = substr($query,1); 
      $file = str_replace(",", ".", $noid).".html"; //further use 
   } 
   $link = "<a href=\"".$file."\""; 
   return($link); 
} Code: Select all
php_flag magic_quotes_gpc Off
php_flag register_globals Off
DirectoryIndex index.php
RewriteEngine on 
RewriteBase /phpwcms/
# This will rewrite 0.0.0.0.0.html => index.php?id=0.0.0.0.0 
RewriteRule ^([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)\.html$ /phpwcms/index.php?id=$1.$2.$3.$4.$5.$6
# This will rewrite mypage.html => index.php?mypage 
RewriteRule ^([a-zA-Z0-9_]*)\.html$ /phpwcms/index.php?$1
Code: Select all
php_flag magic_quotes_gpc Off
php_flag register_globals Off
# Rewrite functionality for phpwcms
# optimized by Jan212
# 18-04-2004
#DirectoryIndex index.html index.php 
RewriteEngine On
# IF PHPWCMS IS INSTALLED IN YOUR WEB ROOT
# This will rewrite 0.0.0.0.0.0.shtml => index.php?id=0.0.0.0.0.0
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.html$ index.php?id=$1.$2.$3.$4.$5.$6
# This will rewrite mypage.html => index.php?mypage
RewriteRule ^(.+)\.html$ index.php?$1
# If phpwcms is installed in a subdirectory,
# sample: "phpwcms" then use this (remove #)
# ===============================================
#RewriteBase /inoko
# This will rewrite 0.0.0.0.0.0.shtml => index.php?id=0.0.0.0.0.0
#RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.shtml$ /inoko/index.php?id=$1.$2.$3.$4.$5.$6
# This will rewrite index-mypage.shtml => index.php?mypage 
#RewriteRule ^(.+)\.shtml$ /inoko/index.php?$1 
#THIS IS FOR REWRITE LOGGING 
#RewriteLog "/absolute/path/to/the/rewrite.log" 
# 0 = Logging disabled, 9 = highest level of logging, only for debugging 
#RewriteLogLevel 3
Code: Select all
// REWRITE - PATCHED FOR 04/04 // jan212
function url_search($query) { 
	if ( substr($query,0,4) == '?id=') { 
		$noid = substr($query, 4); 
		$file = str_replace(',', '.', $noid).'.html'; 
		//$file = str_replace(',', '.', $noid).'.shtml'; 
	} else { 
		$noid = substr($query,1); 
		$file = str_replace(',', '.', $noid).'.html'; 
		//$file = str_replace(',', '.', $noid).'.shtml';
		/*
		//get category name
		$s = $GLOBALS['content']['struct'][ $GLOBALS['content']['cat_id'] ]['acat_name'];
		if($s) {
			$s = str_replace(' ', '-', $s);
			$s = str_replace('_', '-', $s);
			$s = remove_accents($s);
			$file = $s.'_'.$file;
		}
		*/
	} 
	$link = '<a href="'.$file.'"'; 
	return($link); 
} 
function js_url_search($query) { 
	if ( substr($query,0,4) == '?id=') { 
		$noid = substr($query, 4);
		$file = str_replace(',', '.', $noid).'.html'; 
		//$file = str_replace(',', '.', $noid).'.shtml'; 
	} else { 
		$noid = substr($query,1); 
		$file = str_replace(',', '.', $noid).'.html';
		//$file = str_replace(',', '.', $noid).'.shtml';
		/*
		//get category name
		$s = $GLOBALS['content']['struct'][ $GLOBALS['content']['cat_id'] ]['acat_name'];
		if($s) {
			$s = str_replace(' ', '-', $s);
			$s = str_replace('_', '-', $s);
			$s = remove_accents($s);
			$file = $s.'_'.$file;
		}
		*/
	} 
	$link = "onClick=\"location.href='".$file."'"; 
	return($link); 
} 
// -------------------------------------------------------------
 .
 .