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.

How can I have LIKE button like this?

View previous topic View next topic Go down

Solved How can I have LIKE button like this?

Post by th4nhc0n9 on September 16th 2014, 7:30 pm



I have tried in my forum at Reputation. However, I found, it is for topic starter only and there are both plus & subtract icon. Could you help me? Thanks.

th4nhc0n9
Forumember

Male Posts : 157
Reputation : 3
Language : Vietnam

http://vnbeauties.com

Back to top Go down

Solved Re: How can I have LIKE button like this?

Post by SLGray on September 16th 2014, 8:00 pm

What is your forum's version?


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


SLGray
Administrator
Administrator

Male Posts : 35608
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: How can I have LIKE button like this?

Post by Ange Tuteur on September 17th 2014, 2:00 am

Hello,

I have a similar one that I wrote up months ago.
Go to Administration Panel > Modules > JavaScript codes management > Create a new script

Title : Your choice
Placement : In the topics
Paste the code below and submit :
Code:
$(document).ready(function() {
    $('.vote').each(function() {
       if ($(this).find('.vote-bar').length) { var VCount = $(this).find('.vote-bar').attr('title').replace(/.*\((\d+).*\)/,'$1') }
       if (VCount == '1') { var vote = ' vote' }
       else { var vote = ' votes' }
       var VPlus = $(this).find('.vote-button:first a').addClass('VPlus').attr('title', 'Vote up');
      
       $(this).closest('.postbody').find('.profile-icons').append(VPlus);
       $(this).closest('.postbody:has(.vote-bar)').find('.profile-icons').append('<span class="VCount" title="'+VCount+vote+'">'+VCount+'</span>');
       $(this).remove();
    });
    
    $('.VPlus').click(function(){
       $.get($(this).attr('href'), function() {
          location.reload();
       });
       return false
    });
});


Next use the following to style the field :
Display > Colors > CSS stylesheet
Code:
/*Vote System*/
.VCount:before{
content:"+";
opacity:0.5;
filter:alpha(opacity=50);
}
.VCount{
color:#0A0;
font-size:10px;
font-weight:bold;
text-shadow:1px 1px 0px rgba(0,120,0, 0.3);
font-family: Verdana,Arial,Helvetica,sans-serif;
cursor:default;
}
.VPlus{
color:#0A0 !important;
font-size:10px;
font-weight:bold;
text-shadow:1px 1px 0px rgba(0,120,0, 0.1);
font-family: Verdana,Arial,Helvetica,sans-serif;
position:relative;
left:9px;
z-index:1;
}
.VPlus:hover{
color:#0D0 !important;
}
.vote{
opacity:0;
filter:alpha(opacity=0);
}

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2681
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How can I have LIKE button like this?

Post by th4nhc0n9 on September 17th 2014, 7:28 pm

It is OK. Thank U Smile

th4nhc0n9
Forumember

Male Posts : 157
Reputation : 3
Language : Vietnam

http://vnbeauties.com

Back to top Go down

Solved Re: How can I have LIKE button like this?

Post by SLGray on September 17th 2014, 8:05 pm

Topic solved and archived


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


SLGray
Administrator
Administrator

Male Posts : 35608
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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