public function __construct($view, $title_page)
 {
     parent::__construct($view);
     $lang = LangLoader::get('common', 'articles');
     $this->set_title($lang['articles']);
     $this->add_link(LangLoader::get_message('categories.management', 'categories-common'), ArticlesUrlBuilder::manage_categories());
     $this->add_link(LangLoader::get_message('category.add', 'categories-common'), ArticlesUrlBuilder::add_category());
     $this->add_link($lang['articles_management'], ArticlesUrlBuilder::manage_articles());
     $this->add_link($lang['articles.add'], ArticlesUrlBuilder::add_article());
     $this->add_link(LangLoader::get_message('configuration', 'admin-common'), ArticlesUrlBuilder::configuration());
     $env = $this->get_graphical_environment();
     $env->set_page_title($title_page, $lang['articles']);
 }
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'articles');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), ArticlesUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), ArticlesUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), ArticlesUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_articles_link = new AdminModuleLink($lang['articles_management'], ArticlesUrlBuilder::manage_articles());
     $manage_articles_link->add_sub_link(new AdminModuleLink($lang['articles_management'], ArticlesUrlBuilder::manage_articles()));
     $manage_articles_link->add_sub_link(new AdminModuleLink($lang['articles.add'], ArticlesUrlBuilder::add_article(AppContext::get_request()->get_getint('id_category', Category::ROOT_CATEGORY))));
     $tree->add_link($manage_articles_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), ArticlesUrlBuilder::configuration()));
     if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($lang['articles.add'], ArticlesUrlBuilder::add_article(AppContext::get_request()->get_getint('id_category', Category::ROOT_CATEGORY)), ArticlesAuthorizationsService::check_authorizations()->write() || ArticlesAuthorizationsService::check_authorizations()->contribution()));
     }
     $tree->add_link(new ModuleLink($lang['articles.pending_articles'], ArticlesUrlBuilder::display_pending_articles(), ArticlesAuthorizationsService::check_authorizations()->write() || ArticlesAuthorizationsService::check_authorizations()->contribution() || ArticlesAuthorizationsService::check_authorizations()->moderation()));
     return $tree;
 }
    public function get_feed_data_struct($idcat = 0, $name = '')
    {
        if (ArticlesService::get_categories_manager()->get_categories_cache()->category_exists($idcat)) {
            $querier = PersistenceContext::get_querier();
            $category = ArticlesService::get_categories_manager()->get_categories_cache()->get_category($idcat);
            $site_name = GeneralConfig::load()->get_site_name();
            $site_name = $idcat != Category::ROOT_CATEGORY ? $site_name . ' : ' . $category->get_name() : $site_name;
            $feed_module_name = LangLoader::get_message('articles.feed_name', 'common', 'articles');
            $data = new FeedData();
            $data->set_title($feed_module_name . ' - ' . $site_name);
            $data->set_date(new Date());
            $data->set_link(SyndicationUrlBuilder::rss('articles', $idcat));
            $data->set_host(HOST);
            $data->set_desc($feed_module_name . ' - ' . $site_name);
            $data->set_lang(LangLoader::get_message('xml_lang', 'main'));
            $data->set_auth_bit(Category::READ_AUTHORIZATIONS);
            $categories = ArticlesService::get_categories_manager()->get_childrens($idcat, new SearchCategoryChildrensOptions(), true);
            $ids_categories = array_keys($categories);
            $now = new Date();
            $results = $querier->select('SELECT articles.id, articles.id_category, articles.title, articles.rewrited_title, articles.picture_url, 
			articles.contents, articles.description, articles.date_created, cat.rewrited_name AS rewrited_name_cat
			FROM ' . ArticlesSetup::$articles_table . ' articles
			LEFT JOIN ' . ArticlesSetup::$articles_cats_table . ' cat ON cat.id = articles.id_category
			WHERE articles.id_category IN :cats_ids
			AND (published = 1 OR (published = 2 AND publishing_start_date < :timestamp_now AND (publishing_end_date > :timestamp_now OR publishing_end_date = 0)))
			ORDER BY articles.date_created DESC', array('cats_ids' => $ids_categories, 'timestamp_now' => $now->get_timestamp()));
            foreach ($results as $row) {
                $row['rewrited_name_cat'] = !empty($row['id_category']) ? $row['rewrited_name_cat'] : 'root';
                $link = ArticlesUrlBuilder::display_article($row['id_category'], $row['rewrited_name_cat'], $row['id'], $row['rewrited_title']);
                $item = new FeedItem();
                $item->set_title($row['title']);
                $item->set_link($link);
                $item->set_guid($link);
                $item->set_desc(FormatingHelper::second_parse($row['contents']));
                $item->set_date(new Date($row['date_created'], Timezone::SERVER_TIMEZONE));
                $item->set_image_url($row['picture_url']);
                $item->set_auth(ArticlesService::get_categories_manager()->get_heritated_authorizations($row['id_category'], Category::READ_AUTHORIZATIONS, Authorizations::AUTH_PARENT_PRIORITY));
                $data->add_item($item);
            }
            $results->dispose();
            return $data;
        }
    }
 public function execute(HTTPRequestCustom $request)
 {
     AppContext::get_session()->csrf_get_protect();
     $article = $this->get_article($request);
     if (!$article->is_authorized_to_delete()) {
         $error_controller = PHPBoostErrors::user_not_authorized();
         DispatchManager::redirect($error_controller);
     }
     if (AppContext::get_current_user()->is_readonly()) {
         $controller = PHPBoostErrors::user_in_read_only();
         DispatchManager::redirect($controller);
     }
     ArticlesService::delete('WHERE id=:id', array('id' => $article->get_id()));
     ArticlesService::get_keywords_manager()->delete_relations($article->get_id());
     PersistenceContext::get_querier()->delete(DB_TABLE_EVENTS, 'WHERE module=:module AND id_in_module=:id', array('module' => 'articles', 'id' => $article->get_id()));
     CommentsService::delete_comments_topic_module('articles', $article->get_id());
     NotationService::delete_notes_id_in_module('articles', $article->get_id());
     Feed::clear_cache('articles');
     AppContext::get_response()->redirect($request->get_url_referrer() ? $request->get_url_referrer() : ArticlesUrlBuilder::home(), StringVars::replace_vars(LangLoader::get_message('articles.message.success.delete', 'common', 'articles'), array('title' => $article->get_title())));
 }
    private function build_table()
    {
        $table_model = new SQLHTMLTableModel(ArticlesSetup::$articles_table, 'table', array(new HTMLTableColumn(LangLoader::get_message('form.title', 'common'), 'title'), new HTMLTableColumn(LangLoader::get_message('category', 'categories-common'), 'id_category'), new HTMLTableColumn(LangLoader::get_message('author', 'common'), 'display_name'), new HTMLTableColumn(LangLoader::get_message('form.date.creation', 'common'), 'date_created'), new HTMLTableColumn(LangLoader::get_message('status', 'common'), 'published'), new HTMLTableColumn('')), new HTMLTableSortingRule('date_created', HTMLTableSortingRule::DESC));
        $table = new HTMLTable($table_model);
        $table_model->set_caption($this->lang['articles_management']);
        $results = array();
        $result = $table_model->get_sql_results('articles
			LEFT JOIN ' . DB_TABLE_AVERAGE_NOTES . ' notes ON notes.id_in_module = articles.id AND notes.module_name = \'articles\'
			LEFT JOIN ' . DB_TABLE_NOTE . ' note ON note.id_in_module = articles.id AND note.module_name = \'articles\' AND note.user_id = ' . AppContext::get_current_user()->get_id() . '
			LEFT JOIN ' . DB_TABLE_MEMBER . ' member ON member.user_id = articles.author_user_id', array('*', 'articles.id'));
        foreach ($result as $row) {
            $article = new Article();
            $article->set_properties($row);
            $category = $article->get_category();
            $user = $article->get_author_user();
            $edit_link = new LinkHTMLElement(ArticlesUrlBuilder::edit_article($article->get_id()), '', array('title' => LangLoader::get_message('edit', 'common')), 'fa fa-edit');
            $delete_link = new LinkHTMLElement(ArticlesUrlBuilder::delete_article($article->get_id()), '', array('title' => LangLoader::get_message('delete', 'common'), 'data-confirmation' => 'delete-element'), 'fa fa-delete');
            $user_group_color = User::get_group_color($user->get_groups(), $user->get_level(), true);
            $author = $user->get_id() !== User::VISITOR_LEVEL ? new LinkHTMLElement(UserUrlBuilder::profile($user->get_id()), $user->get_display_name(), !empty($user_group_color) ? array('style' => 'color: ' . $user_group_color) : array(), UserService::get_level_class($user->get_level())) : $user->get_display_name();
            $br = new BrHTMLElement();
            $dates = '';
            if ($article->get_publishing_start_date() != null && $article->get_publishing_end_date() != null) {
                $dates = LangLoader::get_message('form.date.start', 'common') . ' ' . $article->get_publishing_start_date()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE) . $br->display() . LangLoader::get_message('form.date.end', 'common') . ' ' . $article->get_publishing_end_date()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE);
            } else {
                if ($article->get_publishing_start_date() != null) {
                    $dates = $article->get_publishing_start_date()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE);
                } else {
                    if ($article->get_publishing_end_date() != null) {
                        $dates = LangLoader::get_message('until', 'main') . ' ' . $article->get_publishing_end_date()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE);
                    }
                }
            }
            $start_and_end_dates = new SpanHTMLElement($dates, array(), 'smaller');
            $results[] = new HTMLTableRow(array(new HTMLTableRowCell(new LinkHTMLElement(ArticlesUrlBuilder::display_article($category->get_id(), $category->get_rewrited_name(), $article->get_id(), $article->get_rewrited_title()), $article->get_title()), 'left'), new HTMLTableRowCell(new LinkHTMLElement(ArticlesUrlBuilder::display_category($category->get_id(), $category->get_rewrited_name()), $category->get_name())), new HTMLTableRowCell($author), new HTMLTableRowCell($article->get_date_created()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE)), new HTMLTableRowCell($article->get_status() . $br->display() . ($dates ? $start_and_end_dates->display() : '')), new HTMLTableRowCell($edit_link->display() . $delete_link->display())));
        }
        $table->set_rows($table_model->get_number_of_matching_rows(), $results);
        $this->view->put('table', $table->display());
    }
 private function build_response(View $tpl)
 {
     $article = $this->get_article();
     $response = new SiteDisplayResponse($tpl);
     $graphical_environment = $response->get_graphical_environment();
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['articles'], ArticlesUrlBuilder::home());
     if ($article->get_id() === null) {
         $breadcrumb->add($this->lang['articles.add'], ArticlesUrlBuilder::add_article($article->get_id_category()));
         $graphical_environment->set_page_title($this->lang['articles.add'], $this->lang['articles']);
         $graphical_environment->get_seo_meta_data()->set_description($this->lang['articles.add']);
         $graphical_environment->get_seo_meta_data()->set_canonical_url(ArticlesUrlBuilder::add_article($article->get_id_category()));
     } else {
         $categories = array_reverse(ArticlesService::get_categories_manager()->get_parents($article->get_id_category(), true));
         foreach ($categories as $id => $category) {
             if ($category->get_id() != Category::ROOT_CATEGORY) {
                 $breadcrumb->add($category->get_name(), ArticlesUrlBuilder::display_category($category->get_id(), $category->get_rewrited_name()));
             }
         }
         $breadcrumb->add($article->get_title(), ArticlesUrlBuilder::display_article($category->get_id(), $category->get_rewrited_name(), $article->get_id(), $article->get_rewrited_title()));
         $breadcrumb->add($this->lang['articles.edit'], ArticlesUrlBuilder::edit_article($article->get_id()));
         $graphical_environment->set_page_title($this->lang['articles.edit'], $this->lang['articles']);
         $graphical_environment->get_seo_meta_data()->set_description($this->lang['articles.edit']);
         $graphical_environment->get_seo_meta_data()->set_canonical_url(ArticlesUrlBuilder::edit_article($article->get_id()));
     }
     return $response;
 }
 protected function get_delete_category_url(Category $category)
 {
     return ArticlesUrlBuilder::delete_category($category->get_id());
 }
Example #8
0
 *
 ###################################################
 *
 * This program is a free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 ###################################################*/
####################################################
#						French						#
####################################################
$lang['root_category_description'] = 'Bienvenue dans l\'espace des articles du site !
<br /><br />
Une catégorie et un article ont été créés pour vous montrer comment fonctionne ce module. Voici quelques conseils pour bien débuter sur ce module.
<br /><br /> 
<ul class="formatter-ul">
	<li class="formatter-li"> Pour configurer ou personnaliser l\'accueil de votre module, rendez vous dans l\'<a href="' . ArticlesUrlBuilder::configuration()->relative() . '">administration du module</a></li>
	<li class="formatter-li"> Pour créer des catégories, <a href="' . ArticlesUrlBuilder::add_category()->relative() . '">cliquez ici</a> </li>
	<li class="formatter-li"> Pour ajouter des articles, <a href="' . ArticlesUrlBuilder::add_article()->relative() . '">cliquez ici</a></li>
</ul>
<br />Pour en savoir plus, n\'hésitez pas à consulter la documentation du module sur le site de <a href="http://www.phpboost.com">PHPBoost</a>.';
 private function generate_response()
 {
     $response = new SiteDisplayResponse($this->view);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->lang['articles.pending_articles'], $this->lang['articles']);
     $graphical_environment->get_seo_meta_data()->set_description($this->lang['articles.seo.description.pending']);
     $graphical_environment->get_seo_meta_data()->set_canonical_url(ArticlesUrlBuilder::display_pending_articles(AppContext::get_request()->get_getstring('field', 'date'), AppContext::get_request()->get_getstring('sort', 'desc'), AppContext::get_request()->get_getint('page', 1)));
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['articles'], ArticlesUrlBuilder::home());
     $breadcrumb->add($this->lang['articles.pending_articles'], ArticlesUrlBuilder::display_pending_articles(AppContext::get_request()->get_getstring('field', 'date'), AppContext::get_request()->get_getstring('sort', 'desc'), AppContext::get_request()->get_getint('page', 1)));
     return $response;
 }
 protected function get_categories_management_url()
 {
     return ArticlesUrlBuilder::manage_categories();
 }
 protected function get_category_url(Category $category)
 {
     return ArticlesUrlBuilder::display_category($category->get_id(), $category->get_rewrited_name());
 }
Example #12
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 ###################################################*/
#####################################################
#                      English			    #
####################################################
$lang = array();
$lang['default.category.name'] = 'First category';
$lang['default.category.description'] = 'Demonstration of an article';
$lang['default.article.title'] = 'How to begin with the articles module';
$lang['default.article.description'] = '';
$lang['default.article.contents'] = 'This brief article will give you some simple tips to take control of this module.<br /> 
<br /> 
<ul class="formatter-ul"> 
<li class="formatter-li">To configure your module, <a href="' . ArticlesUrlBuilder::configuration()->relative() . '">click here</a> 
</li><li class="formatter-li">To add categories: <a href="' . ArticlesUrlBuilder::add_category()->relative() . '">click here</a> (categories and subcategories are infinitely)
</li><li class="formatter-li">To add an item: <a href="' . ArticlesUrlBuilder::add_article()->relative() . '">click here</a> 
</li></ul> 
<ul class="formatter-ul">
<li class="formatter-li">To format your articles, you can use bbcode language or the WYSIWYG editor (cf this (cf cet <a href="http://www.phpboost.com/articles/articles-6-61+mise-en-page-du-contenu.php">article</a>)<br /> 
</li></ul><br /> 
<br /> 
For more information, please see the module documentation on the site <a href="http://www.phpboost.com">PHPBoost</a>.<br /> 
<br /> 
<br /> 
Good use of this module.';
Example #13
0
 *
 ###################################################
 *
 * This program is a free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 ###################################################*/
####################################################
#						English						#
####################################################
$lang['root_category_description'] = 'Welcome to the articles section of the website!
<br /><br />
One category and one article were created to show you how this module works. Here are some tips to get started on this module.
<br /><br /> 
<ul class="formatter-ul">
	<li class="formatter-li"> To configure or customize the module homepage your module, go into the <a href="' . ArticlesUrlBuilder::configuration()->relative() . '">module administration</a></li>
	<li class="formatter-li"> To create categories, <a href="' . ArticlesUrlBuilder::add_category()->relative() . '">clic here</a></li>
	<li class="formatter-li"> To create articles, <a href="' . ArticlesUrlBuilder::add_article()->relative() . '">clic here</a></li>
</ul>
<br />To learn more, don \'t hesitate to consult the documentation for the module on <a href="http://www.phpboost.com">PHPBoost</a> website.';
 private function generate_response()
 {
     $response = new SiteDisplayResponse($this->tpl);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->article->get_title(), $this->lang['articles']);
     $graphical_environment->get_seo_meta_data()->set_description($this->article->get_description());
     $graphical_environment->get_seo_meta_data()->set_canonical_url(ArticlesUrlBuilder::display_article($this->category->get_id(), $this->category->get_rewrited_name(), $this->article->get_id(), $this->article->get_rewrited_title(), AppContext::get_request()->get_getint('page', 1)));
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['articles'], ArticlesUrlBuilder::home());
     $categories = array_reverse(ArticlesService::get_categories_manager()->get_parents($this->article->get_id_category(), true));
     foreach ($categories as $id => $category) {
         if ($category->get_id() != Category::ROOT_CATEGORY) {
             $breadcrumb->add($category->get_name(), ArticlesUrlBuilder::display_category($category->get_id(), $category->get_rewrited_name()));
         }
     }
     $breadcrumb->add($this->article->get_title(), ArticlesUrlBuilder::display_article($category->get_id(), $category->get_rewrited_name(), $this->article->get_id(), $this->article->get_rewrited_title()));
     return $response;
 }
Example #15
0
 public function get_tpl_vars()
 {
     $category = $this->get_category();
     $description = $this->get_real_description();
     $user = $this->get_author_user();
     $user_group_color = User::get_group_color($user->get_groups(), $user->get_level(), true);
     $sources = $this->get_sources();
     $nbr_sources = count($sources);
     return array('C_EDIT' => $this->is_authorized_to_edit(), 'C_DELETE' => $this->is_authorized_to_delete(), 'C_HAS_PICTURE' => $this->has_picture(), 'C_USER_GROUP_COLOR' => !empty($user_group_color), 'C_PUBLISHED' => $this->is_published(), 'C_PUBLISHING_START_AND_END_DATE' => $this->publishing_start_date != null && $this->publishing_end_date != null, 'C_PUBLISHING_START_DATE' => $this->publishing_start_date != null, 'C_PUBLISHING_END_DATE' => $this->publishing_end_date != null, 'C_DATE_UPDATED' => $this->date_updated != null, 'C_AUTHOR_DISPLAYED' => $this->get_author_name_displayed(), 'C_NOTATION_ENABLED' => $this->get_notation_enabled(), 'C_READ_MORE' => !$this->get_description_enabled() && $description != FormatingHelper::second_parse($this->contents) && strlen($description) >= ArticlesConfig::load()->get_number_character_to_cut(), 'C_SOURCES' => $nbr_sources > 0, 'ID' => $this->get_id(), 'TITLE' => $this->get_title(), 'DATE' => $this->get_date_created()->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE_TEXT), 'DATE_DAY' => $this->get_date_created()->get_day(), 'DATE_MONTH' => $this->get_date_created()->get_month(), 'DATE_YEAR' => $this->get_date_created()->get_year(), 'DATE_ISO8601' => $this->get_date_created()->format(Date::FORMAT_ISO8601), 'DATE_SHORT' => $this->get_date_created()->format(Date::FORMAT_DAY_MONTH_YEAR), 'STATUS' => $this->get_status(), 'PUBLISHING_START_DATE' => $this->publishing_start_date != null ? $this->publishing_start_date->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE) : '', 'PUBLISHING_START_DATE_ISO8601' => $this->publishing_start_date != null ? $this->publishing_start_date->format(Date::FORMAT_ISO8601) : '', 'PUBLISHING_END_DATE' => $this->publishing_end_date != null ? $this->publishing_end_date->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE) : '', 'PUBLISHING_END_DATE_ISO8601' => $this->publishing_end_date != null ? $this->publishing_end_date->format(Date::FORMAT_ISO8601) : '', 'DATE_UPDATED' => $this->date_updated != null ? $this->date_updated->format(Date::FORMAT_DAY_MONTH_YEAR) : '', 'DATE_UPDATED_DAY' => $this->date_updated != null ? $this->date_updated->get_day() : '', 'DATE_UPDATED_MONTH' => $this->date_updated != null ? $this->date_updated->get_month() : '', 'DATE_UPDATED_YEAR' => $this->date_updated != null ? $this->date_updated->get_year() : '', 'DATE_UPDATED_ISO8601' => $this->date_updated != null ? $this->date_updated->format(Date::FORMAT_ISO8601) : '', 'DATE_UPDATED_SHORT' => $this->date_updated != null ? $this->date_updated->format(Date::FORMAT_DAY_MONTH_YEAR) : '', 'L_COMMENTS' => CommentsService::get_number_and_lang_comments('articles', $this->get_id()), 'NUMBER_COMMENTS' => CommentsService::get_number_comments('articles', $this->get_id()), 'NUMBER_VIEW' => $this->get_number_view(), 'NOTE' => $this->get_notation()->get_number_notes() > 0 ? NotationService::display_static_image($this->get_notation()) : '&nbsp;', 'C_AUTHOR_EXIST' => $user->get_id() !== User::VISITOR_LEVEL, 'PSEUDO' => $user->get_display_name(), 'DESCRIPTION' => $description, 'PICTURE' => $this->get_picture()->rel(), 'USER_LEVEL_CLASS' => UserService::get_level_class($user->get_level()), 'USER_GROUP_COLOR' => $user_group_color, 'C_ROOT_CATEGORY' => $category->get_id() == Category::ROOT_CATEGORY, 'CATEGORY_ID' => $category->get_id(), 'CATEGORY_NAME' => $category->get_name(), 'CATEGORY_DESCRIPTION' => $category->get_description(), 'CATEGORY_IMAGE' => $category->get_image()->rel(), 'U_EDIT_CATEGORY' => $category->get_id() == Category::ROOT_CATEGORY ? ArticlesUrlBuilder::configuration()->rel() : ArticlesUrlBuilder::edit_category($category->get_id())->rel(), 'U_COMMENTS' => ArticlesUrlBuilder::display_comments_article($category->get_id(), $category->get_rewrited_name(), $this->get_id(), $this->get_rewrited_title())->rel(), 'U_AUTHOR' => UserUrlBuilder::profile($this->get_author_user()->get_id())->rel(), 'U_CATEGORY' => ArticlesUrlBuilder::display_category($category->get_id(), $category->get_rewrited_name())->rel(), 'U_ARTICLE' => ArticlesUrlBuilder::display_article($category->get_id(), $category->get_rewrited_name(), $this->get_id(), $this->get_rewrited_title())->rel(), 'U_EDIT_ARTICLE' => ArticlesUrlBuilder::edit_article($this->id, AppContext::get_request()->get_getint('page', 1))->rel(), 'U_DELETE_ARTICLE' => ArticlesUrlBuilder::delete_article($this->id)->rel(), 'U_SYNDICATION' => ArticlesUrlBuilder::category_syndication($category->get_id())->rel(), 'U_PRINT_ARTICLE' => ArticlesUrlBuilder::print_article($this->get_id(), $this->get_rewrited_title())->rel());
 }
 private function generate_response()
 {
     $response = new SiteDisplayResponse($this->view);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->get_keyword()->get_name(), $this->lang['articles']);
     $graphical_environment->get_seo_meta_data()->set_description(StringVars::replace_vars($this->lang['articles.seo.description.tag'], array('subject' => $this->get_keyword()->get_name())));
     $graphical_environment->get_seo_meta_data()->set_canonical_url(ArticlesUrlBuilder::display_tag($this->get_keyword()->get_rewrited_name(), AppContext::get_request()->get_getstring('field', 'date'), AppContext::get_request()->get_getstring('sort', 'desc'), AppContext::get_request()->get_getint('page', 1)));
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['articles'], ArticlesUrlBuilder::home());
     $breadcrumb->add($this->get_keyword()->get_name(), ArticlesUrlBuilder::display_tag($this->get_keyword()->get_rewrited_name(), AppContext::get_request()->get_getstring('field', 'date'), AppContext::get_request()->get_getstring('sort', 'desc'), AppContext::get_request()->get_getint('page', 1)));
     return $response;
 }