All pastes #45405 Raw Edit

silverwings

public php v1 · immutable
#45405 ·published 2006-03-12 20:43 UTC
rendered paste body
<?php// Phrases the theme when called from main pagefunction phrasetheme($theme) {	// Opens theme main file located in the user specifyed directory	$themepage = 'templates/'.$theme.'/theme.php';	// Opens theme file	$handle = fopen($themepage, "r");	// Reads content from the file and makes it in a option for later processing	$contents = fread($handle, filesize($themepage));	// Replaces $theme from within the template with the defult theme name : Example <img src="themes/$theme/test.jpg"> with 	// <img src="themes/Defult/test.jpg">	$step1 = str_replace('$theme', $theme, $contents);	// Closes the file	fclose($handle);		// Creates a Template Array of where stuff should be located	$array = array('{menu}', '{login}');	// Phrases the spasific arrays with there content "Menu" - phrasemenu function is called 	$phrase1 = str_replace($array[0], phrasemenu($theme), $step1);	// Phrases the spasific arrays with there content "Login" - phraselogin function is called 		$phrase2 = str_replace($array[1], phraselogin($theme), $phrase1);?>