��ҹ��Ǣ�͡�͹˹�� :: ��ҹ��Ǣ�ͶѴ� |
����� |
��ͤ��� |
ryuozero Site Admin
�������: 13 Jul 2005 �ͺ: 1145
|
�ͺ�����: Thu May 31, 2007 2:34 am ����ͧ: �Ը��͡�з����˹���á |
|
|
�Ըա����¹�鴹�� ������� Tag Table ����Ҫ���㹡�èѴ�ٻẺ
˹�ҵҨ��͡���ѧ䧹�� ��������Ѻ�����Ҩ��͡Ẻ�������ѧ䧵������
�����������ѹ��´ա��ҹ�
�����������ҧ��� config.inc.php ��͹
�� PHP:
��ҧ�ԧ�ҡ: |
<?php
$host = "localhost"; //MySQL Server ��һ��Ԥ�� localhost
$user = "root"; // Username �����Դ��� Database
$pass = ""; // Password �����Դ��� Database
$db = "forums"; // ���Ͱҹ�����ŷ����
$table = "vb_thread"; //���͵��ҧ
$conn = mysql_connect($host,$user,$pass);
mysql_select_db($db,$conn);
?> |
������ͧ��� ˹���á��蹡��� ryuozero.html ����ͧ
�� PHP:
��ҧ�ԧ�ҡ: |
<?php
echo "<html>";
echo "<head>";
echo "<title>::My Show Last Forums::</title>";
echo "</head>";
echo "<body>";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";
echo "<tr><td valign=\"top\">";
echo "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">";
$sql = "select * from $table where forumid=11 order by threadid desc limit 0,10";
$result = mysql_query($sql);
while($row=mysql_fetch_array($result)){
echo "<tr><td><img src=images/dot_head.gif border=0> <a href='http://kundream.ath.cx/board/showthread.php?t=$row[threadid]' target=\"_blank\">$row[title]</a> <font color=#B9B9B9>(��ҹ $row[views]/�ͺ $row[replycount])</font></td></tr>";
}
echo "<tr><td align=right><a href=http://www.yourdomain.com/vBulletin_board/forumdisplay.php?f=11 target=f11><img src=images/read_all.gif border=0></a></td></tr></table>";
echo "</td></tr>";
echo "</table>";
echo "</body>";
echo "</html>";
?> |
�������ѧࡵ�ç���͡��� forumid=11 �Ţ 11 ���� ��������ѧ�
�������ҡ �������Դ˹�Һ��촢ͧ��� ���������Ǵ�ͧ��з������ҵ�ͧ��èй�����¹
�ҡ��� ����ѧࡵ����� ��������Ţ���� �� forumdisplay.php?f=11
f �դ����ҡѺ 11 ��蹡����¤������ forumid=11 ����ͧ
�ͨ���������͹ �������� �������ҡѹ�ա��
����Ѻ������վ�鹰ҹ�ҧ��ҹ���� PHP �������� ������ء����ҹ��
���´�� ��������ͺ�ͧ����ͧ |
|
���仢�ҧ�� |
|
|
ryuozero Site Admin
�������: 13 Jul 2005 �ͺ: 1145
|
�ͺ�����: Thu May 31, 2007 2:50 am ����ͧ: |
|
|
vershion2
��ҧ�ԧ�ҡ: |
<?php
echo "<table cellpadding=2 cellspacing=2 border=0 align=center>
<tr>
<td align=center>Topics</td>
<td align=center>Post By</td>
<td align=center>Reply & Views</td>
<td align=center>Lastpost</td>
</tr>";
/* Step 1 : ��駤�� */
$db = "dbname"; // ���Ͱҹ�����ŷ����
$table = "vb364_thread"; //���͵��ҧ
$limit = 15; //�ӹǹ��з�����ͧ����ʴ�
$host = "localhost"; //MySQL Server ��һ��Ԥ�� localhost
$user = "username"; // Username �����Դ��� Database
$pass = "password"; // Password
/* Step 2 : ����������ѧ �ҵ�����Կ����� */
$conn = mysql_connect($host,$user,$pass);
mysql_select_db($db,$conn);
/* Step 3 : ������ ����� sql*/
$sql = "select * from $table ORDER BY threadid DESC LIMIT 0,$limit";
$result = mysql_query($sql);
/* Step 4 : ǹ�ٻ������ */
while($row=mysql_fetch_array($result)){
echo "<tr>
<td><img src=images/dot_head.gif border=0>
<a href='http://kundream.ath.cx/board/showthread.php?t=$row[threadid]' target=\"_blank\">$row[title]</a> (��ҹ $row[views] / �ͺ $row[replycount])</td>
</tr>";
}
echo "<table>";
?> |
|
|
���仢�ҧ�� |
|
|
ryuozero Site Admin
�������: 13 Jul 2005 �ͺ: 1145
|
�ͺ�����: Thu May 31, 2007 2:55 am ����ͧ: |
|
|
����ͧ��Ẻ���ٹ��
last_vb_forum.php
�� PHP:
��ҧ�ԧ�ҡ: |
<?php
/*
15 ��з������ش
Free block for vBulletin
Author by Kantaphong Chaksumat
*/
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
$content = "
<table cellpadding=2 cellspacing=2 border=0 align=center>
<tr>
<td align=center>Topics</td>
<td align=center>Post By</td>
<td align=center>Reply & Views</td>
<td align=center>Lastpost</td>
</tr>";
/* Step 1 : ��駤�� */
$db = "dbname"; // ���Ͱҹ�����ŷ����
$table = "vb364_thread"; //���͵��ҧ vb364 ��� prefix_ �ͧ���ҧ������
$limit = 15; //�ӹǹ��з�����ͧ����ʴ�
$host = "localhost"; //MySQL Server ��һ��Ԥ�� localhost
$user = "username"; // Username �����Դ��� Database
$pass = "password"; // Password
/* Step 2 : ����������ѧ �ҵ�����Կ����� */
$conn = mysql_connect($host,$user,$pass);
mysql_select_db($db,$conn);
/* Step 3 : ������ ����� sql*/
$sql = "select * from $table ORDER BY threadid DESC LIMIT 0,$limit";
$result = mysql_query($sql);
/* Step 4 : ǹ�ٻ������ */
while($row=mysql_fetch_array($result)){
$content .= "
<tr>
<td><img src=images/dot_head.gif border=0>
<a href='http://localhost/vb365/forum/showthread.php?t=$row[threadid]' target=\"_blank\">$row[title]</a> (��ҹ $row[views] / �ͺ $row[replycount])
</td>
</tr>";
}
$content .= "</table>";
?> |
��ѧ�ҡ�ѹ�֡��������º��������
��� copy ��ҧ����� PHP-Nuke-8.0-FCK_Thai_Special-Edition\html\blocks
�ҡ�������������ټ��Ǻ����к��ͧ PHP-Nuke ���ͷӡ������ �������� �������͡价����� last_vb_forum
�ͧ�����٤�Ѻ�� ����Һ��Ҩ�������ҧ�� ���������ҹ����¹������Ѻ block �ͧ PHP-Nuke �����੾����¹�����
blocknuke |
|
���仢�ҧ�� |
|
|
|