From: Eloi G. <ada...@us...> - 2004-09-30 05:15:22
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25805/class Modified Files: Article.php ArticleManager.php Section.php Log Message: Release version 2.7 files. Index: Section.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Section.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Section.php 18 Jun 2004 23:31:07 -0000 1.11 --- Section.php 30 Sep 2004 05:14:30 -0000 1.12 *************** *** 162,167 **** if ($edit_mode) { - $myform[0] = PHPWS_Form::formHidden('module', 'article') - . PHPWS_Form::formHidden('SECT_id', $this->id); $remove = $_SESSION['translate']->it('Remove'); if($_SESSION['OBJ_user']->js_on) --- 162,165 ---- *************** *** 172,191 **** $js_vars['value'] = 'section=remove:'.$this->id; $js_vars['location'] = 'index.php?module=article§ion=remove&SECT_id='.$this->id; ! $myform[0] .= PHPWS_WizardBag::js_insert('confirm', 'SECT_options', $this->id, 0, $js_vars); } ! else $myform[0] .= PHPWS_Form::formSubmit($remove, 'ARTICLE_vars[section:remove]'); ! $myform[0] .= CLS_help::show_link('article', 'section_remove'); ! $myform[0] .= PHPWS_Form::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] .= PHPWS_Form::formSubmit($_SESSION['translate']->it('Move Up'), 'ARTICLE_vars[section:move_up]'); ! $myform[0] .= PHPWS_Form::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">' ! . PHPWS_Form::makeForm('SECT_options' . $this->id, 'index.php#' ! . $this->id, $myform, 'post', 0, 0) . '</div><hr />'; } return $section_content; --- 170,192 ---- $js_vars['value'] = 'section=remove:'.$this->id; $js_vars['location'] = 'index.php?module=article§ion=remove&SECT_id='.$this->id; ! $action_form = PHPWS_WizardBag::js_insert('confirm', 'SECT_options', $this->id, 0, $js_vars); } ! else $action_form = '<input name="ARTICLE_vars[section:remove]" value="'.$remove.'" type="submit">' ! . CLS_help::show_link('article', 'section_remove'); ! $action_form .= '<input name="ARTICLE_vars[section:edit]" value="'.$_SESSION['translate']->it('Edit').'" type="submit">' ! . CLS_help::show_link('article', 'section_edit').' '; if (count($_SESSION['SES_ART_article']->order)>1) { ! $action_form .= '<input name="ARTICLE_vars[section:move_up]" value="'.$_SESSION['translate']->it('Move Up').'" type="submit"> '; ! $action_form .= '<input name="ARTICLE_vars[section:move_down]" value="'.$_SESSION['translate']->it('Move Down').'" type="submit"> ' ! . CLS_help::show_link('article', 'section_move'); } ! $section_content .= '<div class="smalltext" style="clear:both;text-align:right">' ! . '<form name="SECT_options'.$this->id.'" action="index.php#'.$this->id.'" method="post">' ! . '<input name="module" value="article" type="hidden">' ! . '<input name="SECT_id" value="'.$this->id.'" type="hidden">' ! . $action_form ! . '</form></div><hr />'; } return $section_content; *************** *** 205,210 **** include(PHPWS_SOURCE_DIR . 'mod/article/inc/S_edit.php'); return $section_title ! . PHPWS_Form::makeForm('SECT_edit', 'index.php#'.$this->id, $myelements, 'post', 0, 1) ! . '<br />'; } --- 206,213 ---- include(PHPWS_SOURCE_DIR . 'mod/article/inc/S_edit.php'); return $section_title ! . '<form name="SECT_edit" action="index.php#'.$this->id.'" method="post" enctype="multipart/form-data">' ! . $tags['HIDDEN'] ! . PHPWS_Template::processTemplate($tags,'article','edit/section.tpl') ! . '</form><br />'; } Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Article.php 21 Aug 2004 17:38:16 -0000 1.20 --- Article.php 30 Sep 2004 05:14:30 -0000 1.21 *************** *** 99,105 **** function PHPWS_Article ($id = NULL, $data = NULL) { ! $this->menuLink = '<center>' . PHPWS_Text::moduleLink($_SESSION['translate']->it('Main Menu'), 'article' ! ,array('disp'=>'main_menu')).'</center>'; $this->sectionID = 'a'; $this->editmode = FALSE; --- 99,105 ---- function PHPWS_Article ($id = NULL, $data = NULL) { ! $this->menuLink = '<div style="text-align:center">' . PHPWS_Text::moduleLink($_SESSION['translate']->it('Main Menu'), 'article' ! ,array('disp'=>'main_menu')).'</div>'; $this->sectionID = 'a'; $this->editmode = FALSE; *************** *** 369,380 **** $s = $_SESSION['translate']->it('Printable Version'); $article_tags['PRINT_ICON'] = '<a href="' . $article_link ! .'&lay_quiet=1" target="_blank"><img src="http://' . PHPWS_SOURCE_HTTP ! . 'mod/article/img/print.gif" border="0" width="22" height="20" alt="' ! . $s . '" title="'. $s . '"/></a>'; $s = $_SESSION['translate']->it('E-mail this Article to a Friend'); $article_tags['EMAIL'] = '<a href="./index.php?module=article&email='.$this->id ! .'"><img src="http://'. PHPWS_SOURCE_HTTP ! . 'mod/article/img/mailto.png" border="0" width="19" height="12" alt="' ! . $s . '" title="' . $s . '"/></a>'; } --- 369,379 ---- $s = $_SESSION['translate']->it('Printable Version'); $article_tags['PRINT_ICON'] = '<a href="' . $article_link ! .'&lay_quiet=1" target="_blank" style="text-decoration:none" alt="' ! . $s . '" title="'. $s . '"><img src="http://' . PHPWS_SOURCE_HTTP ! . 'mod/article/img/print.gif" border="0" width="22" height="20" alt="'.$s.'" title="'.$s.'"/>'.$_SESSION['translate']->it('Print').'</a>'; $s = $_SESSION['translate']->it('E-mail this Article to a Friend'); $article_tags['EMAIL'] = '<a href="./index.php?module=article&email='.$this->id ! .'" style="text-decoration:none" alt="'.$s.'" title="'.$s.'"><img src="http://'. PHPWS_SOURCE_HTTP ! . 'mod/article/img/mailto.png" border="0" width="19" height="12" alt="'.$s.'" title="'.$s.'"/>'.$_SESSION['translate']->it('eMail').'</a>'; } Index: ArticleManager.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/ArticleManager.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ArticleManager.php 21 Aug 2004 17:38:16 -0000 1.14 --- ArticleManager.php 30 Sep 2004 05:14:30 -0000 1.15 *************** *** 2,12 **** /* This is a base class for this module, so load all supporting classes here */ require_once(PHPWS_SOURCE_DIR . 'core/Text.php'); - //require_once(PHPWS_SOURCE_DIR . 'core/Array.php'); require_once(PHPWS_SOURCE_DIR . 'core/WizardBag.php'); ! //require_once(PHPWS_SOURCE_DIR . 'core/File.php'); ! //require_once(PHPWS_SOURCE_DIR . 'core/Error.php'); ! require_once(PHPWS_SOURCE_DIR . 'core/Form.php'); ! //require_once(PHPWS_SOURCE_DIR . 'core/Template.php'); ! //require_once(PHPWS_SOURCE_DIR . 'core/DateTime.php'); require_once(PHPWS_SOURCE_DIR . 'core/Pager.php'); require_once(PHPWS_SOURCE_DIR . 'mod/help/class/CLS_help.php'); --- 2,7 ---- /* This is a base class for this module, so load all supporting classes here */ require_once(PHPWS_SOURCE_DIR . 'core/Text.php'); require_once(PHPWS_SOURCE_DIR . 'core/WizardBag.php'); ! require_once(PHPWS_SOURCE_DIR . 'core/EZform.php'); require_once(PHPWS_SOURCE_DIR . 'core/Pager.php'); require_once(PHPWS_SOURCE_DIR . 'mod/help/class/CLS_help.php'); *************** *** 124,149 **** $this->list_order = $_REQUEST['LIST_order']; $tags['SEARCHQUERY'] = $_SESSION['translate']->it('Show me [var1] stuff ordered by [var2][var3]' ! , PHPWS_Form::formSelect('LIST_group', $this->group_array, $this->list_group, NULL, TRUE) ! , PHPWS_Form::formSelect('LIST_sort', $this->sort_array, $this->list_sort, NULL, TRUE) ! , PHPWS_Form::formSelect('LIST_order', $this->order_array, $this->list_order, NULL, TRUE)) ! . PHPWS_Form::formSubmit($_SESSION['translate']->it('List Articles'), 'ARTICLE_vars[disp:main_menu]'); if ($this->can("create")) ! $tags['BTN_CREATE'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Create New Article'), 'ARTICLE_vars[edit:create]'); if ($_SESSION['OBJ_user']->allow_access('article', 'global_article_prefs')) ! $tags['BTN_CONFIG_EDIT'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Edit Configuration'), 'ARTICLE_vars[config:edit]'); if ($_SESSION['OBJ_user']->allow_access('article', 'images_in_library')) ! $tags['BTN_IMG_LIB'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Image Library'), 'IMGLib_op') ! . PHPWS_Form::formHidden('IMGLib_can_select_images', 0) ! . PHPWS_Form::formHidden('IMGLib_return_data', 'main_menu'); ! ! $content[0] = PHPWS_Template::processTemplate($tags,'article','menu.tpl'); ! $content[0] .= PHPWS_Form::formHidden('module', 'article'); $title = $_SESSION['translate']->it('Main Menu'); ! $content = PHPWS_Form::makeForm('ARTICLE_main_menu', 'index.php', $content, 'post', 0, 0); $this->popbox($title, $content); } --- 119,154 ---- $this->list_order = $_REQUEST['LIST_order']; + $form = new EZform; + /* list_group */ + $form->add('LIST_group', 'select', $this->group_array); + $form->setMatch('LIST_group', $this->list_group, TRUE); + /* list_sort */ + $form->add('LIST_sort', 'select', $this->sort_array); + $form->setMatch('LIST_sort', $this->list_sort, TRUE); + /* list_order */ + $form->add('LIST_order', 'select', $this->order_array); + $form->setMatch('LIST_order', $this->list_order, TRUE); $tags['SEARCHQUERY'] = $_SESSION['translate']->it('Show me [var1] stuff ordered by [var2][var3]' ! , $form->get('LIST_group') ! , $form->get('LIST_sort') ! , $form->get('LIST_order')) ! . '<input name="ARTICLE_vars[disp:main_menu]" value="'.$_SESSION['translate']->it('List Articles').'" type="submit">'; if ($this->can("create")) ! $tags['BTN_CREATE'] = '<input name="ARTICLE_vars[edit:create]" value="'.$_SESSION['translate']->it('Create New Article').'" type="submit">'; if ($_SESSION['OBJ_user']->allow_access('article', 'global_article_prefs')) ! $tags['BTN_CONFIG_EDIT'] = '<input name="ARTICLE_vars[config:edit]" value="'.$_SESSION['translate']->it('Edit Configuration').'" type="submit">'; if ($_SESSION['OBJ_user']->allow_access('article', 'images_in_library')) ! $tags['BTN_IMG_LIB'] = '<input name="IMGLib_op" value="'.$_SESSION['translate']->it('Image Library').'" type="submit">' ! . '<input name="IMGLib_can_select_images" value="0" type="hidden">' ! . '<input name="IMGLib_return_data" value="main_menu" type="hidden">'; $title = $_SESSION['translate']->it('Main Menu'); ! $content = '<form name="ARTICLE_main_menu" action="index.php" method="post" enctype="multipart/form-data">' ! . '<input name="module" value="article" type="hidden">' ! . PHPWS_Template::processTemplate($tags,'article','menu.tpl') ! . '</form>'; $this->popbox($title, $content); } *************** *** 284,291 **** /* If there are summaries to display, display 'em */ ! if ($this->val['summaries_on_homepage']>0) { - $GLOBALS['CNT_article_summaries']['title'] = '<center><b>' - . $_SESSION['translate']->it('Also on this Site') . '...</b></center>'; $GLOBALS['CNT_article_summaries']['content'] = ''; for($i=0; $i < $this->val['summaries_on_homepage'] && $summary=$result->fetchrow(DB_FETCHMODE_ASSOC); $i++) --- 289,294 ---- /* If there are summaries to display, display 'em */ ! if ($this->val['summaries_on_homepage']>0 && $result) { $GLOBALS['CNT_article_summaries']['content'] = ''; for($i=0; $i < $this->val['summaries_on_homepage'] && $summary=$result->fetchrow(DB_FETCHMODE_ASSOC); $i++) *************** *** 293,296 **** --- 296,305 ---- $temp = new PHPWS_Article($summary['id'], $summary); $temp->view(false); + $content = true; + } + if (isset($content)) + { + $GLOBALS['CNT_article_summaries']['title'] = $_SESSION['translate']->it('Also on this Site') . '...'; + unset($content); } } |