User map [Deleted]

The template mod was working correctly with an earlier version of UIX btw, I think 1.5.9. I'll have a look also.

Also @CrispinP another suggestion, if we can have a configurable active member filter it would be great ie filter out members who have not logged in for x days. Ideally a front end filter (show active members in last xx days) but failing that a backend global value would be a good start with a checkbox much like we have today.

As for the opt-in for auto location via GeoIP or AGPS or whatever, it would be along the following lines, I'm still thinking of a better way of doing this:

1. New checkbox on registration page (checked off by default) - can the board use your IP to locate you
2. New profile checkbox - same as above

New option in ACP to 'prefer Location field' or 'prefer GeoIP' or both (with geoip as fallback).

Mass update change to pull GeoIP for profiles that have opted in without clicking on current GeoIP checkbox.
 
Last edited:
Yes, as Freelancer said, he too has issues with it. There's something wonky with how the replace is done. I'll see if I can work it out again. Without buying the add-on it's hard to get right. The dev did not reply to an email either. :(


That should be straightforward. There is already an option for someone to remove themselves all together.

I've started making some changes to the filter thing - should encompass most of the functionality and them some.


C

Hey boss, any progress with this? Itching to use the filters and messaging options but waiting on the updates. :)
 
@ichpen

I fixed this and wrote @CrispinP in a private convo what he has to change.

So, to wrap this up and give you some thoughts/inspiration to improve this for UI.X users I have summarized the following insights:

"message_user_info"
template mod does not work with UI.X (the way it is now). Better use the following in the "find":
Code:
<xen:if is="@messageShowLocation AND {$user.location}">
<dl class="pairsJustified">
<dt>{xen:phrase location}:</dt>
<dd><a href="{xen:link 'misc/location-info', '', 'location={xen:string censor, $user.location, '-'}'}" target="_blank" rel="nofollow" itemprop="address" class="concealed">{xen:string censor, $user.location}</a></dd>
</dl>
</xen:if>
...and replace it with
Code:
$0
<xen:include template="crispin_usermap_mmessage_user_info" />
In THIS way it is not used by any other add-on on the market and is the same for default and UI.X style PLUS it makes sense to have a map link directly under the location entry...

bildschirmfoto-2017-03-10-um-15-59-31-jpg.149631


Please integrate this in a future update! :)

"crispin_usermap_mmessage_user_info" template: I took the freedom and "cleaned up" that template a little for the better of it. Maybe you can find this useful.

Default:
Code:
<xen:if is="{$xenOptions.crispin_usermap_show_on_user_info} AND {$user.customFields.map_location}">
<dl class="pairsJustified userField_map_location">
<dt>Map</dt>
<xen:if is="{$xenOptions.crispin_usermap_use_fontawesome}">
<dd><a href="usermap?viewuser={$user.user_id}" id="fld_map_location"><i class="fa fa-map info_extra_fa"></i></a></dd>
<xen:else/> 
<dd><a href="usermap?viewuser={$user.user_id}" id="fld_map_location"><i>{xen:phrase crispin_usermap_mi_view_me}</i></a></dd> 
</xen:if>
</dl>
</xen:if>
Modded:
Code:
<xen:if is="{$xenOptions.crispin_usermap_show_on_user_info} AND {$user.customFields.map_location}">
<dl class="pairsJustified userField_map_location">
<dt>Member Map:</dt>
<xen:if is="{$xenOptions.crispin_usermap_use_fontawesome}">
<dd><a href="usermap?viewuser={$user.user_id}" id="fld_map_location" class="concealed"><i class="fa fa-map-marker info_extra_fa" style="margin-right: 2px;"></i>{xen:phrase crispin_usermap_mi_view_me}</a></dd>
<xen:else/> 
<dd><a href="usermap?viewuser={$user.user_id}" id="fld_map_location" class="concealed"><i></i>{xen:phrase crispin_usermap_mi_view_me}</a></dd> 
</xen:if>
</dl>
</xen:if>
...coming with corrected HTML and "concealed" classes, which are true for the default style.
 
with debug on. I'm getting this error on member profile pages

Template Errors: member_view
  1. Missing argument 2 for Crispin_UserMap_Model_UserMaps::getSettings(), called in /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/Crispin/UserMap/Listener.php on line 36 and defined in /var/www/vhosts/myste.co.uk/httpdocs/forum/library/Crispin/UserMap/Model/UserMaps.php, line 194:
    193: ';
    194: if ($xenOptions['enableTrophies'])
    195: {
 
Tried a fresh install of 3.8 on my XAMPP development environment and got this Server Error:

Code:
Server Error
Mysqli statement execute error : Field 'sedo_perms_input_val' doesn't have a default value

Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1638
XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1627
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
XenForo_DataWriter->save() in Crispin/UserMap/Install/Base.php at line 35
Crispin_UserMap_Install_Base::install() in XenForo/Model/AddOn.php at line 211
XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 188
XenForo_ControllerAdmin_AddOn->actionInstall() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /Applications/XAMPP/xamppfiles/htdocs/xenforo/admin.php at line 13

I am guessing that "Field 'sedo_perms_input_val' doesn't have a default value" just means it doesn't even exist (yet).
 
Suffering <what did Elma Fudd say?>

Sorry folks, I've been away on work and only just seen this. Oddly, I don't get any emails when there is a reply...

Anyhow...
Quite update -

I've ripped out the Show Me On Map stuff and redoing it in the privacy section. There is that and a few more options to add to it. Some small issues to work out but it's much better than it was.

Also @CrispinP another suggestion, if we can have a configurable active member filter it would be great ie filter out members who have not logged in for x days. Ideally a front end filter (show active members in last xx days) but failing that a backend global value would be a good start with a checkbox much like we have today.
Nice idea, I've added it in and it works. In ACP you can specify only show members who have been seen n-days ago.
I'll look at putting in the front-end as well if there is sufficient demand for it?

New option in ACP to 'prefer Location field' or 'prefer GeoIP' or both (with geoip as fallback).
Taken care of by the up-coming changes. :)


with debug on. I'm getting this error on member profile pages

Template Errors: member_view
  1. Missing argument 2 for Crispin_UserMap_Model_UserMaps::getSettings(), called in /var/www/vhosts/mysite.co.uk/httpdocs/forum/library/Crispin/UserMap/Listener.php on line 36 and defined in /var/www/vhosts/myste.co.uk/httpdocs/forum/library/Crispin/UserMap/Model/UserMaps.php, line 194:
    193: ';
    194: if ($xenOptions['enableTrophies'])
    195: {
Which version are you using?

Mysqli statement execute error : Field 'sedo_perms_input_val' doesn't have a default value
I've no idea what that is. I don't have any field called that. It looks like it's erroring when the datawriter saves but that also triggers all over add-ons to write. Try disabling them all and see?

I appreciate the work you've put in, I was also interested in hearing when the next release would be as @CrispinP mentioned it was imminent (with a bunch of rework of the radius functionality etc etc). Haven't heard a peep since.
Hoping to get this update out soon. I broke the version with the slider stuff on unfortunately so cannot send you that one either. Should be by the weekend hopefully. :)


C
 
Quick update:
It's looking quite good I think with the privacy settings and the new user control.
Last bit of functionality about to be put in and then testing the new bits.

If work does not get in the way too much then there should be an update this week.
It's been a rather interesting couple of weeks at work with failed servers. Lots of late nights :(


Will update soon.
Any alpha testers willing to try an early version?
 
Go ahead.
You're a given ;)
Thanks, will send through something soon.


By the way, although watching this thread I did not get ANY alerts of new posts here... and it seems that others have this problem too...
This happens to me too.
I know sometimes I read the email and then never actually click on the thread to mark it as read. When that happens it'll not email you again.


C
 
Hi, I've installed this and I think I have the api keys set correctly now, but I get the error below and on all of the computers I have tried. If I refresh the page over and over every now and then its slow enough where to I can see the goggle map come up, but then it turns to the grey screen below after the page fully loads. It's trying to embed the map, but then it goes blank before it can finish.

XenForo - 1.5.13
PHP - 7.1.3
SQL - 5.6.33


Untitled.webp
 
That's normally because the browser key is wrong. In Chrome, go there and press F12 and then select Console tab. Anything red in there?


C
 
Whenever I click on a members name the below error page comes up. Is this because you stripped out all of the privacy stuff? It crashes everyone's profile page, etc.

An exception occurred: Too few arguments to function Crispin_UserMap_Model_UserMaps::getSettings(), 1 passed in /home/me/public_html/library/Crispin/UserMap/Listener.php on line 36 and exactly 2 expected in /home/me/public_html/library/Crispin/UserMap/Model/UserMaps.php on line 194

Crispin_UserMap_Model_UserMaps->getSettings() in Crispin/UserMap/Listener.php at line 36
Crispin_UserMap_Listener::template_hook_members_view() in XenForo/CodeEvent.php at line 58
XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 285
XenForo_Template_Abstract->callTemplateHook() in XenForo/Template/Abstract.php(265) : eval()'d code at line 1788
eval() in XenForo/Template/Abstract.php at line 265
XenForo_Template_Abstract->_renderInternal() in XenForo/Template/Abstract.php at line 191
XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 110
XenForo_Template_Public->render() in XenForo/ViewRenderer/HtmlPublic.php at line 124
XenForo_ViewRenderer_HtmlPublic->renderContainer() in XenForo/FrontController.php at line 639
XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
XenForo_FrontController->run() in /home/me/public_html/index.php at line 13

Then here is the full error in the server log
Code:
Error Info
Too few arguments to function Crispin_UserMap_Model_UserMaps::getSettings(), 1 passed in /home/me/public_html/library/Crispin/UserMap/Listener.php on line 36 and exactly 2 expected - library/Crispin/UserMap/Model/UserMaps.php:194

Stack Trace
#0 /home/me/public_html/library/Crispin/UserMap/Listener.php(36): Crispin_UserMap_Model_UserMaps->getSettings(1)
#1 /home/me/public_html/library/XenForo/CodeEvent.php(58): Crispin_UserMap_Listener::template_hook_members_view('member_view_tab...', '', Array, Object(XenForo_Template_Public))
#2 /home/me/public_html/library/XenForo/Template/Abstract.php(285): XenForo_CodeEvent::fire('template_hook', Array, 'member_view_tab...')
#3 /home/me/public_html/library/XenForo/Template/Abstract.php(265) : eval()'d code(1788): XenForo_Template_Abstract->callTemplateHook('member_view_tab...', '', Array)
#4 /home/me/public_html/library/XenForo/Template/Abstract.php(265): eval()
#5 /home/me/public_html/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('$__output = '';...', Array)
#6 /home/me/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#7 /home/me/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(124): XenForo_Template_Public->render()
#8 /home/me/public_html/library/XenForo/FrontController.php(639): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#9 /home/me/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#10 /home/me/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}

Request State
Array
(
    [url] => http://mydomain.com/members/admin.1/
    [_GET] => Array
        (
        )

    [_POST] => Array
        (
        )
)
.
 
Last edited:
Top Bottom