Resource icon

Find New Thread No Content 1.0.1

No permission to download

Liam W

in memoriam 1998-2020
Liam W submitted a new resource:

Find New Thread No Content - Show thread titles in find new without content permission...

This is a very simple install-and-done add-on that'll show threads in find new to users that have permission to view threads, but not permission to view thread content.

Easiest way to see this in action is at my site, XF Liam - XenForo Add-On Development - all my paid add-on categories are marked as view threads but no content to non-license holders.

Read more about this resource...
 
Hi @Liam W

I'm getting errors since installing, any idea what might be happening? Cheers.

ErrorException: Argument 1 passed to XenForo_Permission::hasContentPermission() must be of the type array, null given, called in /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/LiamW/FindNewThreadTitle/Extend/Model/Thread.php on line 11 and defined -library/XenForo/Permission.php:51

#0 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/Permission.php(51): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/var/www/vhosts...', 51, Array)
#1 /var/www/vhosts/mysiteco.uk/httpdocs/forum/library/LiamW/FindNewThreadTitle/Extend/Model/Thread.php(11): XenForo_Permission::hasContentPermission(NULL, 'viewContent')
#2 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/ControllerPublic/Thread.php(2258): LiamW_FindNewThreadTitle_Extend_Model_Thread->canViewThreadAndContainer(Array, Array)
#3 [internal function]: XenForo_ControllerPublic_Thread::getSessionActivityDetailsForList(Array)
#4 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/Model/Session.php(332): call_user_func(Array, Array)
#5 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/Model/Session.php(388): XenForo_Model_Session->addSessionActivityDetailsToList(Array)
#6 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/ControllerPublic/Member.php(211): XenForo_Model_Session->getSessionActivityDetails(Array)
#7 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Member->actionMember()
#8 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /var/www/vhosts/mysite.co.uk/httpdocs/forum/index.php(13): XenForo_FrontController->run()
#10 {main}
 
Hi @Liam W

I'm getting errors since installing, any idea what might be happening? Cheers.

ErrorException: Argument 1 passed to XenForo_Permission::hasContentPermission() must be of the type array, null given, called in /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/LiamW/FindNewThreadTitle/Extend/Model/Thread.php on line 11 and defined -library/XenForo/Permission.php:51

#0 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/Permission.php(51): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/var/www/vhosts...', 51, Array)
#1 /var/www/vhosts/mysiteco.uk/httpdocs/forum/library/LiamW/FindNewThreadTitle/Extend/Model/Thread.php(11): XenForo_Permission::hasContentPermission(NULL, 'viewContent')
#2 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/ControllerPublic/Thread.php(2258): LiamW_FindNewThreadTitle_Extend_Model_Thread->canViewThreadAndContainer(Array, Array)
#3 [internal function]: XenForo_ControllerPublic_Thread::getSessionActivityDetailsForList(Array)
#4 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/Model/Session.php(332): call_user_func(Array, Array)
#5 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/Model/Session.php(388): XenForo_Model_Session->addSessionActivityDetailsToList(Array)
#6 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/ControllerPublic/Member.php(211): XenForo_Model_Session->getSessionActivityDetails(Array)
#7 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Member->actionMember()
#8 /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /var/www/vhosts/mysite.co.uk/httpdocs/forum/index.php(13): XenForo_FrontController->run()
#10 {main}

Yeah, just discovered that myself - I forgot to standardize the node permissions.

I'll release an update now.

Liam
 
Thanks @Liam W that seems to have sorted it, but I have a problem.

Threads are showing up in Recent/New even when the user group is not allowed to view the node. To work best for me I need this to respect the View Node Permissions.

I need it to Showing threads (but not content) in the Recent/New only to those that have View threads by others: YES View thread content: NO Is this possible? Cheers. (y)
 
Thanks @Liam W that seems to have sorted it, but I have a problem.

Threads are showing up in Recent/New even when the user group is not allowed to view the node. To work best for me I need this to respect the View Node Permissions.

I need it to Showing threads (but not content) in the Recent/New only to those that have View threads by others: YES View thread content: NO Is this possible? Cheers. (y)

Yeah, I check deleted and moderated but no can view forum... Whoops!

Will fix when I get home and after part tea (it's my younger brother's birthday).

Liam
 
Aye - it would be great if this could respect node permissions. I need to list content in subscriber only nodes to show as teasers but not the moderator private staff room!

Cheers
 
This should be fixed before tomorrow, I was really tired when I got home yesterday, and completely fell asleep...

Liam
 
Hi Liam,

I could really do with this fix. Please let us know if you intend fix or leave it as is. Cheers.
 
Back
Top Bottom