Forum pragmaMx France 25 Mai 2012 à 16:26:56 *
Bienvenue, Invité. Veuillez vous connecter ou vous inscrire.


Connexion avec identifiant et mot de passe
 
Accueil Aide Rechercher
Pages: [1]   Bas de page
Imprimer
Auteur Fil de discussion: Comment afficher simplement la date dans un article sur son theme  (Lu 486 fois)
angecris
Membre Héroïque Mx
*****
Hors ligne Hors ligne

Messages: 512



« le: 06 Septembre 2011 à 15:06:18 »

Salut, j aimerais ajouter simplement la date dans un l'article sans le variable user etc ...

voici mon code :

Code:
<!-- START themeindex -->
<div class="items leading">
<div class="item">
<h1 class="title">{$title}</h1>
<p class="meta"><em>Proposé par NTFrance le {$datetime}</em></p>
<div class="content"><p>{$content}</p></div>
<p class="links">
{$readmore}
</p>

</div></div>
<!-- END themeindex -->

et le fichier fonction.php tout simple :

Code:
/**
 * News Modul Artikelliste (index.php)
 * $x bedeutet: nicht verwendet, nur zur nuke-Modulkompatibilitaet
 */
function themeindex($x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, $story = array())
{
    global $theme_template;
    static $viewcounter;
    if (!isset($viewcounter) || ($viewcounter == 2)) $viewcounter = 0;
    $viewcounter++;
    pmxHeader::add_style('themes/' . basename(dirname(__FILE__)) . '/style/news.css');
    $story['buttons'] = implode('&nbsp;', getThemeIndexButtons($story));
    $bmore = ($story['allmorelink']['bodycount']) ? '(' . $story['allmorelink']['bodycount'] . ' ' . _BYTESMORE . ')' : '';
    $story['readmore'] = (empty($bmore)) ? '' : '' . $story['allmorelink']['more'] . '';
    if ($GLOBALS['storyhome_cols'] == 1) {
        $topicimage_class = ($viewcounter == 1) ? 'story-topicimage-left' : 'story-topicimage-right';
        $topicimage = mxCreateImage($GLOBALS['tipath'] . $story['topicimage'], _TOPIC . ': ' . $story['topictext'], 0, 'align="left" style="padding-right: 20px; padding-bottom: 10px;"');
        $story['topicimage'] = '<a href="modules.php?name=News&amp;new_topic=' . $story['topic'] . '">' . $topicimage . '</a>';
    } else {
        $story['topicimage'] = '';
    }
    $cattitle = (empty($story['cattitle'])) ? '' : '<br /><span class="story-cattitle">' . $story['allmorelink']['categorie'] . '</span>';
    $authorinfo = (empty($story['informant']) || $story['informant'] == $GLOBALS['anonymous']) ? theme_adminname($story) : $story['allmorelink']['informantlink'] . $story['informant'] . ((mxModuleAllowed('Userinfo') || MX_IS_ADMIN) ? '</a>' : '');
    $story['content'] = $story['hometext'];
    $story['infoline'] = ($GLOBALS['storyhome_cols'] == 1) ? _NEWSSUBMITED . ' ' . $authorinfo . ' ' . $story['allmorelink']['datetime'] : $story['datetime'];
    $story['title'] = strip_tags($story['title']) . $cattitle;
    // die oben definierten Variablen in dem passenden templateteil ersetzen
    $artvars = theme_define_content();
    echo theme_replace_vars($theme_template[$artvars['themeindex']], $story);
    return;
}

Journalisée

http://www.ntfrance.org site dedié au jeu de simulation auto GTR
Pages: [1]   Haut de page
Imprimer
Forum pragmaMx France  |  Thèmes  |  Thèmes & Design (Modérateurs: Diabolo, kroms, phi56360)  |  Fil de discussion: Comment afficher simplement la date dans un article sur son theme
 
Aller à:  

Powered by SMF 1.1.15 | SMF © 2006-2009, Simple Machines

Plus