Nouvel éditeur : template/posting_body : modifications incorrectes ?

2 participants

Voir le sujet précédent Voir le sujet suivant Aller en bas

Résolu Nouvel éditeur : template/posting_body : modifications incorrectes ?

Message par sophb Dim 28 Juil 2013 - 18:14

Bonjour,
je suis revenue de mes vacances et je commence à faire le modifications demandées pour le nouvel éditeur (avec correctif).
https://forum.forumactif.com/t352401-nouvel-editeur-de-messages-pour-les-forums-forumactif

Pour la partie en pphb2 template/posting_body, j'ai des soucis car ce qui est écrit ne correspond pas à mon posting_body.

Ligne 130 à 138
Code:
<!-- BEGIN switch_groupmsg -->
 <tr>
 <td class="row1" width="22%"><span class="gen"><b>{L_USERNAME}</b></span></td>
 <td class="row2" width="78%"><span class="genmed">{USER&amp;#8288;NAME}</span></td>
 </tr>
 <!-- END switch_groupmsg -->

 <!-- BEGIN switch_subject -->
 <tr>

Ok, j'ai trouvé....

Selon la procédure,on me demande de modifier après ce code (environ 317 lignes), soit du 139 jusqu'à environ 446 :
Code:
       <tr id="parent_editor_simple" {EDITOR_DISPLAY_SIMPLE}>
          <td class="row1" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr>
              ...
              </tr>
            </table>
          </td>
        </tr>

Mais je n'ai pas du tout ce codage d'origine..... me serais-je trompée ?
Code:
<td class="row1"><span class="gen"><b>{L_SUBJECT}</b></span></td>
                        <td class="row2">
 <span class="gen">
 <input class="post" style="width:450px" type="text" name="subject" value="{SUBJECT}" size="45" maxlength="{TOPIC_TITLE_MAXLENGTH}" tabindex="2" title="{TOPIC_TITLE_LENGTH_EXPLAIN}" onkeypress="if (event.keyCode==13){return false}" />

 <!-- BEGIN switch_subject_color -->
 <script type="text/javascript">
 //<![CDATA[
 input = document.getElementsByName('subject');
 //]]>
 </script>
 <select name="topic_color" onchange="input[0].style.color = topic_color.value" style="margin-left:10px">
 {switch_subject.switch_subject_color.TOPIC_TITLE_COLOR_OPTIONS}
 </select>
 <script type="text/javascript">
 //<![CDATA[
 input[0].style.color = '{switch_subject.switch_subject_color.TOPIC_TITLE_COLOR_DEFAULT}';
 //]]>
 </script>
 <!-- END switch_subject_color -->
 </span>
 </td>
 </tr>
 <!-- END switch_subject -->

 <!-- BEGIN switch_description -->
 <tr>
 <td class="row1" width="22%"><span class="gen"><b>{L_DESCRIPTION}</b></span></td>
 <td class="row2" width="78%">
 <span class="gen">
 <input class="post" style="width:450px" type="text" name="description" value="{DESCRIPTION}" maxlength="{TOPIC_DESCRIPTION_MAXLENGTH}" onkeypress="if (event.keyCode==13){return false}" />
 </span>
 </td>
 </tr>
 <!-- END switch_description -->

 <!-- BEGIN switch_icon_checkbox -->
 <tr>
 <td class="row1" valign="top"><span class="gen"><b>{L_ICON_TITLE}</b></span></td>
 <td class="row2">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
 <!-- BEGIN row -->
 <tr>
 <td nowrap="nowrap"><span class="gen"><!-- BEGIN cell --><label><input type="radio" name="post_icon" value="{switch_icon_checkbox.row.cell.ICON_ID}" {switch_icon_checkbox.row.cell.ICON_CHECKED} id="post_icon_{switch_icon_checkbox.row.cell.ICON_ID}" /> <span onclick="document.forms['post'].post_icon_{switch_icon_checkbox.row.cell.ICON_ID}.checked=true">{switch_icon_checkbox.row.cell.ICON_IMG}</span></label><!-- END cell --></span></td>
 </tr>
 <!-- END row -->
 </table>
 </td>
 </tr>
 <!-- END switch_icon_checkbox -->

 <tr id="parent_editor_simple" {EDITOR_DISPLAY_SIMPLE}>
 <td class="row1" valign="top">
 <table width="100%" border="0" cellspacing="0" cellpadding="1">
 <tr>
 <td><span class="gen" style="white-space: nowrap;"><b>{L_MESSAGE_BODY}</b></span></td>
 </tr>
 <tr>
 <td align="center" valign="middle">
 <table width="100" border="0" cellspacing="0" cellpadding="5">
 <tr align="center">
 <td class="gensmall" colspan="{S_SMILIES_COLSPAN}">
 <div id="smileyContainer">
 {L_SMILIES_PREVIEW_NEW}
 </div>
 </td>
 </tr>
 </table>
 </td>
 </tr>
 </table>
 </td>
 <td class="row2" valign="top"><span class="genmed"></span>
 <table border="0" cellspacing="0" cellpadding="0" width="100%">
 <tr>
 <td valign="top">
 <textarea id="text_editor_textarea" class="post" name="message" tabindex="3" wrap="virtual">{MESSAGE}</textarea> 
 </td>
 <td id="smileyContainer" valign="top">
 {L_SMILIES_PREVIEW_NEW}
 </td>
 </tr>
 </table>
 </td>
 </tr>

 <!-- BEGIN edit_reason -->
 <tr>
 <td class="row1" width="22%"><span class="gen"><strong>{edit_reason.L_EDIT_REASON}</strong></span></td>
 <td class="row2" width="78%"><span class="gen"><input class="post" style="width:450px" type="text" name="edit_reason" value="{edit_reason.EDIT_REASON}" maxlength="255" /></span></td>
 </tr>
 <!-- END edit_reason -->
 {CODE_CONFIRM}
 </table>
 
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
 <tr>
 <td class="catBottom" colspan="2" align="center" height="28">
 <input type="hidden" name="lt" value="{LAST_TOPIC_ID}" />
 {S_HIDDEN_FORM_FIELDS}
 <!-- BEGIN switch_preview -->
 <input class="liteoption" type="submit" name="preview" value="{L_PREVIEW}" tabindex="5" /> 
 <!-- END switch_preview -->
 <!-- BEGIN switch_draft -->
  <input class="liteoption" type="submit" name="draft" value="{L_DRAFT}" tabindex="7" accesskey="d" /> 
 <!-- END switch_draft -->
 <!-- BEGIN switch_publish -->
  <input class="liteoption" type="submit" name="publish" value="{L_PUBLISH}" tabindex="8" accesskey="p" /> 
 <!-- END switch_publish -->
  <input class="mainoption" type="submit" name="post" value="{L_SUBMIT}" tabindex="6" accesskey="s" />
 </td>
 </tr>
 </table>
 <br /><br />

 <!-- BEGIN switch_roll_dice -->
 <div id="rolldice" style="display:{ROLLDICE_CLOSE}">
 <table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
 <tr>
 <th class="thHead">
 <table width="100%">
 <tr>
 <td width="10"></td>
 <td align="center"><span class="gen"><b>{ROLL_DICE_TITLE}</b></span></td>
 <td width="10"><a href="javascript:ShowHideLayernew('rolldice')"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></td>
 </tr>
 </table>
 </th>
 </tr>
 </table>
 </div>

 <div id="rolldice_show" style="display:{ROLLDICE_OPEN}">
 <table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
 <tr>
 <th class="thHead" colspan="2">
 <table width="100%">
 <tr>
 <td width="10"> </td>
 <td align="center"><span class="gen"><b>{ROLL_DICE_TITLE}</b></span></td>
 <td width="10"><a href="javascript:ShowHideLayernew('rolldice')">
 <img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a>
 </td>
 </tr>
 </table>
 </th>
 </tr>
 <tr>
 <td class="row1">
 <script type="text/javascript">
 //<![CDATA[
 function add_dice(dice_number,dice,number)
 {
 var content = document.getElementById('post_dice').innerHTML;
 document.getElementById('dice_to_del').innerHTML = '';
 document.getElementById('dice_to_del').id = '';

 var new_tr = document.createElement('tr');
 new_tr.appendChild(document.createElement('td'));
 new_tr.firstChild.innerHTML = '<span class="postbody">{ROLL_DICE_TITLE_LOW} #' + (dice_number + 1) + ' : </span><select name="post_dice_' + dice_number + '" id="post_dice_' + dice_number + '" value="' + dice + '">' + content + '</select><span class="postbody"> <label for="nb_rolls_' + dice_number + '">{switch_roll_dice.L_DICE_ROLLS} : </label><input type="text" size="2" maxlength="3" name="nb_rolls_' + dice_number + '" id="nb_rolls_' + dice_number + '" class="post" value="' + number + '" /> <span id="dice_to_del"><a href="javascript:add_dice(' + (dice_number + 1) + ',\'\',1)"><img src="{PATH_IMG_FA}tabs_more.gif" alt="plus" /></a></span></span>';
 document.getElementById('list_dice').lastChild.appendChild(new_tr);

 var select_dice = document.getElementById('post_dice_' + dice_number);
 if ( dice == '' )
 {
 select_dice.selectedIndex=0;
 }
 for ( var i = 1; select_dice.options[i]; i++ )
 {
 select_dice.options[i].selected = ( select_dice.options[i].value == dice );
 }
 }
 //]]>
 </script>
<table style="width:100%" id="list_dice">
 <tr>
 <td>
 <span class="postbody">{ROLL_DICE_TITLE_LOW} #1 : </span>
 <select name="post_dice_0" id="post_dice">
 <option value="">-</option>
 <!-- BEGIN row_replace -->
 <option value="{switch_roll_dice.row_replace.DICE_ID}"{switch_roll_dice.row_replace.DICE_SELECTED}>{switch_roll_dice.row_replace.DICE_NAME}</option>
 <!-- END row_replace -->
 </select>
 <span class="postbody">
  <label for="nb_rolls_0">{switch_roll_dice.L_DICE_ROLLS} : </label><input type="text" size="2" maxlength="3" name="nb_rolls_0" id="nb_rolls_0" class="post" value="{switch_roll_dice.S_DICE_ROLLS_VALUE}" />
  <span id="dice_to_del"><a href="javascript:add_dice(1,'',1)"><img src="{PATH_IMG_FA}tabs_more.gif" alt="plus" /></a></span>
 </span>
 </td>
 </tr>
 </table>
</td>
 </tr>
 </table><br /><br />
 </div>
 {switch_roll_dice.DICE_SCRIPT}
 <!-- END switch_roll_dice -->

<!-- BEGIN switch_attachment_list -->
<div id="attachments">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th class="thHead" colspan="2">
<table width="100%"><tr>
<td width="10"></td><td align="center"><span class="gen"><b>{L_ATTACHMENTS}</b></span></td><td width="10"></td>
</tr></table>
</th></tr>
<!-- BEGIN attachments -->
<tr>
<td width="22%" class="row1">
<span class="gen"><b>{L_ATTACHMENT_FILENAME}</b></span><br />
</td>
<td width="78%" class="row2">
<!-- BEGIN switch_is_orphan -->
<span class="gen">{switch_attachment_list.attachments.switch_is_orphan.FILENAME}</span>  
<!-- END switch_is_orphan -->
<!-- BEGIN switch_is_not_orphan -->
<a href="{switch_attachment_list.attachments.switch_is_not_orphan.U_ATTACH_URL}" class="gen">{switch_attachment_list.attachments.switch_is_not_orphan.FILENAME}</a>  
<!-- END switch_is_not_orphan -->
<!-- BEGIN switch_can_delete -->
<input type="submit" value="{L_ATTACHMENT_DELETE}" name="delete_file[{switch_attachment_list.attachments.ATTACH_POS}]" /><br />
<!-- END switch_can_delete -->
</td>
</tr>
<tr>
<td width="22%" class="row1">
<span class="gen"><b>{L_ATTACH_COMMENT}</b></span>
</td>
<td width="78%" class="row2">
<!--textarea name="comment_list[{switch_attachment_list.attachments.ATTACH_POS}]" cols="35" rows="3" style="width:100%">{switch_attachment_list.attachments.ATTACH_COMMENT}</textarea><br />
<a href="{switch_attachment_list.attachments.U_ATTACH_URL}" class="gen">{switch_attachment_list.attachments.FILENAME}</a>  <input class="liteoption" type="submit" value="{L_ATTACHMENT_DELETE}" name="delete_file[{switch_attachment_list.attachments.ATTACH_POS}]" /-->
<input class="post" type="text" id="filecomment{switch_attachment_list.attachments.ATTACH_POS}" name="comment_list[{switch_attachment_list.attachments.ATTACH_POS}]" value="{switch_attachment_list.attachments.ATTACH_COMMENT}" maxlength="255" style="width: 450px" />
<input type="hidden" value="{switch_attachment_list.attachments.ATTACH_ID}" name="attachment_data[{switch_attachment_list.attachments.ATTACH_POS}][attach_id]" />
<input type="hidden" value="{switch_attachment_list.attachments.IS_ORPHAN}" name="attachment_data[{switch_attachment_list.attachments.ATTACH_POS}][is_orphan]" />
<input type="hidden" value="{switch_attachment_list.attachments.REAL_FILENAME}" name="attachment_data[{switch_attachment_list.attachments.ATTACH_POS}][real_filename]" />
<input type="hidden" value="{switch_attachment_list.attachments.ATTACH_COMMENT}" name="attachment_data[{switch_attachment_list.attachments.ATTACH_POS}][attach_comment]" />
</td>
</tr>

<!-- END attachments -->
</table>
</div>
<!-- END switch_attachment_list -->

<!-- BEGIN switch_attachment -->
<div id="attachment" style="display:{ATTACHMENT_CLOSE}">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th class="thHead">
<table width="100%"><tr>
<td width="10"></td><td align="center"><span class="gen"><b>{L_ATTACHMENT_ADD}</b></span></td><td width="10"><a href="javascript:ShowHideLayernew('attachment')"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></td>
</tr></table>
</th></tr>
</table>
</div>

<div id="attachment_show" style="display:{ATTACHMENT_OPEN}">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th class="thHead" colspan="2">
<table width="100%"><tr>
<td width="10"></td><td align="center"><span class="gen"><b>{L_ATTACHMENT_ADD}</b></span></td>
<td width="10"><a href="javascript:ShowHideLayernew('attachment')">
<img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></td>
</tr></table>
</th></tr>
<tr>
<td class="row1">

<table class="forumline" width="100%" cellspacing="1" cellpadding="0" border="0">
<tr>
<td class="row1" colspan="2"><span class="gen">{L_ATTACHMENT_ADD_HELP}</span><br /><span class="info">{EXT_LIST}</span><br /></td>
</tr>

<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_ATTACHMENT_FILENAME}</b></span></td>
<td class="row2" width="78%"><span class="genmed"><input class="post" type="file" id="fileupload" name="fileupload" value="" /><input value="{L_SUBMIT}" type="submit" name="add_file" /> ({L_MAX_ATT_SIZE})</span></td>
</tr>

<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_ATTACH_COMMENT}</b></span></td>
<td class="row2" width="78%"><span class="genmed"><input class="post" type="text" style="width:450px" id="filecomment" name="filecomment" value="" maxlength="255" /></span></td>
</tr>

<!-- BEGIN modif_dav_08032010 -->
<tr>
<td valign="top" width="15%"><label class="gen" for="fileupload">{L_ATTACHMENT_FILENAME}</label><br /><br />
<label class="gen" for="filecomment">{L_ATTACH_COMMENT}</label></td>
<td width="80%"><input type="file" id="fileupload" name="fileupload" /><input type="submit" name="add_file" /> ({L_MAX_ATT_SIZE})<br />
<textarea id="filecomment" name="filecomment" cols="35" rows="3" style="width:100%"></textarea></td>
</tr>
<!-- END modif_dav_08032010 -->

</table>
</td>
</tr>
</table>
</div>

<!-- END switch_attachment -->

<div id="optionsitems" style="display:{OPTIONSITEMS_CLOSE}">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th class="thHead">
<table width="100%"><tr>
<td width="10"></td><td align="center"><span class="gen"><b>{L_OPTIONS}</b></span></td><td width="10"><a href="javascript:ShowHideLayernew('optionsitems')"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></td>
</tr></table>
</th></tr>
</table>
</div>

Je n'ose pas modifié par peur de me tromper. Quel est votre avis ?

bonne journée à toutes et à tous


Dernière édition par sophb le Lun 29 Juil 2013 - 21:08, édité 1 fois
sophb

sophb
***

Messages : 158
Inscrit(e) le : 05/03/2012

http://ateliersdenebty.forumgratuit.org/
sophb a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Nouvel éditeur : template/posting_body : modifications incorrectes ?

Message par Tech Dim 28 Juil 2013 - 18:27

Bonjour,

La partie est bien présente dans le template que vous fournissez Wink
Utilisez la recherche pour trouver "parent_editor_simple".

Cordialement.
Tech

Tech
Membre actif

Masculin
Messages : 22683
Inscrit(e) le : 01/12/2007

https://forum.forumactif.com/
Tech a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Nouvel éditeur : template/posting_body : modifications incorrectes ?

Message par sophb Dim 28 Juil 2013 - 18:42

Merci Tech,

Je l'ai trouvé mais pas aux lignes indiquées.....Je n'ai supprimé que 35 lignes au lieu des 317 (indication fournie).

Maintenant, je me suis attaquée au Template/profile_add_body.

Je n'arrive pas à trouver le code à supprimer
Code:
        <!-- BEGIN switch_report -->
        <tr>
          <td class="row1"><span class="gen">{switch_preferences_menu.switch_report.L_NO_REPORT_POPUP} :</span></td>
          <td class="row2">
            <label class="gen"><input type="radio" name="no_report_popup" value="0" {switch_preferences_menu.switch_report.NO_REPORT_POPUP_YES} />{L_YES}</label> 
            <label class="gen"><input type="radio" name="no_report_popup" value="1" {switch_preferences_menu.switch_report.NO_REPORT_POPUP_NO} />{L_NO}</label>
          </td>
        </tr>
        <tr>
          <td class="row1"><span class="gen">{switch_preferences_menu.switch_report.L_NO_REPORT_MAIL} :</span></td>
          <td class="row2">
            <label class="gen"><input type="radio" name="no_report_mail" value="0" {switch_preferences_menu.switch_report.NO_REPORT_MAIL_YES} />{L_YES}</label> 
            <label class="gen"><input type="radio" name="no_report_mail" value="1" {switch_preferences_menu.switch_report.NO_REPORT_MAIL_NO} />{L_NO}</label>
          </td>
        </tr>
        <!-- END switch_report -->
qui est situé apres le BEGIN switch_report (ligne 260)

Je vous remercie de vos conseils

sophb

sophb
***

Messages : 158
Inscrit(e) le : 05/03/2012

http://ateliersdenebty.forumgratuit.org/
sophb a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Nouvel éditeur : template/posting_body : modifications incorrectes ?

Message par Tech Lun 29 Juil 2013 - 10:53

Bonjour,

Vous n'avez certainement pas modifié ce template avant la mise à jour donc celui-ci s'est mit à jour automatiquement Wink

Cordialement.
Tech

Tech
Membre actif

Masculin
Messages : 22683
Inscrit(e) le : 01/12/2007

https://forum.forumactif.com/
Tech a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Nouvel éditeur : template/posting_body : modifications incorrectes ?

Message par sophb Lun 29 Juil 2013 - 11:23

Merci beaucoup pour cette information car je cherchais partout.....

Est-ce que les templates qu'on "remets" a leur état d'origine, sont-ils à jour où faut-il les vérifier ?
NB : merci pour le conseil sur la case recherche.... c'est tellement plus facile.
sophb

sophb
***

Messages : 158
Inscrit(e) le : 05/03/2012

http://ateliersdenebty.forumgratuit.org/
sophb a été remercié(e) par l'auteur de ce sujet.

Résolu Re: Nouvel éditeur : template/posting_body : modifications incorrectes ?

Message par Tech Lun 29 Juil 2013 - 17:03

Tous les templates d'origine (non modifiés) se mettent à jour tout seul.

Cordialement.
Tech

Tech
Membre actif

Masculin
Messages : 22683
Inscrit(e) le : 01/12/2007

https://forum.forumactif.com/
Tech a été remercié(e) par l'auteur de ce sujet.

Voir le sujet précédent Voir le sujet suivant Revenir en haut

- Sujets similaires

Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum