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 best answer [AwesomeBB]

5 posters

Go down

Solved The best answer [AwesomeBB]

Post by zest_n Wed 21 Dec 2022 - 5:18

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
zest_n
zest_n
New Member

Posts : 11
Reputation : 3
Language : English

http://d.com

Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by Ape Wed 21 Dec 2022 - 10:26

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
Ape
Ape
Administrator
Administrator

Male Posts : 19040
Reputation : 1988
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

zest_n likes this post

Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by Guest Wed 21 Dec 2022 - 12:01

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?
avatar
Guest
Guest


Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by SarkZKalie Wed 21 Dec 2022 - 12:19

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
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1406
Reputation : 218
Language : English

https://rotavn.forumotion.com/

zest_n likes this post

Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by Guest Wed 21 Dec 2022 - 14:25

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


Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by zest_n Wed 21 Dec 2022 - 16:15

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?
zest_n
zest_n
New Member

Posts : 11
Reputation : 3
Language : English

http://d.com

Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by Guest Wed 21 Dec 2022 - 16:43

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.
avatar
Guest
Guest


Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by skouliki Fri 23 Dec 2022 - 20:08

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

Female Posts : 14886
Reputation : 1666
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

zest_n likes this post

Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by The Godfather Tue 27 Dec 2022 - 11:14

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.
The Godfather
The Godfather
Administrator
Administrator

Posts : 5088
Reputation : 831

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

Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by zest_n Thu 29 Dec 2022 - 7:54

solved, thanks a lot.
zest_n
zest_n
New Member

Posts : 11
Reputation : 3
Language : English

http://d.com

Back to top Go down

Solved Re: The best answer [AwesomeBB]

Post by skouliki Thu 29 Dec 2022 - 7:58

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

Female Posts : 14886
Reputation : 1666
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum