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

    The best answer [AwesomeBB]

    zest_n
    zest_n
    New Member


    Posts : 14
    Reputation : 5
    Language : English

    Solved The best answer [AwesomeBB]

    Post by zest_n December 21st 2022, 5:18 am

    Version: AwesomeBB

    Hello,
    i would like to have the best reply function after clicking the 'thank you' button like https://imgur.com/VTt9pWg on my AwesomeBB forum. I have a code like below:

    Code:
    jQuery(function(){
        jQuery('.post[style="background-color:#f4f9fd;"]').prepend('<div id="melhor_reply_fdf" class="profile_user">✓  Melhor Resposta</div>');
        var topicauthor = jQuery('.post #melhor_reply_fdf').parents('.post').find('p.author').html();
        var reply_author_name = jQuery('.post #melhor_reply_fdf').parents('.post').find('.postprofile strong').html();
        var topicavatar = jQuery('.post #melhor_reply_fdf').parents('.post').find('.postprofile dt a img').attr('src');
        var urlavt= jQuery('.post #melhor_reply_fdf').parents('.post').find('.postprofile a').attr('href');
        var topicpost = jQuery('.post #melhor_reply_fdf').parents('.post').find('.topic-title a').attr('href');
        var bestTopic = jQuery('.post #melhor_reply_fdf').parents('.post').find('.content').html();
    if(jQuery('#melhor_reply_fdf').length){
        jQuery('.page-title').after('<fieldset id="cont-d"><legend>MELHOR RESPOSTA</legend>
    <p>A melhor resposta foi dada pelo usuário  '+reply_author_name+' ! Caso não seja a melhor resposta, use o sistema de busca para obter ajuda necessária ou crie uma nova questão!</p><div id="postContent"><span class="ipsUserPhoto"><img src="'+topicavatar+'" /></span>
    <span class="ipsBadge">Melhor Resposta</span> '+topicauthor+'<div style="border: 1px solid #ddd; border-bottom: 1px solid #ececec; margin: 3px;"></div><div style="display: inline-block;">'+bestTopic+'</fieldset><a href="'+topicpost+'"><br></div>
            <span class="ipsBadge" style="background: #B3B3B3;font-weight: normal !important;">Ver a mensagem marcada como OBRIGADO. <img class="icon" src="http://i.imgur.com/omzqZnf.png"></span></a>
    </div>');}
        });

    thanks
    Ape
    Ape
    Administrator
    Administrator


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

    Solved Re: The best answer [AwesomeBB]

    Post by Ape December 21st 2022, 10:26 am

    Sadly this is not on our system right now but we do have the Thank you / Thanks setting that is almost the same thing.
    The code you have would have to be added to the servers I think for it to work.

    Admin Control Panel Settings:
     ACP >> Display Tab >>    Pictures and Colors >> Pics management >> Advanced Mode >> under the buttons tab >>



    The best answer [AwesomeBB] Left1212The best answer [AwesomeBB] Center11The best answer [AwesomeBB] Right112
    The best answer [AwesomeBB] Ape_b110
    The best answer [AwesomeBB] Ape1010

    zest_n likes this post

    avatar
    Guest
    Guest


    Solved Re: The best answer [AwesomeBB]

    Post by Guest December 21st 2022, 12:01 pm

    zest_n wrote:Version: AwesomeBB

    Hello,
    i would like to have the best reply function after clicking the 'thank you' button like https://imgur.com/VTt9pWg on my AwesomeBB forum. I have a code like below:

    Code:
    jQuery(function(){
        jQuery('.post[style="background-color:#f4f9fd;"]').prepend('<div id="melhor_reply_fdf" class="profile_user">✓  Melhor Resposta</div>');
        var topicauthor = jQuery('.post #melhor_reply_fdf').parents('.post').find('p.author').html();
        var reply_author_name = jQuery('.post #melhor_reply_fdf').parents('.post').find('.postprofile strong').html();
        var topicavatar = jQuery('.post #melhor_reply_fdf').parents('.post').find('.postprofile dt a img').attr('src');
        var urlavt= jQuery('.post #melhor_reply_fdf').parents('.post').find('.postprofile a').attr('href');
        var topicpost = jQuery('.post #melhor_reply_fdf').parents('.post').find('.topic-title a').attr('href');
        var bestTopic = jQuery('.post #melhor_reply_fdf').parents('.post').find('.content').html();
    if(jQuery('#melhor_reply_fdf').length){
        jQuery('.page-title').after('<fieldset id="cont-d"><legend>MELHOR RESPOSTA</legend>
    <p>A melhor resposta foi dada pelo usuário  '+reply_author_name+' ! Caso não seja a melhor resposta, use o sistema de busca para obter ajuda necessária ou crie uma nova questão!</p><div id="postContent"><span class="ipsUserPhoto"><img src="'+topicavatar+'" /></span>
    <span class="ipsBadge">Melhor Resposta</span> '+topicauthor+'<div style="border: 1px solid #ddd; border-bottom: 1px solid #ececec; margin: 3px;"></div><div style="display: inline-block;">'+bestTopic+'</fieldset><a href="'+topicpost+'"><br></div>
            <span class="ipsBadge" style="background: #B3B3B3;font-weight: normal !important;">Ver a mensagem marcada como OBRIGADO. <img class="icon" src="http://i.imgur.com/omzqZnf.png"></span></a>
    </div>');}
        });

    thanks

    Let me clerify this first. You want, once the topic is opened, a script that will find which topic has most thanks and according to it change the style of that post?
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1442
    Reputation : 220
    Language : English

    Solved Re: The best answer [AwesomeBB]

    Post by SarkZKalie December 21st 2022, 12:19 pm

    Sorry but AwesomeBB didn't have *Thanked backgroud color* in Admin Control Panel, only Post author can see which message is thanked



    The best answer [AwesomeBB] Sarkzk10

    zest_n likes this post

    avatar
    Guest
    Guest


    Solved Re: The best answer [AwesomeBB]

    Post by Guest December 21st 2022, 2:25 pm

    I can make you a similar effect based on number of likes. That's kinda the same. Most liked, most thanked..
    zest_n
    zest_n
    New Member


    Posts : 14
    Reputation : 5
    Language : English

    Solved Re: The best answer [AwesomeBB]

    Post by zest_n December 21st 2022, 4:15 pm

    System32 wrote:I can make you a similar effect based on number of likes. That's kinda the same. Most liked, most thanked..
    Yes. Can you help me?
    avatar
    Guest
    Guest


    Solved Re: The best answer [AwesomeBB]

    Post by Guest December 21st 2022, 4:43 pm

    zest_n wrote:
    System32 wrote:I can make you a similar effect based on number of likes. That's kinda the same. Most liked, most thanked..
    Yes. Can you help me?
    Yes, I can. But I will not share such script online, so I will contact you by PM.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: The best answer [AwesomeBB]

    Post by skouliki December 23rd 2022, 8:08 pm

    When your request is complete, please mark it as Solved.

    zest_n likes this post

    The Godfather
    The Godfather
    Administrator
    Administrator


    Posts : 5297
    Reputation : 844

    Solved Re: The best answer [AwesomeBB]

    Post by The Godfather December 27th 2022, 11:14 am

    Hello,

    SarkZKalie wrote:Sorry but AwesomeBB didn't have *Thanked backgroud color* in Admin Control Panel, only Post author can see which message is thanked

    We added the *Thanked backgroud color* on AwesomeBB this morning Very Happy

    If ou modified the template viewtopic_body, you have to replace this part:

    Code:
    <div class="post">

    By this one:

    Code:
    <div class="post" {postrow.displayed.THANK_BGCOLOR}>

    Thank you.

    Ape, SLGray, SarkZKalie, tikky and zest_n like this post

    zest_n
    zest_n
    New Member


    Posts : 14
    Reputation : 5
    Language : English

    Solved Re: The best answer [AwesomeBB]

    Post by zest_n December 29th 2022, 7:54 am

    solved, thanks a lot.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: The best answer [AwesomeBB]

    Post by skouliki December 29th 2022, 7:58 am

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules


      Current date/time is September 23rd 2024, 12:24 am