diff domain-mirror/config.inc.php domain-mirror_patched1/config.inc.php
7,9c7,12
< 	$default_options['blogdescription_1'] = '';		// Tagline
< 	$default_options['siteurl_1'] = 'http://';		// Wordpress Address
< 	$default_options['home_1'] = 'http://';			// Blog Address
---
> 	$default_options['blogdescription_1'] = '';	// Tagline
> 	$default_options['siteurl_1'] = 'http://';	// Wordpress Address
> 	$default_options['home_1'] = 'http://';		// Blog Address
> 	$default_options['template_1'] = 'default';	// Template
> 	$default_options['stylesheet_1'] = 'default';// Stylesheet
> 	$default_options['authorid_1'] = '';			// Author ID
Common subdirectories: domain-mirror/Help_files and domain-mirror_patched1/Help_files
diff domain-mirror/WP-DomainMirror.php domain-mirror_patched1/WP-DomainMirror.php
36a37,39
>  *
>  * v1.1 - 01/09/2008 (patched by apoc)
>  * 		Added Theme and User into Settings
46c49
< 			
---
> 
88a92,105
> 		
> 		if ( substr ($k, 0, 9) == 'template_' ) {
> 			$wpdm_options[$k] = $v;
> 		}
> 		
> 		if ( substr ($k, 0, 11) == 'stylesheet_' ) {
> 			$wpdm_options[$k] = $v;
> 		}
> 
> 		if ( substr ($k, 0, 9) == 'authorid_' ) {
> 			$wpdm_options[$k] = $v;
> 		}
> 		
> 		
124a142,155
> 						
> 						if ( substr ($k, 0, 14) == 'wpdm_template_' ) {
> 							$options['template_'.$count] = $v;
> 						}
> 
> 						if ( substr ($k, 0, 16) == 'wpdm_stylesheet_' ) {
> 							$options['stylesheet_'.$count] = $v;
> 						}
> 						
> 						if ( substr ($k, 0, 14) == 'wpdm_authorid_' ) {
> 							$options['postswhere_'.$count] = $v;
> 						}
> 						
> 						
149c180,183
<  	
---
> 		$options['template'.$options['count']] = 'default';
> 		$options['stylesheet'.$options['count']] = 'default';
> 		$options['authorid'.$options['count']] = '';
> 
163a198,200
> 	document.getElementById( 'wpdm_template_' + parseInt(number)).value = "<?php echo get_option('template') ?>";
> 	document.getElementById( 'wpdm_stylesheet_' + parseInt(number)).value = "<?php echo get_option('stylesheet') ?>";
> 	document.getElementById( 'wpdm_authorid_' + parseInt(number)).value = "";
171a209,211
> 	document.getElementById( 'wpdm_template_' + parseInt(number)).value = "default";
> 	document.getElementById( 'wpdm_stylesheet_' + parseInt(number)).value = "default";
> 	document.getElementById( 'wpdm_authorid_' + parseInt(number)).value = "";
200c240
< 					www.<input type="text" id="wpdm_domain_<?php echo $count; ?>" name="wpdm_domain_<?php echo $count; ?>" value="<?php print $options['domain_'.$count]; ?>" size="36" />
---
> 					(www.)<input type="text" id="wpdm_domain_<?php echo $count; ?>" name="wpdm_domain_<?php echo $count; ?>" value="<?php print $options['domain_'.$count]; ?>" size="36" />
244a285,314
> 			<tr>
> 				<th scope="row">
> 					Template:
> 				</td>
> 				<td>
> 					<input type="text" id="wpdm_template_<?php echo $count; ?>" name="wpdm_template_<?php echo $count; ?>" value="<?php print $options['template_'.$count]; ?>" size="40" />
> 					<input type="button" onclick="void(document.getElementById( 'wpdm_template_<?php echo $count; ?>' ).value = 'default');" value="X" />
> 				</td>
> 				<td>[dmTemplate]</td>
> 			</td>
> 			<tr>
> 				<th scope="row">
> 					Stylesheet:
> 				</td>
> 				<td>
> 					<input type="text" id="wpdm_stylesheet_<?php echo $count; ?>" name="wpdm_stylesheet_<?php echo $count; ?>" value="<?php print $options['stylesheet_'.$count]; ?>" size="40" />
> 					<input type="button" onclick="void(document.getElementById( 'wpdm_stylesheet_<?php echo $count; ?>' ).value = 'default');" value="X" />
> 				</td>
> 				<td>[dmStylesheet]</td>
> 			</td>
> 			<tr>
> 				<th scope="row">
> 					Author(id!):
> 				</td>
> 				<td>
> 					<input type="text" id="wpdm_authorid_<?php echo $count; ?>" name="wpdm_authorid_<?php echo $count; ?>" value="<?php print $options['authorid_'.$count]; ?>" size="40" />
> 					<input type="button" onclick="void(document.getElementById( 'wpdm_authorid_<?php echo $count; ?>' ).value = '');" value="X" />
> 				</td>
> 				<td>[dmAuthor]</td>
> 			</td>
321a392,417
> function wpdm_filter_template($content) {
> 
> 	$current_server = $_SERVER['SERVER_NAME'];
> 	$options = wpdm_getAdminOptions();
> 
> 	for ($count = 1; $count <= $options['count']; $count++) {
> 		if ( $current_server == $options['domain_'.$count] || $current_server == 'www.'.$options['domain_'.$count] ) {
> 			return ( $options['template_'.$count] ); 
> 		}
>    }
>    return $content;
> }
> 
> function wpdm_filter_stylesheet($content) {
> 
> 	$current_server = $_SERVER['SERVER_NAME'];
> 	$options = wpdm_getAdminOptions();
> 
> 	for ($count = 1; $count <= $options['count']; $count++) {
> 		if ( $current_server == $options['domain_'.$count] || $current_server == 'www.'.$options['domain_'.$count] ) {
> 			return ( $options['stylesheet_'.$count] ); 
> 		}
>    }
>    return $content;
> }
> 
334a431,446
> function wpdm_filter_authorid($content) {
> 
> 	$current_server = $_SERVER['SERVER_NAME'];
> 	$options = wpdm_getAdminOptions();
> 
> 	for ($count = 1; $count <= $options['count']; $count++) {
> 		if ( $current_server == $options['domain_'.$count] || $current_server == 'www.'.$options['domain_'.$count] ) {
> 			$user = ( $options['authorid_'.$count] ); 
> 			if(is_numeric($user))
> 				return $content." AND wp_posts.post_author = $user";
> 		}
>    }
>    	
>    return $content;
> }
> 
363a476,496
> 		
> 	$search = "/\[dmTemplate\]/";
> 		
> 		if (preg_match($search, $content)){
> 			$replace = get_option('template');
> 			$content = preg_replace ($search, $replace, $content);
> 		}
> 		
> 	$search = "/\[dmStylesheet\]/";
> 		
> 		if (preg_match($search, $content)){
> 			$replace = get_option('stylesheet');
> 			$content = preg_replace ($search, $replace, $content);
> 		}
> 		
> 	$search = "/\[dmAuthor\]/";
> 		
> 		if (preg_match($search, $content)){
> 			$replace = get_option('authorid');
> 			$content = preg_replace ($search, $replace, $content);
> 		}
376a510,514
> 
> add_filter('option_template', 'wpdm_filter_template', 1);
> add_filter('option_stylesheet', 'wpdm_filter_stylesheet', 1);
> add_filter('posts_where', 'wpdm_filter_authorid', 1);
> 
