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.

i need code " like botton "

View previous topic View next topic Go down

Solved i need code " like botton "

Post by AlFoROoN on September 29th 2014, 3:25 pm



Last edited by AlFoROoN on September 29th 2014, 4:18 pm; edited 1 time in total

AlFoROoN
New Member

Posts : 13
Reputation : 1
Language : arabic

http://www.7roof-des.net/

Back to top Go down

Solved Re: i need code " like botton "

Post by Ange Tuteur on September 29th 2014, 3:50 pm

Hello,

Please change the title of your topic to something that is related to your question, so that other users will be able to find an answer using search, if they have a similar problem.

I have a similar version for phpbb2. Go to Administration Panel > Modules > JavaScript codes management and create a new script

Title : Your choice
Placement : In the topics
Paste the code below and submit :
Code:
$(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('.post').find('.post-options').append(VPlus);
       $(this).closest('.post:has(.vote-bar)').find('.post-options').append('<span class="VCount" title="'+VCount+vote+'">'+VCount+'</span>');
       $(this).remove();
    });
    
    $('.VPlus').click(function(){
       $.get($(this).attr('href'), function() {
          location.reload();
       });
       return false
    });
});

To style it go to Display > Colors > CSS stylesheet and paste the rules below :
Code:
/*Vote System*/
.VCount, .VPlus {
  color:#0A0 !important;
  font-size:14px;
  font-weight:bold;
  font-family:Verdana,Arial,Helvetica,sans-serif;
}

.VCount:before {
  content:"+";
  opacity:0.5;
  filter:alpha(opacity=50);
  margin-left:4px;
}

.VPlus + .VCount:before { margin-left:-12px }
.VCount {
  text-shadow:1px 1px 0px rgba(0,120,0, 0.3);
  cursor:default;
}

.VPlus {
  text-shadow:1px 1px 0px rgba(0,120,0, 0.1);
  text-decoration:none;
  position:relative;
  margin-left:4px;
  z-index:1;
}

.VPlus:hover { color:#0D0 !important }
.vote {
  opacity:0;
  filter:alpha(opacity=0);
}

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i need code " like botton "

Post by AlFoROoN on September 29th 2014, 4:24 pm

thank you

AlFoROoN
New Member

Posts : 13
Reputation : 1
Language : arabic

http://www.7roof-des.net/

Back to top Go down

Solved Re: i need code " like botton "

Post by Ange Tuteur on September 29th 2014, 5:04 pm

You're welcome Smile

Topic archived

If you have anymore questions don't hesitate to open a new topic.

Ange Tuteur
Forumaster

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

http://fmdesign.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