Guest Posting for XenForo 2.x by AddonsLab

Guest Posting for XenForo 2.x by AddonsLab [Paid] 1.8.0

No permission to buy ($34.99)
Just purchased the add-on, really liking it so far but have two suggestions.

1. Currently the add-on "allows guests to post threads even if they don't have permission to post in current forum". This allows guests to post in any forum theoretically, while the "Disable In Forums" field allows you to additionally specify sections that are restricted from normal members.

I feel it may be far more functional to have the guest ignore if they have permissions to post in the current forum, but also check if the 'Registered' rank has permission. If the 'Registered' rank does not have permission to this forum, neither should these guests as they won't have permission to post there, even if they register and are moved from 'Guest' to 'Registered'. For compatibility (such as if the default 'registered' rank doesn't exist) you could allow the administrator to configure which user group that 'Guests' should mirror the permissions of. Let me know if this makes sense or if you have any questions about the functionality I'm suggesting.
Hello, @Yawn !

Thank you for the purchase.

Thank you for the suggestions. The first suggestion has already been made before, and we worked on it, but we didn't implement it and used the text field option instead as checking if a user would be able to post as a registered user would require at least one marge query, that should be executed on each and every page, as in most of the pages we need to check the permission (for example, to decide if we show Post thread or Reply buttons or no). If this is, however, of a high priority for you (e.g. you have hundreds of forums which already have usergroup restrictions) we can work on such solution.
Can you please look into an implementation of this? Perhaps instead of checking guest permissions, you could check registered permissions. You can use the current field for ‘disable in forums’ to prevent guests from posting in certain forums, fulfilling the functionality of the guest permissions in its place. This is just an idea, perhaps you can find a better solution with more thought but I can’t see an operatable way for large forums such as ours to reasonably use this add-on with the current method of handling permissions.
Can you please clarify the use-case when you would like the post made by a guest to become visible immediately? XenForo itself has permissions to allow the guests to post content, and you don't need our add-on for that. The meaning of our add-on is to promote the users to register on the website, and not just post content as guests and leave the board. Keeping the content posted by guests invisible prevents spamming the board. By the way, just in case you missed it, once the user registers, of course, the add-on activates their thread and makes them publically visible (unless you have moderation rules that force the thread to stay moderated, like forcing moderation for registered users, forcing moderation when the thread has URLs in it etc.).

Please let us know your thoughts and we will see how the best to implement what you need.



Sure, we will try to solve this is a way that will not affect the performance too much. Unfortunately, XenForo loads only Guest permissions if a user is a guest, and it simply does not load registered user permissions. Doing a query on each and every page to load these permissions as well is not advisable.

We will work on it and update here once we come up with some working solution.

Thank you!

@AddonsLab
Is that situation solved?
So guest can posts only where registered users can, or better let we/admin choose in ACPin which forums guest can post or create thread
 
AddonsLab updated Guest Posting for XenForo 2.x by AddonsLab with a new update entry:

Permission-based activation of guest posting

The version implements a new option allowing to activate guest posting based on XenForo permission system. Administrators can enter the ID of any user (usually a registered user), whose permissions should be taken into account when doing the check. If the given user can't create a thread or reply in a thread in the given forum, then guest posting will also not be available.

Please note, that the option causes one additional query (fetching user data from the database) on all pages where...

Read the rest of this update entry...
 
This add-on would work much better for generating content if the poster was not asked for their email address before submitting their post. Let them submit their post (data) into the system and THEN ask for the email address on the following screen. At the very least, this should be an option for administrators who wish to use the add-on for added content...
 
Hello, @Sal Collaziano

It seems you are using the "Quick Registration Workflow", which allows users to post content and register based on that, being asked for the email at the time of posting instead of registration. The use-case you describe seems to be properly covered by the product if you disable Quick Registration Workflow - in this case users are not asked for additional information while creating the thread/post, and once the content is posted, they see the notice to register or login to activate their content. This mode is active on our demo board right now, feel free to test it at https://xf2.addonslab.com/index.php?forums/main-forum.2/ using Private Mode in your browser.

Just let us know if you have any other questions or suggestions.

Thank you!
 
Hello, @Sal Collaziano

It seems you are using the "Quick Registration Workflow", which allows users to post content and register based on that, being asked for the email at the time of posting instead of registration. The use-case you describe seems to be properly covered by the product if you disable Quick Registration Workflow - in this case users are not asked for additional information while creating the thread/post, and once the content is posted, they see the notice to register or login to activate their content. This mode is active on our demo board right now, feel free to test it at https://xf2.addonslab.com/index.php?forums/main-forum.2/ using Private Mode in your browser.

Just let us know if you have any other questions or suggestions.

Thank you!
Thank you. It's working exactly as I was hoping it would. I didn't realize that "quick registration workflow" brought the email request to the forefront...
 
Hey. It looks like an update is needed since the latest version of XenForo was released.

Here's what I get on the back end:

Server error log
  • ErrorException: [E_WARNING] array_key_exists() expects parameter 2 to be array, null given
  • src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php:33
  • Generated by: My Forum
  • Sep 12, 2019 at 10:15 PM
Stack trace
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] arr...', '/home/kiasporta...', 33, Array)
#1 src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php(33): array_key_exists('lastBuilt', NULL)
#2 src/XF/Pub/App.php(323): AddonsLab\GuestPosting\XF\Repository\ApprovalQueue->rebuildUnapprovedCounts()
#3 src/XF/Pub/App.php(190): XF\Pub\App->updateModeratorCaches()
#4 src/XF/App.php(2174): XF\Pub\App->start(true)
#5 src/XF.php(390): XF\App->run()
#6 index.php(20): XF::runApp('XF\\Pub\\App')
#7 {main}
Request state
array(4) {
["url"] => string(1) "/"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}




...and here's what I get on the front end:

An exception occurred: [ErrorException] [E_WARNING] array_key_exists() expects parameter 2 to be array, null given in src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php on line 33
  1. XF::handlePhpError()
  2. array_key_exists() in src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php at line 33
  3. AddonsLab\GuestPosting\XF\Repository\ApprovalQueue->rebuildUnapprovedCounts() in src/XF/Pub/App.php at line 323
  4. XF\Pub\App->updateModeratorCaches() in src/XF/Pub/App.php at line 190
  5. XF\Pub\App->start() in src/XF/App.php at line 2174
  6. XF\App->run() in src/XF.php at line 390
  7. XF::runApp() in index.php at line 20


If I disable the add on, the site comes back up and works fine - until somebody tries to post as a guest... Any solution would be appreciated...

Thank you!
 
Last edited:
Hey. It looks like an update is needed since the latest version of XenForo was released.

Here's what I get on the back end:

Server error log
  • ErrorException: [E_WARNING] array_key_exists() expects parameter 2 to be array, null given
  • src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php:33
  • Generated by: My Forum
  • Sep 12, 2019 at 10:15 PM
Stack trace
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] arr...', '/home/kiasporta...', 33, Array)
#1 src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php(33): array_key_exists('lastBuilt', NULL)
#2 src/XF/Pub/App.php(323): AddonsLab\GuestPosting\XF\Repository\ApprovalQueue->rebuildUnapprovedCounts()
#3 src/XF/Pub/App.php(190): XF\Pub\App->updateModeratorCaches()
#4 src/XF/App.php(2174): XF\Pub\App->start(true)
#5 src/XF.php(390): XF\App->run()
#6 index.php(20): XF::runApp('XF\\Pub\\App')
#7 {main}
Request state
array(4) {
["url"] => string(1) "/"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}




...and here's what I get on the front end:

An exception occurred: [ErrorException] [E_WARNING] array_key_exists() expects parameter 2 to be array, null given in src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php on line 33
  1. XF::handlePhpError()
  2. array_key_exists() in src/addons/AddonsLab/GuestPosting/XF/Repository/ApprovalQueue.php at line 33
  3. AddonsLab\GuestPosting\XF\Repository\ApprovalQueue->rebuildUnapprovedCounts() in src/XF/Pub/App.php at line 323
  4. XF\Pub\App->updateModeratorCaches() in src/XF/Pub/App.php at line 190
  5. XF\Pub\App->start() in src/XF/App.php at line 2174
  6. XF\App->run() in src/XF.php at line 390
  7. XF::runApp() in index.php at line 20


If I disable the add on, the site comes back up and works fine - until somebody tries to post as a guest... Any solution would be appreciated...

Thank you!
Perhaps nobody has upgraded?
 
AddonsLab updated Guest Posting for XenForo 2.x by AddonsLab with a new update entry:

Dependency added: [AL] Core Package and a fix for XenForo 2.1.2+

This is a minor release, that changes the way the add-on is using some of our shared PHP classes. From now on, the add-on will require a core library package from https://xenforo.com/community/resources/al-core-package.7382/ to be installed. Please download the package and install it before upgrading the add-on. Please upgrade all other AddonsLab add-ons you are using to their latest versions if you see an error in the Admin Panel about files with unexpected content.

The release...

Read the rest of this update entry...
 
There's a guy in America - let's call him "John". He found a way to be offended by guest posts. Is there a way to hide guest posts from specific usergroups - or anything like that? The direction the world is going where everyone is offended by everything tells me that this will be a much needed feature, if it's not a capability already included...
 
There's a guy in America - let's call him "John". He found a way to be offended by guest posts. Is there a way to hide guest posts from specific usergroups - or anything like that? The direction the world is going where everyone is offended by everything tells me that this will be a much needed feature, if it's not a capability already included...

Please confirm, if you mean to hide the posts, that were made by guests who never registered, so they are still posts from unregistered users, or even the ones that posted and registered later?
 
Please confirm, if you mean to hide the posts, that were made by guests who never registered, so they are still posts from unregistered users, or even the ones that posted and registered later?
It seems a few people (there actually is more than one) feel guests should not be allowed to post without signing up for the community. It's a long story. But I'd like to hide guest posts from people who feel this way... If those guests register and are then listed under a username - those guest posts WOULD be seen by members who've chosen to NOT see guest posts. Does that make sense?
 
It seems a few people (there actually is more than one) feel guests should not be allowed to post without signing up for the community. It's a long story. But I'd like to hide guest posts from people who feel this way... If those guests register and are then listed under a username - those guest posts WOULD be seen by members who've chosen to NOT see guest posts. Does that make sense?

Sure, it is clear. In general, the add-on is meant to promote registrations, not to promote posting on a forum and leaving. In its default configuration, it does not publish these guests posts and deletes them after some time. We will, of course, try to help you as soon as possible, but you may also reconsider not publishing posts of guests who don't register, as these posts are in most cases not valuable for a community (of course, this could be different in your case).

Thank you!
 
Sure, it is clear. In general, the add-on is meant to promote registrations, not to promote posting on a forum and leaving. In its default configuration, it does not publish these guests posts and deletes them after some time. We will, of course, try to help you as soon as possible, but you may also reconsider not publishing posts of guests who don't register, as these posts are in most cases not valuable for a community (of course, this could be different in your case).

Thank you!
Thank you. Yes, these guests posters sign up about half the time. MOST of the time, those who don't - actually post good questions - and SOME of the time, they actually provide assistance (answer questions, etc). It's been a really positive feature for me. Perhaps some people feel slighted that they had to sign up and "give up" their email address - while others did not. I don't know. Whatever the case, it would be nice if I could create a user group that never saw guest posts...
 
C/P from another thread.

@Xon
Some errors. I will tag also @AddonsLab because their addon is related in error too.

Code:
Server error log
ErrorException: Template error: Method canTriggerCacheUpdate is not callable on the given object (SV\BookmarkEssentials\XF\Entity\Post) src/XF/Template/Templater.php:999
Generated by: Unknown account 11.11.2019. at 21:27
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canTrigg...', '/home/nginx/dom...', 999, Array)
#1 src/XF/Template/Templater.php(999): trigger_error('Method canTrigg...', 512)
#2 internal_data/code_cache/templates/l1/s1/public/post_macros.php(467): XF\Template\Templater->method(Object(SV\BookmarkEssentials\XF\Entity\Post), 'canTriggerCache...', Array)
#3 src/XF/Template/Templater.php(706): XF\Template\Templater->{closure}(Object(SV\BookmarkEssentials\XF\Template\Templater), Array, Array)
#4 internal_data/code_cache/templates/l1/s1/public/thread_view.php(661): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#5 src/XF/Template/Templater.php(1320): XF\Template\Templater->{closure}(Object(SV\BookmarkEssentials\XF\Template\Templater), Array)
#6 src/addons/AddonsLab/GuestPosting/XF/Template/Templater.php(67): XF\Template\Templater->renderTemplate('thread_view', Array, true)
#7 src/XF/Template/Template.php(24): AddonsLab\GuestPosting\XF\Template\Templater->renderTemplate('public:thread_v...', Array)
#8 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#9 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#10 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#13 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#14 src/XF.php(391): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
Request state
array(4) {
  ["url"] => string(50) "/threads/opcenito-o-rolama-savjeti-i-iskustva.701/"
  ["referrer"] => string(23) "https://www.google.com/"
  ["_GET"] => array(1) {
    ["/threads/opcenito-o-rolama-savjeti-i-iskustva_701/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
None of my add-ons add or use the method canTriggerCacheUpdate, so it is likely a bug in another add-on.
 
Hi,

Before using this plugin I had the default Xenforo guest posting enabled, and the orange "Post Thread..." button was displayed on the forum homepage to guests. With your plugin enabled there is no more "Post Thread..." button on the forum homepage for guests. Is there anyway I can get this to display again?

Thankyou!
 
AddonsLab updated Guest Posting for XenForo 2.x by AddonsLab with a new update entry:

"Post thread…" not shown on the home page

The release fixes permission checks for guests users showing them the button " Post thread…" on the home page if thread guest posting is enabled.

The new version is available for all licensed customers at

Thank you!

Read the rest of this update entry...
 
Top Bottom