Joovili v.2 - последни теми от форума

----------------------------------------------

Инструкции

-----------------> 1

Създавате си файл със име index_latest_forums.php

=========================================
<?php

@include("include/settings.inc.php");
@include("include/replace.inc.php");

echo '<link href="themes/'.$site_theme.'/joovili_style.css" rel="stylesheet" type="text/css">';

?>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td class="page_titles">Последни теми от форума</td>
</tr>
<tr>
<td height="20"><img src="themes/<?php echo $site_theme;?>/images/014.gif" width="100%" height="1" /></td>
</tr>
</table>
<?php
## Тук нагласяте колко теми(топика) да показва в случая са 10

$show_topics = '10';


$fetch_topics = mysql_query("SELECT * FROM joovili_forum_topics ORDER BY topic_id DESC

LIMIT $show_topics");

while ( $fetched_topics = mysql_fetch_array($fetch_topics) ) {


$fetch_picture = mysql_query("SELECT * FROM joovili_pictures

WHERE picture_username = '".$fetched_topics['topic_starter']."' AND picture_status = '1'

AND picture_type = '1'");


if ( mysql_num_rows($fetch_picture) == 1 ) {

$fetched_p = mysql_fetch_array($fetch_picture);

$topic_picture = 'include/images.inc.php?picture=../'.$fetched_p['picture_path'];

} else {

$topic_picture = 'themes/'.$site_theme.'/images/default_picture.gif';

}

?>
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td width="10%" rowspan="2"><img src="<?php echo $topic_picture;?>" width="40" height="40" class="picture_borders"></td>
<td width="90%" class="bold_text"><?php echo '<a href="'.$site_url.'/forums/view.php?page=1&&board='.$fetched_topics['topic_board'].'&&topic='.$fetched_topics['topic_id'].'" class="bold_text" target="_blank">'.$fetched_topics['topic_title'].'</a>'; ?></td>
</tr>
<tr>
<td class="text"><?php echo 'Публикувана от <a href="'.$site_url.'/'.$fetched_topics['topic_starter'].'" class="text" target="_blank">'.$fetched_topics['topic_starter'].'</a> on '.gmdate('jS M, H:i', $fetched_topics['topic_starter_date']); ?></td>
</tr>
<tr>
<td colspan="2"><hr color="#EEEEEE" width="100%" size="1" /></td>
</tr>
</table>
<?php

}

?>


-----------------> 2

Поставете следния код където искате да се показват последните теми!


<iframe src="index_latest_forums.php" width="100%" height="210" vspace="5" frameborder="0" marginheight="0" marginwidth="0"></iframe>





/ Трябва да сте регистриран за да напишете коментар /