Resource icon

Mandatory Location 1.3.3

No permission to download
Hey @ceribik Thanks for taking the time to make this work with honeypot. But I just upgraded and now I get a 500 server error. Heres the log:

Error Info
ErrorException: Fatal Error: syntax error, unexpected '7' (T_LNUMBER), expecting function (T_FUNCTION) -library/MandatoryLocation/ControllerPublic/MandatoryLocation.php:8
Generated By: Unknown Account, 3 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(38) "http://www.trailpeople.org/login/login"
["_GET"] => array(1) {
["/login/login"] => string(0) ""
}
["_POST"] => array(5) {
["login"] => string(0) ""
["register"] => string(1) "1"
["cookie_check"] => string(1) "1"
["redirect"] => string(1) "/"
["_xfToken"] => string(8) "********"
}
}
 
Hey @ceribik Thanks for taking the time to make this work with honeypot. But I just upgraded and now I get a 500 server error. Heres the log:
I've pushed an update that fixes this. Alternatively, you can just replace "library/MandatoryLocation/ControllerPublic/MandatoryLocation.php"
 
Yup, just installed it. The error is gone and I'm not sure if this is something that you could fix but honeypot doesn't include a location field. It has to be added but after splicing the location field into the form and then registering the location isnt anywhere to be found. Is that somthing Tenants would need to do?
 
Yup, just installed it. The error is gone and I'm not sure if this is something that you could fix but honeypot doesn't include a location field. It has to be added but after splicing the location field into the form and then registering the location isnt anywhere to be found. Is that somthing Tenants would need to do?
Are you saying there is no location field on the registration form? It should be added by my addon automatically.

Edit: Does honeypot use a different registration form template? @tenants
 
Ooops. Sorry. Disregard last post. All is working perfectly. Awesome. Nice work man. This is really useful for people that are using the member map addon.


Oh and yes his addon uses a different registration form.
 
Are you saying there is no location field on the registration form? It should be added by my addon automatically.

Edit: Does honeypot use a different registration form template? @tenants

Nope, it uses the core template modifications on the template "register_form", so if you have also added it to the same template (TMS or other method), there should be no conflict

upload_2014-4-10_13-25-5.webp



FBHP uses regular expression to pinpoint the exact node and field to replace, so other fields can be added else where in the template without issue
Code:
#<fieldset[^>]*>[^<]*<dl[^>]*>[^<]*<dt[^>]*>[^<]*<label for="ctrl_password.+ctrl_password(.*?)</fieldset>#siu


There is an option to use a different template, but this is un-ticked by default (and only needs to be ticked if there are conflicts with other add-ons, which should never really be the case), @russoroni may need to untick this option (if they have it ticked)
 
Last edited:
It looks like you are using Simple Replacement to search and replace this:
Code:
<xen:include template="helper_birthday_row_register" />

That's fine, fbhp leaves this completely intact in the register_form template when used with template modifications

And from a quick test, it looks like the template modifications should be compatible

upload_2014-4-10_13-44-28.webp
 
Last edited:
Hi Ceribik,

Great add-on - thanks :)

Is there any way to be able to force people that have already registered to set a location at all?? Because of a buy/sell forum, it would be beneficial to force people to set a location, meaning that others have a clue as to where they are :)

Thanks
Paul
 
Hi Ceribik,

Great add-on - thanks :)

Is there any way to be able to force people that have already registered to set a location at all?? Because of a buy/sell forum, it would be beneficial to force people to set a location, meaning that others have a clue as to where they are :)

Thanks
Paul
There is no built in function for this, but it already is possible in a way. There is a criteria for no location set, so you could use that with another plugin that allows you to use criteria in this way
 
Actually - to update.... Fresh install of latest version yesterday - however location does not appear on new user registration form, so therefore as it doesn't appear, you cant continue as it says you must have put in location info......but it's not on the form.... :(
 
Actually - to update.... Fresh install of latest version yesterday - however location does not appear on new user registration form, so therefore as it doesn't appear, you cant continue as it says you must have put in location info......but it's not on the form.... :(
Are you using any addons that modify the registration forum?
 
I'm getting the same error repeated over and over in my logs:

ErrorException: Fatal Error: Call to undefined method XFCP_MandatoryLocation_ControllerPublic_MandatoryLocation::_getRegistrationDataFromInput() - library/MandatoryLocation/ControllerPublic/MandatoryLocation.php:10
Generated By: Unknown Account, Saturday at 02:15
Code:
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Code:
array(3) {
["url"] => string(39) "http://hondakarma.com/register/register"
["_GET"] => array(1) {
["/register/register"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
Top Bottom