Sofia
11/06/2008, 18h43
Grâce à ce hack, vous pourrez fermer ou ouvrir une discussion directement dans la réponse rapide, après avoir répondu à la discussion.
Remerciements
Ce Hack a été traduit en français pour vBulletin-Ressources avec l'autorisation explicite de son auteur. / This Hack was translated into French for vBulletin-Ressources with the explicit authorization of its author.
vBulletin-Ressources et son équipe offrira du support vis-à-vis des hacks traduits, bien sûr, dans la mesure du possible de chacun, autant en terme de temps que de connaissances/ vBulletin-Ressources and its team will offer support for the translated hacks, of course, as far as possible for everyone, as much in term of time that knowledge.
vBulletin-Ressources remercie l'auteur du hack pour avoir fourni son autorisation. / vBulletin-Ressources thanks the author for the hack to have provided its authorization.
Conception
Auteur du Hack / Author Of Hack : Viper007Bond (http://www.vbulletin.org/forum/member.php?u=167490)
Source / Link of Thread : Close / Open Thread Via Quick Reply (http://www.vbulletin.org/forum/showthread.php?t=180239)
Version du hack : 2008.05.25
Testé / Tested : oui
Copyright © 2006 vBulletin-Ressources.com - Tous droits réservés Uniquement pour nos traductions/ Copyright © 2006 vBulletin-Ressources.com - All Rights Reserved Only For Ours Translations
Version vBulletin Requise / Version vBulletin Required : vB 3.7.0
Installation
Importation du XML
Importez le fichier inscriptions_ajax.xml depuis votre panneau d'administration.
Modules et Produits >> Gestionnaire de Produits >> Importer / Exporter des Produits
Modification de Templates
Dans le template SHOWTHREAD, rechercher (2 fois dans le template) :
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
<else />
Et remplacez par (pour les 2 fois) :
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" class="replybutton" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" class="replybutton" /></if></a></td>
<else />
Toujours dans le template SHOWTHREAD, recherchez :
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>
</fieldset>
Ajoutez en-dessous :
<if condition="$show['openclose']">
<fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
<legend>$vbphrase[viper_opencloseqr_thread_management]</legend>
<div style="padding:3px">
<div>
<label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" tabindex="1" /><span id="qr_openclosestatus"><if condition="$show['closethread']">$vbphrase[viper_opencloseqr_close_thread]<else />$vbphrase[viper_opencloseqr_open_thread]</if></span></label>
</div>
</div>
</fieldset>
<script type="text/javascript">
/* <![CDATA[ */
// Current thread status recorder
var viperThreadOpen = <if condition="$show['closethread']">true<else />false</if>;
// Run the custom function when the quick reply form is submitted
YAHOO.util.Event.addListener(document.getElementBy Id("qrform"), "submit", viperQuikyReply);
// Do some stuff when the form is submitted
function viperQuikyReply() {
var viperOpenCloseCheckbox = document.getElementById("cb_openclose");
var viperQRTextareaChars = document.getElementById("vB_Editor_QR_textarea").value.length;
var viperReplyButtonIMG;
// If the checkbox wasn't checked or the message was too short (simple check), abort
if ( viperOpenCloseCheckbox.checked == false || viperQRTextareaChars == 0 || viperQRTextareaChars < $vboptions[postminchars] ) return;
// Uncheck the checkbox
viperOpenCloseCheckbox.checked = false;
// Change the text and set the reply button image filename
if ( viperThreadOpen == true ) {
document.getElementById("qr_openclosestatus").innerHTML = "$vbphrase[viper_opencloseqr_open_thread]";
viperReplyButtonIMG = "threadclosed.gif";
viperThreadOpen = false;
} else {
document.getElementById("qr_openclosestatus").innerHTML = "$vbphrase[viper_opencloseqr_close_thread]";
viperReplyButtonIMG = "reply.gif";
viperThreadOpen = true;
}
// Get all reply buttons via the new class
var replybuttons = YAHOO.util.Dom.getElementsByClassName("replybutton", "img");
// Loop through each reply button and change it's image URL
var i;
for (i in replybuttons) {
replybuttons[i].src = "$stylevar[imgdir_button]/" + viperReplyButtonIMG;
}
}
/* ]]> */
</script>
</if>
Configuration
Aucune configuration nécessaire.
Screenshots et Archive
Remerciements
Ce Hack a été traduit en français pour vBulletin-Ressources avec l'autorisation explicite de son auteur. / This Hack was translated into French for vBulletin-Ressources with the explicit authorization of its author.
vBulletin-Ressources et son équipe offrira du support vis-à-vis des hacks traduits, bien sûr, dans la mesure du possible de chacun, autant en terme de temps que de connaissances/ vBulletin-Ressources and its team will offer support for the translated hacks, of course, as far as possible for everyone, as much in term of time that knowledge.
vBulletin-Ressources remercie l'auteur du hack pour avoir fourni son autorisation. / vBulletin-Ressources thanks the author for the hack to have provided its authorization.
Conception
Auteur du Hack / Author Of Hack : Viper007Bond (http://www.vbulletin.org/forum/member.php?u=167490)
Source / Link of Thread : Close / Open Thread Via Quick Reply (http://www.vbulletin.org/forum/showthread.php?t=180239)
Version du hack : 2008.05.25
Testé / Tested : oui
Copyright © 2006 vBulletin-Ressources.com - Tous droits réservés Uniquement pour nos traductions/ Copyright © 2006 vBulletin-Ressources.com - All Rights Reserved Only For Ours Translations
Version vBulletin Requise / Version vBulletin Required : vB 3.7.0
Installation
Importation du XML
Importez le fichier inscriptions_ajax.xml depuis votre panneau d'administration.
Modules et Produits >> Gestionnaire de Produits >> Importer / Exporter des Produits
Modification de Templates
Dans le template SHOWTHREAD, rechercher (2 fois dans le template) :
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
<else />
Et remplacez par (pour les 2 fois) :
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" class="replybutton" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" class="replybutton" /></if></a></td>
<else />
Toujours dans le template SHOWTHREAD, recherchez :
<label for="qr_quickreply"><input type="checkbox" name="quickreply" value="1" id="qr_quickreply" accesskey="w" tabindex="4" />$vbphrase[quote_message_in_reply]</label>
</div>
</fieldset>
Ajoutez en-dessous :
<if condition="$show['openclose']">
<fieldset class="fieldset" style="margin:$stylevar[formspacer]px 0px 0px 0px">
<legend>$vbphrase[viper_opencloseqr_thread_management]</legend>
<div style="padding:3px">
<div>
<label for="cb_openclose"><input type="checkbox" name="openclose" value="1" id="cb_openclose" tabindex="1" /><span id="qr_openclosestatus"><if condition="$show['closethread']">$vbphrase[viper_opencloseqr_close_thread]<else />$vbphrase[viper_opencloseqr_open_thread]</if></span></label>
</div>
</div>
</fieldset>
<script type="text/javascript">
/* <![CDATA[ */
// Current thread status recorder
var viperThreadOpen = <if condition="$show['closethread']">true<else />false</if>;
// Run the custom function when the quick reply form is submitted
YAHOO.util.Event.addListener(document.getElementBy Id("qrform"), "submit", viperQuikyReply);
// Do some stuff when the form is submitted
function viperQuikyReply() {
var viperOpenCloseCheckbox = document.getElementById("cb_openclose");
var viperQRTextareaChars = document.getElementById("vB_Editor_QR_textarea").value.length;
var viperReplyButtonIMG;
// If the checkbox wasn't checked or the message was too short (simple check), abort
if ( viperOpenCloseCheckbox.checked == false || viperQRTextareaChars == 0 || viperQRTextareaChars < $vboptions[postminchars] ) return;
// Uncheck the checkbox
viperOpenCloseCheckbox.checked = false;
// Change the text and set the reply button image filename
if ( viperThreadOpen == true ) {
document.getElementById("qr_openclosestatus").innerHTML = "$vbphrase[viper_opencloseqr_open_thread]";
viperReplyButtonIMG = "threadclosed.gif";
viperThreadOpen = false;
} else {
document.getElementById("qr_openclosestatus").innerHTML = "$vbphrase[viper_opencloseqr_close_thread]";
viperReplyButtonIMG = "reply.gif";
viperThreadOpen = true;
}
// Get all reply buttons via the new class
var replybuttons = YAHOO.util.Dom.getElementsByClassName("replybutton", "img");
// Loop through each reply button and change it's image URL
var i;
for (i in replybuttons) {
replybuttons[i].src = "$stylevar[imgdir_button]/" + viperReplyButtonIMG;
}
}
/* ]]> */
</script>
</if>
Configuration
Aucune configuration nécessaire.
Screenshots et Archive