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.
Have plugin appear on 'discussionscontroller' as well
kirkpa31
✭✭
Possible to have this plugin appear on the main page ('discussionscontroller') in addition to appear within each post ('discussioncontroller')? I ask this b/c of the peregrine voting leaderboard plugin (which I now love), I would like it to be possible to scroll the main page and vote on topics without having to click on the topic first and then vote.
Will continue to look through the different files in the voting plugin and report back if I find anything.
0
Comments
@kirkpa31 It appears the features you are looking for might be in version 1.1.3. You can find it on github.
I don't suggest you use this, unless you are comfortable finding and reporting bugs. I do suggest this in the hopes you will try to understand the differences.
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.
Thank you @hgtonight. At first quick run it is horribly messing up the formatting of my page - but hopefully with time I'm able to figure this out.
Can't figure it out for the life of me using that github link. Last couple hours unfortunately wasted a little looking at the voting plugin and this stuff . Progress I've made: a screen shot of what I have in mind?
Hopefully the next couple hours of my attempting go better. It would work excellently well with @peregrine's voting leaderboard plugin.
Changed within plugins/Voting/class.voting.plugin.php
from
* Add the vote.js file to discussions page, and handle sorting of answers. */ public function DiscussionController_Render_Before($Sender) { // if (!C('Plugins.Voting.Enabled')) // return; $this->AddJsCss($Sender); }
to
public function Base_Render_Before($Sender) { // ($DisplayOn = array('discussioncontroller', 'discussionscontroller'); if (!InArrayI($Sender->ControllerName, $DisplayOn)) return;; $Sender->AddJsFile; }
to no avail. Hoping that I'm at least on the right track.
EDIT
looking through the file again, i think the code under this header is the one that needs to be edited:
/** * Increment/decrement discussion scores */
When I look at the class.voting.php
I notice it has commented out stuff and the echo to the discussion
Maybe all you need to do is uncomment the stuff so it works also for the discussion list or other..
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Unfortunately all that does, as far as I can see, is that the are removed.
I have been looking inside of the Fancybox plugin looking for code that I changed to activate it on the discussionscontroller page, which I implemented in my earlier attempt on this page. No luck thus far.
have you tried adding this? This part I believe is what inserts the stuff all you would need could be to add the controller you want but be warned it can be a red herring ! lol
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Added your code within, preview is below, but ERROR pages are something I've become accustomed to unfortunately, and it's what happens with this code.
@kirkpa31
post a zip of your complete mods, and I 'll have a look if you want.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
yea but what are the error messages , data error on? that gives a clue and tells what line where. Is it syntax error?
Maybe you just need this part
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thank you @peregrine! I'm attaching a zip of my voting plugin - the only file I've done modifications to is voting.plugin.php, adding the
as posted above. I've removed modified part posted under
b/c It caused my forum to flip out.
yea thanks @peregrine this thread was getting fishy from so much red herring !
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@kirkpa31
give me a day or two.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@vrijvlinder
The error message before that last bit you posted was:
Fatal error: Cannot redeclare VotingPlugin::DiscussionsController_Render_Before() in /home/kirkpa31/public_html/plugins/Voting/class.voting.plugin.php on line 546
Caused purely by the commented out bit of code under the "add voting css to post controller"
// if (!C('Plugins.Voting.Enabled')) // return;
Removing this, as you suggested in that last mod, removed the error but made no alterations in the voting plugin.
And Thank You @peregrine!
I am incredibly grateful for yours and @vrijvlinder's support.
I will also continue to work on this and will post back anything that I find to be potentially useful.
I will try this too see what goes now I am curious.... not as easy as it seems 0_o
back to school I go
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
this may get you somewhere. You will need to adjust .css and js
but it will add a box to the left in discussions page - if thats what you want.
you will need to figure out the proper .css - to get the box correct.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
EDIT
@peregrine
I was putting it in the wrong place....
This does create a box!!!
I will edit CSS and js, as you have recommended, and report back!
Thank you!!!
either what you posted is wrong or displaying wrong. You left out closing brace. or try again from scratch.
Doing the sequence in order.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.