Ejemplo n.º 1
0
    function showResults($result, $searchtext)
    {
        global $rsgConfig;
        html_rsg2_search::showSearchBox();
        //Format number of hits
        $count = count($result);
        $count = "<span style=\"font-weight:bold;\">" . $count . "</span>";
        ?>
		<table width="100%" style="border-bottom: thin solid #CCCCCC;">
		<tr>
			<td><div align="right"><a href="index.php?option=com_rsgallery2"><?php 
        echo JText::_('Main gallery page');
        ?>
</a></div></td>
		</tr>
		<tr>
			<td><h3><?php 
        echo JText::_('RSGallery2 Search Results');
        ?>
</h3></td>
		</tr>
		<tr>
			<td>
				<span style="font-style:italic;">
				<?php 
        echo JText::_('There are ') . $count . JText::_(' results for ');
        ?>
					<span style="font-weight:bold;";><?php 
        echo $searchtext;
        ?>
</span>
				<span>
			</td>
		</tr>
		</table>
		<br />
		<?php 
        if ($result) {
            foreach ($result as $match) {
                ?>
				<table width="100%" border="0" style="border-bottom: thin solid #CCCCCC;">
				<tr>
					<td width="<?php 
                echo $rsgConfig->get('thumb_width');
                ?>
">
					<div class="img-shadow">
						<a href="index.php?option=com_rsgallery2&page=inline&id=<?php 
                echo $match->item_id;
                ?>
">
						<img border="0" src="<?php 
                echo JURI_SITE . $rsgConfig->get('imgPath_thumb') . "/" . imgUtils::getImgNameThumb($match->itemname);
                ?>
" alt="image" />
						</a>
					</div>
					</td>
					<td valign="top">
						<a href="index.php?option=com_rsgallery2&page=inline&id=<?php 
                echo $match->item_id;
                ?>
">
							<span style="font-weight:bold;"><?php 
                echo galleryUtils::highlight_keywords($match->title, $searchtext);
                ?>
</span>
						</a>
						<p><?php 
                echo galleryUtils::highlight_keywords($match->descr, $searchtext);
                ?>
</p>
						<p style="color: #999999;font-size:10px;">
				[<?php 
                echo JText::_('Gallery name');
                ?>
:<a href="<?php 
                echo JRoute::_("index.php?option=com_rsgallery2&gid=" . $match->gallery_id);
                ?>
"><?php 
                echo $match->name;
                ?>
</a>]
							<?php 
                if ($match->userid > 0) {
                    echo "[" . JText::_('Owner') . ":&nbsp;" . galleryUtils::genericGetUsername($match->userid) . "]";
                }
                ?>
						</p>
					</td>
				</tr>
				</table>
				<br />
				<?php 
            }
        }
    }
Ejemplo n.º 2
0
 function showSearchBox()
 {
     global $rsgConfig;
     if ($rsgConfig->get('displaySearch') != 0) {
         require_once JPATH_ROOT . "/components/com_rsgallery2/lib/rsgsearch/search.html.php";
         html_rsg2_search::showSearchBox();
     }
 }