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.

Editing the Voting Plugin.

edited January 2012 in Vanilla 2.0 - 2.8

I'm trying to modify the Voting plugin. Yes... I know it's been brought up a number of times here. I've read through the questions and had trouble downloading or extracting the modified files that have been provided by users here. I'd also rather just edit my already-installed plugins as I've modified the CSS slightly to get it to look the way I want it to.

Can anyone please tell me which files to edit in the plugin, and what exactly to take out in order to get rid of "follows" and "votes" and just leave "views" and "comments"? I'm sure this would be helpful to many other people who download the plugin.

Thank you so much.

Tagged:

Best Answer

Answers

  • 422422 Developer MVP

    Is it class.voting.php ? Not sure off top of my head

    There was an error rendering this rich post.

  • Let me try that.. thanks

  • thanks, you're right. i think that's where i'm supposed to edit. i'd tried it before. tried again, but nothing is working.. just getting a bunch of parse and fatal errors :( i'm not a developer so it's pretty much trial and error (lol, i love that accidental pun) and i'm just thinking there must be something i'm missing, it can't be this hard?

  • hbfhbf wiki guy? MVP

    not wanting to do any actual coding for you here (sorry)

    the god awful easiest way to hide that stuff would be to use css and just hide the elements you don't want shown.

    take a look a my shortpanel plugin. you can use that with only a tweak to the regex statement in the php and simply changing the element names in the css file.

  • Hehe. It's ok.

    I tried editing the css and nothing changed. Maybe I need to sleep on it. I'm pretty sure there's an easy way to do this that I'm missing. Let me get your plugin

  • hbfhbf wiki guy? MVP
    Answer ✓

    BTW - i just tested display: none on the

    .DataList .Bookmark, .DataList a.Bookmark, .DataList a.Bookmarked, .DataList a.Bookmarking

    tag for this site. works like a charm.

  • hbfhbf wiki guy? MVP

    shiran1 said:
    Hehe. It's ok.

    I tried editing the css and nothing changed. Maybe I need to sleep on it. I'm pretty sure there's an easy way to do this that I'm missing. Let me get your plugin

    what cssfile did you edit and what element and tag did you edit? it works, you just need to make sure it gets picked up. you can always tag it important to force its expression.

  • Oh goodness! I found it I found it I found iiiiit...

    So for anyone who's clueless about code wants to do this, just go to the CSS and insert a "display: none;" for whatever you need to hide (which in my case was Statbox and VotesBox. :))

    Thanks, guys..

  • hbf said:
    BTW - i just tested display: none on the

    .DataList .Bookmark, .DataList a.Bookmark, .DataList a.Bookmarked, .DataList a.Bookmarking

    tag for this site. works like a charm.

    I tried it on voting.css.

  • I'm going to try doing your version; what I did just took it out of the main/home page which is fine. I still have the vote thingie within the discussions themselves, not a big deal but I'll try and take them out. Thanks again.

  • hbfhbf wiki guy? MVP

    shiran1 said:
    I'm going to try doing your version; what I did just took it out of the main/home page which is fine. I still have the vote thingie within the discussions themselves, not a big deal but I'll try and take them out. Thanks again.

    should be the same principle. google chrome, inspect element will be your friend.

  • edited January 2012

    Ok. Worked out. Yes, it's the same principle. "Display: none" is my friend. I changed
    "span.Votes a,
    span.Votes span "

    from "display: block;" to "display: none;".

    I really hope this helps someone out, I was so frustrated.

  • hbfhbf wiki guy? MVP

    BTW - removing stuff like this through css is slick because it keeps the presentation independent of the code. so if someone updates the plugin you don't have to figure out how to hack it again.

    on the other hand, it's a little more bloated, because you are sending over the info you don't want to be displayed... but it's really not that much data so who cares.

  • hbf said:
    now you may sleep in peace.

    Lol. I totally intend to. Thanks again.

  • hbfhbf wiki guy? MVP

    shiran1 said:
    Ok. Worked out. Yes, it's the same principle. "Display: none" is my friend. I changed
    "span.Votes a,
    span.Votes span "

    from "display: block;" to "display: none;".

    I really hope this helps someone out, I was so frustrated.

    Maybe i should post a discussion called "How to hide stuff you don't want your users to see"
    ...

  • hbfhbf wiki guy? MVP

    shiran1 said:

    hbf said:
    now you may sleep in peace.

    Lol. I totally intend to. Thanks again.

    NP. I figured you had suffered enough ;)

Sign In or Register to comment.