Afficher/Cacher l'encart d'accueil
Tag Cumulus
add Administration Arabic Basic Block Canvas Change Conception Conference Controllers Core Cpanel Create Css Css-Tricks Css3 Database Debug Development Display Effect English File French ftp Google Hack Html Html5 Image Installation integral30 Javascript Jquery Manage management Member Models module MVC MySql NanosGraphics Parameter PhotoShop Php phpacademy Preview Project SEO server setup Spanish System Template Theme User Webdesign Xhtml Xoops Zend
Meilleures Vidéos
Modification des templates pour les commentaires - Partie 1
 
Modification des templates pour les commentaires - Partie 1 Populaire!
 
 
 
Auteur : kris_fr
Publiée le : Mer, 23-Juin-2010
Durée: 0:02:54    |   Vue: 607 fois
Tags: French   module   Html   Theme   Change   System   User   Member   Display   Comment   Render   Overridding   Templates  
 
Description:
Première partie d'un tutoriel en français présentant des modifications à effectuer sur les templates des commentaires du module System, afin de changer et simplifier les informations affichées




kris_fr © Copyright 2013 - http://tv.xoofoo.org
Les commentaires appartiennent à leurs auteurs. Nous ne sommes pas responsables de leur contenu.
Auteur Conversation
 Re: Modification des templates pour les commentaires - Pa...
Code des templates après modification :

/***** system_comment.html *****/
<!-- start comment post -->

        <
tr>
          <{if 
$comment.poster.id != 0}>
          <
td class="odd" style="width:120px; text-align:center;">
          <
img class="comUserImg" src="<{$xoops_upload_url}>/<{$comment.poster.avatar}>" alt="" />
          <
br />
          <
a id="comment<{$comment.id}>"></a> <{$comment.poster.uname}>
    </
td>

          <{else}>

          <
td class="odd"> </td>

          <{/if}>

          <
td class="odd">
        <
div class="comDate" style="text-align: right;"><span class="comDateCaption"><{$lang_posted}>:</span> <{$comment.date_posted}></div>
        <
div class="comText"><{$comment.text}></div>
          </
td>
        </
tr>
        <
tr>
          <
td class="even"></td>

          <{if 
$xoops_iscommentadmin == true}>

          <
td class="even" align="right">
            <
a href="<{$editcomment_link}>&amp;com_id=<{$comment.id}>" title="<{$lang_edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href="<{$deletecomment_link}>&amp;com_id=<{$comment.id}>" title="<{$lang_delete}>"><img src="<{$xoops_url}>/images/icons/delete.gif" alt="<{$lang_delete}>" /></a><a href="<{$replycomment_link}>&amp;com_id=<{$comment.id}>" title="<{$lang_reply}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{elseif 
$xoops_isuser == true && $xoops_userid == $comment.poster.id}>

          <
td class="even" align="right">
            <
a href="<{$editcomment_link}>&amp;com_id=<{$comment.id}>" title="<{$lang_edit}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$lang_edit}>" /></a><a href="<{$replycomment_link}>&amp;com_id=<{$comment.id}>" title="<{$lang_reply}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{elseif 
$xoops_isuser == true || $anon_canpost == true}>

          <
td class="even" align="right">
            <
a href="<{$replycomment_link}>&amp;com_id=<{$comment.id}>"><img src="<{$xoops_url}>/images/icons/reply.gif" alt="<{$lang_reply}>" /></a>
          </
td>

          <{else}>

          <
td class="even"> </td>

          <{/if}>

        </
tr>
<!-- 
end comment post -->


/***** system_comments_flat.html *****/
<table class="outer" cellpadding="5" cellspacing="1">
  <
tr>
    <
th colspan="2" style="width:150px;">Commentaires</th>
  </
tr>
  <{foreach 
item=comment from=$comments}>
    <{include 
file="db:system_comment.html" comment=$comment}>
  <{/foreach}>
</
table>


/***** system_comments_nest.html *****/
<{section name=i loop=$comments}>
<
br />
<
table cellspacing="1" class="outer">
  <
tr>
    <
th colspan="2">Commentaires</th>
  </
tr>
  <{include 
file="db:system_comment.html" comment=$comments[i]}>
</
table>

<!-- 
start comment replies -->
<{foreach 
item=reply from=$comments[i].replies}>
<
br />
<
table cellspacing="0" border="0">
  <
tr>
    <
td width="<{$reply.prefix}>"></td>
    <
td>
      <
table class="outer" cellspacing="1">
        <
tr>
          <
th colspan="2">Réponse(sau(xcommentaire(s)</th>
        </
tr>
        <{include 
file="db:system_comment.html" comment=$reply}>
      </
table>
    </
td>
  </
tr>
</
table>
<{/foreach}>
<!-- 
end comment tree -->
<{/
section}>


/***** system_comments_thread.html *****/
<{section name=i loop=$comments}>
<
br />
<
table cellspacing="1" class="outer">
  <
tr>
    <
th colspan="2"><{$lang_thread}></th>
  </
tr>
  <{include 
file="db:system_comment.html" comment=$comments[i]}>
</
table>

<{if 
$show_threadnav == true}>
<
div style="text-align:left; margin:3px; padding: 5px;">
<
a href="<{$comment_url}>" title="<{$lang_top}>"><{$lang_top}></a> | <a href="<{$comment_url}>&amp;com_id=<{$comments[i].pid}>&amp;com_rootid=<{$comments[i].rootid}>#newscomment<{$comments[i].pid}>"><{$lang_parent}></a>
</
div>
<{/if}>

<{if 
$comments[i].show_replies == true}>
<!-- 
start comment tree -->
<
br />
<
table cellspacing="1" class="outer">
  <
tr>
    <
th width="50%"><{$lang_subject}></th>
    <
th width="20%" align="center"><{$lang_poster}></th>
    <
th align="right"><{$lang_posted}></th>
  </
tr>
  <{foreach 
item=reply from=$comments[i].replies}>
  <
tr>
    <
td class="even"><{$reply.prefix}> <a href="<{$comment_url}>&amp;com_id=<{$reply.id}>&amp;com_rootid=<{$reply.root_id}>" title=""><{$reply.title}></a></td>
    <
td class="odd" align="center"><{$reply.poster.uname}></td>
    <
td class="even" align="right"><{$reply.date_posted}></td>
  </
tr>
  <{/foreach}>
</
table>
<!-- 
end comment tree -->
<{/if}>

<{/
section}>
 
Dev Doc Documentation API de Xoops et Modules Labs Astuces et tips Xoops, Xhtml et Css Community Site communautaire XooFoo.org Thèmes Site de présentation de thèmes et templates Tutos Site de tutos flash et video sur Xoops XooFoo Home Page - Kris