۱۳۸۹/۱/۲۶، ۲۰:۳۷:۵۲ عصر
اقا نگران نباش منم دو روزه دارم با وردپرس کار می کنم هنوز نتونستم یه قالب واسش خوب پیدا کنم ،
ــــــــــــــــــــــــــــــــــــــــــــــ
اقا من کد ها انجمن ویبلیشن رو پیدا کردم ببنید می شه ستش کرد :
این کد برای قالب و تو قالب باید اضافه شه :
این کد رو داخل استایل خودتون بزارید :
ــــــــــــــــــــــــــــــــــــــــــــــ
اقا من کد ها انجمن ویبلیشن رو پیدا کردم ببنید می شه ستش کرد :
این کد برای قالب و تو قالب باید اضافه شه :
کد php:
<?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 = "localhost"; // Change this if your MySQL database host is different.
$db_name = "dbname"; // Change this to the name of your database.
$db_user = "dbuser"; // Change this to your database username.
$db_pw = "dbpass"; // Change this to your database password.
$forum_url = "http://forum.persianscript.ir/"; // 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 "
<tr>
<td class=\"MTForumrowtitle\">
<a href=\"".$forum_url."showthread.php?t=$tid&p=$pid\">
<img src=\"FBarrow.gif\" border=\"0\"> $title</a></td>
<td class=\"MTForumanswer\">$replycount</td>
<td class=\"MTForumview\">$views</td>
<td class=\"MTForumview\">$poster</td>
</tr>";
}
echo " </tr>
</table>
</div>";
?>
این کد رو داخل استایل خودتون بزارید :
کد:
#MTForumBlock{padding:5px;}
#MTForumBlock TABLE{width:100%;}
#MTForumBlock TR{background-image:url(images/MTForumBlock/MTForumBlock_row.png);background-repeat:repeat-x;}
#MTForumBlock TD{font-family:Tahoma;font-size:1em;border:1px solid #e6e9ec;color:#666;height:15px;}
.MTForumtitle{text-align:center;}
.MTForumlast{width:90px;text-align:center;}
.MTForumrowtitle{padding-right:5px;}
#MTForumBlock A{float:right;width:100%;height:100%;color:#666;text-decoration:none;}
#MTForumBlockControl TABLE{height:22px;font-family:Tahoma;font-size:1em;color:#666;}
#MTForumBlockControl A{text-decoration:none;color:#666;float:right;width:49px;height:22px;line-height:20px;}
.MTForumButton{width:49px;background-image:url(images/MTForumBlock/MTForumBlock_button.png);background-position:right;background-repeat:no-repeat;text-align:center;}
.MTForumButton:hover{background-image:url(images/MTForumBlock/MTForumBlock_button.png);background-position:left;background-repeat:no-repeat;}
#MTForumBlock TR.MTForumfirst,#MTForumBlock TR:hover{background-image:url(images/MTForumBlock/MTForumBlock_row_over.png);}
.MTForumanswer,.MTForumview,#MTFloader{width:40px;text-align:center;}