Changeset 545
- Timestamp:
- 09/13/06 15:32:21 (2 years ago)
- Files:
-
- devel/_templates/Default_Template/pageshell (modified) (2 diffs)
- devel/search/index.php (modified) (3 diffs)
- devel/units/files/function_search.php (modified) (1 diff)
- devel/units/profile/function_search.php (modified) (1 diff)
- devel/units/search/function_display.php (modified) (1 diff)
- devel/units/search/function_search_all_display.php (modified) (1 diff)
- devel/units/weblogs/function_search.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/_templates/Default_Template/pageshell
r520 r545 42 42 <div id="search_widget"><!-- open div search_widget --> 43 43 <img src="{{url}}_templates/default_images/own_ad_top.gif" alt="" border="0" /> 44 <form name="searchform" action="{{url}}search/ all.php">44 <form name="searchform" action="{{url}}search/index.php"> 45 45 <script language="JavaScript" type="text/javascript"> 46 46 <!-- … … 51 51 --> 52 52 </script> 53 <p><label>Search</label><br /><input type="text" size="20" name="tag" value="" /> <select name=""><option value="all">--- all ---</option></select> <br /><input type="submit" name="" value="search" /></p> 53 <p><label>Search</label><br /><input type="text" size="20" name="tag" value="" /> 54 <select name="user_type"> 55 <option value="">--- all ---</option> 56 <option value="person">People</option> 57 <option value="community">Communities</option> 58 </select> <br /><input type="submit" name="" value="search" /></p> 54 59 </form> 55 60 <img src="{{url}}_templates/default_images/own_ad_bottom.gif" alt="" border="0" /> devel/search/index.php
r543 r545 19 19 $PAGE->search_type = $db->qstr($PAGE->search_type_unformatted); 20 20 21 $PAGE->returned_items = optional_param('returned_items',''); 22 21 23 $querystring = ""; 22 24 if (isset($_GET) && !empty($_GET)) { … … 34 36 $querystring = $CFG->wwwroot . "search/index.php?" . $querystring; 35 37 36 $body .= "<p>" . gettext("Search ing") . " ";38 $body .= "<p>" . gettext("Search for results from:") . " "; 37 39 38 40 if ($PAGE->search_type == "''") { … … 57 59 $body .= "</p>"; 58 60 61 62 63 $querystring = ""; 64 if (isset($_GET) && !empty($_GET)) { 65 foreach($_GET as $key => $value) { 66 if ($key != 'returned_items') { 67 if (!empty($querystring)) { 68 $querystring .= "&"; 69 } 70 $querystring .= urlencode($key); 71 $querystring .= "="; 72 $querystring .= urlencode(optional_param($key,'')); 73 } 74 } 75 } 76 $querystring = $CFG->wwwroot . "search/index.php?" . $querystring; 77 78 $body .= "<p>" . gettext("Filter by content type:") . " "; 79 if (empty($PAGE->returned_items)) { 80 $body .= "<b class=\"search_displaying_type\">"; 81 } 82 $body .= "<a href=\"$querystring\">" . gettext("Everything") . "</a> "; 83 if (empty($PAGE->returned_items)) { 84 $body .= "</b>"; 85 } 86 if ($PAGE->returned_items == 'accounts') { 87 $body .= "<b class=\"search_displaying_type\">"; 88 } 89 $body .= "<a href=\"$querystring&returned_items=accounts\">" . gettext("Users and communities") . "</a> "; 90 if ($PAGE->returned_items == 'accounts') { 91 $body .= "</b>"; 92 } 93 if ($PAGE->returned_items == 'resources') { 94 $body .= "<b class=\"search_displaying_type\">"; 95 } 96 $body .= "<a href=\"$querystring&returned_items=resources\">" . gettext("Resources") . "</a> "; 97 if ($PAGE->returned_items == 'resources') { 98 $body .= "</b>"; 99 } 100 101 59 102 $body .= run("search:display"); 60 103 devel/units/files/function_search.php
r543 r545 4 4 global $search_exclusions; 5 5 6 if (isset($parameter) && $parameter[0] == "file") { 6 7 $handle = 1; 8 9 if (!empty($PAGE->returned_items) && $PAGE->returned_items == "accounts") { 10 $handle = 0; 11 } 12 13 if (isset($parameter) && $parameter[0] == "file" && $handle) { 7 14 8 15 $dbtag = $db->qstr($parameter[1]); devel/units/profile/function_search.php
r543 r545 13 13 } 14 14 } 15 15 16 if (!empty($PAGE->returned_items) && $PAGE->returned_items == "resources") { 17 $handle = 0; 18 } 19 16 20 if ($handle) { 17 21 devel/units/search/function_display.php
r543 r545 16 16 17 17 foreach($query as $field => $value) { 18 if ($field != user_session_name && $field != "ref" && $field != "owner" && $field != "psaContext" && $field != "PHPSESSID" && $field != "user_type") { 18 if ($field != user_session_name && $field != "ref" && $field != "owner" 19 && $field != "psaContext" && $field != "PHPSESSID" 20 && $field != "user_type" && $field != "returned_items") { 19 21 // $searchline = "tagtype = '".addslashes($field)."' and tag = '".addslashes($value)."'"; 20 22 $run_result .= run("search:display_results", array($field,$value)); devel/units/search/function_search_all_display.php
r543 r545 14 14 15 15 } 16 if ($tag != "ref" && $tag != "owner" && $tag != user_session_name && $tag != "user_type" ) {16 if ($tag != "ref" && $tag != "owner" && $tag != user_session_name && $tag != "user_type" && $tag != "returned_items") { 17 17 $run_result .= run("search:tags:suggest",$tag); 18 18 $run_result .= run("search:users:suggest",$tag); devel/units/weblogs/function_search.php
r543 r545 9 9 $otherUsers2 = gettext("Users with weblog posts in category"); // gettext variable 10 10 11 if (isset($parameter) && $parameter[0] == "weblog" || $parameter[0] == "weblogall") { 11 $handle = 1; 12 13 if (!empty($PAGE->returned_items) && $PAGE->returned_items == "accounts") { 14 $handle = 0; 15 } 16 17 if ((isset($parameter) && $parameter[0] == "weblog" || $parameter[0] == "weblogall") && $handle) { 12 18 13 19 if ($parameter[0] == "weblog") {
