HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Problem with autorefresh

edited June 2013 in Feedback

Hey guys,

I had a problem with that the sort div from the Voting was loaded with the auto refresh, and don't know if anybody else had it, but I figured I would post my fix here.
The problem was cause by the fact it was also generated on the getnew page. So this was my fix:
Insert this code on line 190 in the ./plugins/Voting/class.voting.plugin.php:

<?php $URL_parted = explode('/', $_SERVER['REQUEST_URI']); if ($URL_parted[2] == "getnew") return; ?>

Or is there a better way to fix this? I prefer python so I almost never write php so it could be terrible :P

Comments

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Welcome to the community!

    What version of Vanilla are you running?

    I have never encountered this issue. If there are request arguments, you can get them from $Sender->RequestArgs.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    Sorry, I'm running version 2.0.18.8, which is awesome btw!
    I could try to get the arguments by your statement but I think it is quite efficient to get them with a request header and nginx, but I the downside is that I can't put my install in a sub directory, but I wasn't planning on that anyway :)

Sign In or Register to comment.