vitalich2013
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Я когда то ставил похожий вот его файл: <?php $sql_result = $db->query( "SELECT id, title, date, alt_name, category, short_story, flag FROM " . PREFIX . "_post WHERE approve='1' ORDER BY rating DESC LIMIT 0,8" );while ( $row = $db->get_row()){$row['date'] = strtotime( $row['date'] );$row['category'] = intval( $row['category'] );if( $config['allow_alt_url'] == "yes"){if( $row['flag'] and $config['seo_type']){if( $row['category'] and $config['seo_type'] == 2 ){$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";}else{$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";}}else{$full_link = $config['http_home_url'] . date( 'Y/m/d/', $row['date'] ) . $row['alt_name'] . ".html";}}else{$full_link = $config['http_home_url'] . "index.php?newsid=" . $row['id'];}$title = substr( $row['title'], 0, 23 ) . "...";$short_story = substr( strip_tags($row['short_story']), 0, 0 )."..."; $shortnews = $row['short_story']; preg_match_all( '#<img[^>]*\\ssrc=(\'|")(.*?)\\1.*?>#i',$shortnews,$total); foreach( $total[2] as $image ) echo('<a class="catName" href="'.$full_link.'"><table border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td width="18" background="{THEME}/images/ram/tl.png" height="18"> </td> <td background="{THEME}/images/ram/tm.png" height="18"> </td> <td width="18" background="{THEME}/images/ram/tr.png" height="18"> </td> </tr> <tr> <td width="18" background="{THEME}/images/ram/ml.png"> </td> <td><img align="center" src="'.$image.'" width="101" height="100"></td> <td width="18" background="{THEME}/images/ram/mr.png"> </td> </tr> <tr> <td width="18" background="{THEME}/images/ram/bl.png" height="18"> </td> <td background="{THEME}/images/ram/bm.png" height="18"> </td> <td width="18" background="{THEME}/images/ram/br.png" height="18"> </td> </tr> </tbody></table><br />'.$title.'</a>') ;} ?> | Всего записей: 3 | Зарегистр. 28-07-2013 | Отправлено: 08:43 28-07-2013 | Исправлено: vitalich2013, 09:20 28-07-2013 |
|