[OzzModz] Reaction to Vote

[OzzModz] Reaction to Vote 2.0.1 Patch Level 3

No permission to buy ($10.00)
Compatible XF 2.x versions
  1. 2.2
Additional requirements
PHP 7
License
Single Use License (may be used on one website)
Updates duration
Lifetime for Xenforo versions listed above
Visible branding
No
Automatic upvote/downvote for suggestions & answers to questions on given or taken reaction (depending on reaction type - positive = upvote, negative = downvote)
With AJAX vote block updating.

ONLY FOR XF 2.2!




1605008336035.png



You can easily add support for your votable content by implementing PB\ReactionToVote\Entity\ReactionToVoteInterface

PHP:
/**
* Represents Votable entity for current reacted content
* return $this if your votable content is the same to reacted entity or return parent relation with ContentVote if not
*
* Eg: reacted Post entity has a ContentVoteTrait implementation that relates to Thread on suggestion forum types
* @return \XF\Mvc\Entity\Entity
*/
public function getReactionToVoteContent();

/**
* Returns true if reaction to vote action is supported
* @return bool
*/
public function isReactionToVoteSupported(): bool;


Config options can be extended in PB\ReactionControl\Repository\Repo::getSupportedContentTypes()

Eg:

PHP:
public function getSupportedContentTypes()
{
   $contentTypes = parent::getSupportedContentTypes();

   $contentTypes['My/AwesomeAddon'] => [
         'my_content_type1' => ['title' => XF::phrase('my_content_type1')],
         'my_content_type2' => ['title' => XF::phrase('my_content_type2')]
      ]
   ];
   return $contentTypes;
}
Author
Ozzy47
Views
3,367
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Ozzy47

Latest updates

  1. [OzzModz] Reaction To Vote for XenForo 2.2+ Update 2.0.1 Patch Level 3

    2.0.1 Patch Level 3: - Fixed removing vote on taking cancelling reaction in suggestion threads
  2. [OzzModz] Reaction To Vote for XenForo 2.2+ Update 2.0.1 Patch Level 2

    Fix: Front-end actions are performed regardless of disabled content-types & nodes
  3. [OzzModz] Reaction to Vote for XenForo 2.2+ Update 2.0.1 Patch Level 1

    Fix: reaction to other's posts in suggestion threads causes vote to own thread
Top Bottom