View Full Version : Seperating News Posts (Help Needed)

06-09-2006, 11:17 AM
Well after a day of searching and trying all sorts of random stuff I can't seem to get this to work... (PHP Noob alert) <-- :)

What I want is the news section on my site to display each news item in it's own content box (Like most sites have it setup).

Here is the code I have that displays the news (From the MySQL database).


$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
$seoname = isset($_REQUEST['seoname']) ? $_REQUEST['seoname'] : '';

if( !empty($seoname) ){
$seoname = explode("-",$seoname);
$seoname = end($seoname);

$leftMenu = getPages('parent','0');
foreach($leftMenu as $id=>$page){
echo "| <a href='{$page['seoname']}.html'>{$page['title']}</a> |";

if( !empty($seoname) ){
$page = getPage('seoname',$seoname);
$page = getPage('id','1');

<div class="titlebar-blank">
<div class="icon-arrow-down-accent" style="margin-top:8px"></div>
<div class = "title-news"><?=$page['title']?></div>
<div class="newsbg">
<div class="news-space"><?=nl2br($page['body'])?></div>
<br />

// Here is the "list" of news posts
$kids = getPages('parent',$page['id']);
if( count($kids) > 0 ){
foreach($kids as $id=>$kid){
echo "<div class='titlebar-blank'>";
echo "<div class='icon-arrow-down-accent' style='margin-top:8px'></div>";
echo "<div class = 'title-news'><a href='{$page['seoname']}-{$kid['seoname']}.html'>{$kid['title']}</a></div>";
echo "</div>";
echo "<div class='newsbg'>";
echo "<div class='news-space'>{$kid['summary']}</div>";
echo "</div";


Any help would be much appreciated.


07-08-2006, 07:11 PM
what is a "it's own content box"? where is the link to your site? where are the links to "most sites" that you want yours to look like?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum