|
From: <ada...@us...> - 2003-10-22 02:15:25
|
Update of /cvsroot/phpwebsite-comm/modules/article/class
In directory sc8-pr-cvs1:/tmp/cvs-serv22121/class
Modified Files:
Article.php ArticleManager.php Section.php
Log Message:
2.0 Release
Index: Article.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Article.php 20 Sep 2003 22:11:42 -0000 1.13
--- Article.php 21 Oct 2003 21:14:26 -0000 1.14
***************
*** 39,43 ****
* @param int editmode : Temporary Flag showing what mode we're in
* @param int announce : Whether or not this article will show up in the homepage summary list
! * @param int linkBack : Link back to where Article Manager was called from
//* @param array categories : Temporary holding array of selected categories
*
--- 39,44 ----
* @param int editmode : Temporary Flag showing what mode we're in
* @param int announce : Whether or not this article will show up in the homepage summary list
! * @param string meta_keywords : Keywords to include in this page's metatags
! * @param string meta_robots : Search Engine instructions for this page's metatags
//* @param array categories : Temporary holding array of selected categories
*
***************
*** 73,76 ****
--- 74,79 ----
var $announce;
var $menuLink;
+ var $meta_keywords;
+ var $meta_robots;
/**
***************
*** 133,136 ****
--- 136,141 ----
$this->version = $data['version'];
$this->announce = $data['announce'];
+ $this->meta_keywords = $data['meta_keywords'];
+ $this->meta_robots = $data['meta_robots'];
}
// otherwise this is a new article. Load Default values.
***************
*** 166,169 ****
--- 171,175 ----
$this->version = -1;
$this->announce = 1;
+ $this->meta_keywords = $this->meta_robots = '';
}
}
***************
*** 190,202 ****
}
/* Now test to see if article is publishable */
! $now = date('Y-m-d H:i:s');
! if (!($this->mainarticle
! || (($this->approved || $GLOBALS['module']=='approval')
! && $this->publication_date <= $now
! && ($this->expiration_date > $now || $this->expiration_date==NULL))
! || $_SESSION['SES_ART_master']->can('edit',$this->created_username)))
{
$GLOBALS['CNT_article']['content'] =
! $_SESSION['translate']->it('The article you requested has expired.');
PHPWS_Fatcat::deactivate($this->id, 'article');
return;
--- 196,203 ----
}
/* Now test to see if article is publishable */
! if (!$this->is_viewable())
{
$GLOBALS['CNT_article']['content'] =
! $_SESSION['translate']->it('The article you requested is not viewable.');
PHPWS_Fatcat::deactivate($this->id, 'article');
return;
***************
*** 213,222 ****
if ($this->summary)
$article_tags['SUMMARYTEXT'] = PHPWS_Core::parseOutput($this->summary);
- if($GLOBALS['module']!='home')
- {
- $GLOBALS['Layout_title'] = $article_tags['TITLE'] . ' - ' . $_SESSION['OBJ_layout']->page_title;
- $_SESSION['OBJ_layout']->meta_vars['meta_description'] = $article_tags['SUMMARYTEXT']
- . ' - ' . $_SESSION['OBJ_layout']->meta_description;
- }
$article_tags['HITS'] = $this->hits;
$article_tags['CREATED_DATE'] = $this->created_date;
--- 214,217 ----
***************
*** 232,235 ****
--- 227,239 ----
else $article_tags['UPDATED_USER'] = $this->updated_username;
+ /* Create custom metatags */
+ if($Fullpage && $_SESSION['SES_ART_master']->val['make_metatags'])
+ {
+ $GLOBALS['Layout_title'] = $article_tags['TITLE'] . ' - ' . strip_tags($_SESSION['OBJ_layout']->page_title);
+ $_SESSION['OBJ_layout']->meta_vars['meta_description'] = strip_tags($article_tags['SUMMARYTEXT']);
+ $_SESSION['OBJ_layout']->meta_vars['meta_author'] = strip_tags($article_tags['CREATED_USER'].' @ '.PHPWS_HOME_HTTP);
+ $_SESSION['OBJ_layout']->meta_vars['meta_keywords'] = strip_tags($this->meta_keywords);
+ $_SESSION['OBJ_layout']->meta_vars['meta_robots'] = $this->meta_robots;
+ }
$article_tags['CREATED_TEXT'] = "<b>"
. $_SESSION['translate']->it('Created By [var1] on [var2]', '</b>'
***************
*** 321,333 ****
{
$num_comments=$_SESSION['PHPWS_CommentManager']->numComments('article',$this->id);
! $article_tags['NUM_COMMENTS']="[<a href=\"". $article_link. "\">\n"
! .(($num_comments>0)
! ?$num_comments
! :$_SESSION['translate']->it('Add'))
! ." "
! .(($num_comments==1)
! ?$_SESSION['translate']->it('Comment')
! :$_SESSION['translate']->it('Comments'))
! . "</a>]";
}
}
--- 325,337 ----
{
$num_comments=$_SESSION['PHPWS_CommentManager']->numComments('article',$this->id);
! $article_tags['NUM_COMMENTS']= $GLOBALS['core']->moduleLink((($num_comments>0)
! ?$num_comments
! :$_SESSION['translate']->it('Add'))
! ." "
! .(($num_comments==1)
! ?$_SESSION['translate']->it('Comment')
! :$_SESSION['translate']->it('Comments'))
! , 'article'
! , array('view'=>$this->id), null, null, 'comments');
}
}
***************
*** 362,367 ****
{
/* Show it in summary format */
! $GLOBALS['CNT_article_summaries']['content']
! .= $GLOBALS['core']->processTemplate($article_tags, 'article', 'summary_view.tpl');
}
elseif ($returnHTML)
--- 366,374 ----
{
/* Show it in summary format */
! if ($returnHTML)
! return $GLOBALS['core']->processTemplate($article_tags, 'article', 'summary_view.tpl');
! else
! $GLOBALS['CNT_article_summaries']['content']
! .= $GLOBALS['core']->processTemplate($article_tags, 'article', 'summary_view.tpl');
}
elseif ($returnHTML)
***************
*** 435,439 ****
$article_tags['TITLE_LABEL'] = $_SESSION['translate']->it('Title').':';
$article_tags['TITLE'] = PHPWS_Core::formTextField('ARTICLE_title', htmlspecialchars($this->title), 55, 70)
! . $_SESSION['OBJ_help']->show_link('article', 'article_title');
// Set up link back to main menu
--- 442,446 ----
$article_tags['TITLE_LABEL'] = $_SESSION['translate']->it('Title').':';
$article_tags['TITLE'] = PHPWS_Core::formTextField('ARTICLE_title', htmlspecialchars($this->title), 55, 70)
! . CLS_help::show_link('article', 'article_title');
// Set up link back to main menu
***************
*** 443,447 ****
// Get the article summary text
$article_tags['SUMMARY_LABEL'] = $_SESSION['translate']->it('Summary').':'
! . $_SESSION['OBJ_help']->show_link('article', "article_summary");
$article_tags['SUMMARYTEXT'] = PHPWS_Core::formTextArea("ARTICLE_summary",htmlspecialchars($this->summary),3,60);
--- 450,454 ----
// Get the article summary text
$article_tags['SUMMARY_LABEL'] = $_SESSION['translate']->it('Summary').':'
! . CLS_help::show_link('article', "article_summary");
$article_tags['SUMMARYTEXT'] = PHPWS_Core::formTextArea("ARTICLE_summary",htmlspecialchars($this->summary),3,60);
***************
*** 492,496 ****
{
/* Begin creating "Article Information" box */
! $article_tags['INFORMATION_LABEL'] = $_SESSION['translate']->it('Article Information'). $_SESSION['OBJ_help']->show_link('article', 'article_info');
$article_tags['CREATED_TEXT'] = "<b>" . $_SESSION['translate']->it('Created By [var1] on [var2]', '</b>'.$this->created_username.'<b>', '</b>'.$this->created_date);
$article_tags['UPDATED_TEXT'] = "<b>" . $_SESSION['translate']->it('Last Updated By [var1] on [var2]', '</b>'.$this->updated_username.'<b>', '</b>'.$this->updated_date);
--- 499,503 ----
{
/* Begin creating "Article Information" box */
! $article_tags['INFORMATION_LABEL'] = $_SESSION['translate']->it('Article Information'). CLS_help::show_link('article', 'article_info');
$article_tags['CREATED_TEXT'] = "<b>" . $_SESSION['translate']->it('Created By [var1] on [var2]', '</b>'.$this->created_username.'<b>', '</b>'.$this->created_date);
$article_tags['UPDATED_TEXT'] = "<b>" . $_SESSION['translate']->it('Last Updated By [var1] on [var2]', '</b>'.$this->updated_username.'<b>', '</b>'.$this->updated_date);
***************
*** 509,513 ****
$GLOBALS['core']->formCheckBox('ARTICLE_announce',1,$this->announce,NULL
,$_SESSION['translate']->it('Announce changes to this article on the homepage'))
! . $_SESSION['OBJ_help']->show_link('article', 'article_announce');
if ($_SESSION['OBJ_user']->allow_access('article', "allow_comments")
--- 516,520 ----
$GLOBALS['core']->formCheckBox('ARTICLE_announce',1,$this->announce,NULL
,$_SESSION['translate']->it('Announce changes to this article on the homepage'))
! . CLS_help::show_link('article', 'article_announce');
if ($_SESSION['OBJ_user']->allow_access('article', "allow_comments")
***************
*** 517,521 ****
$GLOBALS['core']->formCheckBox('ARTICLE_allow_comments',1,$this->allow_comments,NULL
,$_SESSION['translate']->it('Allow Comments'))
! . $_SESSION['OBJ_help']->show_link('article', 'article_allow_comments');
if ($_SESSION['OBJ_user']->allow_access('article', "allow_anon"))
--- 524,528 ----
$GLOBALS['core']->formCheckBox('ARTICLE_allow_comments',1,$this->allow_comments,NULL
,$_SESSION['translate']->it('Allow Comments'))
! . CLS_help::show_link('article', 'article_allow_comments');
if ($_SESSION['OBJ_user']->allow_access('article', "allow_anon"))
***************
*** 524,528 ****
$GLOBALS['core']->formCheckBox('ARTICLE_allow_anonymous',1,$this->allow_anonymous,NULL
,$_SESSION['translate']->it('Allow Comments by unregistered users'))
! . $_SESSION['OBJ_help']->show_link('article', 'article_allow_anonymous');
}
}
--- 531,535 ----
$GLOBALS['core']->formCheckBox('ARTICLE_allow_anonymous',1,$this->allow_anonymous,NULL
,$_SESSION['translate']->it('Allow Comments by unregistered users'))
! . CLS_help::show_link('article', 'article_allow_anonymous');
}
}
***************
*** 535,539 ****
,date('Ymd', strtotime($this->publication_date))
,$currentYear,$currentYear + $_SESSION['SES_ART_master']->val['default_year_count'])
! . $_SESSION['OBJ_help']->show_link('article', "article_publication_date");
if ($_SESSION['SES_ART_master']->val['can_expire'])
--- 542,546 ----
,date('Ymd', strtotime($this->publication_date))
,$currentYear,$currentYear + $_SESSION['SES_ART_master']->val['default_year_count'])
! . CLS_help::show_link('article', "article_publication_date");
if ($_SESSION['SES_ART_master']->val['can_expire'])
***************
*** 548,557 ****
,$currentYear
, $currentYear + $_SESSION['SES_ART_master']->val['default_year_count'])
! . $_SESSION['OBJ_help']->show_link('article', 'article_expiration_date');
$article_tags['EXPIRATION_FLAG'] =
PHPWS_Core::formCheckBox('ARTICLE_expiration_flag',1
,($this->expiration_date != NULL)?0:1
, NULL, $_SESSION['translate']->it('Never Expires'))
! . $_SESSION['OBJ_help']->show_link('article', 'article_expiration_flag');
}
}
--- 555,564 ----
,$currentYear
, $currentYear + $_SESSION['SES_ART_master']->val['default_year_count'])
! . CLS_help::show_link('article', 'article_expiration_date');
$article_tags['EXPIRATION_FLAG'] =
PHPWS_Core::formCheckBox('ARTICLE_expiration_flag',1
,($this->expiration_date != NULL)?0:1
, NULL, $_SESSION['translate']->it('Never Expires'))
! . CLS_help::show_link('article', 'article_expiration_flag');
}
}
***************
*** 577,590 ****
$article_tags['TEMPLATE_LABEL'] = $_SESSION['translate']->it('Page Format').':';
$article_tags['TEMPLATE'] = $GLOBALS['core']->formSelect('ARTICLE_template', $article_tpl_array, $this->template, true, NULL, NULL)
! . $_SESSION['OBJ_help']->show_link('article', "article_template");
}
!
/* FatCat Category Selection */
if (isset($_SESSION['OBJ_fatcat']))
{
$article_tags['CATEGORY_LABEL'] = $_SESSION['translate']->it('Related Topics').':'
! . $_SESSION['OBJ_help']->show_link('article', 'categories');
$article_tags['CATEGORY'] = $_SESSION['OBJ_fatcat']->showSelect($this->id,'multiple',NULL,'article');
}
$article_tags['SAVE_WARNING'] = "<div class=\"errortext\"><b>".$_SESSION['translate']->it('ATTENTION!')
--- 584,615 ----
$article_tags['TEMPLATE_LABEL'] = $_SESSION['translate']->it('Page Format').':';
$article_tags['TEMPLATE'] = $GLOBALS['core']->formSelect('ARTICLE_template', $article_tpl_array, $this->template, true, NULL, NULL)
! . CLS_help::show_link('article', "article_template");
}
!
/* FatCat Category Selection */
if (isset($_SESSION['OBJ_fatcat']))
{
$article_tags['CATEGORY_LABEL'] = $_SESSION['translate']->it('Related Topics').':'
! . CLS_help::show_link('article', 'categories');
$article_tags['CATEGORY'] = $_SESSION['OBJ_fatcat']->showSelect($this->id,'multiple',NULL,'article');
}
+
+ /* Metatag Customization */
+ if ($_SESSION['SES_ART_master']->val['make_metatags'])
+ {
+ $article_tags['META_KEYWORDS'] .= $_SESSION['translate']->it('Keywords for this article') .': '
+ . CLS_help::show_link('article', 'meta_keywords')
+ . $GLOBALS['core']->formTextField('ARTICLE_keywords', htmlspecialchars($this->meta_keywords), 60, 100);
+ if ($_SESSION['OBJ_user']->allow_access('article', 'edit_robots'))
+ $article_tags['META_ROBOTS'] = $_SESSION['translate']->it('Search Engine instructions').':'
+ . CLS_help::show_link('article', 'meta_robots')
+ . $GLOBALS['core']->formSelect('ARTICLE_robots'
+ , array('--'=>'Default Settings'
+ ,'00'=>'noindex, nofollow'
+ ,'01'=>'noindex, follow'
+ ,'10'=>'index, nofollow'
+ ,'11'=>'index, follow')
+ , $this->meta_robots, false, true);
+ }
$article_tags['SAVE_WARNING'] = "<div class=\"errortext\"><b>".$_SESSION['translate']->it('ATTENTION!')
***************
*** 594,600 ****
. $_SESSION['translate']->it('You can return and edit this article after you have saved it') . '.<br />';
$article_tags['SAVE_BUTTON'] = PHPWS_Core::formSubmit($_SESSION['translate']->it('Save Article'), 'ARTICLE_vars[edit:save]')
! . $_SESSION['OBJ_help']->show_link('article', "article_save");
$article_tags['CANCEL_BUTTON'] = PHPWS_Core::formSubmit($_SESSION['translate']->it('Cancel Editing'), 'ARTICLE_vars[edit:cancel]')
! . $_SESSION['OBJ_help']->show_link('article', "article_cancel");
}
/* Create all necessary editing forms */
--- 619,625 ----
. $_SESSION['translate']->it('You can return and edit this article after you have saved it') . '.<br />';
$article_tags['SAVE_BUTTON'] = PHPWS_Core::formSubmit($_SESSION['translate']->it('Save Article'), 'ARTICLE_vars[edit:save]')
! . CLS_help::show_link('article', "article_save");
$article_tags['CANCEL_BUTTON'] = PHPWS_Core::formSubmit($_SESSION['translate']->it('Cancel Editing'), 'ARTICLE_vars[edit:cancel]')
! . CLS_help::show_link('article', "article_cancel");
}
/* Create all necessary editing forms */
***************
*** 609,613 ****
. PHPWS_Core::formSubmit($_SESSION['translate']->it('Save Title and Summary')
, 'ARTICLE_vars[edit:save_title]')
! . $_SESSION['OBJ_help']->show_link('article', 'save_title')
. '</center><hr />';
--- 634,638 ----
. PHPWS_Core::formSubmit($_SESSION['translate']->it('Save Title and Summary')
, 'ARTICLE_vars[edit:save_title]')
! . CLS_help::show_link('article', 'save_title')
. '</center><hr />';
***************
*** 672,675 ****
--- 697,702 ----
if ($this->publication_date < $this->created_date)
$this->publication_date = $this->created_date;
+ if ($this->updated_date < $this->publication_date)
+ $this->updated_date = $this->publication_date;
}
***************
*** 683,686 ****
--- 710,724 ----
if (isset($_POST['ARTICLE_template']))
$this->template = str_replace(' ','_',$_POST['ARTICLE_template']);
+ if (isset($_POST['ARTICLE_keywords']))
+ $this->meta_keywords = $GLOBALS['core']->parseInput($_POST['ARTICLE_keywords']);
+ if (isset($_POST['ARTICLE_robots']))
+ {
+ echo 'robots:'.$_POST['ARTICLE_robots'];
+ if ($_POST['ARTICLE_robots']=='--')
+ $this->meta_robots = '';
+ else
+ $this->meta_robots = $_POST['ARTICLE_robots'];
+ echo 'meta:'.$this->meta_robots.':';
+ }
}
***************
*** 714,717 ****
--- 752,757 ----
$query_data['version'] = ++$this->version;
$query_data['announce'] = $this->announce;
+ $query_data['meta_keywords'] = $this->meta_keywords;
+ $query_data['meta_robots'] = $this->meta_robots;
/* Calculate current wordcount */
$query_data['wordcount'] = 0;
***************
*** 778,782 ****
if(isset($_SESSION['OBJ_fatcat']))
$_SESSION['OBJ_fatcat']->saveSelect($query_data['title']
! , 'index.php?module=article&view='.$this->id, $this->id, 'article');
/* Stop here if we're just importing records */
--- 818,823 ----
if(isset($_SESSION['OBJ_fatcat']))
$_SESSION['OBJ_fatcat']->saveSelect($query_data['title']
! , 'index.php?module=article&view='.$this->id
! , $this->id, null, 'article', null, null, $this->is_viewable(true));
/* Stop here if we're just importing records */
***************
*** 1111,1115 ****
* Displays this article's row in a fatCat category display
*
- *
* @author Eloi George <el...@NO...>
* @module Article Manager
--- 1152,1155 ----
***************
*** 1120,1123 ****
--- 1160,1184 ----
$this = new PHPWS_Article($id);
return $this->view(false, true);
+ }
+
+
+ /**
+ * Tests to see if this aticle can be viewed
+ *
+ * @author Eloi George <el...@NO...>
+ * @module Article Manager
+ * @param bool saving : Whether this is being called by function save() or not.
+ */
+ function is_viewable ($saving = false)
+ {
+ $now = date('Y-m-d H:i:s');
+ return ($this->mainarticle
+ || ($this->approved
+ && $this->publication_date <= $now
+ && ($this->expiration_date > $now || $this->expiration_date==NULL))
+ || ($_SESSION['SES_ART_master']->can('edit',$this->created_username)
+ && $GLOBALS['module']=='article'
+ && !$saving)
+ || $GLOBALS['module']=='approval');
}
}
Index: ArticleManager.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/article/class/ArticleManager.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ArticleManager.php 20 Sep 2003 22:19:08 -0000 1.9
--- ArticleManager.php 21 Oct 2003 21:14:26 -0000 1.10
***************
*** 64,68 ****
/* This method of setting up the sql allows me to add group-based restrictions later */
$this->sql_article_table = $GLOBALS['core']->tbl_prefix.'mod_article AS A';
! $this->sql_predicate = "";
/* Set up the list search criteria */
--- 64,68 ----
/* This method of setting up the sql allows me to add group-based restrictions later */
$this->sql_article_table = $GLOBALS['core']->tbl_prefix.'mod_article AS A';
! $this->sql_predicate = '';
/* Set up the list search criteria */
***************
*** 228,233 ****
?" ((TBA))"
:"";
! $row['ARTICLE_TITLE'] = '<a href=index.php?module=article&view='.$value['id']
! .' id='.$value['id'].'>'. stripslashes($value['title']) . $tba.'</a>';
/* Set var to show whether this is the homepage article or not */
--- 228,233 ----
?" ((TBA))"
:"";
! $row['ARTICLE_TITLE'] = $GLOBALS['core']->moduleLink(stripslashes($value['title']), 'article'
! ,array('view'=>$value['id']));
/* Set var to show whether this is the homepage article or not */
***************
*** 261,267 ****
$row['DELETE'] = '<input type="submit" name="ARTICLE_vars[edit:delete]" value="'.$Fdelete.'" />';
! $content[0] = $GLOBALS['core']->processTemplate($row,'article','listing_row.tpl')
! . $GLOBALS['core']->formHidden('module', 'article')
! . $GLOBALS['core']->formHidden('ARTICLE_id', $value['id']);
$tags['LIST_ROWS'] .= $GLOBALS['core']->makeForm('ARTICLE_main_menu', 'index.php#'.$value['id'], $content, 'post', 0, 0);
}
--- 261,267 ----
$row['DELETE'] = '<input type="submit" name="ARTICLE_vars[edit:delete]" value="'.$Fdelete.'" />';
! $content[0] = '<input type="hidden" name="module" value="article" id='.$value['id'].' />'
! . '<input type="hidden" name="ARTICLE_id" value="'.$value['id'].'" />'
! . $GLOBALS['core']->processTemplate($row,'article','listing_row.tpl');
$tags['LIST_ROWS'] .= $GLOBALS['core']->makeForm('ARTICLE_main_menu', 'index.php#'.$value['id'], $content, 'post', 0, 0);
}
***************
*** 270,277 ****
$tags['TITLE'] = $_SESSION['translate']->it('Title');
$tags['HOME_FLAG'] = $_SESSION['translate']->it('Homepage') . '?'
! . $_SESSION['OBJ_help']->show_link('article', 'list_mainarticle');
$tags['DATE'] = $_SESSION['translate']->it($temp_date_title);
$tags['ACTION'] = $_SESSION['translate']->it('Action')
! . $_SESSION['OBJ_help']->show_link('article', 'list_action');
$tags['PAGE_BACKWARD_LINK'] = $this->pager->getBackLink();
$tags['PAGE_FORWARD_LINK'] = $this->pager->getForwardLink();
--- 270,277 ----
$tags['TITLE'] = $_SESSION['translate']->it('Title');
$tags['HOME_FLAG'] = $_SESSION['translate']->it('Homepage') . '?'
! . CLS_help::show_link('article', 'list_mainarticle');
$tags['DATE'] = $_SESSION['translate']->it($temp_date_title);
$tags['ACTION'] = $_SESSION['translate']->it('Action')
! . CLS_help::show_link('article', 'list_action');
$tags['PAGE_BACKWARD_LINK'] = $this->pager->getBackLink();
$tags['PAGE_FORWARD_LINK'] = $this->pager->getForwardLink();
***************
*** 611,616 ****
$content .= '<br />';
$content .= date('F d', strtotime($summary['updated_date']))
! . ' <br /><a href="index.php?module=article&view='
! . $summary['id'] .'">' . $summary['title'] . "</a><br />\n";
}
if (isset($content))
--- 611,616 ----
$content .= '<br />';
$content .= date('F d', strtotime($summary['updated_date']))
! . ' <br />' . $GLOBALS['core']->moduleLink($summary['title'], 'article'
! ,array('view'=>$summary['id']))."\n";
}
if (isset($content))
***************
*** 653,658 ****
$content .= '<br />';
$content .= date('F d', strtotime($summary['updated_date']))
! . ' <br /><a href="index.php?module=article&view='
! . $summary['id'] .'">' . $summary['title'] . "</a><br />\n";
}
if (isset($content))
--- 653,658 ----
$content .= '<br />';
$content .= date('F d', strtotime($summary['updated_date']))
! . ' <br />' . $GLOBALS['core']->moduleLink($summary['title'], 'article'
! ,array('view'=>$summary['id']))."\n";
}
if (isset($content))
***************
*** 754,758 ****
$myelements[0] = $GLOBALS['core']->formFile('LIB_loaded_image', 33, 255, $_SESSION['translate']->it('File to Upload').': ')
. "\n " . $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Save'), 'ARTICLE_vars[config:save_library_item]')
! . $_SESSION['OBJ_help']->show_link('article', 'section_lib_image')
. $GLOBALS['core']->formHidden('module', 'article');
--- 754,758 ----
$myelements[0] = $GLOBALS['core']->formFile('LIB_loaded_image', 33, 255, $_SESSION['translate']->it('File to Upload').': ')
. "\n " . $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Save'), 'ARTICLE_vars[config:save_library_item]')
! . CLS_help::show_link('article', 'section_lib_image')
. $GLOBALS['core']->formHidden('module', 'article');
Index: Section.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Section.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Section.php 20 Sep 2003 22:14:17 -0000 1.7
--- Section.php 21 Oct 2003 21:14:26 -0000 1.8
***************
*** 173,185 ****
}
else $myform[0] .= $GLOBALS['core']->formSubmit($remove, 'ARTICLE_vars[section:remove]');
! $myform[0] .= $_SESSION['OBJ_help']->show_link('article', 'section_remove');
$myform[0] .= $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Edit'), 'ARTICLE_vars[section:edit]')
! .$_SESSION['OBJ_help']->show_link('article', 'section_edit');
if (count($_SESSION['SES_ART_article']->order)>1)
{
$myform[0] .= $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Move Up'), 'ARTICLE_vars[section:move_up]');
$myform[0] .= $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Move Down'), 'ARTICLE_vars[section:move_down]')
! .$_SESSION['OBJ_help']->show_link('article', 'section_move');
}
$section_content .= '<div class="smalltext" style="clear : both;" align="right">'
--- 173,185 ----
}
else $myform[0] .= $GLOBALS['core']->formSubmit($remove, 'ARTICLE_vars[section:remove]');
! $myform[0] .= CLS_help::show_link('article', 'section_remove');
$myform[0] .= $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Edit'), 'ARTICLE_vars[section:edit]')
! .CLS_help::show_link('article', 'section_edit');
if (count($_SESSION['SES_ART_article']->order)>1)
{
$myform[0] .= $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Move Up'), 'ARTICLE_vars[section:move_up]');
$myform[0] .= $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Move Down'), 'ARTICLE_vars[section:move_down]')
! .CLS_help::show_link('article', 'section_move');
}
$section_content .= '<div class="smalltext" style="clear : both;" align="right">'
***************
*** 211,224 ****
$myelements[0] = $GLOBALS['core']->formCheckBox('SECT_new_page',1,$this->new_page,NULL, $_SESSION['translate']->it('Start on new page?'))
! . $_SESSION['OBJ_help']->show_link('article', 'section_new_page') . '<br />';
$myelements[0] .= $_SESSION['SES_ART_master']->get_error('SECT_title')
. $_SESSION['translate']->it('Section Title').':'
! . $_SESSION['OBJ_help']->show_link('article', 'section_title').'<br />'
. $GLOBALS['core']->js_insert('wysiwyg', 'SECT_edit', 'SECT_title');
$myelements[0] .= $GLOBALS['core']->formTextField('SECT_title', htmlspecialchars($this->title), 55, 70)
. '<br />';
$myelements[0] .= $_SESSION['translate']->it('Section Text').':'
! . $_SESSION['OBJ_help']->show_link('article', 'section_text') .'<br />'
. $GLOBALS['core']->js_insert('wysiwyg', 'SECT_edit', 'SECT_text');
$myelements[0] .= $GLOBALS['core']->formTextArea('SECT_text', stripslashes($this->text), 20, 60)
--- 211,224 ----
$myelements[0] = $GLOBALS['core']->formCheckBox('SECT_new_page',1,$this->new_page,NULL, $_SESSION['translate']->it('Start on new page?'))
! . CLS_help::show_link('article', 'section_new_page') . '<br />';
$myelements[0] .= $_SESSION['SES_ART_master']->get_error('SECT_title')
. $_SESSION['translate']->it('Section Title').':'
! . CLS_help::show_link('article', 'section_title').'<br />'
. $GLOBALS['core']->js_insert('wysiwyg', 'SECT_edit', 'SECT_title');
$myelements[0] .= $GLOBALS['core']->formTextField('SECT_title', htmlspecialchars($this->title), 55, 70)
. '<br />';
$myelements[0] .= $_SESSION['translate']->it('Section Text').':'
! . CLS_help::show_link('article', 'section_text') .'<br />'
. $GLOBALS['core']->js_insert('wysiwyg', 'SECT_edit', 'SECT_text');
$myelements[0] .= $GLOBALS['core']->formTextArea('SECT_text', stripslashes($this->text), 20, 60)
***************
*** 247,251 ****
. $_SESSION['translate']->it('Upload a new image').': '
. PHPWS_Core::formFile('SECT_loaded_image', 33, 255)
! . $_SESSION['OBJ_help']->show_link('article', 'section_image') . '<br />';
}
--- 247,251 ----
. $_SESSION['translate']->it('Upload a new image').': '
. PHPWS_Core::formFile('SECT_loaded_image', 33, 255)
! . CLS_help::show_link('article', 'section_image') . '<br />';
}
***************
*** 268,285 ****
$myelements[0] .= $_SESSION['translate']->it('Or select one from the library').': '
. $GLOBALS['core']->formSelect('SECT_lib_image', $lib_array, $this->image['name'], NULL, NULL, NULL)
! . $_SESSION['OBJ_help']->show_link('article', 'section_lib_image') . '<br /><br />';
/* Enter alt text, link, & image_caption */
$myelements[0] .= $_SESSION['SES_ART_master']->get_error('SECT_alt')
. $_SESSION['translate']->it('Short Image Description') .': '
! . $_SESSION['OBJ_help']->show_link('article', 'section_image_desc')
. $GLOBALS['core']->formTextField('SECT_alt', htmlspecialchars($this->image['alt']), 60, 255)
. '<br />';
$myelements[0] .= $_SESSION['translate']->it('This Image Links To') . '...: '
! . $_SESSION['OBJ_help']->show_link('article', 'section_image_link')
. $GLOBALS['core']->formTextField('SECT_link', htmlspecialchars($this->image['link']), 60, 255)
. '<br />';
$myelements[0] .= $_SESSION['translate']->it('Link caption').': '
! . $_SESSION['OBJ_help']->show_link('article', 'section_image_caption')
. $GLOBALS['core']->formTextField('SECT_image_caption', htmlspecialchars($this->image['caption']), 60, 255)
. '<br />';
--- 268,285 ----
$myelements[0] .= $_SESSION['translate']->it('Or select one from the library').': '
. $GLOBALS['core']->formSelect('SECT_lib_image', $lib_array, $this->image['name'], NULL, NULL, NULL)
! . CLS_help::show_link('article', 'section_lib_image') . '<br /><br />';
/* Enter alt text, link, & image_caption */
$myelements[0] .= $_SESSION['SES_ART_master']->get_error('SECT_alt')
. $_SESSION['translate']->it('Short Image Description') .': '
! . CLS_help::show_link('article', 'section_image_desc')
. $GLOBALS['core']->formTextField('SECT_alt', htmlspecialchars($this->image['alt']), 60, 255)
. '<br />';
$myelements[0] .= $_SESSION['translate']->it('This Image Links To') . '...: '
! . CLS_help::show_link('article', 'section_image_link')
. $GLOBALS['core']->formTextField('SECT_link', htmlspecialchars($this->image['link']), 60, 255)
. '<br />';
$myelements[0] .= $_SESSION['translate']->it('Link caption').': '
! . CLS_help::show_link('article', 'section_image_caption')
. $GLOBALS['core']->formTextField('SECT_image_caption', htmlspecialchars($this->image['caption']), 60, 255)
. '<br />';
***************
*** 310,314 ****
. $GLOBALS['core']->formSelect('SECT_template', $sect_tpl_array
, str_replace('_',' ',$this->template), true, NULL, NULL)
! . $_SESSION['OBJ_help']->show_link('article', 'section_template')
. '<br /><br />';
}
--- 310,314 ----
. $GLOBALS['core']->formSelect('SECT_template', $sect_tpl_array
, str_replace('_',' ',$this->template), true, NULL, NULL)
! . CLS_help::show_link('article', 'section_template')
. '<br /><br />';
}
***************
*** 316,320 ****
$myelements[0] .= $GLOBALS['core']->formHidden('module', 'article')
. $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Save Section'), 'ARTICLE_vars[section:save]')
! . $_SESSION['OBJ_help']->show_link('article', 'section_save');
return $section_title
--- 316,320 ----
$myelements[0] .= $GLOBALS['core']->formHidden('module', 'article')
. $GLOBALS['core']->formSubmit($_SESSION['translate']->it('Save Section'), 'ARTICLE_vars[section:save]')
! . CLS_help::show_link('article', 'section_save');
return $section_title
***************
*** 365,373 ****
$this->text = PHPWS_Core::parseInput($_POST['SECT_text']);
if (isset($_POST['SECT_alt']))
! $this->image['alt'] = $_POST['SECT_alt'];
if (isset($_POST['SECT_link']))
$this->image['link'] = $_POST['SECT_link'];
if (isset($_POST['SECT_image_caption']))
! $this->image['caption'] = $_POST['SECT_image_caption'];
if (isset($_POST['SECT_template']))
$this->template = str_replace(' ','_',$_POST['SECT_template']);
--- 365,373 ----
$this->text = PHPWS_Core::parseInput($_POST['SECT_text']);
if (isset($_POST['SECT_alt']))
! $this->image['alt'] = PHPWS_Core::parseInput($_POST['SECT_alt']);
if (isset($_POST['SECT_link']))
$this->image['link'] = $_POST['SECT_link'];
if (isset($_POST['SECT_image_caption']))
! $this->image['caption'] = PHPWS_Core::parseInput($_POST['SECT_image_caption']);
if (isset($_POST['SECT_template']))
$this->template = str_replace(' ','_',$_POST['SECT_template']);
|