added tagging the search results

This commit is contained in:
SJ
2012-03-10 14:52:50 +01:00
parent ee9c2af1b2
commit 99848614e8
13 changed files with 163 additions and 16 deletions

View File

@ -64,6 +64,7 @@
.text { font: normal 12px Arial, sans-serif; font-weight: bold; text-align:left; width: 408px; }
.ruletext { font: normal 12px Arial, sans-serif; font-weight: bold; text-align:left; width: 365px; }
.advtext { font: bold 12px Arial, sans-serif; font-weight: bold; text-align:left; width: 280px; }
.tagtext { font: normal 10px Arial, sans-serif; font-weight: bold; text-align:left; width: 280px; }
.advtextgrey { font: bold 12px Arial, sans-serif; color: #999; font-weight: bold; text-align:left; width: 280px; }
.textregular { font: normal 12px Arial, sans-serif; font-weight: bold; text-align:left; }
@ -108,13 +109,14 @@
#health1 .error { color: red; font-weight: bold; }
#pagenav { float: left; margin-top: 0px; margin-bottom: 0px; text-align: left; width: 990px; border: 0px solid red; }
.navrow { display: table-row; width: 282px; border: 1px solid red; }
.navrow { display: table-row; }
.navlink { color: #bbb; font: bold 12px Arial, sans-serif; }
#pagenav a.navlink { color: #850505; font: bold 12px Arial, sans-serif; }
#pagingleft { display: table-cell; float: left; text-align: left; width: 60px; border: 0px solid red; }
#pagingcenter { display: table-cell; float: left; text-align: center; width: 145px; border: 0px solid red; }
#pagingright { display: table-cell; float: right; text-align: right; width: 60px; border: 0px solid red; }
#pagingright { display: table-cell; float: left; text-align: right; width: 60px; border: 0px solid red; }
#tagbox { display: table-cell; float: left; text-align: right; vertical-align: top; width: 725px; border: 0px solid red; }
.messagelink { border-bottom: 1px solid gray; color: #850505; }
.messagelink.spam { border-bottom: 1px solid gray; color: #aaa; }
@ -125,7 +127,6 @@
.advselect2 { width: 205px; font: bold 12px Arial, sans-serif; padding: 0; margin:0;}
.ruleselect { width: 40px; font: bold 12px Arial, sans-serif; padding: 0; margin:0;}
/*button { margin-left: 0px; background-color:gray; border-top:1px solid gray; border-left:1px solid gray; font: bold 12px Arial, sans-serif; border-left: yellow; border-right: black; width:50%;}*/
button { margin: 0; background-color:gray; font: bold 12px Arial, sans-serif; width:40%; height: 40px; margin-left: 5%; margin-right: 5%; }
button.active { background-color: #850505; color:white; }
@ -136,6 +137,8 @@
input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 17%;}
input[type=button].short { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 50px;}
input[type=button].tag { margin: 0; background-color:#eee; color: gray; font: normal 10px Arial, sans-serif; }
input[type=checkbox].attachmenttype { margin: 0; vertical-align: middle; }
#messagepopup { margin: 10px 20px 10px 20px; padding: 0; background-color: white; text-align: left; }
@ -158,8 +161,8 @@
ul.dropdown { position: relative; }
ul.dropdown li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding-right: 40px; padding-left: 40px; border: 0px solid red; }
ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; padding-right: 5px; }
ul.dropdown li.search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
ul.dropdown li.no_search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
ul.dropdown li.search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 0px; }
ul.dropdown li.no_search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 0px; }
ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; }
ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding: 0; }

View File

@ -10,7 +10,7 @@
<div class="mcell" style="width: 315px;">
<ul class="dropdown">
<li class="search_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_simple_search; ?></a></li>
<li class="search_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_simple_search; ?></a> |&nbsp;</li>
<li class="search_li"><a href="advanced.php"<?php if(strstr($_SERVER['REQUEST_URI'], "advanced.php")){ ?> id="active"<?php } ?>><?php print $text_advanced_search; ?></a></li>
</ul>
</div>

View File

@ -15,14 +15,20 @@
<?php if($next_page <= $total_pages){ ?><a href="#" class="navlink" onclick="script:load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), <?php print $next_page; ?>); return false;">&gt; </a> <?php } else { ?><span class="navlink">&gt; </span><?php } ?>
<?php if($page < $total_pages) { ?> &nbsp; <a href="#" class="navlink" onclick="script:load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), <?php print $total_pages; ?>); return false;"> &gt;&gt; </a><?php } else { ?> <span class="navlink"> &nbsp; &gt;&gt;</span><?php } ?>
</div>
<?php } if($n > 0){ ?>
<div id="tagbox"<?php if($n < $page_len) { ?> style="margin-left: 265px;"<?php } ?>>
<input type="hidden" id="tag_keys" name="tag_keys" value="<?php print $all_ids; ?>" />
<input type="hidden" id="_ref" name="_ref" value="<?php print $_ref; ?>" />
Tag search results: <input type="text" id="tag_value" name="tag_value" class="tagtext" /> <input type="button" class="tag" onclick="javascript: tag_search_results('<?php print SEARCH_TAG_URL; ?>'); var __ref = document.getElementById('_ref').value; if(__ref) { add_message_reference_to_form(__ref); } load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), 0); return false;" value="OK" />
</div>
<?php } else { ?>&nbsp;<?php } ?>
</div>
</div>
<div id="resultscontainer"<?php if($n <= 0) { ?> class="empty"<?php } ?>>
<div id="results">
@ -65,14 +71,14 @@
<?php $i=0; foreach ($messages as $message) { $i++; ?>
<div class="resultrow<?php if($i % 2) { ?> odd<?php } ?><?php if($message['spam'] == 1) { ?> spam<?php } ?>">
<div id="e_<?php print $message['id']; ?>" class="resultrow<?php if($i % 2) { ?> odd<?php } ?><?php if($message['spam'] == 1) { ?> spam<?php } ?>">
<div class="cell5 id"><?php print ($page*$page_len) + $i; ?>.</div>
<div class="cell5 date"><?php print $message['date']; ?></div>
<div class="cell5 from"><?php if($message['from'] != $message['shortfrom']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&amp;", $message['from']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></div>
<div class="cell5 subject"><a class="messagelink<?php if($message['spam'] == 1) { ?> spam<?php } ?>" href="<?php print SITE_URL; ?>message.php/<?php print $message['piler_id']; ?>"><?php if($message['subject'] != $message['shortsubject']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&amp;", $message['subject']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><?php print $message['shortsubject']; ?></span><?php } else { print $message['subject']; } ?></a><?php if($message['reference']) { ?> <a href="#" onclick="script:add_message_reference_to_form('<?php print $message['reference']; ?>'); load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), 0); a = document.getElementById('ref'); a.value=''; return false;"><span onmouseover="Tip('<?php print $text_conversation_available; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()">[+]</span></a><?php } ?></div>
<div class="cell5 from"><?php if($message['from'] != $message['shortfrom']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&amp;", $message['from']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></div>
<div class="cell5 subject"><a class="messagelink<?php if($message['spam'] == 1) { ?> spam<?php } ?>" href="<?php print SITE_URL; ?>message.php/<?php print $message['piler_id']; ?>"><?php if($message['subject'] != $message['shortsubject']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&amp;", $message['subject']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();"><?php print $message['shortsubject']; ?></span><?php } else { print $message['subject']; } ?></a><?php if($message['reference']) { ?> <a href="#" onclick="script:add_message_reference_to_form('<?php print $message['reference']; ?>'); load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), 0); a = document.getElementById('ref'); a.value=''; return false;"><span onmouseover="Tip('<?php print $text_conversation_available; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();">[+]</span></a><?php } ?></div>
<div class="cell5 size"><?php print $message['size']; ?></div>
<div class="cell5"><?php if($message['attachments'] > 0) { ?><img src="<?php print ICON_ATTACHMENT; ?>" alt="" width="16" height="18" /><?php } else { ?>&nbsp;<?php } ?></div>
<div class="cell5"><?php if($message['tag']) { ?><span onmouseover="Tip('<?php print $message['tag']; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><img src="<?php print ICON_TAG; ?>" alt="" /></span><?php } else { ?>&nbsp;<?php } ?></div>
<div class="cell5"><?php if($message['tag']) { ?><span onmouseover="Tip('<?php print $message['tag']; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();"><img src="<?php print ICON_TAG; ?>" alt="" /></span><?php } else { ?>&nbsp;<?php } ?></div>
<?php if(ENABLE_ON_THE_FLY_VERIFICATION == 1) { ?>
<div class="cell5 verification"><img src="<?php if($message['verification'] == 1){ print ICON_GREEN_OK; } else { print ICON_RED_X; } ?>" alt="verification status" /></div>
<?php } ?>

View File

@ -0,0 +1 @@
<p><?php print $message; ?></p>