Advanced Application Forms for XenForo 1.x [Deleted]

I'll check on the PM problem tomorrow.

I'll put your suggestions on the wish list.

But I do have one question. How do you know a poll has reached a conclusion if it doesn't run for a certain period of time?

That was fast with the smaller suggestens, thanks :)

As a quickfix for me only i modified the sql wich checks if the Poll is finisched that it looks for certain prefix ID's for the thread of the poll so it looks if the thread has certain prefixes (for the quickfix "accepted" or "denied" with other prefixes nothing happens).

Prefixes are also the best suggestion for this "flag" that i have. Moderators can change the flag and it mostly uses features that are already there.

As Example: our manual process with the application forms we had in vbulletin was the following:

1. The created thread gets the prefix "new"
2. The discussion on the application and the voting occurs
2a. If the applicant withdraws the application before the discussion reached an end -> the thread gets the prefix "withdrawn" -> the application is canceld
3. If the discussion reached a conclusion the thread gets the one of the two prefixes "accepted" or "declined" and the applicant gets the information mail.



For the automated process the following 2 versions should work :

1. The short and easy way
  • You define a prefix for the thread when it is created (already there)
  • You have a list of prefix ids (maybe 4,5 for accepted, declined) wich signal the the process is at an end the cron-job should take the poll as finished und process the results as if the poll would have reached the end of the defined timeframe.
  • All other prefixes the thread has do not have any meaning for the process, the poll stays open.
2. the sophisticated way
  • You define a prefix for the thread when it is created (already there)
  • You define one prefixid wich stands for "canceled". In this case the poll is finished but no further action is taken, no pc's are send out.
  • You define one prefixid wich stands for "accepted". In this case the poll is finished and the application is taken as "accepted" even if the voting says otherwise. The voting in this case is only to help in the process of the discussion to reach a conlusion.
  • You define one prefixid wich stands for "declined". In this case the poll is finished and the application is taken as "declined" even if the voting says otherwise. The voting in this case is only to help in the process of the discussion to reach a conlusion.
In both cases if you do want the old way, that the poll ends when the time ends the fields for the prefix id's could be left blank.

My modified sql in the poll model class wich essentialy works like the "short and easy" way only with hardcoded thread ids:
Code:
SELECT
            xf_snog_applications_polls.app_pollid AS app_pollid,
            xf_snog_applications_polls.poll_id AS poll_id,
            xf_snog_applications_polls.posid AS posid,
            xf_snog_applications_polls.user_id AS user_id,
            xf_snog_applications_polls.promote_type AS promote_type,
            xf_snog_applications_polls.pollpromote AS pollpromote,
            xf_snog_applications_polls.poll_enddate AS poll_enddate,
            xf_snog_applications_polls.poll_reverse AS poll_reverse,
            xf_snog_applications_polls.orig_group AS orig_group,
            xf_snog_applications_polls.orig_additional AS orig_additional

            FROM xf_snog_applications_polls
            JOIN xf_poll ON xf_poll.poll_id = xf_snog_applications_polls.poll_id
            JOIN xf_thread ON xf_poll.content_id = xf_thread.thread_id
            WHERE
            xf_thread.prefix_id =3 OR xf_thread.prefix_id =7'
 
I really wasn't asking how to do it. I was asking how you know a poll has reached a conclusion. ;)

It looks like it's just a arbitrary decision on the part of whoever is viewing the poll.
 
Yes someone has the "right" to declare a poll/discussion as finished
OK, is that truly arbitrary or is the decision based on some criteria such as there are only 10 users that can vote and 6 have already voted?
 
OK, is that truly arbitrary or is the decision based on some criteria such as there are only 10 users that can vote and 6 have already voted?

For us it would be best if it is truly arbitrary when the voting is finished and even better if the poll is only informative in the decision making process because in polls you can not change your mind based on the discussion so it may be useful to be able to close the discussion with a differend outcome than the poll result represents.
If not everyone should be able to close it, it could only be allowed for one defined user per Form + all administrators as backup when this person is not available but that is not essential for us as all voters/users who can access the thread are "trusted".

But your other criteria may be useful for others.
 
For us it would be best if it is truly arbitrary when the voting is finished and even better if the poll is only informative in the decision making process because in polls you can not change your mind based on the discussion so it may be useful to be able to close the discussion with a differend outcome than the poll result represents.
If not everyone should be able to close it, it could only be allowed for one defined user per Form + all administrators as backup when this person is not available but that is not essential for us as all voters/users who can access the thread are "trusted".

But your other criteria may be useful for others.
This really sounds like something that is unique to your site and may or may not be useful to other sites.

I'd like to hear feedback from other users of the system about this.
 
Last edited:
I don't think it is that unique.

We are a Multiplayer Online Gaming Clan and the basic process for applicants is similar in most of the other ones i know, but i think most addons for forms are not flixible enougth to model the whole process.
This is the first addon i saw wich has this automatism for changing groups and notify the user. The others i new could only post the threads and polls but did not take it further.

Even if you would vote AFTER the discussion and not use the poll to get a quick overview what everyone thinks to quickly accept or decline those where everyone agrees (lets say 80%) and for the other 20% you maybe scedule a teamspeak-interview because there are differend opinions and you want to give the applicant another chance maybe because his initial application was a bit on the short side or you want to clarify something.

There are always corner cases where you need to be able to stop the automatism.

Maybe the applicant tells you that your answer was not fast enought and now he joined another clan because he could not wait half a day for your answer :eek: (yes that happens more often than one would think).
Then you do not want to let a positive poll go through, send him a pc that he is accepted, send another one, that you are sorry but you could not stop the automatism and tell your admin he has to remove the new member from the group he joint because the poll was positive an you could not change the outcome.
 
I think this conflicts with ******* credits when I try to click a member on the sidebar I get this instead of his usercard.

An exception occurred: Invalid argument supplied for foreach() in /home/website/public_html/library/*******/Credits/Listener/Listener.php on line 127

  1. XenForo_Application::handlePhpError() in *******/Credits/Listener/Listener.php at line 127
  2. *******_Credits_Listener_Listener::criteriaUser()
  3. call_user_func_array() in XenForo/CodeEvent.php at line 90
  4. XenForo_CodeEvent::fire() in XenForo/Helper/Criteria.php at line 383
  5. XenForo_Helper_Criteria::userMatchesCriteria() in Snog/Applications/Listener/NavTab.php at line 31
  6. Snog_Applications_Listener_NavTab::createTab()
  7. call_user_func_array() in XenForo/CodeEvent.php at line 90
  8. XenForo_CodeEvent::fire() in XenForo/Dependencies/Public.php at line 491
  9. XenForo_Dependencies_Public->_getNavigationContainerParams() in XenForo/Dependencies/Public.php at line 371
  10. XenForo_Dependencies_Public->getEffectiveContainerParams() in XenForo/FrontController.php at line 612
  11. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  12. XenForo_FrontController->run() in /home/website/public_html/index.php at line 13
 
I think this conflicts with ******* credits when I try to click a member on the sidebar I get this instead of his usercard.

An exception occurred: Invalid argument supplied for foreach() in /home/website/public_html/library/*******/Credits/Listener/Listener.php on line 127

  1. XenForo_Application::handlePhpError() in *******/Credits/Listener/Listener.php at line 127
  2. *******_Credits_Listener_Listener::criteriaUser()
  3. call_user_func_array() in XenForo/CodeEvent.php at line 90
  4. XenForo_CodeEvent::fire() in XenForo/Helper/Criteria.php at line 383
  5. XenForo_Helper_Criteria::userMatchesCriteria() in Snog/Applications/Listener/NavTab.php at line 31
  6. Snog_Applications_Listener_NavTab::createTab()
  7. call_user_func_array() in XenForo/CodeEvent.php at line 90
  8. XenForo_CodeEvent::fire() in XenForo/Dependencies/Public.php at line 491
  9. XenForo_Dependencies_Public->_getNavigationContainerParams() in XenForo/Dependencies/Public.php at line 371
  10. XenForo_Dependencies_Public->getEffectiveContainerParams() in XenForo/FrontController.php at line 612
  11. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  12. XenForo_FrontController->run() in /home/website/public_html/index.php at line 13
I'm unable to duplicate this.

Could you post all of your settings from ACP->Options->Application Forms AND the settings for your Application Types and Positions?
 
@turbos there is one thing you can try.

Edit library/Snog/Applications/Listener/NavTab.php

Locate this code...
Code:
foreach ($applications AS &$application)

And replace with this code...
Code:
foreach ($applications AS $application)

The ampersand doesn't belong there, but it really shouldn't cause an error. Maybe a warning, but not an error.
 
@turbos there is one thing you can try.

Edit library/Snog/Applications/Listener/NavTab.php

Locate this code...
Code:
foreach ($applications AS &$application)

And replace with this code...
Code:
foreach ($applications AS $application)

The ampersand doesn't belong there, but it really shouldn't cause an error. Maybe a warning, but not an error.

I removed the sidebar applications and left only the one in the navigation bar, everything working great now, thanks :)
 
Last edited:
Hi Snog - major problemo here,

The default moderator form that is included in the add-on throws this when I attempt to view the application form on the front-end:

Argument 1 passed to XenForo_Model_Forum::getAttachmentParams() must be an array, boolean given, called in .../library/Snog/Applications/ControllerPublic/Application.php on line 34 and defined
  1. XenForo_Application::handlePhpError() in XenForo/Model/Forum.php at line 464
  2. XenForo_Model_Forum->getAttachmentParams() in Snog/Applications/ControllerPublic/Application.php at line 34
  3. Snog_Applications_ControllerPublic_Application->actionForm() in XenForo/FrontController.php at line 347
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  5. XenForo_FrontController->run() in .../index.php at line 13
For privacy, I've replaced the root folder with ... above.

Secondly, I duplicated the moderator application, say Moderator2 Application, and the form is identical in nature and criteria, yet it will not show on the front-end - and I'm an administrator - only the default application form shows. Any ideas?

I've disabled all my add-ons except for this one and I still get the above problems. The disabled add-ons are:

applications_disabled_addons.webp
 
Last edited:
Hi Snog - major problemo here,

The default moderator form that is included in the add-on throws this when I attempt to view the application form on the front-end:

Argument 1 passed to XenForo_Model_Forum::getAttachmentParams() must be an array, boolean given, called in .../library/Snog/Applications/ControllerPublic/Application.php on line 34 and defined
  1. XenForo_Application::handlePhpError() in XenForo/Model/Forum.php at line 464
  2. XenForo_Model_Forum->getAttachmentParams() in Snog/Applications/ControllerPublic/Application.php at line 34
  3. Snog_Applications_ControllerPublic_Application->actionForm() in XenForo/FrontController.php at line 347
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  5. XenForo_FrontController->run() in .../index.php at line 13
For privacy, I've replaced the root folder with ... above.

Secondly, I duplicated the moderator application, say Moderator2 Application, and the form is identical in nature and criteria, yet it will not show on the front-end - and I'm an administrator - only the default application form shows. Any ideas?

I've disabled all my add-ons except for this one and I still get the above problems. The disabled add-ons are:

View attachment 70216


EDIT: I was able to get the duplicate application to appear - apparently there are two Criteria's that needed to be adjusted for both Types and Forms and I guess they can't be identical. However, the Moderator application still throws that error above... I'll just delete that application.
 
Is it possible for the Expected Answers in say a dropdown, to be separated by something else besides a comma? I'm trying to input timezones and a lot of them use commas... I could remove the commas, sure but I think it would make more sense if it used a more cryptic delimiter and not something so common, ya?
 
The reason the default application threw the error was most likely because the forum define in the default application didn't exist. That's why the README.txt file says you must set up the report type for the default application to work properly.

The criteria for the application type and the application form can be identical. Most likely you didn't give 'Administrators' permission to view one or both of them. Or you didn't meet the conditions to display the form.

For now, try using a dash in the time zones that use a comma. I'll put this on the wish list for the add-on.
 
Last edited:
I love your addon. What would I have to do to remove the large spacing between agreements?
KoWyn5Y.png
 
Back
Top Bottom