1 <script type=
"text/javascript">/*<!#EVAL{chr(
91)}CDATA#EVAL{chr(
91)}*/
3 jQuery.fn.add_reply_to = function(id_thread){
4 var me = jQuery(this).parents('li.comment-li').eq(
0);
5 if (me.find('#formulaire_forum').length==
0){
6 jQuery('div.comments p.repondre').show();
7 jQuery('#formulaire_forum')
10 .appendTo(me.children('div.form_response'))
13 .removeClass('noajax')
14 .find('input[name=id_forum]').val(id_thread);
16 me.find('p.repondre').first().hide();
17 jQuery('#formulaire_forum').find('form.preview,.reponse_formulaire').remove();
18 if ($('.comment-form h2 a').length ==
0)
19 jQuery('.comment-form h2').wrapInner('
<a href=
"#forum-formulaire-principal" onClick=
"jQuery(this).main_reply();return false;"><\/a
>');
20 jQuery(me).find('.comment').last().find('p').last().positionner(true);
24 var ancre = window.location.hash;
26 if ((id=ancre.match(/^#(forum|comment)([
0-
9]+$)/)) && jQuery(ancre).length==
0){
27 var a = jQuery('.comments-thread a.lien_pagination').last();
29 var href = a.attr('href');
30 href = href.replace(/debut_comments-list=[
0-
9]+#.*$/,'debut_comments-list=@@'+id[
2]+ancre);
31 a.after(
"<a href='"+href+
"' style='visibility:hidden' id='forum"+id[
2]+
"' class='lien_pagination'>Go<\/a>");
32 jQuery(a.parents('div.ajaxbloc').first()).ajaxbloc();
33 jQuery(ancre).eq(
0).click();
37 jQuery.fn.main_reply = function(){
38 var me = jQuery(this).parents('.comment-form').eq(
0);
39 if (me.find('#formulaire_forum').length==
0){
40 jQuery('div.comments p.repondre').show();
41 jQuery('#formulaire_forum')
47 .removeClass('noajax')
48 .find('input[name=id_forum]').val(
0);
50 me.find('h2 a').contents().unwrap();
51 jQuery('#formulaire_forum').find('form.preview,.reponse_formulaire').remove();
52 me.find('h2').positionner(true);
55 /*#EVAL{chr(
93)}[(#EVAL{chr(
93)})]
>*/
</script>