affichage du nom de cat et auteur [Réglé]
j1.seth Membre non connecté
-
Administrateur
- Voir le profil du membre j1.seth
- Inscrit le : 01/09/2008
- Site internet
- Groupes :
-
Chef de Projet
-
Equipe Développement
Reprise du message précédent
Ce que je te proposais était juste un exemple avec le echo.Essayes ça
:Code PHP :
<?php /*################################################## * HomeCustomHomePageExtensionPoint.class.php * ------------------- * begin : August 25, 2012 * copyright : (C) 2012 Kevin MASSY * email : kevin.massy@phpboost.com * * ################################################### * * This program is 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 the 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. * ###################################################*/ class HomeCustomHomePageExtensionPoint implements HomePageExtensionPoint { public function get_home_page() { return new DefaultHomePage($this->get_title(), $this->get_view()); } private function get_title() { return LangLoader::get_message('title', 'common', 'HomeCustom'); } private function get_view() { $template = new FileTemplate('HomeCustom/home.tpl'); return $this->build_view($template); } private function build_view(View $template) { $result = PersistenceContext::get_querier()->select(' SELECT id, title, contents, timestamp FROM ' . PREFIX . 'news WHERE visible = 1 ORDER BY timestamp DESC LIMIT 6 '); while ($row = $result->fetch()) { $date = new Date(DATE_TIMESTAMP, TIMEZONE_AUTO, $row['timestamp']); $template->assign_block_vars('news', array( 'U_LINK' => Url::to_absolute('/news/news.php?id=' . $row['id']), 'TITLE' => $row['title'], 'CONTENT' => $row['contents'], 'DATE' => $date->format(DATE_FORMAT_TEXT_LONG) )); } return $template; } } ?>
Et :
samghami Membre non connecté
Booster Bazooka
-
Booster Bazooka
- Voir le profil du membre samghami
- Inscrit le : 16/04/2012
- Site internet

Un GRAND MERCI A ElenWii, Janus57 et julienseth78 pour m'avoir aidé.
J'aime une communauté aussi réactive que PHPBoost.
ElenWii Membre non connecté
-
Administrateur
- Voir le profil du membre ElenWii
- Inscrit le : 14/08/2009
- Site internet
- Groupes :
-
Equipe Graphique

En plus tu es normand alors bon

ElenWii
samghami Membre non connecté
Booster Bazooka
-
Booster Bazooka
- Voir le profil du membre samghami
- Inscrit le : 16/04/2012
- Site internet

Oui et la je suis en pleine création d'un énormément site pour des gamers, cela pourrai me lancer dans une carrière
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie