سلام
میشه لطفا کد آخرین ارسال های تالار گفتمان رو که پرشین اسکریپت روی سایت وردپرسش گذاشته رو ارائه کنید؟؟؟
من کد خود آخرین ارسال هارو دارم
اما کلاسش رو ندارم .
این کدش
همین رو مثلا بهش کلاس بدید بذارید تا من هم استفاده کنم .دقیقا مثل پرشین اسکریت.همون دقیقا
ممنون
میشه لطفا کد آخرین ارسال های تالار گفتمان رو که پرشین اسکریپت روی سایت وردپرسش گذاشته رو ارائه کنید؟؟؟
من کد خود آخرین ارسال هارو دارم
اما کلاسش رو ندارم .
این کدش
کد:
<?php
echo '<div id="MTForumBlock">
<table id="lastpost">
<tr class="MTForumfirst">
<td class="MTForumtitle">عنوان</td>
<td class="MTForumanswer">پاسخ</td>
<td class="MTForumview">بازديد</td>
<td class="MTForumview">توسط</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.
$forum_url = "/"; // Change this to reflect to your forum's URL.
$forum_id = "";
$limit = "15"; // Number of posts displayed.
$txtlimit = "100"; // This is the character limit.
#######################################
// Connecting to your database
mysql_connect($db_host, $db_user, $db_pw)
OR die ("Cannot connect to your database");
mysql_select_db($db_name) OR die("Cannot connect to your database");
if ($forum_id) {
$forumid = "AND forumid=$forum_id";
}
if ($limit) {
$limited = "LIMIT $limit";
}
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter,replycount,views FROM thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited");
while($thread_get=mysql_fetch_array($thread_sql))
{
$replycount = $thread_get['replycount'];
$views = $thread_get['views'];
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid DESC");
$getp=mysql_fetch_array($psql);
$pid = $getp['postid'];
$title = $thread_get['title'];
$title = substr($title,0,$txtlimit);
echo "
<div class=\"tr\">
<div class=\"title\"><a href=\"".$forum_url."showthread.php?t=$tid&p=$pid\" target=\"_blank\">$title</a></div>
<div class=\"reply\">$replycount</div>
<div class=\"views\">$views</div>
<div class=\"author\">$poster</div>
</div>";
}
echo " </tr>
</table>
</div>";
?>
ممنون