The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
5 posters

    Anti double post

    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Anti double post

    Post by Milouze14 November 19th 2015, 10:11 am

    Hi to all of you,
    I find myself facing a dillem with a script that should work on all versions and I found the Portuguese media.
    On version phpbb3 nothing to do he does not want to know anything,
    I want to point out that I have no script to share it and my templates are blank.
    The script in question:

    Code:

    jQuery(document).ready(function(){var r='form';var k='#quick_reply';var t=jQuery('input[name="t"]').val();var p='/t'+t+'-';if(jQuery(k).length){var q=''}else{var q='<br><a href="'+p+'">Clique aqui</a> para voltar ao tópico.'};var s='<img src=http://2img.net/i/fa/admin/icones/big_ico/warning.png><br>É proibido fazer double post.'+q;if(jQuery('body#phpbb').length){var m='<div class=panel style=font-size:23px><span class=corners-top></span><center style=padding:5px>'+s+'</center><span class=corners-bottom></span></div>';var h='p.author'}else if(jQuery('table.bodylinewidth').length){var m='<table width=100%><tr><td align=center>'+s+'</td></tr></table>';var h='.name'}else{var m='<div class="main-content message box-content" style=text-align:center;padding:5px>'+s+'</div>';var h='.username'};if(jQuery(r+'[action="/post"]').length&&jQuery('input[name="mode"][value="reply"]').length){var g=jQuery('a.mainmenu#logout').text().split('[ ')[1].replace(/ ]/g,'');if(jQuery(k).length){jQuery.get('/post?t='+t+'&mode=reply',function(d){if(jQuery(h+':eq(0)',d).text().split(' em')[0].replace(' por ','')==g){jQuery(r+k).html(m)}})}else{if(jQuery(h+':eq(0)').text().split(' em')[0].replace(' por ','')==g){jQuery(r+'[action="/post"]').html(m)}}}});



    The link to the trick:
    http://ajuda.forumeiros.com/t57000-tutorial-anti-double-post#385380

    thank you in advance

    a++
    Kiyomizu
    Kiyomizu
    Forumember


    Male Posts : 201
    Reputation : 31
    Language : French and English
    Location : France

    Solved Re: Anti double post

    Post by Kiyomizu November 19th 2015, 12:21 pm

    Hello !

    On my forum, don't work..
    But i find a script for PHPBB2 and PHPBB 3 Very Happy

    On ACP > Modules > Javascript

    And put that

    Code:
    $(function() {
      var c = "", a, d = 0, b = 0;
      $("div.post").each(function() {
        var e = $(".postprofile dt", this).text();
        e != c ? (d++, b++, a = $(this), b % 2 != d % 2 && a.toggleClass("row1 row2"), c = e) : (b++, $(a).find("div.signature_div").remove(), $("div.postbody", a).append($("div.postbody", this).attr("class", "doublepost").attr("id", $(this).attr("id").replace(/^p([0-9]+)$/, "$1"))), $(this).remove())
      });
      var f = location.hash;
      location.hash = "";
      location.hash = f
    });

    And on your CSS
    Code:
    .doublepost { border-top: 1px solid #888888 }

    (Source: http://forum.forumactif.com/t347281-phpbb-agreger-les-doubles-post)

    Have a nice day Very Happy
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 19th 2015, 12:28 pm

    Hi,
    sorry but this does not correspond to my request, but thank you Wink .

    Hou , tu es français ?
    J'ai déjà recherché sur le support Français car je donne de mon temps sur ce forum Wink

    a++
    Ace
    Ace
    Forumember


    Posts : 250
    Reputation : 49
    Language : Portuguese & English

    Solved Re: Anti double post

    Post by Ace November 19th 2015, 8:50 pm

    Hi!

    Whenever there's an update in the platform, some old tutorials might have a few problems. Confused

    So, there are a few possible causes that you might need to pay attention too. Please, could you send me your forum URL so I can see if there's any JS that could be causing this error (conflict)?

    And please, add this JS:

    Code:
    jQuery(document).ready(function() { if(jQuery('.pun-crumbs p.crumbs a:eq(3)').attr('href') != '/f999-'){ var r='form';var k='#quick_reply';var t=jQuery('input[name="t"]').val();var p='/t'+t+'-';if(jQuery(k).length){var q=''}else{var q='<br><a href="'+p+'">Clique aqui</a> para voltar ao tópico.'};var s='<img src=http://2img.net/i/fa/admin/icones/big_ico/warning.png><br>É proibido fazer double post.'+q;if(jQuery('body#phpbb').length){var m='<div class=panel style=font-size:23px><span class=corners-top></span><center style=padding:5px>'+s+'</center><span class=corners-bottom></span></div>';var h='p.author'}else if(jQuery('table.bodylinewidth').length){var m='<table width=100%><tr><td align=center>'+s+'</td></tr></table>';var h='.name'}else{var m='<div class="main-content message box-content" style=text-align:center;padding:5px>'+s+'</div>';var h='.username'};if(jQuery(r+'[action="/post"]').length&&jQuery('input[name="mode"][value="reply"]').length){var g=jQuery('a.mainmenu#logout').text().split('[ ')[1].replace(/ ]/g,'');if(jQuery(k).length){jQuery.get('/post?t='+t+'&mode=reply',function(d){if(jQuery(h+':eq(0)',d).text().split(' em')[0].replace(' por ','')==g){jQuery(r+k).html(m)}})}else{if(jQuery(h+':eq(0)').text().split(' em')[0].replace(' por ','')==g){jQuery(r+'[action="/post"]').html(m)}}} } });

    Let it activated (unless of course it causes a huge unexpected impact on your forum which probably won't be the case) Smile

    Regards,
    Ace.
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 20th 2015, 5:43 am

    I Ace,


    thanks for the advice Anti double post 1f60b .

    Whenever there's an update in the platform, some old tutorials might have a few problems.

    Milouze14 wrote:
    On version phpbb3 nothing to do he does not want to know anything,


    So, there are a few possible causes that you might need to pay attention too. Please, could you send me your forum URL so I can see if there's any JS that could be causing this error (conflict)?

    Milouze14 wrote:
    I want to point out that I have no script to share it and my templates are blank.



    And please, add this JS:

    This is for the PunBB and not Phpbb3
    Code:

    jQuery(document).ready(function() { if(jQuery('.pun-crumbs p.crumbs a:eq(3)').attr('href') != '/f999-')


    a++
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Anti double post

    Post by SLGray November 20th 2015, 6:42 am

    Are you referring to this tutorial: https://help.forumotion.com/t136448-phpbb-aggregate-double-posts?highlight=double ? It will work on phpBB 2 and 3.



    Anti double post Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 20th 2015, 6:48 am

    I ,
    no it's is :
    http://ajuda.forumeiros.com/t57000-tutorial-anti-double-post#385380

    the trick is to force the member edit his subject rather than answer .

    I will wait Ange Tuteur because he will understand my request.
    English and me, this is the ideal scratch .

    Thank you Wink .

    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Anti double post

    Post by SLGray November 20th 2015, 6:52 am

    Have you checked the official French support forum for this tutorial?



    Anti double post Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 20th 2015, 6:56 am

    Yes ,

    There are no tutorial on French support, the trick comes from the Portuguese media

    a++
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Anti double post

    Post by SLGray November 20th 2015, 7:04 am

    Sometimes if a code is in a foreign language that your forum is not set to, the code will not work.



    Anti double post Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 20th 2015, 7:06 am


    I think over a missing character but I do not know which for this version
    Kiyomizu
    Kiyomizu
    Forumember


    Male Posts : 201
    Reputation : 31
    Language : French and English
    Location : France

    Solved Re: Anti double post

    Post by Kiyomizu November 20th 2015, 10:41 am

    Hi,

    This script have a lot of error in tags (class=aaa> or style=font-size:14px;color:#fff>..
    But, this script don't work sorry Sad
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 20th 2015, 12:38 pm

    Hi ,
    not there are no error .

    Thanks
    a++
    Ace
    Ace
    Forumember


    Posts : 250
    Reputation : 49
    Language : Portuguese & English

    Solved Re: Anti double post

    Post by Ace November 22nd 2015, 7:24 pm

    Hi there,

    Sorry it took me so long. I asked a friend for a help on this one to make it available to all versions again. A big thanks to MateusAnjosV who helped a lot! Smile

    So let's get to the code shall we? It should work in PHPBB3, PHPBB2, PUNBB and Invision. (Add it in a JS page)

    Code:
    $(function(){
     var phpbb2 = $('.row2[valign="top"][width="150"]');
     
     if($('.post:eq('+phpbb2.length+')').find('.name').text() == _userdata["username"]){
     $('#quick_reply').html('<center><img src="http://icons.iconarchive.com/icons/aha-soft/free-3d-glossy-interface/64/abort-icon.png" alt="No double post"><br><br><b>It is forbidden to double post - please click the edit button</b></center>');
     }
    else if($('.post:last-of-type').find('.username').text() == _userdata["username"]){
    $('#pun-qpost').html('<center><img src="http://icons.iconarchive.com/icons/aha-soft/free-3d-glossy-interface/64/abort-icon.png" alt="No double post"><br><br><b>It is forbidden to double post - please click the edit button</b></center>');
    }
      else if($('.post:last').find('.postprofile dl dt strong a span strong').text() == _userdata["username"]){
     $('#quick_reply').html('<center><img src="http://icons.iconarchive.com/icons/aha-soft/free-3d-glossy-interface/64/abort-icon.png" alt="No double post"><br><br><b>It is forbidden to double post - please click the edit button</b></center>');
    }
     else if($('.post:last').find('.postprofile dl dt a span strong').text() == _userdata["username"]){
     $('#quick_reply').html('<center><img src="http://icons.iconarchive.com/icons/aha-soft/free-3d-glossy-interface/64/abort-icon.png" alt="No double post"><br><br><b>It is forbidden to double post - please click the edit button</b></center>');
    } else {
    console.log('Forbidden Double Post - Coded by: MateusAnjosV - Translated & Optimized by: Ace - It is not a double post')
    };
     
     
    });

    console.log('Forbidden Double Post - Coded by: MateusAnjosV - Translated & Optimized by: Ace');

    About the message:

    Code:
    <center><img src="http://icons.iconarchive.com/icons/aha-soft/free-3d-glossy-interface/64/abort-icon.png" alt="No double post"><br><br><b>It is forbidden to double post - please click the edit button</b></center>

    This is the part that you can edit. It supports HTML so you can make awesome tables, images and so on. Very Happy

    It's also important to go to your Admin CP >> Display >> Pics management >> Buttons >> Reply to topic >> Hide.

    Important: This is not a foolproof solution . Nor it is hard to avoid it. But it should get the job done. This script will only work in the quick reply. I'm already working to make a better version of this code. Wink

    Best Regards.
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 23rd 2015, 5:48 am

    Hi Ace,
    sorry for the delay ,
    the script matches my request but unfortunately does not work well,
    actually it works fine in Firefox but in chrome it is ineffective.
    Thank you a lot.
    a ++
    Ace
    Ace
    Forumember


    Posts : 250
    Reputation : 49
    Language : Portuguese & English

    Solved Re: Anti double post

    Post by Ace November 23rd 2015, 2:45 pm

    Milouze14 wrote:Hi Ace,
    sorry for the delay ,
    the script matches my request but unfortunately does not work well,
    actually it works fine in Firefox but in chrome it is ineffective.
    Thank you a lot.
    a ++

    Hi,

    Are you sure? I have tested it in Chrome all along. Clean your cookies and cache and retry. If it is still ineffective, please, send me your forum URL so I can check if another JS is interfering. (and please, let the codes activated)

    Regards.
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 23rd 2015, 6:16 pm

    hoo I'm sorry Embarassed

    for the trouble I had only seen the tip concerned only the quick response .
    I am going to take this tip.
    thanks a lot for your help
    Enjoy the rest of the evening Hello

    a++
    Ace
    Ace
    Forumember


    Posts : 250
    Reputation : 49
    Language : Portuguese & English

    Solved Re: Anti double post

    Post by Ace November 23rd 2015, 6:42 pm

    Milouze14 wrote:hoo I'm sorry Embarassed

    for the trouble I had only seen the tip concerned only the quick response .
    I am going to take this tip.
    thanks a lot for your help
    Enjoy the rest of the evening Hello

    a++

    Hi,

    No problem. I'm already working in a solution to block the reply itself and I'll probably just create a topic in the coding zone when it's done.

    Regards.
    Milouze14
    Milouze14
    Forumember


    Male Posts : 59
    Reputation : 18
    Language : French
    Location : Vendée

    Solved Re: Anti double post

    Post by Milouze14 November 23rd 2015, 6:44 pm

    Hi sorry,
    it only remains to wait for my friend,
    still a big thank you.
    a ++
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19325
    Reputation : 2005
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Anti double post

    Post by Ape November 24th 2015, 1:00 pm

    Topic solved and archived



    Anti double post Left1212Anti double post Center11Anti double post Right112
    Anti double post Ape_b110
    Anti double post Ape1010

      Current date/time is September 22nd 2024, 11:34 pm