Okay guys, this is for PHP coders.
I'm using Illumina and decided I hate the way the news is, so I tried to edit it to the new news.
I'm no pro at coding, but I've gotten pretty far.
I'll show images first, then explain what's wrong.
Mine:
Habbo's:
Now my problem is the bullets at the top.
Mine doesn't load all the news stories and only shows one bullet.
Anybody know how to fix this?
PHP Code:public static function getMainStories($amt) { global $db, $tpl, $light;
if($r = $db->query("SELECT id,title,topstory_image,snippet FROM site_news ORDER BY id DESC LIMIT " . $amt . "")) { $c = 0; while($a = $r->fetch_assoc()) { $disp = 'block'; $imgurl = $a['topstory_image']; if($c > 0) { $disp = 'none'; } $_seo = $a['id'] . "-" . strtolower(str_replace(' ', '-', $a['title'])); echo '<div id="promo-bullets"><a href="#"></a></div> <div class="promo-container" style="background-image: url(' . $imgurl . ');"> <div class="promo-content-container"> <div class="promo-content"> <div class="title"> <a href="' . WWW . '/articles/' . $_seo . '">' . $light->filter($a['title']) . '</a> </div> <div class="body"> ' . $a['snippet'] . ' </div> </div> </div> <div class="promo-link-container"> <div class="enter-hotel-btn"> <div class="open enter-btn"> <a href="' . WWW . '/articles/' . $_seo . '">Read the full article »</a> </div> </div> <b></b> </div> </div>'; $c++; } } else { $db->databaseError($db->error); } }




Reply With Quote

