Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to move first voting element?
chjohan
New
Hi! I wish to change the position of the first voting element when viewing a discussion. I want to only move the voting element linked to the main thread, not the comments.
Is there any way to create an unique css class for the first voting element?
I need this to get a smooth fit with my theme
0
Comments
css example for the first element. will modify color - add what you need.
kasper had a discussion on css with respect to positioning and voting plugin, but you would need to search for that.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Hi, peregrine!
I followed all your steps: copy and paste the "DiscussionController_BeforeCommentMeta_Handler" function, change name of the function to "DiscussionController_CommentInfo_Handler", add code to the top of the function. Add more code to the "DiscussionController_BeforeCommentMeta_Handler" function.
I managed to change the colours.
I then tried to change the positioning by using the following css code taken from kasper's example:
ul.MessageList div.Meta span.Votes { right: 15px !important; }
But still all elements gets affected by the change in the css code.
How do I change the positioning of only the first element?
I also tried the following code without success:
.FirstComment ul.MessageList div.Meta span.Votes { right: 15px !important; }
the plugin change I suggested should move the positioning based on the event you triggered on, you could try other events. different versions of vanilla have different events. You could also add a custom event in your helper functions.
As far as positioning with css - you would have to experiment.
But you now know how to identify the .FirstComment with css, maybe you've gained some insights. maybe not.
maybe if you specify your theme or post a link to your site, a css positioning expert will come knocking on your door. Personally, I find css positioning tedious, so beyond some hints above that is about all I've got.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.