۱۳۸۹/۱۰/۹، ۲۱:۱۹:۰۰ عصر
کدهای فایل last.php خودم رو در اختیار شما میزارم تا ازش الگو برداری کنید .
تنها چیزی که به ذهنم میرسه این خطشه :
آدرس این قسمت رو دقیقا به همین صورت بهش بده یعنی با لینک کامل .....
اگه بازم درست نشد احتمالا مربوط به قالب میشه . با یه قالب دیگه هم امتحان کن ...
کد php:
<?php
//web alfa
// http://www.85ohm.ir
// ver 1.0
echo '
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="fa-IR">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="http://download.85ohm.ir/wp-content/themes/WSDFantezy/last/FB.css" rel="stylesheet" type="text/css" media="screen">
<div id="MTForumBlock">
<table id="webalfa-lastpost">
<tr class="MTForumfirst">
<td class="MTForumtitle">عنوان</td>
<td class="MTForumanswer">پاسخ</td>
<td class="MTForumview">بازديد</td>
<td class="MTForumlast">توسط</td>
</tr>';
## CUSTOMIZE SETTINGS FOR YOUR SITE ##
$db_host = "******"; // Change this if your MySQL database host is different.
$db_name = "******"; // Change this to the name of your database.
$db_user = "******"; // Change this to your database username.
$db_pw = "*****"; // Change this to your database password.
$db_pre = "mybb_"; // Tables prefix
$forum_url = "http://www.85ohm.ir/"; // Change this to reflect to your forum's URL.
$limit = "20"; // Number of posts displayed.
$txtlimit = "100"; // This is the character limit.
#######################################
// Connecting to your database
mysql_connect($db_host, $db_user, $db_pw );
mysql_select_db($db_name);
mysql_query("SET NAMES utf8");
$thread_sql = mysql_query("SELECT tid,subject,lastposter,replies,views FROM ".$db_pre."threads order by lastpost DESC LIMIT $limit");
while($thread_get=mysql_fetch_array($thread_sql))
{
$replycount = $thread_get['replies'];
$views = $thread_get['views'];
$threadid = $thread_get['tid'];
$poster = $thread_get['lastposter'];
$title = $thread_get['subject'];
if(strlen($title) > ($txtlimit-4)){
$title = substr($title,0,$txtlimit).'...';
}
echo "
<tr>
<td class=\"MTForumrowtitle\"><a href=\"".$forum_url."thread-$threadid-lastpost.html\"><img src=\"last/FBarrow.gif\" border=\"0\"> $title</a></td>
<td class=\"MTForumanswer\">$replycount</td>
<td class=\"MTForumview\">$views</td>
<td class=\"MTForumlast\">$poster</td>
</tr>";
}
echo " </tr>
</table>
</div>
";
?>
تنها چیزی که به ذهنم میرسه این خطشه :
کد php:
<link href="http://download.85ohm.ir/wp-content/themes/WSDFantezy/last/FB.css" rel="stylesheet" type="text/css" media="screen">
اگه بازم درست نشد احتمالا مربوط به قالب میشه . با یه قالب دیگه هم امتحان کن ...