|
From: <ada...@us...> - 2003-08-31 22:59:06
|
Update of /cvsroot/phpwebsite-comm/modules/article/class
In directory sc8-pr-cvs1:/tmp/cvs-serv15351/class
Modified Files:
Article.php
Log Message:
-Publication date is now >= the same as creation date
-Changed some hardcoded links to use moduleLink to let Article take advantage of the phpWS mod_rewrite hack (to be finalized this week)
Index: Article.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Article.php 6 Aug 2003 02:26:32 -0000 1.10
--- Article.php 31 Aug 2003 22:59:02 -0000 1.11
***************
*** 86,90 ****
function PHPWS_Article ($id = NULL, $data = NULL)
{
! $this->menuLink = '<center><a href="index.php?module=article&disp=main_menu">'.$_SESSION['translate']->it('Main Menu').'</a></center>';
$this->sectionID = 'a';
$this->editmode = FALSE;
--- 86,93 ----
function PHPWS_Article ($id = NULL, $data = NULL)
{
! $this->menuLink = '<center>'
! . $GLOBALS['core']->moduleLink($_SESSION['translate']->it('Main Menu'), 'article'
! ,array('disp'=>'main_menu')).'</center>';
! // '<center><a href="index.php?module=article&disp=main_menu">'.$_SESSION['translate']->it('Main Menu').'</a></center>';
$this->sectionID = 'a';
$this->editmode = FALSE;
***************
*** 209,213 ****
$copyright = '<a href="'.$rights[rand(0,2)].'"><img src="http://'.PHPWS_SOURCE_HTTP
. 'mod/article/img/mark.gif" border="0" title="Article Manager module by by George! Software." alt="Article Manager module by by George! Software."></a>';
! $article_link = 'index.php?module=article&view='.$this->id;
$article_tags = array();
--- 212,216 ----
$copyright = '<a href="'.$rights[rand(0,2)].'"><img src="http://'.PHPWS_SOURCE_HTTP
. 'mod/article/img/mark.gif" border="0" title="Article Manager module by by George! Software." alt="Article Manager module by by George! Software."></a>';
! // $article_link = 'index.php?module=article&view='.$this->id;
$article_tags = array();
***************
*** 282,293 ****
/* otherwise, create a article link */
} else {
! $article_tags['NAVLIST'] .= '<a href="http://'.$GLOBALS['core']->home_http
! .'index.php?module=article&view='.$this->id
! .'&page_num='.$page_count.'">'.$page_list[$page_count-1].'</a><br />';
$article_tags['NAVBAR'] .= (($page_count > 1)? " | " : "")
! .'<a href="http://'.$GLOBALS['core']->home_http
! .'index.php?module=article&view='.$this->id
! .'&page_num='.$page_count.'"> '.$page_count.'</a>';
}
}
--- 285,295 ----
/* otherwise, create a article link */
} else {
! $article_tags['NAVLIST'] .= $GLOBALS['core']->moduleLink($page_list[$page_count-1], 'article'
! ,array('view'=>$this->id, 'page_num'=>$page_count))
! .'<br />';
$article_tags['NAVBAR'] .= (($page_count > 1)? " | " : "")
! . $GLOBALS['core']->moduleLink($page_count, 'article'
! ,array('view'=>$this->id, 'page_num'=>$page_count));
}
}
***************
*** 295,309 ****
$spacer = ' ';
if ($page_wanted > 1)
! $article_tags['PREV'] = "<a href=\"http://".$GLOBALS['core']->home_http
! .'index.php?module=article&view='.$this->id
! .'&page_num='. ($page_wanted-1) .'"><< '
! .$_SESSION['translate']->it('Previous Page').'</a>';
else
$article_tags['PREV'] = $spacer;
if ($page_wanted < $this->pages)
! $article_tags['NEXT'] = '<a href="http://'.$GLOBALS['core']->home_http
! .'index.php?module=article&view='.$this->id
! .'&page_num='. ($page_wanted+1).'">'
! .$_SESSION['translate']->it('Next Page').' >></a>';
else
$article_tags['NEXT'] = $spacer;
--- 297,307 ----
$spacer = ' ';
if ($page_wanted > 1)
! $article_tags['PREV'] = $GLOBALS['core']->moduleLink($_SESSION['translate']->it('Previous Page'), 'article'
! ,array('view'=>$this->id, 'page_num'=>($page_wanted-1)));
else
$article_tags['PREV'] = $spacer;
if ($page_wanted < $this->pages)
! $article_tags['NEXT'] = $GLOBALS['core']->moduleLink($_SESSION['translate']->it('Next Page'), 'article'
! ,array('view'=>$this->id, 'page_num'=>($page_wanted+1)));
else
$article_tags['NEXT'] = $spacer;
***************
*** 312,319 ****
else /* Summary Display */
{
! $article_tags['READMORE'] = '['.'<a href="'. $article_link. '">'. $_SESSION['translate']->it('Read More'). ' </a>]';
! $article_tags['LINK'] = 'http://'.$GLOBALS['core']->home_http.$article_link;
$article_tags['MOREWORDS'] = $this->wordcount." ".$_SESSION['translate']->it('more words');
! $article_tags['TITLE_LINK'] = '<a href="' . $article_link . '">' . $this->title . '</a>';
$article_tags['MOREPAGES'] = $this->pages . ' '
--- 310,319 ----
else /* Summary Display */
{
! $article_tags['READMORE'] = '['
! . $GLOBALS['core']->moduleLink($_SESSION['translate']->it('Read More'), 'article'
! ,array('view'=>$this->id)). ']';
$article_tags['MOREWORDS'] = $this->wordcount." ".$_SESSION['translate']->it('more words');
! $article_tags['TITLE_LINK'] = $GLOBALS['core']->moduleLink($this->title, 'article'
! ,array('view'=>$this->id));
$article_tags['MOREPAGES'] = $this->pages . ' '
***************
*** 669,677 ****
}
! if (isset($_POST['ARTICLE_publication_date_month']))
$this->publication_date =
! date("Y-m-d H:i:s", mktime(0,0,0,$_POST['ARTICLE_publication_date_month']
! ,$_POST['ARTICLE_publication_date_day']
! ,$_POST['ARTICLE_publication_date_year']));
if (isset($_POST['ARTICLE_expiration_date_month']))
$this->expiration_date =
--- 669,682 ----
}
! if (isset($_POST['ARTICLE_publication_date_month']))
! {
$this->publication_date =
! date("Y-m-d H:i:s", mktime(0,0,0,$_POST['ARTICLE_publication_date_month']
! ,$_POST['ARTICLE_publication_date_day']
! ,$_POST['ARTICLE_publication_date_year']));
! if ($this->publication_date < $this->created_date)
! $this->publication_date = $this->created_date;
! }
!
if (isset($_POST['ARTICLE_expiration_date_month']))
$this->expiration_date =
|