<h3>Result</h3>
				<div class="ssi_result"><?php 
ssi_quickSearch();
flush();
?>
</div>
			</div>

			<div class="ssi_preview" id="ssi_recentAttachments">
				<h2>Recent Attachments Function</h2>

				<h3>Code</h3>
				<div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code">&lt;?php ssi_recentAttachments(); ?&gt;</code>
				<h3>Result</h3>
				<div class="ssi_result"><?php 
ssi_recentAttachments();
flush();
?>
</div>
			</div>

<!-- ADVANCED FUNCTIONS -->
			<div class="ssi_preview" id="ssi_showPoll">
				<h2>Show Single Poll</h2>
				<p>Shows a poll in the specified topic.</p>

				<h3>Code</h3>
				<div class="codeheader">Code: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">[Select]</a></div><code class="bbc_code">&lt;?php ssi_showPoll($topicID); ?&gt;</code>
				<h3>Result</h3>
				<div class="ssi_result"><i>Not shown because it needs specific topic ID that contains a poll.</i></div>
			</div>
function sp_attachmentRecent($parameters, $id, $return_parameters = false)
{
    global $txt;
    $block_parameters = array('limit' => 'int');
    if ($return_parameters) {
        return $block_parameters;
    }
    $limit = empty($parameters['limit']) ? 5 : (int) $parameters['limit'];
    $items = ssi_recentAttachments($limit, array(), 'array');
    if (empty($items)) {
        echo '
								', $txt['error_sp_no_attachments_found'];
        return;
    }
    echo '
								<ul class="sp_list">';
    foreach ($items as $item) {
        echo '
									<li>', sp_embed_image('attach'), ' <a href="', $item['file']['href'], '">', $item['file']['filename'], '</a></li>
									<li class="smalltext">', $txt['downloads'], ': ', $item['file']['downloads'], '</li>
									<li class="smalltext">', $txt['filesize'], ': ', $item['file']['filesize'], '</li>';
    }
    echo '
								</ul>';
}
 /**
  * Short description
  *
  * Long description
  *
  * @param
  * @return
  */
 protected function show_recentAttachments()
 {
     try {
         $this->loadSSI();
     } catch (Exception $e) {
         throw new \Exception($e->getMessage());
     }
     $this->attachment_ext = unserialize($this->attachment_ext);
     if ('echo' == $this->output_method) {
         ob_start();
         ssi_recentAttachments($this->num_attachments, $this->attachment_ext, $this->output_method);
         $this->data = ob_get_contents();
         ob_end_clean();
     } else {
         $this->data = ssi_recentAttachments($this->num_attachments, $this->attachment_ext, $this->output_method);
     }
 }