The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Best Answer In Topics(?)

Page 2 of 3 Previous  1, 2, 3  Next

View previous topic View next topic Go down

Solved Best Answer In Topics(?)

Post by J0k3R^ on April 21st 2014, 3:34 pm

First topic message reminder :

HelloHello
watch the title.
i would like to have in my forum something like that:




i would ask Mark himself but he is inactive so long time, so, here we go.


My forum is punbb. Any suggestions are welcome, thanks Smile


Last edited by J0k3R^ on April 23rd 2014, 8:48 pm; edited 1 time in total

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down


Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on April 28th 2014, 9:36 pm

alright now i get itloul
lets wait for Chivas to show us his try about the subject

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on April 29th 2014, 8:53 pm

Bump ↑

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Paradise on April 30th 2014, 2:02 am

Are we having any hope please Chivas?

Paradise
Forumember

Male Posts : 90
Reputation : 1
Language : English

http://www9.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Sir Chivas™ on April 30th 2014, 3:48 am

Hi,

I have tried and I have not yet came with a good outcome. Everything is close to it, but with lots of errors. Give me some extra time, as I am not an expert with JS.

Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6783
Reputation : 430
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on April 30th 2014, 6:35 am

okey, but maybe shows us ur code so anybody else like Ange help us?

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on April 30th 2014, 10:04 pm

Hello,

You just have to utilize the thanks system. When a post has been thanked you use the thanked bg color you've set in your ACP to check for the thanked post. You then remove that background color and add your element for thank posts.

Administration panel > modules > javascript codes management > create a new script

Title : what you wish
Placement : in the topics
Paste the code below and save :
Code:
$(function() {
  var thankColor = '#99ff99';
  var text = 'Best Answer';
 
  var post = $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]');
 
  post.children().css('background-color','');
  post.find('.postmain').children().css('background-color','');
  post.css('background-color','').find('.posthead').append('<div id="thanked">' + text + '</div>');
});

Modify the following :
Code:
var thankColor = '#99ff99';
  var text = 'Best Answer';

thankColor : the color of your thanked color
text : the texts displayed

Use CSS to style the element :
Display > colors > CSS stylesheet

Code:
#thanked {
  color:#8B8;
  background:#CFC;
  border:1px solid #ADA;
  border-radius:4px;
  display:inline-block;
  padding:3px;
  margin-top:3px;
}

Result should be similar to :

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Luffy on April 30th 2014, 10:24 pm

@Ange Tuteur wrote:Hello,

You just have to utilize the thanks system. When a post has been thanked you use the thanked bg color you've set in your ACP to check for the thanked post. You then remove that background color and add your element for thank posts.

Administration panel > modules > javascript codes management > create a new script

Title : what you wish
Placement : in the topics
Paste the code below and save :
Code:
$(function() {
  var thankColor = '#99ff99';
  var text = 'Best Answer';
 
  var post = $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]');
 
  post.children().css('background-color','');
  post.find('.postmain').children().css('background-color','');
  post.css('background-color','').find('.posthead').append('<div id="thanked">' + text + '</div>');
});

Modify the following :
Code:
var thankColor = '#99ff99';
  var text = 'Best Answer';

thankColor : the color of your thanked color
text : the texts displayed

Use CSS to style the element :
Display > colors > CSS stylesheet

Code:
#thanked {
  color:#8B8;
  background:#CFC;
  border:1px solid #ADA;
  border-radius:4px;
  display:inline-block;
  padding:3px;
  margin-top:3px;
}

Result should be similar to :

Ange this will make the thanked message as Best Answer or the post with most thanks as the best answer?

Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on April 30th 2014, 10:27 pm

You can only thank a post once with the thanks system and only the author can thank someone in their topic that is NOT that author.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Luffy on April 30th 2014, 11:11 pm

So we must have the thanks button on also. Ok now i got it..

Edit: I cannot see the thanks button..






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on April 30th 2014, 11:18 pm

Modules > Reputation > activate thanks :


Display > Pics management > advanced > buttons > thanks buttons :


NOTE : You must be the topic starter to see the thanks button, the topic starter cannot thank their own posts.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Luffy on April 30th 2014, 11:45 pm

With the codes given above it makes the profile of the thanked member white. Why?
Thanked: (has white all arround)

Normal:







Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on April 30th 2014, 11:53 pm

Try this script instead :
Code:
$(function() {
  var thankColor = '#99ff99';
  var text = 'Best Answer';
 
  $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]').find('.posthead').append('<div id="thanked">' + text + '</div>');
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Luffy on April 30th 2014, 11:54 pm

nothing changed! Sad

(and also the LGlike button disappeared!)






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 1st 2014, 12:03 am

I am getting the following error from your forum :

TypeError: qr is null

If you have a script for quick reply, this is most likely causing that error.

Additionally I am getting two more errors from your javascripts :

TypeError: b(...).sceditor is not a function
TypeError: tmp is null


These errors can cause other scripts on your page to stop functioning.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on May 1st 2014, 6:45 am

@Marios i would please u to open new topic for ur problems
@Ange i tried w/e u said and didnt work for me aswell (i still got the default thanks system and images)SadNo JS related with replies and still...

Note:the only thing which was affected by ur codes is the color of the bar im showing u at the screenshot (changed to the thanked reply)


J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Luffy on May 1st 2014, 9:45 am

@J0k3R^ wrote:@Marios i would please u to open new topic for ur problems
@Ange i tried w/e u said and didnt work for me aswell (i still got the default thanks system and images)SadNo JS related with replies and still...

Note:the only thing which was affected by ur codes is the color of the bar im showing u at the screenshot (changed to the thanked reply)

Jok3R^, my problem is about this topic. Why should i open an other topic for the same issue?
Anyway. Ange what may the other two js that error to you? The one is the quick reply, the other two?

Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 1st 2014, 5:20 pm

Have you modified your templates ? If so then try the scrip below instead.

Code:
$(function() {
  var thankColor = '#99ff99';
  var text = 'Best Answer';
 
  $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]').append('<div id="thanked">' + text + '</div>');
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on May 1st 2014, 5:57 pm

nothing yet mate..blackeye

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 1st 2014, 5:59 pm

Did you change the thankColor to the exact thanks hex color in your ACP ?

Display > colors

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on May 1st 2014, 6:03 pm

u talking about this or im wrong?




EDIT:it appeared but not very good position.. (bottom left side)


J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Luffy on May 1st 2014, 6:41 pm

Αnge to me it appears at the bottom. WHy?







Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 2nd 2014, 4:55 pm

From what I check, you've modified the viewtopic_body some, so the last script couldn't append the element. You can try adding it to the postbody instead if you wish.

Code:
$(function() {
  var thankColor = '#99ff99';
  var text = 'Best Answer';
 
  $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]').find('.postbody').prepend('<div id="thanked">' + text + '</div>');
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on May 2nd 2014, 4:59 pm

its now working but i dont want the background color to be green Sad
if i change it from display→colors, then 'best answer' doesnt appear anymore
what can i do?

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 2nd 2014, 5:01 pm

You'll have to use my first script which removes that bg color.
Code:
$(function() {
  var thankColor = '#99ff99';
  var text = 'Best Answer';
 
  var post = $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]');
 
  post.children().css('background-color','');
  post.find('.postmain').children().css('background-color','');
  post.css('background-color','').find('.postbody').prepend('<div id="thanked">' + text + '</div>');
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on May 2nd 2014, 5:20 pm

nice, its working very good Smile
just something last if thats possible.
can the.pun .posthead{






take the background of the "best answer" ?
I mean Only the.pun .posthead{ which is the 'best answer' there..

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 2nd 2014, 5:36 pm

See if this works :
Code:
$(function() {
    var thankColor = '#99ff99';
    var text = 'Best Answer';
   
    var post = $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]');
   
    post.children().css('background-color','');
    post.find('.postmain').children().css('background-color','');
    post.find('.posthead').css('background-color',thankColor);
    post.css('background-color','').find('.postbody').prepend('<div id="thanked">' + text + '</div>');
});

I added a line which color the post head with the content of the thankColor.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on May 2nd 2014, 5:45 pm

nope mate, didnt work..
now i got this:



and i want make something like this: Smile


J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 2nd 2014, 5:51 pm

Change to :
Code:
$(function() {
    var thankColor = '#99ff99';
    var text = 'Best Answer';
 
    var post = $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]');
 
    post.children().css('background-color','');
    post.find('.postmain').children().css('background-color','');
    post.find('.posthead').css('background',thankColor);
    post.css('background-color','').find('.postbody').prepend('<div id="thanked">' + text + '</div>');
});

You'll need to use background instead of background-color since you're using a gradient.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by J0k3R^ on May 2nd 2014, 5:58 pm

one step closerthumright




my css is this:


but if i change the JS's color#99ff99 with this at css(#dfedd1) it doesnt work.
i mean i want to be same color the "best answer" with the bar (#dfedd1)Smile:rose:

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Solved Re: Best Answer In Topics(?)

Post by Ange Tuteur on May 2nd 2014, 6:03 pm

Oh, is simple Wink

You don't have to use the thank color to color it, you can set your own color.
Code:
$(function() {
    var thankColor = '#99ff99';
    var text = 'Best Answer';
 
    var post = $('.post[style="background-color:' + thankColor.toLowerCase() + ';"]');
 
    post.children().css('background-color','');
    post.find('.postmain').children().css('background-color','');
    post.find('.posthead').css('background','#dfedd1');
    post.css('background-color','').find('.postbody').prepend('<div id="thanked">' + text + '</div>');
});

Also, you can change your thank bg color(display >> colors) to whatever you want so long as you change the color in the script as well. Very good

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Page 2 of 3 Previous  1, 2, 3  Next

View previous topic View next topic Back to top


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