Forum password

Forum password [Paid] 1.2

No permission to buy ($25.00)

AndyB

Well-known member
#1
AndyB submitted a new resource:

Forum password - Password protect forums and threads.

Premium upgrade:

This XF2 add-on along with the entire collection can be purchased for $25.00 USD. Your Premium upgrade will allow you to download as many XF2 add-ons as you like for one year. Please see the entire collection located in the Resources area at this URL:

https://www.xf2addons.com/

Note: all my XF1 add-ons are still 100% free and are supported by donations.

Description:

Password protect forums and threads.

(Example of Forum password page)...
Read more about this resource...
 

XenConcept

Formerly Rémi C
#5
@AndyB I have found one bug, User will see password fields When direct URL access to thread but why marking thread are read without entering thread?
@AndyB

Hello,

Here is the cause of the problem.

PHP:
// get parent       
$parent = parent::actionIndex($params);
What triggers its functions

HTTP:
$threadRepo->markThreadReadByVisitor($thread, $lastPost->post_date);
$threadRepo->logThreadView($thread);
 

Nirjonadda

Well-known member
#6
@AndyB I am getting lot of Server error log. Please let me know this fix update.

Code:
ErrorException: [E_NOTICE] Undefined index: password src/addons/Andy/ForumPassword/Pub/Controller/ForumPassword.php:19

Generated by: Black Knight May 26, 2018 at 7:41 PM

Stack trace

#0 src/addons/Andy/ForumPassword/Pub/Controller/ForumPassword.php(19): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nadda/pub...', 19, Array)
#1 src/XF/Mvc/Dispatcher.php(249): Andy\ForumPassword\Pub\Controller\ForumPassword->actionSave(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Andy\\ForumPassw...', 'Save', 'html', Object(XF\Mvc\ParameterBag), '', Object(Andy\ForumPassword\Pub\Controller\ForumPassword), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}

Request state

array(4) {
  ["url"] => string(19) "/forumpassword/save"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: [E_NOTICE] Undefined index: threadId src/addons/Andy/ForumPassword/Pub/Controller/ForumPassword.php:16

Generated by: Black Knight May 26, 2018 at 7:41 PM

Stack trace

#0 src/addons/Andy/ForumPassword/Pub/Controller/ForumPassword.php(16): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nadda/pub...', 16, Array)
#1 src/XF/Mvc/Dispatcher.php(249): Andy\ForumPassword\Pub\Controller\ForumPassword->actionSave(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Andy\\ForumPassw...', 'Save', 'html', Object(XF\Mvc\ParameterBag), '', Object(Andy\ForumPassword\Pub\Controller\ForumPassword), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}

Request state

array(4) {
  ["url"] => string(19) "/forumpassword/save"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Code:
ErrorException: [E_NOTICE] Undefined index: nodeId src/addons/Andy/ForumPassword/Pub/Controller/ForumPassword.php:13

Generated by: Black Knight May 26, 2018 at 7:41 PM

Stack trace

#0 src/addons/Andy/ForumPassword/Pub/Controller/ForumPassword.php(13): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/nadda/pub...', 13, Array)
#1 src/XF/Mvc/Dispatcher.php(249): Andy\ForumPassword\Pub\Controller\ForumPassword->actionSave(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Andy\\ForumPassw...', 'Save', 'html', Object(XF\Mvc\ParameterBag), '', Object(Andy\ForumPassword\Pub\Controller\ForumPassword), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}

Request state

array(4) {
  ["url"] => string(19) "/forumpassword/save"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
#8
looks like the table wasn't created after updating
Code:
XF\Db\Exception: MySQL statement prepare error [1146]: Table 'pointsixtyfive_xenforo.xf_andy_forum_password' doesn't exist in src/XF/Db/AbstractStatement.php at line 212
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 79
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 91
XF\Db\AbstractAdapter->fetchOne() in src/addons/Andy/ForumPassword/XF/Pub/Controller/Forum.php at line 83
Andy\ForumPassword\XF\Pub\Controller\Forum->actionIndex() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1891
XF\App->run() in src/XF.php at line 328
XF::runApp() in index.php at line 13
 
Top