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.

Tuesday tip : Reputation system: only allow positive votes

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

Tuesday tip : Reputation system: only allow positive votes

Post by Leviosa on January 11th 2011, 2:20 pm

First topic message reminder :

Reputation system: only allow positive votes


Since the appearance of the reputation system, messages can be voted by the "+" or "-" button. However, many members have wondered if it is possible to only take into account the positive votes. This tutorial will explain how to remove the "-" button on all forum versions.

You must also :
- Be the founder of the forum
- Have a basic knowledge of HTML, and templates.

PhpBB2 and punBB
The changes are the same on both versions.

Administration Panel Display Templates General viewtopic_body

Find:

Code:
<!-- BEGIN switch_no_bar -->
                            <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar">----</div>
                            <!-- END switch_no_bar -->

                            <!-- BEGIN switch_vote -->
                            <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}">-</a></div>
                            <!-- END switch_vote -->

Replace it with:

Code:
<!-- BEGIN switch_no_bar -->
                            <div title="{postrow.displayed.switch_vote_active.L_VOTE_TITLE}" class="vote-no-bar" style="display: none;">----</div>
                            <!-- END switch_no_bar -->

                            <!-- BEGIN switch_vote -->
                            <div class="vote-button" style="display: none;"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}"></a></div>
                            <!-- END switch_vote -->

Then click the "Publish" button.

Result:
PhpBB2PunBB

PhpBB3 version and Invision
The changes are the same on both versions.

Administration Panel Display Colors CSS

Add this code to your CSS:

Code:
/ *-- Removal of negative voting button in messages --* /
.vote .vote-button, .vote-no-bar {
  display:none;
}
.vote .vote-button:first-child {
    display:block;
}

Result:
PhpBB3Invision

    Replace the "+" with a picture
    PhpBB2 and phpBB versions only

It is of course possible to replace the + with an image of your choice. In our example, we will take this picture (you can also use):


Administration Panel Display Templates General viewtopic_body

Find:

Code:
<!-- BEGIN switch_vote -->
                            <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}">+</a></div>
                            <!-- END switch_vote -->

And replace it with:

Code:
<!-- BEGIN switch_vote -->
                            <div class="vote-button"><a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}"><img src="http://i22.servimg.com/u/f22/09/02/12/09/001_1810.png" title="Avis positif" alt="Avis positif" /></a></div>
                            <!-- END switch_vote -->

Then click the "Publish" button.

Afterward add this to your CSS:

Code:
.vote {
    width: 24px; / *-- Width of the image chosen --* /
}
Here, the image chosen above has a width of 24px, so we put a value of 24px.
If your image has a width of 35px, remember to adapt this code by changing 24px to 35px. Wink

Result:


This tutorial was written by the Staff of the Forum Forum,
And in particular Toto456 and translated by MrMario.

No reproduction possible without our consent, in accordance with article L122-1 of the ICC.


No help without your forum url
No support via private message



Leviosa
Administrator
Administrator

Female Posts : 15386
Reputation : 1563
Language : French, English

http://help.forumotion.com

Back to top Go down


Hellp

Post by baxuz011 on March 4th 2011, 2:02 am

Menu can not see the image, overlapping the edge of the forum. how to fix it. "PunBB"

Sorry for my bad English.




How to improve it, to see the whole picture?


EDIT:

Fixed

baxuz011
New Member

Posts : 5
Reputation : 0
Language : Srpski

Back to top Go down

doesnt work for me

Post by CajunBelle on March 18th 2011, 5:10 am

It doesnt work on my forum . Ive tried 3 times and the minus sign is still there . Thanks anyway .


Last edited by CajunBelle on March 18th 2011, 5:11 am; edited 1 time in total (Reason for editing : spelling error)

CajunBelle
New Member

Female Posts : 8
Reputation : 0
Language : English

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by lovekhmer2008 on March 30th 2011, 1:29 pm

my forum PhpBB2 version
i make like you write but don't work on my forum
why ?

lovekhmer2008
New Member

Female Posts : 10
Reputation : 0
Language : Khmer Française English
Location : Phnom Penh (Cambodia)

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by Base on March 30th 2011, 7:26 pm

@lovekhmer2008 wrote:my forum PhpBB2 version
i make like you write but don't work on my forum
why ?

Have you clicked on "Publish" and made sure that the template is coloured green?

Base
Forumaster

Male Posts : 10386
Reputation : 1687
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by dleavell on April 5th 2011, 2:33 am

i think the best set up is to have only your forum moderators with the ability to de-rep and others can only go possitive

dleavell
New Member

Posts : 2
Reputation : 0
Language : Boise, Idaho

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by invisible_fa on April 5th 2011, 6:31 pm

Good tutorial, I knew a "trick" (wich is not really a trick, just set points configuration to zero in the negative votes, so the reputation wont go down although someone give you negative reputation), but this tutorial is better, because, in that way, people directly cant give you negative reputation.

Nice work Mr. Green

invisible_fa
Forumember

Male Posts : 885
Reputation : 18
Language : Klingon
Location : Does it matter? I'm Invisible, you will not see me anyway

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by ioncube on April 23rd 2011, 11:42 pm

To produce an hover effect
in phpbb3

Code:
.vote .vote-button:hover a {
background-image: url('http://i54.tinypic.com/2ryolfq.jpg') !important;
padding-left: 25px;
padding-top: 22px;
font-size: 0px !important;
}
for this to work you must add following before this :

Code:
.vote .vote-button, .vote-no-bar {
  display:none;
}
.vote .vote-button:first-child {
    display:block;
}

ioncube
Forumember

Male Posts : 279
Reputation : 41
Language : eng
Location : Pakistan

http://defencedog.blogspot.com/

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by Darkel on April 24th 2011, 3:28 am

another great tutorial typlo! Smile

Darkel
Hyperactive

Male Posts : 2128
Reputation : 257
Language : English, Tagalog
Location : Philippines

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by Fireflaming246 on April 24th 2011, 3:32 pm

I have a question. How do I change the picture for the Minus/Negative Vote button too?

Fireflaming246
Forumember

Posts : 31
Reputation : 0
Language : English

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by lovekhmer2008 on April 30th 2011, 2:07 am

@Base wrote:
@lovekhmer2008 wrote:my forum PhpBB2 version
i make like you write but don't work on my forum
why ?

Have you clicked on "Publish" and made sure that the template is coloured green?

Yes

Spoiler:

lovekhmer2008
New Member

Female Posts : 10
Reputation : 0
Language : Khmer Française English
Location : Phnom Penh (Cambodia)

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by kamikay on April 30th 2011, 3:47 am

Great tut !

kamikay
New Member

Posts : 20
Reputation : 1
Language : americano, no?

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by uafgrad on April 30th 2011, 4:49 am

I did everything described here, and got the - sign to be gone. I also was able to get the thumbs up picture to show (I am on PhpBB3). How do I get rid of the + sign though? It is still there under the thumbs-up up picture.



uafgrad
Forumember

Posts : 88
Reputation : 0
Language : English

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by FIB on July 16th 2014, 11:58 pm

I know this is an old topic but I can't get the image lined up correctly, I did open a post earlier but gave up so they locked it here http://help.forumotion.com/t134274-i-need-to-know-how-to-adjust-some-code  but I really do want to try and get this right so can anyone help? I think I am phpbb2? this is my forum http://www.draytondubs.com maybe you can tell which version it is. Any help would be very much appreciated.


FIB
Forumember

Male Posts : 484
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Re: Tuesday tip : Reputation system: only allow positive votes

Post by Ange Tuteur on July 17th 2014, 1:53 am

@FIB wrote:I know this is an old topic but I can't get the image lined up correctly, I did open a post earlier but gave up so they locked it here http://help.forumotion.com/t134274-i-need-to-know-how-to-adjust-some-code  but I really do want to try and get this right so can anyone help? I think I am phpbb2? this is my forum http://www.draytondubs.com maybe you can tell which version it is. Any help would be very much appreciated.


Hello FIB,

Please open a new topic in the Support Section, or contact a moderator to unlock your topic if it was not solved.

Thank you.

Topic locked

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top


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