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.

i need code " like botton "

2 posters

Go down

Solved i need code " like botton "

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



Last edited by AlFoROoN on September 29th 2014, 4:18 pm; edited 1 time in total
avatar
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 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
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: i need code " like botton "

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

thank you
avatar
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 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
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top


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