[XFA] Thread Template - XF2

[XFA] Thread Template - XF2 [Paid] 3.0.4

No permission to buy (€5.00)
If i remember right from the xf1 the content of the template will be activated/inserted, when i start a thread.
Means i have to delete the stuff, when i dont need it.

For convience it would be nice to decide myself before or while i start a new thread.
Possible ways:

Start thread + click an icon to insert the template
Start thread + value in a userfield (yes/no) to have it or not to have it (decision of user)
A second button => Start thread | Start thread with template (short) Start TT
A checkbox next to start thread
A button to empty the post => start thread + click Button Delete
 
If i remember right from the xf1 the content of the template will be activated/inserted, when i start a thread.
Means i have to delete the stuff, when i dont need it.

For convience it would be nice to decide myself before or while i start a new thread.
Possible ways:

Start thread + click an icon to insert the template
Start thread + value in a userfield (yes/no) to have it or not to have it (decision of user)
A second button => Start thread | Start thread with template (short) Start TT
A checkbox next to start thread
A button to empty the post => start thread + click Button Delete

Exactly.

Wrt. add-on price this is not something I envision, adding buttons to the editor is time consuming.

Clément
 
No problem. Thank you.
I have found the add-on for insert templates now.
Together with your add-on everything is possible now.
 
  • Like
Reactions: XFA
is it possible to make an option to make the template text act like Thread prompts? i.e. it just shows the text as information but will be gone once you type something in the textarea?

1587536018311.png
 
Getting this spammed in the error log:
Server error log
  • ErrorException: [E_NOTICE] Trying to get property 'node_id' of non-object
  • src/addons/XFA/ThreadTemplate/XF/Pub/Controller/Forum.php:36
  • Generated by: Unknown account
  • Jan 8, 2021 at 8:26 PM

Stack trace​

#0 src/addons/XFA/ThreadTemplate/XF/Pub/Controller/Forum.php(36): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/nginx/dom...', 36, Array)
#1 src/addons/SV/Threadmarks/XF/Pub/Controller/Forum.php(137): XFA\ThreadTemplate\XF\Pub\Controller\Forum->actionPostThread(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(350): SV\Threadmarks\XF\Pub\Controller\Forum->actionPostThread(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Forum', 'PostThread', Object(XF\Mvc\RouteMatch), Object(SV\MultiPrefix\XF\Pub\Controller\Forum), NULL)
#4 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\MultiPrefix\XF\Pub\Controller\Forum), NULL)
#5 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#7 src/XF.php(488): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}

Request state​

array(4) {
["url"] => string(24) "/news/gaming/post-thread"
["referrer"] => bool(false)
["_GET"] => array(1) {
["/news/gaming/post-thread"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
There must be some add-on interfering.
The post-thread url action is expected to return a forum object and it seems it is not an object anymore.

@Xon: I see some of your add-ons in the log, could it be yours ?
 
This is how SV/Threadmarks extends that function;
PHP:
    public function actionPostThread(ParameterBag $params)
    {
        $response = parent::actionPostThread($params);

        if (($response instanceof View) && ($thread = $response->getParam('thread')))
        {
            /** @var \SV\Threadmarks\Service\ThreadmarkIndex\Creator $creator */
            $creator = $this->service('SV\Threadmarks:ThreadmarkIndex\Creator', $thread);
            $response->setParam('threadmarkIndex', $creator->getThreadmarkIndex());
        }

        return $response;
    }

None of my add-ons that @JoyFreak are using replace the returned contents, just add more stuff.
 
This is how SV/Threadmarks extends that function;
PHP:
    public function actionPostThread(ParameterBag $params)
    {
        $response = parent::actionPostThread($params);

        if (($response instanceof View) && ($thread = $response->getParam('thread')))
        {
            /** @var \SV\Threadmarks\Service\ThreadmarkIndex\Creator $creator */
            $creator = $this->service('SV\Threadmarks:ThreadmarkIndex\Creator', $thread);
            $response->setParam('threadmarkIndex', $creator->getThreadmarkIndex());
        }

        return $response;
    }

None of my add-ons that @JoyFreak are using replace the returned contents, just add more stuff.
Ok thanks for the heads up.

@JoyFreak can you please tell me if in the Development > Class extension you have others add-on attached to XF/Pub/Controller/Forum ?
 
Back
Top Bottom