News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Comment avoir les messages récent en haut du forum?

Started by jpdc91, December 15, 2013, 06:50:33 AM

Previous topic - Next topic

jpdc91

Bonjour,
Je suis passé à la version 2.0.6 et aimerai retrouver la fonction des messages récent en haut du forum,comment dois-je procéder svp? :)

maximus23

Pas de support par PM ou Courrier...Veuillez utiliser le forum pour vous avoir une réponse rapide à votre demande d'aide. Merci.
Amitiés et à Bientôt...
No support by PM or Mail...You will get better and faster responses in the support forums. Thank you.
Have a nice day...


vanheckealain

Pour ceux que cela peut aider:


il faut éditer la page BoardIndex.template.php de votre thème et déplacer la section :



// This is the "Recent Posts" bar.
   if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
   {
      echo '
         <div class="title_barIC">
            <h4 class="titlebg">
               <span class="ie6_header floatleft">
                  <a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
                  ', $txt['recent_posts'], '
               </span>
            </h4>
         </div>
         <div class="hslice" id="recent_posts_content">
            <div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
            <div class="entry-content" style="display: none;">
               <a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
            </div>';

      // Only show one post.
      if ($settings['number_recent_posts'] == 1)
      {
         // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
         echo '
            <strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
            <p id="infocenter_onepost" class="middletext">
               ', $txt['recent_view'], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
            </p>';
      }
      // Show lots of posts.
      elseif (!empty($context['latest_posts']))
      {
         echo '
            <dl id="ic_recentposts" class="middletext">';

         /* Each post in latest_posts has:
               board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
               subject, short_subject (shortened with...), time, link, and href. */
         foreach ($context['latest_posts'] as $post)
            echo '
               <dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
               <dd>', $post['time'], '</dd>';
         echo '
            </dl>';
      }
      echo '
         </div>';

   }


au niveau de la ligne 87 (version smf 2.0.7)

et placer cela juste au dessus de :

echo '
   <div id="boardindex_table">
      <table class="table_list">';

maximus23

Bonjour,

Il y a un mod officiel indiqué ci-dessus pour faire cela.

Quand tu mets du code il faut le mettre entre balise code pour qu'il soit compréhensible.

Merci :)
Pas de support par PM ou Courrier...Veuillez utiliser le forum pour vous avoir une réponse rapide à votre demande d'aide. Merci.
Amitiés et à Bientôt...
No support by PM or Mail...You will get better and faster responses in the support forums. Thank you.
Have a nice day...

Advertisement: