1
For a certain project I am doing, I need to change the format of the news article page. I need for all articles posted before a certain date to appear one way, and any articles posted after that to look another way.
Here is the code i want to change:
Quote:
if ( trim($bodytext) != '' ) {
$articletext = explode("[pagebreak]", $bodytext);
$story_pages = count($articletext);
if ($story_pages > 1) {
include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
$pagenav = new XoopsPageNav($story_pages, 1, $storypage, 'page', 'storyid='.$storyid);
$xoopsTpl->assign('pagenav', $pagenav->renderNav());
//$xoopsTpl->assign('pagenav', $pagenav->renderImageNav());
if ($storypage == 0) {
$story['text'] = $story['text'].'
'.$articletext[$storypage];
} else {
$story['text'] = $articletext[$storypage];
}
} else {
$story['text'] = $story['text'].'
'.$bodytext;
}}
I want all articles before a certain date to appear like the above.
I would like for all articles after a certain date to appear as:
Quote:
if ( trim($bodytext) != '' ) {
$articletext = explode("[pagebreak]", $bodytext);
$story_pages = count($articletext);
if ($story_pages > 1) {
include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
$pagenav = new XoopsPageNav($story_pages, 1, $storypage, 'page', 'storyid='.$storyid);
$xoopsTpl->assign('pagenav', $pagenav->renderNav());
//$xoopsTpl->assign('pagenav', $pagenav->renderImageNav());
if ($storypage == 0) {
$story['text'] = $articletext[$storypage];
} else {
$story['text'] = $articletext[$storypage];
}
} else {
$story['text'] = "
" .$bodytext;
}}
i'm not much of a programmer, but i'm assumming i need to
write this into an "if" "else" statement, but, i am having a problem defining a date and an "if" statement that will use a set date.
then again, i might be completely off in my assumption....
i hope this question is clear enough..