R-J / rating

Vanilla Forums plugin which allows users to up- or down-vote discussions and comments
2 stars 0 forks source link

Need an option to move RatingContainer into Reactions #1

Open vintprox opened 5 years ago

vintprox commented 5 years ago

My current workaround is to add custom theme hook function which writes to Reactions utilizing RatingPlugin::printRatingTemplate:

    public function base_afterFlag_handler($sender, $args) {
        if ($args['Comment']) {
            RatingPlugin::printRatingTemplate(
                'Comment',
                $args['Comment']->CommentID,
                $args['Comment']->Score
            );
        } elseif ($args['Discussion']) {
            RatingPlugin::printRatingTemplate(
                'Discussion',
                $args['Discussion']->DiscussionID,
                $args['Discussion']->Score
            );
        }
    }

But it doesn't prevent the plugin to draw another RatingContainer before title. Also current rating.css stylesheet messes up a bit my layout, it should touch as less selectors as possible especially while looking ahead such options as "Draw in title" and "Draw in reactions".

R-J commented 5 years ago

Sorry, I'm not good at doing interfaces. I certainly will accept pull requests. You can solve your problem by hiding the voting options where you don't like them to be.

vintprox commented 5 years ago

@R-J oh, no problems about your skillset, I actually like to see that someone made a plugin with which I gonna be more familiar with how Vanilla hooks work. Thank you. 👍 VF seems to be very rapid solution for forum development (for my job at least), but my only guess is that it was not designed as future-proof software. Well, everything PHP except Laravel looks messy to me. 😂 I already got rid of rating appearing in ItemHeader and made it appear as thumbs up and down under every post. I think colleagues and other visitors of the forum will be comfortable with it. 😸 If I'll find a good way of keeping two options (in title, in reactions), then I will share some commitment, c ya!

R-J commented 5 years ago

It was designed long before Symfony (which also Laravel is based on) was designed and all those state of the art techniques are getting implemented right now, step by step. But it was obviously designed to be extensible and that was what attracted me when I did a comparison on the forum scripts some years ago.

If you have any questions or simply want to discuss what might be a good approach to do this and that, just start a discussion at the forums.