'forumhome_subforumseparator_post'
'forumhome_subforumseparator_post', 'forumhome_stats_poster', 'forumhome_stats_member', 'forumhome_stats_thread',
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
// ### TOP 5 STATS BY ANIMEWEBBY ########################################### $displayrecords = "5"; // how many records should we show? $excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7" $threadchars = "30"; // number of characters in thread title before '...' is added $getstats_posters = $DB_site->query("SELECT userid, username, posts FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $displayrecords"); while ($getstats_poster = $DB_site->fetch_array($getstats_posters)) { eval('$stats_posters .= "' . fetch_template('forumhome_stats_poster') . '";'); } $getstats_members = $DB_site->query("SELECT userid, username, posts, joindate FROM " . TABLE_PREFIX . "user ORDER BY joindate DESC LIMIT 0, $displayrecords"); while ($getstats_member = $DB_site->fetch_array($getstats_members)) { eval('$stats_members .= "' . fetch_template('forumhome_stats_member') . '";'); } // filter out deletion notices if can't be seen $forumperms = fetch_permissions($forumid); if (!($permissions['forumpermissions'] & CANSEEDELNOTICE)) { $delquery = ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason"; $delthreadlimit = "AND deletionlog.primaryid IS NULL"; $deljoin = "LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')"; } else { $delquery = ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason"; $delthreadlimit = ""; $deljoin = "LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')"; } $getstats_threads = $DB_site->query(" SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, thread.visible, user.username, user.userid $delquery FROM " . TABLE_PREFIX . "thread AS thread LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.username = thread.lastposter) $deljoin WHERE thread.forumid NOT IN ($excludedforums) $delthreadlimit ORDER BY thread.lastpost DESC LIMIT 0, $displayrecords"); while ($getstats_thread = $DB_site->fetch_array($getstats_threads)) { $getstats_thread[title] = unhtmlspecialchars($getstats_thread[title]); if (strlen($getstats_thread[title]) > $threadchars) { $getstats_thread[titletrimmed] = substr($getstats_thread[title], 0, strrpos(substr($getstats_thread[title], 0, $threadchars), ' ')) . '...'; } else { $getstats_thread[titletrimmed] = $getstats_thread[title]; } if ($getstats_thread[lastpost] > $bbuserinfo[lastvisit]) { $getstats_thread[newpost] = true; } if ($getstats_thread[isdeleted]) { $getstats_thread[isdeleted] = true; } eval('$stats_threads .= "' . fetch_template('forumhome_stats_thread') . '";'); }
<tr> <td class="smallfont" width="100%"><b><a href="member.php?u=$getstats_member[userid]">$getstats_member[username]</a></b></td> <td class="smallfont" align="right"><b>$getstats_member[posts]</b></td> </tr>
<tr> <td width="100%"><b><a href="member.php?u=$getstats_poster[userid]">$getstats_poster[username]</a></b></td> <td class="smallfont" align="right"><b>$getstats_poster[posts]</b></td> </tr>
<tr> <td class="smallfont"><strong>[<i><if condition="$getstats_thread[newpost]">جديد<else />قديم</if></i>] <a href="showthread.php?$session[sessionurl]goto=newpost&t=$getstats_thread[threadid]" title="<phrase 1="$getstats_thread[title]">$vbphrase[go_first_unread_in_thread_x]</phrase>">$getstats_thread[titletrimmed]</a></strong></td> <if condition="$getstats_thread[isdeleted]"> <td class="smallfont"colspan=3" align="left"><phrase 1="member.php?$session[sessionurl]u=$getstats_thread[del_userid]" 2="$getstats_thread[del_username]">$vbphrase[thread_deleted_by_x]</phrase></td> <else /> <td class="smallfont"><strong><a href="member.php?$session[sessionurl]u=$getstats_thread[userid]">$getstats_thread[lastposter]</a></strong></td> <td class="smallfont" align="right"><strong>$getstats_thread[views]</strong></td> <td class="smallfont" align="right"><strong>$getstats_thread[replycount]</strong></td> </if> </tr>
<!-- end what's going on box -->
<!-- top statistics box --> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <thead> <tr> <td class="tcat" colspan="3"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_statistics')"><img id="collapseimg_forumhome_statistics" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_statistics].gif" alt="" border="0" /></a> <span lang="ar-sa">احصائيات المنتدى</span></td> </tr> </thead> <tbody id="collapseobj_forumhome_statistics" style="$vbcollapse[collapseobj_forumhome_statistics]"> <tr> <td class="thead" width="23%" align="center" nowrap><span lang="ar-sa"> اكثر الاعضاء نشاطاَ</span></td> <td class="thead" width="22%" align="center" nowrap><span lang="ar-sa"> الاعضاء الجدد</span></td> <td class="thead" width="55%" nowrap align="center"><span lang="ar-sa"> المشاركات الاخيرة</span></td> </tr> <tr> <td class="alt2" width="23%" valign="top"> <table> <tr> <td class="smallfont" width="100%"><span lang="ar-sa">الاسم</span></td> <td class="smallfont" align="right" nowrap><span lang="ar-sa"> المشاركات</span></td> </tr> $stats_posters </table> </td> <td class="alt1" width="22%" valign="top"> <table> <tr> <td class="smallfont" width="100%" nowrap><span lang="ar-sa"> الاسم</span></td> <td class="smallfont" align="right" nowrap><span lang="ar-sa"> المشاركات</span></td> </tr> $stats_members </table> </td> <td class="alt2" width="55%" valign="top"> <table> <tr> <td class="smallfont" width="70%" nowrap><span lang="ar-sa"> الموضوع</span></td> <td class="smallfont" width="30%" nowrap><span lang="ar-sa"> المشاركات الاخيرة</span></td> <td class="smallfont" align="right" nowrap><span lang="ar-sa"> المشاهدات</span></td> <td class="smallfont" align="right" nowrap><span lang="ar-sa"> المشاركات</span></td> </tr> $stats_threads </table> </td> </tr> </tbody> </table> <br /> <br /> <!-- end top statistics box -->
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
<div style="float: right; right:0; top:0;"> <a href="search.php?s=$session[sessionhash]&action=getnew&forumid=$forum[forumid]"><img src="images/sendpmonline.gif" border="0" width="11" height="11" hspace="2" alt="قراءة جديد $forum[title]"></a><a <a href="search.php?s=$session[sessionurl]do=getnew&forumid=$forum[forumid]"><img src="images/front_searchicon.gif" border="0" width="11" height="11" hspace="2" alt="بحث في هذا القسم $forum[forumid]"></a> <a href="newthread.php?s=$session[sessionurl]do=newthread&f=$forum[forumid]"><img src="images/front_newicon.gif" border="0" width="11" height="11" hspace=2" alt="كتابة موضوع جديد "></a><a href="member2.php?s=$session[sessionhash]&action=addsubscription&forumid=$forum[title]"><img src="images/front_subscribeicon.gif" border="0" width="13" height="11" hspace="2"alt="الإشتراك في هذا القسم "$forum;f[forumid]"> </td>
$show['reputationlink'] = iif($vboptions['reputationenable'] AND $bbuserinfo['userid'] AND $post['userid'] AND !($usergroupcache["$post[usergroupid]"]['genericoptions'] & ISBANNEDGROUP), true, false); break; }
// Quick Edit hack if ($post['userid'] == $bbuserinfo['userid']) { $edittext = htmlspecialchars_uni($post['pagetext']); eval('$quickedit = "' . fetch_template('showthread_quickedit') . '";'); } else { $edittext=""; $quickedit=""; } // End Quick Edit hack
'showthread_quickreply',
'showthread_quickedit',
"</head> "
<script language="JavaScript"> function toggleT(_w,_h) { if(********************************************************.getElementById) { //This for Mozilla if (_h=='s') eval("********************************************************.getElementById(_w).style.visibility='visi ble';"); if (_h=='h') eval("********************************************************.getElementById(_w).style.visibility='hidd en';"); } if (********************************************************.all) { // is IE if (_h=='s') eval("********************************************************.all."+_w+".style.visibility='visible';"); if (_h=='h') eval("********************************************************.all."+_w+".style.visibility='hidden';"); } else { // is NS? if (_h=='s') eval("********************************************************.layers['"+_w+"'].visibility='show';"); if (_h=='h') eval("********************************************************.layers['"+_w+"'].visibility='hide';"); } } </script>
<!-- / status icon and date -->
<if condition="$post['pmid']=="""> $quickedit </if>
<form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post"> <a href="javascript:return false;" onClick="toggleT('e$post[postid]','s');return false;"><img src="$stylevar[imgdir_button]/quickedit_icon.gif" alt="تعديل سريع" border="0" /></a> <div id="e$post[postid]" style="VISIBILITY:hidden; z-index:1; position:absolute;"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="updatepost" /> <input type="hidden" name="p" value="$post[postid]" /> <input type="hidden" name="posthash" value="$posthash" /> <input type="hidden" name="poststarttime" value="$poststarttime" /> <table cellpadding="0" cellspacing="0" border="0" bgcolor="#000000" width="67" align="center"><tr><td> <table cellpadding="4" cellspacing="1" border="0" width="100%"> <tr> <td class="tcat" colspan="2"><b>التعديل السريع للمشاركة</b></td> </tr> <tr> <td class="$bgclass"nowrap><b>العنوان:</b></td> <td class="$bgclass"><input type="text" class="bginput" name="title" value="$post[title]" size="63" maxlength="85" tabindex="1"></td> </tr> <tr> <td class="$bgclass" valign="top" nowrap><b>الموضوع:</b> <p> </td> <td class="$bgclass"> <table cellpadding="0" cellspacing="0" border="0"> <tr valign="top"> <td><textarea name="message" class="bginput" style="width:455px; height:85px;" wrap="virtual" tabindex="1">$edittext</textarea><br> <input type="submit" class="button" name="sbutton" accesskey="s" value="احفظ التعديلات" tabindex="3" /> <input type="reset" class="button" value="اعد الرساله القديمه" tabindex="4"> <input type="button" class="button" value="تراجع" onClick="toggleT('e$post[postid]','h')"> <if condition="$bbuserinfo['signature']"> <label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />Sig</label> </if> </td> </tr> </table> </td> </tr> </table> </td></tr></table> <br /> </div> </form>
// ********************* REMOVE HTML CODES *************************** if (!$dohtml) { /*static $html_find = array('<', '>', '<', '>'); static $html_replace = array('<', '>', '<','>'); $bbcode = str_replace($html_find, $html_replace, $bbcode);*/ $bbcode = htmlspecialchars_uni($bbcode); $html_allowed = false; } // end html
// أضيف بواسطـة الصم ، لاستبدال الصور الكبيرة // قم بضبط max_imgsize إلى المقـاس الذي ترغــب به . global $max_imgsize; $max_imgsize=560; if (strstr(strtolower($bbcode),'<img') AND $dohtml) { $tagstartcounter=0; do { $bbcodelength=strlen($bbcode); // pull tag from bbcode $tagopen=(strpos(strtolower($bbcode),'<img',$tagstartcounter)); $tagclose=(strpos($bbcode,'>',$tagopen)); $bbtag=substr($bbcode,$tagopen,($tagclose-$tagopen+1)); $bbtag = str_replace('\'','"',$bbtag); $linkopen=(strpos(strtolower($bbtag),'<img')); $linkopen2=(strpos(strtolower($bbtag),'"',$linkopen)); $linkclose=(strpos($bbtag,'"',$linkopen2+1)); $link=substr($bbtag,$linkopen2+1,($linkclose-$linkopen2-1)); $link = str_replace(' ', '', $link); $image= ($link); if (@fclose(@fopen("$image", "r"))) { $img_width = getimagesize($link); if ($img_width[0] > $max_imgsize) { $bbtag = '<table><tr><td align="center"><a href="' . $link . '"><img src="' . $link . '" width="'.$max_imgsize.'" border="0"'.substr($bbtag,$linkclose+1,strlen($bbtag)-$linkclose+1).'<br>تم تصغـير الصورة تلقـائيـا ، اضغط هنا لمشاهدة الصورة بحجمها الطـبيعي .</a></td></tr></table>'; } } else { $bbtag='<table border="1" cellpadding="0"><tr><td><FONT color="#FF0000">عفـواً .. الصـورة غير موجودة</font></td></tr></table>'; } $bbcode=substr($bbcode,0,$tagopen).$bbtag.substr($ bbcode,$tagclose+1,$bbcodelength-$tagclose); $tagopen=$tagopen+(strpos(strtolower($bbtag),'<img')); $tagstartcounter=(strpos($bbcode,'>',$tagopen)); } while (strpos(strtolower($bbcode),'<img',$tagstartcounter)); } //
return '<img src="' . $link . '" border="0" alt="" />';
// return '<img src="' . $link . '" border="0" alt="" />'; global $max_imgsize; $image= ($link); if (@fclose(@fopen("$image", "r"))) { $img_width = getimagesize($link); if ($img_width[0] > $max_imgsize) { $biglink = '<table><tr><td align="center"><a href="' . $link . '" ><img src="' . $link . '" width="'.$max_imgsize.'" border="0" alt=""><br>تم تصغـير الصورة تلقـائيـا ، اضغط هنا لمشاهدة الصورة بحجمها الطـبيعي .</a></td></tr></table>'; return $biglink; } else { return '<img src="' . $link . '" border="0" alt="" />'; } } else { return '<table border="1" cellpadding="2"><tr><td><FONT color="#FF0000">عفـواً .. الصـورة غير موجودة</font></td></tr></table>'; } //