Empty commit

This commit is contained in:
Git 2012-06-23 08:00:13 +00:00
parent c4345798c8
commit 6a744a389b
2 changed files with 29 additions and 7 deletions

View File

@ -3,7 +3,8 @@
/* /*
Forums search result page Forums search result page
*/ */
include(SERVER_ROOT.'/classes/class_text.php');
$Text = new TEXT;
list($Page,$Limit) = page_limit(POSTS_PER_PAGE); list($Page,$Limit) = page_limit(POSTS_PER_PAGE);
@ -172,14 +173,15 @@
$Words = explode(' ', db_string($Search)); $Words = explode(' ', db_string($Search));
if($Type == 'body') { if($Type == 'body') {
$sql = "SELECT SQL_CALC_FOUND_ROWS $sql = "SELECT SQL_CALC_FOUND_ROWS
t.ID, t.ID,
".(!empty($ThreadID) ? "SUBSTRING_INDEX(p.Body, ' ', 40)":"t.Title").", ".(!empty($ThreadID) ? "SUBSTRING_INDEX(p.Body, ' ', 40)":"t.Title").",
t.ForumID, t.ForumID,
f.Name, f.Name,
p.AddedTime, p.AddedTime,
p.ID p.ID,
p.Body
FROM forums_posts AS p FROM forums_posts AS p
JOIN forums_topics AS t ON t.ID=p.TopicID JOIN forums_topics AS t ON t.ID=p.TopicID
JOIN forums AS f ON f.ID=t.ForumID JOIN forums AS f ON f.ID=t.ForumID
@ -269,7 +271,7 @@
<? } <? }
$Row = 'a'; // For the pretty colours $Row = 'a'; // For the pretty colours
while(list($ID, $Title, $ForumID, $ForumName, $LastTime, $PostID) = $DB->next_record()) { while(list($ID, $Title, $ForumID, $ForumName, $LastTime, $PostID, $Body) = $DB->next_record()) {
$Row = ($Row == 'a') ? 'b' : 'a'; $Row = ($Row == 'a') ? 'b' : 'a';
// Print results // Print results
?> ?>
@ -284,7 +286,7 @@
<?=cut_string($Title, 80); ?> <?=cut_string($Title, 80); ?>
<? } <? }
if ($Type == 'body') { ?> if ($Type == 'body') { ?>
<span style="float: right;" class="last_read" title="Jump to post"><a href="forums.php?action=viewthread&amp;threadid=<?=$ID?><? if(!empty($PostID)) { echo '&amp;postid='.$PostID.'#post'.$PostID; } ?>"></a></span> <a href="#" onClick="$('#post_<?=$PostID?>_text').toggle(); return false;">(show)</a> <span style="float: right;" class="last_read" title="Jump to post"><a href="forums.php?action=viewthread&amp;threadid=<?=$ID?><? if(!empty($PostID)) { echo '&amp;postid='.$PostID.'#post'.$PostID; } ?>"></a></span>
<? } ?> <? } ?>
</td> </td>
<td> <td>
@ -292,8 +294,12 @@
</td> </td>
</tr> </tr>
<? <?
if($Type == 'body') { ?>
<tr class="row<?=$Row?> hidden" id="post_<?=$PostID?>_text">
<td colspan="3"><?=$Text->full_format($Body)?></td>
</tr>
<? }
} }
?> ?>
</table> </table>

View File

@ -105,7 +105,23 @@
if(!$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0))) { ?> if(!$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0))) { ?>
<a href="reports.php?action=report&amp;type=request_update&amp;id=<?=$RequestID?>">[Request Update]</a> <a href="reports.php?action=report&amp;type=request_update&amp;id=<?=$RequestID?>">[Request Update]</a>
<? } ?> <? } ?>
</div>
<?
//create a search url to worldcat and google based on title
$encoded_title = urlencode(preg_replace("/\([^\)]+\)/", "", $Title));
$encoded_artist = substr(str_replace("&amp;","and",$ArtistName), 0, -3);
$encoded_artist = str_ireplace("Performed By", "", $encoded_artist);
$encoded_artist = preg_replace("/\([^\)]+\)/", "", $encoded_artist);
$encoded_artist = urlencode($encoded_artist);
$worldcat_url = "http://worldcat.org/search?q=" . $encoded_artist . " " . $encoded_title;
$google_url = "https://www.google.com/search?&tbm=shop&q=" . $encoded_artist . " " . $encoded_title;
?>
<a href="<? echo $worldcat_url; ?>">[Find in Library]</a>
<a href="<? echo $google_url; ?>">[Find in Stores]</a>
</div>
<div class="sidebar"> <div class="sidebar">
<? if($CategoryID != 0) { ?> <? if($CategoryID != 0) { ?>