[XB] Thread Type Vote Competition

[XB] Thread Type Vote Competition [Paid] 2.0.2 Patch Level 3

No permission to buy ($10.00)
Was or is there a problem with voting for other posts?
We have posts from user1, user2, user3.
Every user can post only for own posts.
Very funny.



IT seems to be solved with an update. Thank you.
 
Last edited:
I get an error when I try to set an end date at the end of next month. This is the error:

Code:
Error: Class "OzzModz\ThreadTypeCompetition\Util\Time" not found in src/addons/OzzModz/ThreadTypeCompetitionVote/ThreadType/Competition.php at line 359
OzzModz\ThreadTypeCompetitionVote\ThreadType\Competition->processExtraDataSimple() in src/XF/Service/Thread/Creator.php at line 300
XF\Service\Thread\Creator->setDiscussionTypeAndDataInternal() in src/XF/Service/Thread/Creator.php at line 207
XF\Service\Thread\Creator->setDiscussionTypeAndData() in src/XF/Pub/Controller/Forum.php at line 662
XF\Pub\Controller\Forum->setupThreadCreate() in src/XF/Pub/Controller/Forum.php at line 884
XF\Pub\Controller\Forum->actionPostThread() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 258
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
XF\App->run() in src/XF.php at line 524
XF::runApp() in index.php at line 20
 
Installed, some tests, uninstalled;

Now I have one thread with:

InvalidArgumentException: Invalid thread type 'ozzmodz_ttcv_competition' in src/XF/App.php at line 3148

But from where comes this ozzmodz_ttcv_competition?

The thread has thread type: discussion

Installed again, thread ok.

Uninstalled, same problem

ozzmodz_ttcv_competition
ttvc? ttcv?
 
Wow! I have erased the xf_data_registry, and rebuild master, but your

InvalidArgumentException: Invalid thread type 'ozzmodz_ttcv_competition' in src/XF/App.php at line 3148

is still in my system

It is not in thread_type, not in forum_type, not in this special thread.
It is not in any searchable file on the hard disc.

But it is somewhere!
 
I have installed it.
I added a new thread, i moved the posts from old thread to the new thread.
Uninstall addon.
Thread not readable.

=> there is a problem with posts!
 
I really dont know how you could hijack my forum, but i need this to get view of thread without that error:

PHP:
<?php

namespace XF\Repository;

use XF\Mvc\Entity\Repository;

class ThreadType extends Repository
{
    /**
     * Filters thread types to those that can be converted individually (non-bulk)
     */
    const FILTER_SINGLE_CONVERTIBLE = 0x1;

    /**
     * Filters thread type to those that can be bulk converted.
     */
    const FILTER_BULK_CONVERTIBLE = 0x2;

    public function rebuildThreadTypeCache(): array
    {
        $cache = $this->db()->fetchPairs("
            SELECT tt.thread_type_id, tt.handler_class
            FROM xf_thread_type AS tt
            LEFT JOIN xf_addon AS addon ON (tt.addon_id = addon.addon_id)
            WHERE (addon.active = 1 OR tt.addon_id = '')
        ");

        \XF::registry()->set('threadTypes', $cache);

        return $cache;
    }

    public function getThreadTypeListData(array $threadTypeIds = null, int $filters = 0): array
    {
        if ($threadTypeIds === null)
        {
            $threadTypeIds = array_keys($this->app()->container('threadTypes'));
        }

        $listData = [];

        foreach ($threadTypeIds AS $threadTypeId)
        {

if ($threadTypeId != 'ozzmodz_ttcv_competition')
{

            if ($typeHandler = $this->app()->threadType($threadTypeId))
            {
                if ($filters & self::FILTER_SINGLE_CONVERTIBLE && !$typeHandler->canConvertThreadToType(false))
                {
                    continue;
                }

                if ($filters & self::FILTER_BULK_CONVERTIBLE && !$typeHandler->canConvertThreadToType(true))
                {
                    continue;
                }

                $listData[$threadTypeId] = $typeHandler->getTypeTitle();
            }

}

        }

        return $listData;
    }
}
 
I hope that you know where this is

$threadTypeIds = array_keys($this->app()->container('threadTypes'));

then please let me know how i can remove that ozzmodz_ttcv_competition from my server.
App is uninstalled, files are deleted.
 
Please find this error!

Invalid thread type 'ozzmodz_ttcv_competition'


I have reinstalled and uninstalled.
 
I can change the thread types of a forum, and set it back to get rid of the problem.
And now I do that for 213 forums?
 
A reviewer said: so the voting items are intermixed with random discussion

This makes the voting essentially unfair as items which are on the front page will get the most votes because people are too lazy to read all the way to Page 5.

Very cool idea.

This needs to have a structure like:

=== (1) ===
Title + First Post
----
dedicated section for voteable items
----
discussion.


=== (2) ===
or it should have a resources-like design with a Tab for the OP and the votes. And a discussion tab.
 
Back
Top Bottom