Project

General

Profile

« Previous | Next » 

Revision 440

Added by Matthias over 17 years ago

Added multilingual support to the search;
Fixed ticket #385;

View differences:

trunk/wb/search/search.php
140 140
	$vars = array('[SEARCH_STRING]', '[WB_URL]', '[PAGE_EXTENSION]', '[TEXT_SEARCH]', '[TEXT_ALL_WORDS]', '[TEXT_ANY_WORDS]', '[TEXT_EXACT_MATCH]', '[TEXT_MATCH]', '[TEXT_MATCHING]', '[ALL_CHECKED]', '[ANY_CHECKED]', '[EXACT_CHECKED]', '[REFERRER_ID]');
141 141
	$values = array($search_string, WB_URL, PAGE_EXTENSION, $TEXT['SEARCH'], $TEXT['ALL_WORDS'], $TEXT['ANY_WORDS'], $TEXT['EXACT_MATCH'], $TEXT['MATCH'], $TEXT['MATCHING'], $all_checked, $any_checked, $exact_checked, REFERRER_ID);
142 142
	$search_header = str_replace($vars, $values, ($fetch_header['value']));
143
	$vars = array('[TEXT_NO_RESULTS]');
144
	$values = array($TEXT['NO_RESULTS']);
145
	$search_no_results = str_replace($vars, $values, ($fetch_no_results['value']));
143 146
	
144 147
	// Show search header
145 148
	echo $search_header;
......
302 305
	
303 306
		// Say no items found if we should
304 307
		if($pages_listed == array() AND $items_listed == array()) {
305
			echo $fetch_no_results['value'];
308
			echo $search_no_results;
306 309
		}
307 310
		
308 311
	}
trunk/wb/search/index.php
34 34
define('ROOT_PARENT', 0);
35 35
define('PARENT', 0);
36 36
define('LEVEL', 0);
37
define('PAGE_TITLE', 'Search');
38
define('MENU_TITLE', 'Search');
37
define('PAGE_TITLE', $TEXT['SEARCH']);
38
define('MENU_TITLE', $TEXT['SEARCH']);
39 39
define('MODULE', '');
40 40
define('VISIBILITY', 'public');
41 41
define('PAGE_CONTENT', 'search.php');
trunk/wb/install/save.php
522 522
	
523 523
	// Search header
524 524
	$search_header = addslashes('
525
<h1>Search</h1>
525
<h1>[TEXT_SEARCH]</h1>
526 526

  
527 527
<form name="search" action="[WB_URL]/search/index[PAGE_EXTENSION]" method="get">
528 528
<table cellpadding="3" cellspacing="0" border="0" width="500">
......
577 577
	$insert_search_results_footer = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'results_footer', '$search_results_footer', '')";
578 578
	$database->query($insert_search_results_footer);
579 579
	// Search no results
580
	$search_no_results = addslashes('<br />No results found');
580
	$search_no_results = addslashes('<br />[TEXT_NO_RESULTS]');
581 581
	$insert_search_no_results = "INSERT INTO `".TABLE_PREFIX."search` VALUES ('', 'no_results', '$search_no_results', '')";
582 582
	$database->query($insert_search_no_results);
583 583
	// Search template
trunk/wb/templates/allcss/index.php
52 52
		<?php if(SHOW_SEARCH) { ?>
53 53
		<form name="search" action="<?php echo WB_URL.'/search/index'.PAGE_EXTENSION; ?>" method="get">
54 54
		<input type="text" name="string" class="search_string" />
55
		<input type="submit" name="submit" value="Search" class="search_submit" />
55
		<input type="submit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" class="search_submit" />
56 56
		</form>
57 57
		<?php } ?>
58 58
	</div>
trunk/wb/templates/round/index.php
86 86
				</tr>
87 87
				<tr>
88 88
					<td class="login">
89

  
90
						<input type="submit" name="submit" value="<?php if(isset($TEXT['SUBMIT'])) { echo $TEXT['SEARCH']; } else { echo 'Search'; } ?>" />
89
						<input type="submit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" />
91 90
					</td>
92 91
				</tr>
93 92
				<tr>
trunk/wb/templates/simple/index.php
64 64
			Search: <br />
65 65
			<form name="search" action="<?php echo WB_URL; ?>/search/index<?php echo PAGE_EXTENSION; ?>" method="get">
66 66
				<input type="text" name="string" style="width: 100%;" />
67
				<input type="submit" name="submit" value="Search" style="width: 100%;" />
67
				<input type="submit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" style="width: 100%;" />
68 68
			</form>
69 69
		<?php } ?>
70 70
		

Also available in: Unified diff