From: Eloi G. <ada...@us...> - 2004-09-30 05:15:29
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25805/inc Modified Files: AM_list_articles.php AM_view_archives.php AM_view_news.php A_delete.php A_edit.php A_mail.php A_remove_section.php A_view_history.php S_edit.php S_update.php editconfig.php Log Message: Release version 2.7 files. Index: editconfig.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/editconfig.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** editconfig.php 21 Aug 2004 17:02:13 -0000 1.8 --- editconfig.php 30 Sep 2004 05:14:32 -0000 1.9 *************** *** 14,17 **** --- 14,18 ---- * @return none */ + $form = new EZform; /* Section Headers */ *************** *** 22,219 **** /* Get the Default Page Template */ ! $article_tpl_array = PHPWS_Template::listTemplates('article',true,'article'); ! if (is_array($article_tpl_array)) ! { ! /* Sort the list */ ! asort($article_tpl_array); ! $tags['DEFAULT_ARTICLE_TEMPLATE'] = ! PHPWS_Form::formSelect('CONFIG_default_article_template', $article_tpl_array, $this->val['default_article_template'], true, NULL, NULL) ! . ' ' . $_SESSION['translate']->it('Default page template') ! . CLS_help::show_link('article', 'article_template'); ! } /* Get the Default Section Template */ ! $sect_tpl_array = PHPWS_Template::listTemplates('article',false,'section'); ! if (is_array($sect_tpl_array)) ! { ! /* Strip the extensions off for readability */ ! $sect_tpl_array = str_replace('.tpl', NULL, $sect_tpl_array); ! /* Sort the list */ ! asort($sect_tpl_array); ! $tags['DEFAULT_SECTION_TEMPLATE'] = ! PHPWS_Form::formSelect('CONFIG_default_section_template', $sect_tpl_array, $this->val['default_section_template'], true, NULL, NULL) ! . ' ' . $_SESSION['translate']->it('Default section template') ! . CLS_help::show_link('article', 'section_template'); ! } /* summaries_on_homepage */ ! $tags['SUMMARIES_ON_HOMEPAGE'] = ! PHPWS_Form::formSelect('CONFIG_summaries_on_homepage', range(0,50) ! , $this->val['summaries_on_homepage'], NULL, NULL, NULL) ! . ' ' . $_SESSION['translate']->it('Number of summaries to show on the Home Page') ! . CLS_help::show_link('article', 'summaries_on_homepage'); /* popular_articles */ ! $tags['POPULAR_ARTICLES'] = ! PHPWS_Form::formSelect('CONFIG_popular_articles', range(0,50) ! , $this->val['popular_articles'], NULL, NULL, NULL) ! . ' ' . $_SESSION['translate']->it('Number of links in the "Popular Articles" Block') ! . CLS_help::show_link('article', 'popular_articles'); /* prev_n_articles */ ! $tags['PREV_N_ARTICLES'] = ! PHPWS_Form::formSelect('CONFIG_prev_n_articles', range(0,50) ! , $this->val['prev_n_articles'], NULL, NULL, NULL) ! . ' ' . $_SESSION['translate']->it('Number of links in the "Previous Articles" Block') ! . CLS_help::show_link('article', 'prev_n_articles'); /* listings_per_page */ ! $tags['LISTINGS_PER_PAGE'] = ! PHPWS_Form::formSelect('CONFIG_listings_per_page', range(1,50) ! , $this->val['listings_per_page'], NULL, NULL, NULL) ! . ' ' . $_SESSION['translate']->it('Number of listings to show per page under the Main Menu') ! . CLS_help::show_link('article', 'listings_per_page'); /* need_approval */ ! $tags['NEED_APPROVAL'] = ! PHPWS_Form::formCheckBox('CONFIG_need_approval',1,$this->val['need_approval'],NULL ! ,$_SESSION['translate']->it('Articles need approval before publication')) ! . CLS_help::show_link('configmanager', 'need_approval'); /* default_allow_comments */ ! $tags['DEFAULT_ALLOW_COMMENTS'] = PHPWS_Form::formCheckBox('CONFIG_default_allow_comments',1 ! ,$this->val['default_allow_comments'],NULL ! ,$_SESSION['translate']->it('Comments are allowed by default')) ! . CLS_help::show_link('configmanager', 'default_allow_comments'); /* default_allow_anon */ ! $tags['DEFAULT_ALLOW_ANON'] = PHPWS_Form::formCheckBox('CONFIG_default_allow_anon',1 ! ,$this->val['default_allow_anon'],NULL ! ,$_SESSION['translate']->it('Comments by unregistered users are allowed by default')) ! . CLS_help::show_link('configmanager', 'default_allow_anon'); /* archive_days*/ ! $tags['ARCHIVE_DAYS'] = PHPWS_Form::formSelect('CONFIG_archive_days', range(0,60), $this->val['archive_days'], TRUE) ! . ' ' . $_SESSION['translate']->it('Number of days to store old versions of articles in the archives.'); $tags['USERS_LABEL'] = $_SESSION['translate']->it('Registered users can'); /* users_can_submit */ ! $tags['USERS_CAN_SUBMIT'] = PHPWS_Form::formCheckBox('CONFIG_users_can_submit',1 ! ,$this->val['users_can_submit'],NULL ! ,$_SESSION['translate']->it('Submit articles')) ! . CLS_help::show_link('configmanager', 'users_can_submit'); /* users_select_article_tpl */ ! $tags['USERS_SELECT_ARTICLE_TPL'] = PHPWS_Form::formCheckBox('CONFIG_users_select_article_tpl',1 ! ,$this->val['users_select_article_tpl'],NULL ! ,$_SESSION['translate']->it('Select article templates')) ! . CLS_help::show_link('configmanager', 'users_select_article_tpl'); /* users_select_section_tpl */ ! $tags['USERS_SELECT_SECTION_TPL'] = PHPWS_Form::formCheckBox('CONFIG_users_select_section_tpl',1 ! ,$this->val['users_select_section_tpl'],NULL ! ,$_SESSION['translate']->it('Select section templates')) ! . CLS_help::show_link('configmanager', 'users_select_section_tpl'); /* users_allow_comments */ ! $tags['USERS_ALLOW_COMMENTS'] = PHPWS_Form::formCheckBox('CONFIG_users_allow_comments',1 ! ,$this->val['users_allow_comments'],NULL ! ,$_SESSION['translate']->it('Allow/Disallow comments')) ! . CLS_help::show_link('configmanager', 'users_allow_comments'); /* users_change_dates */ ! $tags['USERS_CHANGE_DATES'] = PHPWS_Form::formCheckBox('CONFIG_users_change_dates',1 ! ,$this->val['users_change_dates'],NULL ! ,$_SESSION['translate']->it('Set Publication Dates')) ! . CLS_help::show_link('configmanager', 'users_change_dates'); /* user_images_in_article */ ! $tags['USER_IMAGES_IN_ARTICLE'] = PHPWS_Form::formCheckBox('CONFIG_user_images_in_article',1 ! ,$this->val['user_images_in_article'],NULL ! ,$_SESSION['translate']->it('Place images in articles')) ! . CLS_help::show_link('configmanager', 'user_images_in_article'); /* user_upload_images */ ! $tags['USER_UPLOAD_IMAGES'] = PHPWS_Form::formCheckBox('CONFIG_user_upload_images',1 ! ,$this->val['user_upload_images'],NULL ! ,$_SESSION['translate']->it('Upload images to the site')) ! . CLS_help::show_link('configmanager', 'user_upload_images'); /* can_expire */ ! $tags['CAN_EXPIRE'] = PHPWS_Form::formCheckBox('CONFIG_can_expire',1 ! ,$this->val['can_expire'],NULL ! ,$_SESSION['translate']->it('Articles can expire on a predefined date')) ! . CLS_help::show_link('configmanager', 'can_expire'); /* expiration_years */ /* expiration_months */ /* expiration_days */ $tags['EXPIRATION_LABEL'] = $_SESSION['translate']->it('The default expiration date is [var1] years, [var2] months, and [var3] days from article creation.' ! , PHPWS_Form::formSelect('CONFIG_expiration_years', range(0,5), $this->val['expiration_years'], NULL, NULL, NULL) ! , PHPWS_Form::formSelect('CONFIG_expiration_months', range(0,11), $this->val['expiration_months'], NULL, NULL, NULL) ! , PHPWS_Form::formSelect('CONFIG_expiration_days', range(0,31), $this->val['expiration_days'], NULL, NULL, NULL)) . CLS_help::show_link('article', 'expiration_default'); /* default_year_count*/ $tags['DEFAULT_YEAR_COUNT'] = $_SESSION['translate']->it('Publication dates can be set up to [var1] year(s) from article creation.' ! , PHPWS_Form::formSelect('CONFIG_default_year_count', range(1,5) ! , $this->val['default_year_count'], TRUE) ); /* max_image_size */ $tags['MAX_IMAGE_SIZE'] = $_SESSION['translate']->it('The maximum uploaded image [var1] allowed is [var2] Kb' ! , 'filesize' ! , PHPWS_Form::formTextField('CONFIG_max_image_size' ! , $this->val['max_image_size'], 4, 4)) . CLS_help::show_link('article', 'max_image_size'); /* max_image_height */ $tags['MAX_IMAGE_HEIGHT'] = $_SESSION['translate']->it('The maximum uploaded image [var1] allowed is [var2] pixels' ! , 'height' ! , PHPWS_Form::formTextField('CONFIG_max_image_height', $this->val['max_image_height'], 4, 4)); /* max_image_width */ $tags['MAX_IMAGE_WIDTH'] = $_SESSION['translate']->it('The maximum uploaded image [var1] allowed is [var2] pixels' ! , 'width' ! , PHPWS_Form::formTextField('CONFIG_max_image_width', $this->val['max_image_width'], 4, 4)); /* restricted_viewing */ ! //$tags['RESTRICTED_VIEWING'] = PHPWS_Form::formCheckBox('CONFIG_restricted_viewing',1 ! // ,$this->val['restricted_viewing'],NULL ! // ,$_SESSION['translate']->it('Users can only see articles that belong to a group that they are members of')) ! // . CLS_help::show_link('configmanager', 'restricted_viewing'); /* lock_expiration_time */ $tags['LOCK_EXPIRATION_TIME'] = $_SESSION['translate']->it('The maximum time someone can spend editing an article is [var1] seconds' ! ,PHPWS_Form::formTextField('CONFIG_lock_expiration_time' ! , $this->val['lock_expiration_time'], 4, 4)) . CLS_help::show_link('article', 'lock_expiration_time'); /* make_metatags */ ! $tags['MAKE_METATAGS'] = PHPWS_Form::formCheckBox('CONFIG_make_metatags',1 ! ,$this->val['make_metatags'],NULL ! ,$_SESSION['translate']->it('Let Article Manager automatically generate meta descriptions')) ! . CLS_help::show_link('configmanager', 'make_metatags'); ! /* make_metatags */ ! $tags['BRAND_PRINTABLE'] = PHPWS_Form::formCheckBox('CONFIG_brand_printable',1 ! ,$this->val['brand_printable'],NULL ! ,$_SESSION['translate']->it('Show page headers and footers on printable versions of articles')); /* use_comments */ ! $tags['USE_COMMENTS'] = PHPWS_Form::formCheckBox('CONFIG_use_comments',1 ! ,$this->val['use_comments'],NULL ! ,$_SESSION['translate']->it('Enable comments for articles')) ! . CLS_help::show_link('configmanager', 'use_comments'); ! $tags['SAVE'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Save Settings'), 'ARTICLE_vars[config:save]'); ! $tags['RESET'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Reset Settings'), 'ARTICLE_vars[config:reset]'); ! ! $content[0] = PHPWS_Template::processTemplate($tags,'article','config.tpl'); ! $content[0] .= PHPWS_Form::formHidden('module', 'article'); $title = $_SESSION['translate']->it('Article Manager Configuration'); ! $content = PHPWS_Form::makeForm('ART_config', 'index.php', $content, 'post', 0, TRUE); $_SESSION['OBJ_layout']->popbox($title, $content, NULL, 'CNT_article'); ?> --- 23,234 ---- /* Get the Default Page Template */ ! $result = PHPWS_Template::listTemplates('article',true,'article'); ! foreach ($result as $value) ! $article_tpl_array[(string)$value] = $value; ! asort($article_tpl_array); ! $tags['DEFAULT_ARTICLE_TEMPLATE_LABEL'] = $_SESSION['translate']->it('Default page template'); ! $tags['DEFAULT_ARTICLE_TEMPLATE_HELP'] = CLS_help::show_link('article', 'article_template'); ! $form->add('CONFIG_default_article_template', 'select', $article_tpl_array); ! $form->setMatch('CONFIG_default_article_template', $this->val['default_article_template']); ! /* Get the Default Section Template */ ! $result = PHPWS_Template::listTemplates('article',false,'section'); ! $result = str_replace('.tpl', NULL, $result); ! /* Turn this into an assoc array */ ! foreach ($result as $value) ! /* An "insert page" temp[late should not be used as default */ ! if (!stristr($value, 'page_insert')) ! $sect_tpl_array[(string)$value] = $value; ! /* Sort the list */ ! asort($sect_tpl_array); ! $tags['DEFAULT_SECTION_TEMPLATE_LABEL'] = $_SESSION['translate']->it('Default section template'); ! $tags['DEFAULT_SECTION_TEMPLATE_HELP'] = CLS_help::show_link('article', 'section_template'); ! $form->add('CONFIG_default_section_template', 'select', $sect_tpl_array); ! $form->setMatch('CONFIG_default_section_template', $this->val['default_section_template']); ! /* summaries_on_homepage */ ! $tags['SUMMARIES_ON_HOMEPAGE_LABEL'] = $_SESSION['translate']->it('Number of summaries to show on the Home Page'); ! $tags['SUMMARIES_ON_HOMEPAGE_HELP'] = CLS_help::show_link('article', 'summaries_on_homepage'); ! $form->add('CONFIG_summaries_on_homepage', 'select', range(0,50)); ! $form->setMatch('CONFIG_summaries_on_homepage', $this->val['summaries_on_homepage'], TRUE); /* popular_articles */ ! $tags['POPULAR_ARTICLES_LABEL'] = $_SESSION['translate']->it('Number of links in the "Popular Articles" Block'); ! $tags['POPULAR_ARTICLES_HELP'] = CLS_help::show_link('article', 'popular_articles'); ! $form->add('CONFIG_popular_articles', 'select', range(0,50)); ! $form->setMatch('CONFIG_popular_articles', $this->val['popular_articles'], TRUE); /* prev_n_articles */ ! $tags['PREV_N_ARTICLES_LABEL'] = $_SESSION['translate']->it('Number of links in the "Previous Articles" Block'); ! $tags['PREV_N_ARTICLES_HELP'] = CLS_help::show_link('article', 'prev_n_articles'); ! $form->add('CONFIG_prev_n_articles', 'select', range(0,50)); ! $form->setMatch('CONFIG_prev_n_articles', $this->val['prev_n_articles'], TRUE); /* listings_per_page */ ! $tags['LISTINGS_PER_PAGE_LABEL'] = $_SESSION['translate']->it('Number of listings to show per page under the Main Menu'); ! $tags['LISTINGS_PER_PAGE_HELP'] = CLS_help::show_link('article', 'listings_per_page'); ! $form->add('CONFIG_listings_per_page', 'select', range(1,50)); ! $form->setMatch('CONFIG_listings_per_page', $this->val['listings_per_page'], TRUE); /* need_approval */ ! $tags['NEED_APPROVAL_LABEL'] = $_SESSION['translate']->it('Articles need approval before publication'); ! //$tags['NEED_APPROVAL_HELP'] = CLS_help::show_link('article', 'need_approval'); ! $form->add('CONFIG_need_approval', 'checkbox'); ! $form->setMatch('CONFIG_need_approval', $this->val['need_approval']); /* default_allow_comments */ ! $tags['DEFAULT_ALLOW_COMMENTS_LABEL'] = $_SESSION['translate']->it('Comments are allowed by default'); ! //$tags['DEFAULT_ALLOW_COMMENTS_HELP'] = CLS_help::show_link('article', 'default_allow_comments'); ! $form->add('CONFIG_default_allow_comments', 'checkbox'); ! $form->setMatch('CONFIG_default_allow_comments', $this->val['default_allow_comments']); /* default_allow_anon */ ! $tags['DEFAULT_ALLOW_ANON_LABEL'] = $_SESSION['translate']->it('Comments by unregistered users are allowed by default'); ! //$tags['DEFAULT_ALLOW_ANON_HELP'] = CLS_help::show_link('article', 'default_allow_anon'); ! $form->add('CONFIG_default_allow_anon', 'checkbox'); ! $form->setMatch('CONFIG_default_allow_anon', $this->val['default_allow_anon']); /* archive_days*/ ! $tags['ARCHIVE_DAYS_LABEL'] = $_SESSION['translate']->it('Number of days to store old versions of articles in the archives.'); ! $form->add('CONFIG_archive_days', 'select', range(0,60)); ! $form->setMatch('CONFIG_archive_days', $this->val['archive_days'], TRUE); $tags['USERS_LABEL'] = $_SESSION['translate']->it('Registered users can'); /* users_can_submit */ ! $tags['USERS_CAN_SUBMIT_LABEL'] = $_SESSION['translate']->it('Submit articles'); ! //$tags['USERS_CAN_SUBMIT_HELP'] = CLS_help::show_link('article', 'users_can_submit'); ! $form->add('CONFIG_users_can_submit', 'checkbox'); ! $form->setMatch('CONFIG_users_can_submit', $this->val['users_can_submit']); /* users_select_article_tpl */ ! $tags['USERS_SELECT_ARTICLE_TPL_LABEL'] = $_SESSION['translate']->it('Select article templates'); ! //$tags['USERS_SELECT_ARTICLE_TPL_HELP'] = CLS_help::show_link('article', 'users_select_article_tpl'); ! $form->add('CONFIG_users_select_article_tpl', 'checkbox'); ! $form->setMatch('CONFIG_users_select_article_tpl', $this->val['users_select_article_tpl']); /* users_select_section_tpl */ ! $tags['USERS_SELECT_SECTION_TPL_LABEL'] = $_SESSION['translate']->it('Select section templates'); ! //$tags['USERS_SELECT_SECTION_TPL_HELP'] = CLS_help::show_link('article', 'users_select_section_tpl'); ! $form->add('CONFIG_users_select_section_tpl', 'checkbox'); ! $form->setMatch('CONFIG_users_select_section_tpl', $this->val['users_select_section_tpl']); /* users_allow_comments */ ! $tags['USERS_ALLOW_COMMENTS_LABEL'] = $_SESSION['translate']->it('Allow/Disallow comments'); ! //$tags['USERS_ALLOW_COMMENTS_HELP'] = CLS_help::show_link('article', 'users_allow_comments'); ! $form->add('CONFIG_users_allow_comments', 'checkbox'); ! $form->setMatch('CONFIG_users_allow_comments', $this->val['users_allow_comments']); /* users_change_dates */ ! $tags['USERS_CHANGE_DATES_LABEL'] = $_SESSION['translate']->it('Set Publication Dates'); ! //$tags['USERS_CHANGE_DATES_HELP'] = CLS_help::show_link('article', 'users_change_dates'); ! $form->add('CONFIG_users_change_dates', 'checkbox'); ! $form->setMatch('CONFIG_users_change_dates', $this->val['users_change_dates']); /* user_images_in_article */ ! $tags['USER_IMAGES_IN_ARTICLE_LABEL'] = $_SESSION['translate']->it('Place images in articles'); ! //$tags['USER_IMAGES_IN_ARTICLE_HELP'] = CLS_help::show_link('article', 'user_images_in_article'); ! $form->add('CONFIG_user_images_in_article', 'checkbox'); ! $form->setMatch('CONFIG_user_images_in_article', $this->val['user_images_in_article']); /* user_upload_images */ ! $tags['USER_UPLOAD_IMAGES_LABEL'] = $_SESSION['translate']->it('Upload images to the site'); ! //$tags['USER_UPLOAD_IMAGES_HELP'] = CLS_help::show_link('article', 'user_upload_images'); ! $form->add('CONFIG_user_upload_images', 'checkbox'); ! $form->setMatch('CONFIG_user_upload_images', $this->val['user_upload_images']); /* can_expire */ ! $tags['CAN_EXPIRE_LABEL'] = $_SESSION['translate']->it('Articles can expire on a predefined date'); ! $tags['CAN_EXPIRE_HELP'] = CLS_help::show_link('article', 'can_expire'); ! $form->add('CONFIG_can_expire', 'checkbox'); ! $form->setMatch('CONFIG_can_expire', $this->val['can_expire']); /* expiration_years */ + $form->add('CONFIG_expiration_years', 'select', range(0,5)); + $form->setMatch('CONFIG_expiration_years', $this->val['expiration_years'], TRUE); /* expiration_months */ + $form->add('CONFIG_expiration_months', 'select', range(0,11)); + $form->setMatch('CONFIG_expiration_months', $this->val['expiration_months'], TRUE); /* expiration_days */ + $form->add('CONFIG_expiration_days', 'select', range(0,30)); + $form->setMatch('CONFIG_expiration_days', $this->val['expiration_days'], TRUE); $tags['EXPIRATION_LABEL'] = $_SESSION['translate']->it('The default expiration date is [var1] years, [var2] months, and [var3] days from article creation.' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Select number of years').'</span>' ! .$form->get('CONFIG_expiration_years').'</label>' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Select number of months').'</span>' ! .$form->get('CONFIG_expiration_months').'</label>' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Select number of days').'</span>' ! .$form->get('CONFIG_expiration_days').'</label>') . CLS_help::show_link('article', 'expiration_default'); /* default_year_count*/ + $form->add('CONFIG_default_year_count', 'select', range(0,5)); + $form->setMatch('CONFIG_default_year_count', $this->val['default_year_count'], TRUE); $tags['DEFAULT_YEAR_COUNT'] = $_SESSION['translate']->it('Publication dates can be set up to [var1] year(s) from article creation.' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Select number of years').'</span>' ! .$form->get('CONFIG_default_year_count').'</label>'); /* max_image_size */ $tags['MAX_IMAGE_SIZE'] = $_SESSION['translate']->it('The maximum uploaded image [var1] allowed is [var2] Kb' ! , 'filesize' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Enter a filesize in Kb').'</span>' ! . '<input type="text" name="CONFIG_max_image_size" value="'.$this->val['max_image_size'].'" size="4" maxlength="4" /></label>') . CLS_help::show_link('article', 'max_image_size'); /* max_image_height */ $tags['MAX_IMAGE_HEIGHT'] = $_SESSION['translate']->it('The maximum uploaded image [var1] allowed is [var2] pixels' ! , 'height' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Enter an image height in pixels').'</span>' ! . '<input type="text" name="CONFIG_max_image_height" value="'.$this->val['max_image_height'].'" size="4" maxlength="4" /></label>'); /* max_image_width */ $tags['MAX_IMAGE_WIDTH'] = $_SESSION['translate']->it('The maximum uploaded image [var1] allowed is [var2] pixels' ! , 'width' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Enter an image width in pixels').'</span>' ! . '<input type="text" name="CONFIG_max_image_width" value="'.$this->val['max_image_width'].'" size="4" maxlength="4" /></label>'); /* restricted_viewing */ ! //$tags['RESTRICTED_VIEWING_LABEL'] = $_SESSION['translate']->it('Users can only see articles that belong to a group that they are members of'); ! //$tags['RESTRICTED_VIEWING_HELP'] = CLS_help::show_link('article', 'restricted_viewing'); ! //$form->add('CONFIG_restricted_viewing', 'checkbox'); ! //$form->setMatch('CONFIG_restricted_viewing', $this->val['restricted_viewing']); /* lock_expiration_time */ $tags['LOCK_EXPIRATION_TIME'] = $_SESSION['translate']->it('The maximum time someone can spend editing an article is [var1] seconds' ! , '<label><span style="display:none">'.$_SESSION['translate']->it('Enter number of seconds').'</span>' ! . '<input type="text" name="CONFIG_lock_expiration_time" value="'.$this->val['lock_expiration_time'].'" size="4" maxlength="4" /></label>') . CLS_help::show_link('article', 'lock_expiration_time'); /* make_metatags */ ! $tags['MAKE_METATAGS_LABEL'] = $_SESSION['translate']->it('Let Article Manager automatically generate meta descriptions'); ! $tags['MAKE_METATAGS_HELP'] = CLS_help::show_link('article', 'make_metatags'); ! $form->add('CONFIG_make_metatags', 'checkbox'); ! $form->setMatch('CONFIG_make_metatags', $this->val['make_metatags']); ! /* brand_printable */ ! $tags['BRAND_PRINTABLE_LABEL'] = $_SESSION['translate']->it('Show page headers and footers on printable versions of articles'); ! //$tags['BRAND_PRINTABLE_HELP'] = CLS_help::show_link('article', 'brand_printable'); ! $form->add('CONFIG_brand_printable', 'checkbox'); ! $form->setMatch('CONFIG_brand_printable', $this->val['brand_printable']); /* use_comments */ ! $tags['USE_COMMENTS_LABEL'] = $_SESSION['translate']->it('Enable comments for articles'); ! //$tags['USE_COMMENTS_HELP'] = CLS_help::show_link('article', 'use_comments'); ! $form->add('CONFIG_use_comments', 'checkbox'); ! $form->setMatch('CONFIG_use_comments', $this->val['use_comments']); ! $tags['SAVE'] = '<input name="ARTICLE_vars[config:save]" value="'.$_SESSION['translate']->it('Save Settings').'" type="submit">'; ! $tags['RESET'] = '<input name="ARTICLE_vars[config:reset]" value="'.$_SESSION['translate']->it('Reset Settings').'" type="submit">'; + $tags = $form->getTemplate(TRUE, FALSE, $tags); $title = $_SESSION['translate']->it('Article Manager Configuration'); ! $content = '<form name="ART_config" action="index.php" method="post">' ! . '<input name="module" value="article" type="hidden">' ! . PHPWS_Template::processTemplate($tags,'article','config.tpl') ! . '</form>'; ! $_SESSION['OBJ_layout']->popbox($title, $content, NULL, 'CNT_article'); ?> Index: S_update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_update.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** S_update.php 18 Jun 2004 23:31:10 -0000 1.2 --- S_update.php 30 Sep 2004 05:14:32 -0000 1.3 *************** *** 88,92 **** $this->image['caption'] = PHPWS_Text::parseInput($_POST['SECT_image_caption']); if (isset($_POST['SECT_template'])) ! $this->template = str_replace(' ','_',$_POST['SECT_template']); if (isset($_POST['SECT_new_page'])) $this->new_page = 1; --- 88,92 ---- $this->image['caption'] = PHPWS_Text::parseInput($_POST['SECT_image_caption']); if (isset($_POST['SECT_template'])) ! $this->template = $_POST['SECT_template']; if (isset($_POST['SECT_new_page'])) $this->new_page = 1; Index: S_edit.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_edit.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** S_edit.php 18 Jun 2004 23:31:10 -0000 1.2 --- S_edit.php 30 Sep 2004 05:14:32 -0000 1.3 *************** *** 14,39 **** include(PHPWS_SOURCE_DIR . 'mod/article/conf/config.php'); if (is_numeric($this->id)) ! $section_title = '<div name="'.$this->id.'" class="bg_dark">' ! . $_SESSION['translate']->it('Edit Section') . '</div>'; else ! $section_title = '<div name="new section" class="bg_dark">' ! . $_SESSION['translate']->it('New Section') . '</div>'; ! $myelements[0] = PHPWS_Form::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 />' ! . PHPWS_WizardBag::js_insert('wysiwyg', 'SECT_edit', 'SECT_title'); ! $myelements[0] .= PHPWS_Form::formTextField('SECT_title', PHPWS_Text::parseOutput($this->title), 55, 70) ! . '<br />'; ! $myelements[0] .= $_SESSION['translate']->it('Section Text').':' ! . CLS_help::show_link('article', 'section_text') .'<br />' ! . PHPWS_WizardBag::js_insert('wysiwyg', 'SECT_edit', 'SECT_text'); ! $myelements[0] .= PHPWS_Form::formTextArea('SECT_text', PHPWS_Text::parseOutput($this->text), 20, 60) ! . '<br />'; /* If there is a current image, show it */ --- 14,41 ---- include(PHPWS_SOURCE_DIR . 'mod/article/conf/config.php'); + $form = new EZform; + $tags['ID'] = $this->id; if (is_numeric($this->id)) ! $tags['HEADER'] = $_SESSION['translate']->it('Edit Section'); else ! $tags['HEADER'] = $_SESSION['translate']->it('New Section'); ! $tags['NEWPAGE_LABEL'] = $_SESSION['translate']->it('Start on new page?'); ! $tags['NEWPAGE_HELP'] = CLS_help::show_link('article', 'section_new_page'); ! $form->add('SECT_new_page', 'checkbox'); ! $form->setMatch('SECT_new_page', $this->new_page); ! $tags['TITLE_ERR'] = $_SESSION['SES_ART_master']->get_error('SECT_title'); ! $tags['TITLE_LABEL'] = $_SESSION['translate']->it('Section Title'); ! $tags['TITLE_HELP'] = CLS_help::show_link('article', 'section_title'); ! $tags['TITLE_JS'] = PHPWS_WizardBag::js_insert('wysiwyg', 'SECT_edit', 'SECT_title'); ! $tags['TITLE'] = '<input type="text" name="SECT_title" value="'.PHPWS_Text::parseOutput($this->title).'" maxlength="55" style="width:70%" />'; ! ! $tags['TEXT_ERR'] = $_SESSION['SES_ART_master']->get_error('SECT_text'); ! $tags['TEXT_LABEL'] = $_SESSION['translate']->it('Section Text'); ! $tags['TEXT_HELP'] = CLS_help::show_link('article', 'section_text'); ! $tags['TEXT_JS'] = PHPWS_WizardBag::js_insert('wysiwyg', 'SECT_edit', 'SECT_text'); ! $tags['TEXT'] = '<textarea id="SECT_text" name="SECT_text" rows="20" style="width:95%">'.$this->text.'</textarea>'; /* If there is a current image, show it */ *************** *** 41,47 **** /* If this is a temporary image, look in the main directory */ if ($this->temp_image) ! $myelements[0] .= '<img src="' .$_SESSION['SES_ART_master']->image_directory . $this->image['name'] . '" /><br />'; else ! $myelements[0] .= '<img src="' .$_SESSION['SES_ART_master']->image_directory . $this->image['directory'] . $this->image['name'] . '" /><br />'; /* If user is allowed to play around with the images... */ if ($_SESSION['OBJ_user']->allow_access('article', 'images_in_article') --- 43,49 ---- /* If this is a temporary image, look in the main directory */ if ($this->temp_image) ! $tags['IMAGE'] = '<img src="' .$_SESSION['SES_ART_master']->image_directory . $this->image['name'] . '" />'; else ! $tags['IMAGE'] = '<img src="' .$_SESSION['SES_ART_master']->image_directory . $this->image['directory'] . $this->image['name'] . '" />'; /* If user is allowed to play around with the images... */ if ($_SESSION['OBJ_user']->allow_access('article', 'images_in_article') *************** *** 50,55 **** /* allow them to remove it */ if($this->image['name']) ! $myelements[0] .= $_SESSION['translate']->it('Remove Image').'? ' ! . PHPWS_Form::formCheckBox('removeImage', 1, NULL, NULL) . '<br />'; /* If allowed, upload your image here */ --- 52,60 ---- /* allow them to remove it */ if($this->image['name']) ! { ! $tags['REMOVEIMAGE_LABEL'] = $_SESSION['translate']->it('Remove Image'); ! $form->add('removeImage', 'checkbox'); ! $form->setMatch('removeImage', false); ! } /* If allowed, upload your image here */ *************** *** 57,64 **** || ($_SESSION['SES_ART_master']->val['user_upload_images'] && $_SESSION['OBJ_user']->isUser())) { ! $myelements[0] .= $_SESSION['SES_ART_master']->get_error('SECT_loaded_image') ! . $_SESSION['translate']->it('Upload a new image').': ' ! . PHPWS_Form::formFile('SECT_loaded_image', 33, 255) ! . CLS_help::show_link('article', 'section_image') . '<br /><br />'; } --- 62,70 ---- || ($_SESSION['SES_ART_master']->val['user_upload_images'] && $_SESSION['OBJ_user']->isUser())) { ! $tags['SECT_LOADED_IMAGE_ERR'] = $_SESSION['SES_ART_master']->get_error('SECT_loaded_image'); ! $tags['SECT_LOADED_IMAGE_LABEL'] = $_SESSION['translate']->it('Upload a new image'); ! $tags['SECT_LOADED_IMAGE_HELP'] = CLS_help::show_link('article', 'section_image'); ! $form->add('SECT_loaded_image', 'file'); ! $form->setWidth('SECT_loaded_image', 40); } *************** *** 67,93 **** if (substr($this->image['directory'],0,7) == 'library') { $_POST['IMGLib_linkBack'] = $_POST['IMGLib_current_image'] = $_POST['IMGLib_current_gallery'] = null; ! $myelements[0] .= PHPWS_Form::formHidden('IMGLib_current_image', $this->image['name']) ! . PHPWS_Form::formHidden('IMGLib_current_gallery', $this->image['directory']) ! . $_SESSION['translate']->it('Library Image "[var1]" is currently selected', preg_replace("/[^a-zA-Z0-9]/", ' ', str_replace(strrchr($this->image['name'], '.'), '', $this->image['name']))) ! . '<br />'; } ! $myelements[0] .= PHPWS_Form::formSubmit($_SESSION['translate']->it('Select an image from the library'), 'IMGLib_op') ! . PHPWS_Form::formHidden('IMGLib_return_data', 'edit') ! . 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') ! . PHPWS_Form::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') ! . PHPWS_Form::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') ! . PHPWS_Form::formTextField('SECT_image_caption', htmlspecialchars($this->image['caption']), 60, 255) ! . '<br />'; } --- 73,97 ---- if (substr($this->image['directory'],0,7) == 'library') { $_POST['IMGLib_linkBack'] = $_POST['IMGLib_current_image'] = $_POST['IMGLib_current_gallery'] = null; ! $tags['SELECTED_LIB_IMAGE_LABEL'] = $_SESSION['translate']->it('Library Image "[var1]" is currently selected', preg_replace("/[^a-zA-Z0-9]/", ' ', str_replace(strrchr($this->image['name'], '.'), '', $this->image['name']))); ! $form->add('IMGLib_current_image', 'hidden', $this->image['name']); ! $form->add('IMGLib_current_gallery', 'hidden', $this->image['directory']); } ! $tags['SECTION_LIB_IMAGE_BTN'] = '<input type="submit" name="IMGLib_op" value="'.$_SESSION['translate']->it('Select an image from the library').'" />'; ! $tags['SECTION_LIB_IMAGE_HELP'] = CLS_help::show_link('article', 'section_lib_image'); ! $form->add('IMGLib_return_data', 'hidden', 'edit'); /* Enter alt text, link, & image_caption */ ! $tags['ALT_TXT_ERR'] = $_SESSION['SES_ART_master']->get_error('SECT_alt'); ! $tags['ALT_TXT_LABEL'] = $_SESSION['translate']->it('Short Image Description'); ! $tags['ALT_TXT_HELP'] = CLS_help::show_link('article', 'section_image_desc'); ! $tags['ALT_TXT'] = '<input type="text" name="SECT_alt" value="'.htmlspecialchars($this->image['alt']).'" maxlength="255" style="width:70%" />'; ! ! $tags['LINK_LABEL'] = $_SESSION['translate']->it('This Image Links To'); ! $tags['LINK_HELP'] = CLS_help::show_link('article', 'section_image_link'); ! $tags['LINK'] = '<input type="text" name="SECT_link" value="'.htmlspecialchars($this->image['link']).'" maxlength="255" style="width:70%" />'; ! ! $tags['CAPTION_LABEL'] = $_SESSION['translate']->it('Link caption'); ! $tags['CAPTION_HELP'] = CLS_help::show_link('article', 'section_image_caption'); ! $tags['CAPTION'] = '<input type="text" name="SECT_image_caption" value="'.htmlspecialchars($this->image['caption']).'" maxlength="255" style="width:70%" />'; } *************** *** 98,126 **** || (!$_SESSION['OBJ_user']->allow_access('article', 'insert_external_pages') && substr($this->template, 0, 11)=='Page Insert')) ! && $sect_tpl_array = PHPWS_Template::listTemplates('article',false,'section')) { ! /* If user cannot embed external pages, strip the templates out */ ! if (!$_SESSION['OBJ_user']->allow_access('article', 'insert_external_pages')) ! { ! $stop = sizeof($sect_tpl_array); ! for ($count = 1; ($count < $stop); $count++) ! if (substr($sect_tpl_array[$count], 0, 11)=='Page Insert') ! unset($sect_tpl_array[$count]); ! } /* Strip the extensions off & convert _ to spaces for readability */ - $sect_tpl_array = str_replace('.tpl', NULL, $sect_tpl_array); $sect_tpl_array = str_replace('_',' ',$sect_tpl_array); /* Sort the list */ asort($sect_tpl_array); ! $myelements[0] .= $_SESSION['translate']->it('Section Template').': ' ! . PHPWS_Form::formSelect('SECT_template', $sect_tpl_array ! , str_replace('_',' ',$this->template), true, NULL, NULL) ! . CLS_help::show_link('article', 'section_template') ! . '<br /><br />'; } ! $myelements[0] .= PHPWS_Form::formHidden('module', 'article') ! . PHPWS_Form::formSubmit($_SESSION['translate']->it('Save Section'), 'ARTICLE_vars[section:save]') . CLS_help::show_link('article', 'section_save'); ! ?> --- 102,129 ---- || (!$_SESSION['OBJ_user']->allow_access('article', 'insert_external_pages') && substr($this->template, 0, 11)=='Page Insert')) ! && $result = PHPWS_Template::listTemplates('article',false,'section')) { ! /* Turn this into an assoc array */ ! $result = str_replace('.tpl', NULL, $result); ! foreach ($result as $value) ! /* If user cannot embed external pages, strip the templates out */ ! if ($_SESSION['OBJ_user']->allow_access('article', 'insert_external_pages') || !stristr($value, 'page_insert')) ! $sect_tpl_array[(string)$value] = $value; /* Strip the extensions off & convert _ to spaces for readability */ $sect_tpl_array = str_replace('_',' ',$sect_tpl_array); /* Sort the list */ asort($sect_tpl_array); ! $tags['TPL_LABEL'] = $_SESSION['translate']->it('Section Template'); ! $tags['TPL_HELP'] = CLS_help::show_link('article', 'section_template'); ! $form->add('SECT_template', 'select', $sect_tpl_array); ! $form->setMatch('SECT_template', $this->template); } ! $form->add('module', 'hidden', 'article'); ! ! $tags = $form->getTemplate(TRUE, FALSE, $tags); ! ! $tags['SAVE_BTN'] = '<input type="submit" name="ARTICLE_vars[section:save]" value="'.$_SESSION['translate']->it('Save Section').'" />' . CLS_help::show_link('article', 'section_save'); ! ?> \ No newline at end of file Index: AM_view_news.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_view_news.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AM_view_news.php 21 Aug 2004 17:02:12 -0000 1.5 --- AM_view_news.php 30 Sep 2004 05:14:32 -0000 1.6 *************** *** 89,93 **** $title .= $_SESSION['translate']->it(' Starting With `[var1]`', $this->news_filter['letter']); $GLOBALS['Layout_title'] = $title . ' - ' . $_SESSION['OBJ_layout']->page_title; ! $GLOBALS['CNT_article']['title'] = '<center><b>' . $title . '</b></center>'; $content = PHPWS_Template::processTemplate($tags,'article','pager.tpl'); --- 89,93 ---- $title .= $_SESSION['translate']->it(' Starting With `[var1]`', $this->news_filter['letter']); $GLOBALS['Layout_title'] = $title . ' - ' . $_SESSION['OBJ_layout']->page_title; ! $GLOBALS['CNT_article']['title'] = $title; $content = PHPWS_Template::processTemplate($tags,'article','pager.tpl'); Index: A_view_history.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_view_history.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A_view_history.php 21 Aug 2004 17:02:13 -0000 1.1 --- A_view_history.php 30 Sep 2004 05:14:32 -0000 1.2 *************** *** 38,43 **** } function getListPick() ! { ! return '<input name="this" value="'.$this->version.'" type="radio"><input name="that" value="'.$this->version.'" type="radio">'; } function getListArchived_date() --- 38,44 ---- } function getListPick() ! { ! return '<label><span style="display:none">'.$_SESSION['translate']->it('Use this version for the left side of the comparison').'</span><input name="this" value="'.$this->version.'" type="radio"></label>' ! . '<label><span style="display:none">'.$_SESSION['translate']->it('Use this version for the right side of the comparison').'</span><input name="that" value="'.$this->version.'" type="radio"></label>'; } function getListArchived_date() Index: AM_view_archives.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_view_archives.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AM_view_archives.php 18 Jun 2004 23:31:09 -0000 1.3 --- AM_view_archives.php 30 Sep 2004 05:14:32 -0000 1.4 *************** *** 133,137 **** $GLOBALS['Layout_title'] = $this->arc_filter['title'] . ' - ' . $_SESSION['OBJ_layout']->page_title; ! $GLOBALS['CNT_article']['title'] = '<center><b>' . $this->arc_filter['title'] . '</b></center>'; $content = PHPWS_Template::processTemplate($tags,'article','pager.tpl'); --- 133,137 ---- $GLOBALS['Layout_title'] = $this->arc_filter['title'] . ' - ' . $_SESSION['OBJ_layout']->page_title; ! $GLOBALS['CNT_article']['title'] = $this->arc_filter['title']; $content = PHPWS_Template::processTemplate($tags,'article','pager.tpl'); Index: A_delete.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_delete.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** A_delete.php 21 Aug 2004 17:38:20 -0000 1.3 --- A_delete.php 30 Sep 2004 05:14:32 -0000 1.4 *************** *** 91,106 **** else { - $myform[0] = PHPWS_Form::formHidden('module', 'article') - . PHPWS_Form::formHidden('ARTICLE_id', $this->id) - . PHPWS_Form::formHidden('edit', 'delete') - . PHPWS_Form::formSubmit($_SESSION['translate']->it('Yes'), 'yes') - . ' ' - . PHPWS_Form::formSubmit($_SESSION['translate']->it('No'), 'no'); - $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('Article Manager') .' - '. $_SESSION['translate']->it('Confirm Action').'!'; $GLOBALS['CNT_article']['content'] = $_SESSION['translate']->it('Are you sure you want to <b>[var1] "[var2]"</b>?' , $_SESSION['translate']->it('delete'), $this->title) ! . PHPWS_Form::makeForm("ARTICLE_confirm_delete", "index.php", $myform, "post", 0, 0); } --- 91,106 ---- else { $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('Article Manager') .' - '. $_SESSION['translate']->it('Confirm Action').'!'; $GLOBALS['CNT_article']['content'] = $_SESSION['translate']->it('Are you sure you want to <b>[var1] "[var2]"</b>?' , $_SESSION['translate']->it('delete'), $this->title) ! . '<form name="ARTICLE_confirm_delete" action="index.php" method="post">' ! . '<input name="module" value="article" type="hidden">' ! . '<input name="ARTICLE_id" value="'.$this->id.'" type="hidden">' ! . '<input name="edit" value="delete" type="hidden">' ! . '<input name="yes" value="'.$_SESSION['translate']->it('Yes').'" type="submit">' ! . ' ' ! . '<input name="no" value="'.$_SESSION['translate']->it('No').'" type="submit">' ! . '</form>'; } Index: AM_list_articles.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_list_articles.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AM_list_articles.php 21 Aug 2004 17:38:20 -0000 1.5 --- AM_list_articles.php 30 Sep 2004 05:14:32 -0000 1.6 *************** *** 12,15 **** --- 12,28 ---- */ + $lang_count = count($_SESSION['translate']->getRegularLanguages()); + $languages = $_SESSION['translate']->getCodeArray(); + /* This trick is from http://www.madaboutstyle.com/tooltip2.html */ + $_SESSION['OBJ_layout']->addStyle('#dhtmltooltip{ + position: absolute; + border: 2px solid black; + padding: 2px; + background-color: lightyellow; + visibility: hidden; + z-index: 10000; + }'); + + /* Set up display variables */ $now = date('Y-m-d H:i:s'); *************** *** 80,83 **** --- 93,97 ---- { $row = array(); + $actions = ''; if ($count++%2) $row['ODDROW'] = ' '; *************** *** 96,154 **** ?" ((TBA))" :""; ! $row['ARTICLE_TITLE'] = PHPWS_Text::moduleLink(stripslashes($value['title']), 'article' ! ,array('view'=>$value['id'])); ! ! /* Set var to show whether this is the homepage article or not */ ! if($value['mainarticle']) ! $row['HOME_FLAG'] = '<font color="lime"><b><i>' ! . $_SESSION['translate']->it('CURRENT') . '</i></b></font>'; ! else ! if ($is_viewable && isset($Fset_main)) ! $row['HOME_FLAG'] = '<input type="submit" name="ARTICLE_vars[edit:set_main]" value="'.$Fset_main.'" />'; /* Set up date */ ! if(!$row['DATE'] = substr($value[$temp_date],0,10)) $row['DATE'] = ' '; /* Set var to expire/publish the article if it's not the home page */ if (isset($Fexpire) && !$value['mainarticle']) ! $row['PUB_EXP'] = ($is_viewable) ! ?'<input type="submit" name="ARTICLE_vars[edit:expire]" value="'.$Fexpire.'" />' ! :'<input type="submit" name="ARTICLE_vars[edit:publish]" value="'.$Fpublish.'" />'; ! else ! $row['PUB_EXP'] = ' '; ! /* Set up Edit button */ ! if ($this->can('edit',$value['created_username'],$value['mainarticle'])) ! { ! /* If someone else is not editing this page... */ ! if (!PHPWS_Article::isLocked($value['editlock'], $value['edituser'])) ! $row['EDIT'] = '<input type="submit" name="ARTICLE_vars[edit:' ! .$value['id'].']" value="'.$Fedit.'" />'; ! else ! $row['EDIT'] = '['.$_SESSION['translate']->it('Locked').']'; ! } ! else ! $row['EDIT'] = ' '; /* Set up Delete button */ if (isset($Fdelete)) ! $row['DELETE'] = '<input type="submit" name="ARTICLE_vars[edit:delete]" value="'.$Fdelete.'" />'; ! else ! $row['DELETE'] = ' '; ! $content[0] = '<input type="hidden" name="module" value="article" id='.$value['id'].' />' ! . '<input type="hidden" name="ARTICLE_id" value="'.$value['id'].'" />' ! . PHPWS_Template::processTemplate($row,'article','listing_row.tpl'); ! $tags['LIST_ROWS'] .= PHPWS_Form::makeForm('ARTICLE_main_menu', 'index.php#'.$value['id'], $content, 'post', 0, 0); ! } /* Create Table HTML */ $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(); --- 110,167 ---- ?" ((TBA))" :""; ! /* Put extended detail in the title attribute */ ! $detail = '<span style="font-size:small">' ! . $_SESSION['translate']->it('Detail information for article #').$value['id'].'</b><br />' ! . $_SESSION['translate']->it('Current Version').': '.$value['version'].'<br />' ! . $_SESSION['translate']->it('Created By [var1] on [var2]',$value['created_username'],date(PHPWS_DATE_FORMAT, (strtotime($value['created_date'])+$GLOBALS['core']->datetime->time_dif))).'<br />' ! . $_SESSION['translate']->it('Last updated by [var1] on [var2]',$value['updated_username'],date(PHPWS_DATE_FORMAT, (strtotime($value['updated_date'])+$GLOBALS['core']->datetime->time_dif))).'<br />' ! . $_SESSION['translate']->it('Publication Date').': '.date(PHPWS_DATE_FORMAT, (strtotime($value['publication_date'])+$GLOBALS['core']->datetime->time_dif)).'<br />' ! . $_SESSION['translate']->it('Expires on').': '.date(PHPWS_DATE_FORMAT, (strtotime($value['expiration_date'])+$GLOBALS['core']->datetime->time_dif)).'<br />' ! . $_SESSION['translate']->it('Approved').'? ' ! .(($value['approved'])?$_SESSION['translate']->it('Yes'):$_SESSION['translate']->it('No')).'<br />' ! . $_SESSION['translate']->it('Views').': '.$value['hits'].'<br />' ! . $_SESSION['translate']->it('Language').': '.$languages[$_SESSION['translate']->current_language].'<br />' ! . $_SESSION['translate']->it('Available Translations').' ('.'0'.'/'.($lang_count-1).'): '.'To be coded'.'<br />' ! . $_SESSION['translate']->it('Keywords for this article').': '.$value['meta_keywords'] ! . '</span>' ; ! $row['ARTICLE_TITLE'] = PHPWS_Text::moduleLink(stripslashes($value['title']), 'article',array('view'=>$value['id']),null,'A_tooltip'); ! $row['ARTICLE_TITLE'] = str_replace('">'.stripslashes($value['title']),'" onMouseover="ddrivetip(\''.htmlspecialchars($detail).'\')"; onMouseout="hideddrivetip()">'.stripslashes($value['title']), $row['ARTICLE_TITLE']); /* Set up date */ ! if(!$row['DATE'] = date(PHPWS_DATE_FORMAT, (strtotime($value[$temp_date])+$GLOBALS['core']->datetime->time_dif))) $row['DATE'] = ' '; /* Set var to expire/publish the article if it's not the home page */ if (isset($Fexpire) && !$value['mainarticle']) ! $actions .= ($is_viewable) ! ?'<option value="expire">'.$Fexpire.'</option>' ! :'<option value="publish">'.$Fpublish.'</option>'; /* Set up Edit button */ ! if ($this->can('edit',$value['created_username'],$value['mainarticle']) ! && !PHPWS_Article::isLocked($value['editlock'], $value['edituser'])) ! $actions .= '<option value="'.$value['id'].'">'.$Fedit.'</option>'; /* Set up Delete button */ if (isset($Fdelete)) ! $actions .= '<option value="delete">'.$Fdelete.'</option>'; ! /* Set var to show whether this is the homepage article or not */ ! if(!$value['mainarticle'] && $is_viewable && isset($Fset_main)) ! $actions .= '<option value="set_main">'.$Fset_main.'</option>'; + $row['ID'] = $value['id']; + $row['ACTION'] = '<select name="action_list" title="' + . $_SESSION['translate']->it('Select the desired action').'">'.$actions.'</select>'; + $row['ACTION'] = $row['ACTION']; + $row['BTN'] = ' <input name="Row_'.$value['id'].'_btn" value="Do it" type="submit">' + . '<input type="hidden" name="module" value="article" id='.$value['id'].' />' + . '<input type="hidden" name="ARTICLE_id" value="'.$value['id'].'" />'; + $tags['LIST_ROWS'] .= PHPWS_Template::processTemplate($row,'article','listing_row.tpl'); + } /* Create Table HTML */ $tags['TITLE'] = $_SESSION['translate']->it('Title'); $tags['DATE'] = $_SESSION['translate']->it($temp_date_title); ! $tags['ACTION'] = '<label for="action_list">'.$_SESSION['translate']->it('Action').'</label>' . CLS_help::show_link('article', 'list_action'); $tags['PAGE_BACKWARD_LINK'] = $this->pager->getBackLink(); *************** *** 158,165 **** $tags['LIMIT_LINKS'] = $this->pager->getLimitLinks(); $tags['LIMIT_LINKS_LABEL'] = $_SESSION['translate']->it('Rows to show per page: '); $content = PHPWS_Template::processTemplate($tags,'article','listing.tpl'); ! $this->popbox($_SESSION['translate']->it('Current Articles'), $content); ?> \ No newline at end of file --- 171,249 ---- $tags['LIMIT_LINKS'] = $this->pager->getLimitLinks(); $tags['LIMIT_LINKS_LABEL'] = $_SESSION['translate']->it('Rows to show per page: '); + $tags['TBL_SUMMARY'] = $_SESSION['translate']->it('This table lists [var1] in the requested order. The first column is a link to view the article itself and is the name of the article followed by a summary of pertinent information. The next colums are the date it is sorted by and a selection list of actions you can perform on the article.', $tags['SECTION_INFO']); + + $js = '<div id="dhtmltooltip"></div> + + <script type="text/javascript"> + + /*********************************************** + * Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) + * This notice MUST stay intact for legal use + * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code + ***********************************************/ + + var offsetxpoint=-60 //Customize x offset of tooltip + var offsetypoint=20 //Customize y offset of tooltip + var ie=document.all + var ns6=document.getElementById && !document.all + var enabletip=false + if (ie||ns6) + var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "" + + function ietruebody(){ + return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body + } + + function ddrivetip(thetext, thecolor, thewidth){ + if (ns6||ie){ + if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px" + if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor + tipobj.innerHTML=thetext + enabletip=true + return false + } + } + + function positiontip(e){ + if (enabletip && tipobj.style.visibility!="visible"){ + var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft; + var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop; + var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20 + var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20 + + var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000 + + if (rightedge<tipobj.offsetWidth) + tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px" + else if (curX<leftedge) + tipobj.style.left="5px" + else + tipobj.style.left=curX+offsetxpoint+"px" + + if (bottomedge<tipobj.offsetHeight) + tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px" + else + tipobj.style.top=curY+offsetypoint+"px" + tipobj.style.visibility="visible" + } + } + + function hideddrivetip(){ + if (ns6||ie){ + enabletip=false + tipobj.style.visibility="hidden" + tipobj.style.left="-1000px" + tipobj.style.backgroundColor="" + tipobj.style.width="" + } + } + + document.onmousemove=positiontip + + </script>'; $content = PHPWS_Template::processTemplate($tags,'article','listing.tpl'); ! $this->popbox($_SESSION['translate']->it('Current Articles'), $js.$content); ?> \ No newline at end of file Index: A_mail.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_mail.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** A_mail.php 21 Aug 2004 17:02:13 -0000 1.3 --- A_mail.php 30 Sep 2004 05:14:32 -0000 1.4 *************** *** 89,94 **** $GLOBALS['Layout_title'] = $_SESSION['translate']->it('E-mail A Friend').': "'.$this->title . '" - ' . strip_tags($_SESSION['OBJ_layout']->page_title); $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('E-mail this Article to a Friend'); ! $GLOBALS['CNT_article']['content'] = $content .'<br /><br /><center>[' ! . PHPWS_Text::moduleLink($_SESSION['translate']->it('Go back to [var1]', PHPWS_Text::parseOutput($this->title)), 'article', array('view'=>$this->id)). ']</center>'; } else if(isset($_POST['ART_no'])) --- 89,94 ---- $GLOBALS['Layout_title'] = $_SESSION['translate']->it('E-mail A Friend').': "'.$this->title . '" - ' . strip_tags($_SESSION['OBJ_layout']->page_title); $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('E-mail this Article to a Friend'); ! $GLOBALS['CNT_article']['content'] = $content .'<br /><br /><div style="text-align:center">[' ! . PHPWS_Text::moduleLink($_SESSION['translate']->it('Go back to [var1]', PHPWS_Text::parseOutput($this->title)), 'article', array('view'=>$this->id)). ']</div>'; } else if(isset($_POST['ART_no'])) *************** *** 98,106 **** else { ! $myform[0] = PHPWS_Form::formHidden('module', 'article') ! . PHPWS_Form::formHidden('email', $this->id); ! ! $tags['SEND'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Send'), 'ART_yes'); ! $tags['CANCEL'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Cancel'), 'ART_no'); $tags['TITLE'] = PHPWS_Text::parseOutput($this->title); if ($this->summary) --- 98,103 ---- else { ! $tags['SEND'] = '<input name="ART_yes" value="'.$_SESSION['translate']->it('Send').'" type="submit">'; ! $tags['CANCEL'] = '<input name="ART_no" value="'.$_SESSION['translate']->it('Cancel').'" type="submit">'; $tags['TITLE'] = PHPWS_Text::parseOutput($this->title); if ($this->summary) *************** *** 108,130 **** $tags['BACKLINK'] = '['.PHPWS_Text::moduleLink($_SESSION['translate']->it('Back to Article'), 'article', array('view'=>$this->id)). ']'; $tags['R_MAIL_LABEL'] = $_SESSION['translate']->it('Friend\'s Email').':'; ! $tags['R_MAIL_ADDR'] = PHPWS_Form::formTextField('ART_r_email', NULL, 40); $tags['R_MAIL_HELP'] = $_SESSION['translate']->it('Separate multiple addresses with commas. Maximum 200 characters.'); $tags['S_NAME_LABEL'] = $_SESSION['translate']->it('Your Full Name: (optional)'); ! $tags['S_NAME'] = PHPWS_Form::formTextField('ART_s_name', $_SESSION['OBJ_user']->username, 40); $tags['S_MAIL_LABEL'] = $_SESSION['translate']->it('Your Email Address').':'; ! $tags['S_MAIL_ADDR'] = PHPWS_Form::formTextField('ART_s_email', $_SESSION['OBJ_user']->email, 40); $tags['S_MAIL_HELP'] = $_SESSION['translate']->it('These email addresses will be used to email the information on your behalf and will not be collected or used by us for any marketing purposes without your permission.'); ! $tags['S_COPY'] = PHPWS_Form::formCheckBox('ART_copy_s',1,NULL,NULL,$_SESSION['translate']->it('Send a copy to yourself')); $tags['S_MSG_LABEL'] = $_SESSION['translate']->it('Enter a brief message to your friend: (optional)'); ! $tags['S_MSG'] = PHPWS_Form::formTextArea('ART_s_msg', NULL, 3, 60); ! $tags['MAIL_TYPE'] = PHPWS_Form::formRadio('ART_mail_type', 'full', 'full', NULL, $_SESSION['translate']->it('Full Information in HTML')) ! . ' ' .PHPWS_Form::formRadio('ART_mail_type', 'link', 'full', NULL, $_SESSION['translate']->it('Link Only')); ! ! $myform[0] .= PHPWS_Template::processTemplate($tags,'article','mail_form.tpl'); $GLOBALS['Layout_title'] = $_SESSION['translate']->it('E-mail A Friend').': "'.$this->title . '" - ' . strip_tags($_SESSION['OBJ_layout']->page_title); - $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('E-mail this Article to a Friend'); ! $GLOBALS['CNT_article']['content'] = PHPWS_Form::makeForm('ARTICLE_emailAfriend', 'index.php', $myform, 'post', 0, 0); } --- 105,131 ---- $tags['BACKLINK'] = '['.PHPWS_Text::moduleLink($_SESSION['translate']->it('Back to Article'), 'article', array('view'=>$this->id)). ']'; $tags['R_MAIL_LABEL'] = $_SESSION['translate']->it('Friend\'s Email').':'; ! $tags['R_MAIL_ADDR'] = '<input type="text" name="ART_r_email" value="" maxlength="255" style="width:50%" />'; $tags['R_MAIL_HELP'] = $_SESSION['translate']->it('Separate multiple addresses with commas. Maximum 200 characters.'); $tags['S_NAME_LABEL'] = $_SESSION['translate']->it('Your Full Name: (optional)'); ! $tags['S_NAME'] = '<input type="text" name="ART_s_name" value="'.$_SESSION['OBJ_user']->username.'" maxlength="255" style="width:50%" />'; $tags['S_MAIL_LABEL'] = $_SESSION['translate']->it('Your Email Address').':'; ! $tags['S_MAIL_ADDR'] = '<input type="text" name="ART_s_email" value="'.$_SESSION['OBJ_user']->email.'" maxlength="255" style="width:50%" />'; $tags['S_MAIL_HELP'] = $_SESSION['translate']->it('These email addresses will be used to email the information on your behalf and will not be collected or used by us for any marketing purposes without your permission.'); ! $tags['S_COPY_LABEL'] = $_SESSION['translate']->it('Send a copy to yourself'); ! $tags['S_COPY'] = '<input name="ART_copy_s" value="1" type="checkbox">'; $tags['S_MSG_LABEL'] = $_SESSION['translate']->it('Enter a brief message to your friend: (optional)'); ! $tags['S_MSG'] = '<textarea id="ART_s_msg" name="ART_s_msg" rows="3" style="width:95%"></textarea>'; ! $tags['MAIL_TYPE1_LABEL'] = $_SESSION['translate']->it('Full Information in HTML'); ! $tags['MAIL_TYPE1'] = '<input name="ART_mail_type" value="full" checked="checked" type="radio">'; ! $tags['MAIL_TYPE2_LABEL'] = $_SESSION['translate']->it('Link Only'); ! $tags['MAIL_TYPE2'] = '<input name="ART_mail_type" value="link" type="radio">'; $GLOBALS['Layout_title'] = $_SESSION['translate']->it('E-mail A Friend').': "'.$this->title . '" - ' . strip_tags($_SESSION['OBJ_layout']->page_title); $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('E-mail this Article to a Friend'); ! $GLOBALS['CNT_article']['content'] = '<form name="ARTICLE_emailAfriend" action="index.php" method="post">' ! . '<input name="module" value="article" type="hidden">' ! . '<input name="email" value="'.$this->id.'" type="hidden">' ! . PHPWS_Template::processTemplate($tags,'article','mail_form.tpl') ! . '</form>'; } Index: A_remove_section.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_remove_section.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** A_remove_section.php 18 Jun 2004 23:31:10 -0000 1.2 --- A_remove_section.php 30 Sep 2004 05:14:32 -0000... [truncated message content] |