function pretty_profiles_test() { global $scripturl, $txt; // Get the 3 top posters/spammers $boards = ssi_topPoster(3, 'array'); $return = array(); foreach ($boards as $board) { $return[] = $board['link']; } return $return; }
} $topNumber = 6; global $txt, $boarddir, $memberContext, $ultimateportalSettings, $settings; //Load Top Poster (ssi_topPoster from SSI.php) require_once $boarddir . '/SSI.php'; $return = array(); //Ultimate Portal use SMF Cache data... UP it's the best, only "UP", can create this feature if (!empty($ultimateportalSettings['up_reduce_site_overload'])) { if (cache_get_data('bk_top_poster', 1800) === NULL) { $return = ssi_topPoster($topNumber, 'array'); cache_put_data('bk_top_poster', $return, 1800); } else { $return = cache_get_data('bk_top_poster', 1800); } } else { $return = ssi_topPoster($topNumber, 'array'); } // Make a quick array to list the links in. echo ' <table style="border-spacing:5px;width:100%;" border="0" cellspacing="1" cellpadding="3"> '; $count = 0; foreach ($return as $member) { //load member data loadMemberData($member['id']); loadMemberContext($member['id']); //end load member data... $count++; echo ' <tr> <td align="left">';
function TPortal_ssi() { global $context; echo ' <div style="padding: 5px;" class="smalltext">'; if ($context['TPortal']['ssifunction'] == 'topboards') { ssi_topBoards(); } elseif ($context['TPortal']['ssifunction'] == 'topposters') { ssi_topPoster(5); } elseif ($context['TPortal']['ssifunction'] == 'topreplies') { ssi_topTopicsReplies(); } elseif ($context['TPortal']['ssifunction'] == 'topviews') { ssi_topTopicsViews(); } elseif ($context['TPortal']['ssifunction'] == 'calendar') { ssi_todaysCalendar(); } echo ' </div>'; }
<div class="ssi_result"><?php ssi_topPoll(); flush(); ?> </div> </div> <div class="ssi_preview" id="ssi_topPoster"> <h2>Top Poster Function</h2> Shows the top poster's name and profile link. <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"><?php ssi_topPoster(); ?></code> <h3>Result</h3> <div class="ssi_result"><?php ssi_topPoster(); flush(); ?> </div> </div> <!-- MEMBERS --> <div class="ssi_preview" id="ssi_latestMember"> <h2>Latest Member Function</h2> <p>Shows the latest member's name and profile link.</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"><?php ssi_latestMember(); ?></code> <h3>Result</h3> <div class="ssi_result"><?php ssi_latestMember();
/** * Short description * * Long description * * @param * @return */ protected function show_topPoster() { try { $this->loadSSI(); } catch (Exception $e) { throw new \Exception($e->getMessage()); } if ('echo' == $this->output_method) { ob_start(); ssi_topPoster($this->topNumber, $this->output_method); $this->data = ob_get_contents(); ob_end_clean(); } else { $this->data = ssi_topPoster($this->topNumber, $this->output_method); } }