slothdog
29th December 06, 12:23 AM
well i dont hate it, i just have a severe dislike for it sometimes.
can you tell me why this php:
function outputbody($item, $template=""){
if ($template=="" || $template=="default"){ //DEFAULT TEMPLATE
?>
<DIV class="rsscontainer">
<div class="rsstitle"><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></div>
<div class="rssdate"><?php echo $item->get_date('d M Y g:i a'); ?></div>
<div class="rssdescription"><?php echo $item->get_description(); ?></div>
</DIV>
<?
} //end default template
else if ($template=="reviews"){ //"REVIEWS" TEMPLATE
?>
<DIV class="reviewbox">
<div class="reviewboxtitle"><a href="<?php echo $item->get_permalink(); ?>" ><?php echo $item->get_title(); ?></a><br /></div>
</DIV>
<?
} //end reviews template
else if ($template=="menus"){ //"MENUS" TEMPLATE
?>
<DIV class="menubox">
<div class="menuboxrsstitle"><a href="<?php echo $item->get_permalink(); ?>" ><?php echo $item->get_title(); ?></a><br /><br /></div>
<div class="menuboxrssdescription"><?php echo $item->get_description(); ?></div>
<div class="menuboxrssdate"><br /><b>Uploaded:</b> <?php echo $item->get_date('M, d Y'); ?></div>
</DIV>
<?
} //end menus template
else if ($template=="news"){ //"NEWS" TEMPLATE
?>
<DIV class="newsbox">
<div class="newsboxtitle"><a href="<?php echo $item->get_permalink(); ?>" ><?php echo $item->get_title(); ?></a><br /><br /></div>
<div class="newsboxdescription"><?php echo $item->get_description(); ?></div>
<div class="newsboxdate"><br /><b>Posted:</b> <?php echo $item->get_date('M, d Y'); ?></div>
</DIV>
<?
}
only displays the 'menus' template css and not any of the other ones using this style sheet:
.menubox {
padding: 10px;
margin-bottom: 5px;
margin-top: 5px;
margin-left: 5px;
margin-right: 5px;
border: 1px solid black;
}
.menubox .rsstitle { /*Style for .rsstitle DIV*/
font-weight: normal;
}
.menubox .rssdate { /*Style for .rssdate DIV*/
font-color: gray;
font-size: 90%;
}
.reviewbox {
padding: 10px;
margin-bottom: 5px;
margin-top: 5px;
margin-left: 5px;
margin-right: 5px;
}
.reviewbox .rsstitle { /*Style for .rsstitle DIV*/
font-weight: normal;
}
.reviewbox .rssdate { /*Style for .rssdate DIV*/
font-color: gray;
font-size: 90%;
}
.newsbox {
padding: 10px;
margin-bottom: 5px;
margin-top: 5px;
margin-left: 5px;
margin-right: 5px;
}
.newsbox .newstitle { /*Style for .rsstitle DIV*/
font-weight: normal;
}
.newsbox .newsdate { /*Style for .rssdate DIV*/
font-color: gray;
font-size: 90%;
}
can you tell me why this php:
function outputbody($item, $template=""){
if ($template=="" || $template=="default"){ //DEFAULT TEMPLATE
?>
<DIV class="rsscontainer">
<div class="rsstitle"><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></div>
<div class="rssdate"><?php echo $item->get_date('d M Y g:i a'); ?></div>
<div class="rssdescription"><?php echo $item->get_description(); ?></div>
</DIV>
<?
} //end default template
else if ($template=="reviews"){ //"REVIEWS" TEMPLATE
?>
<DIV class="reviewbox">
<div class="reviewboxtitle"><a href="<?php echo $item->get_permalink(); ?>" ><?php echo $item->get_title(); ?></a><br /></div>
</DIV>
<?
} //end reviews template
else if ($template=="menus"){ //"MENUS" TEMPLATE
?>
<DIV class="menubox">
<div class="menuboxrsstitle"><a href="<?php echo $item->get_permalink(); ?>" ><?php echo $item->get_title(); ?></a><br /><br /></div>
<div class="menuboxrssdescription"><?php echo $item->get_description(); ?></div>
<div class="menuboxrssdate"><br /><b>Uploaded:</b> <?php echo $item->get_date('M, d Y'); ?></div>
</DIV>
<?
} //end menus template
else if ($template=="news"){ //"NEWS" TEMPLATE
?>
<DIV class="newsbox">
<div class="newsboxtitle"><a href="<?php echo $item->get_permalink(); ?>" ><?php echo $item->get_title(); ?></a><br /><br /></div>
<div class="newsboxdescription"><?php echo $item->get_description(); ?></div>
<div class="newsboxdate"><br /><b>Posted:</b> <?php echo $item->get_date('M, d Y'); ?></div>
</DIV>
<?
}
only displays the 'menus' template css and not any of the other ones using this style sheet:
.menubox {
padding: 10px;
margin-bottom: 5px;
margin-top: 5px;
margin-left: 5px;
margin-right: 5px;
border: 1px solid black;
}
.menubox .rsstitle { /*Style for .rsstitle DIV*/
font-weight: normal;
}
.menubox .rssdate { /*Style for .rssdate DIV*/
font-color: gray;
font-size: 90%;
}
.reviewbox {
padding: 10px;
margin-bottom: 5px;
margin-top: 5px;
margin-left: 5px;
margin-right: 5px;
}
.reviewbox .rsstitle { /*Style for .rsstitle DIV*/
font-weight: normal;
}
.reviewbox .rssdate { /*Style for .rssdate DIV*/
font-color: gray;
font-size: 90%;
}
.newsbox {
padding: 10px;
margin-bottom: 5px;
margin-top: 5px;
margin-left: 5px;
margin-right: 5px;
}
.newsbox .newstitle { /*Style for .rsstitle DIV*/
font-weight: normal;
}
.newsbox .newsdate { /*Style for .rssdate DIV*/
font-color: gray;
font-size: 90%;
}