Google Member Map

Started by vbgamer45, December 29, 2016, 12:59:42 PM

Previous topic - Next topic

Matthias

Quote from: Arantor on April 09, 2022, 08:47:02 AMYou can't use , to join things when you're not using echo, and that also messed with the ternary expressions.

Untested but I think you need this:

$datablurb .= '
<h4>
' . ($context['can_send_pm'] ? '<a href="' . $marker['online']['href'] . '" title="' . $marker['online']['text'] . '">' : '') . ($settings['use_image_buttons'] ? '<span class="' . ($marker['online']['is_online'] == 1 ? 'on' : 'off') . '" title="' . $marker['online']['text'] . '"></span>' : $marker['online']['label']) . ($context['can_send_pm'] ? '</a>' : '') . '
</h4>';

Great, now the gray and green circle (online - offline) is displayed correctly. But there is no link to send pm.
In the error log is the following:
Undefined index: can_send_pm
Undefined index: member

Probably it has to do with this.
I have attached the GoogleMap.php file. The function it concerns starts at line 408.
It would be great if someone could help me.
Quality first

Matthias

@vbgamer45
I'm just going to speak directly to you. You have published the last version for 2.1.x. The mod can be installed, but partially does not work.
From you as a member of the Customizer team, I would find it quite good if the mods also work and not only for the corresponding SMF version would be installed.

I hope you know what I mean. No hard feelings.
Quality first

vbgamer45

It was tested up to 2.1 RC3 have not tested or updated it to the latest 2.1 version.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Matthias

@Arantor
May I ask you again:

The original code taken from Display.template.php is this:

// Any custom fields to show as icons?
if (!empty($message['custom_fields']['icons']))
{
echo '
<li class="im_icons">
<ol>';

foreach ($message['custom_fields']['icons'] as $custom)
echo '
<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';

echo '
</ol>
</li>';
}

I have changed it to this:
// Any custom fields to show as icons?
if (!empty($marker['custom_fields']['icons']))
{
$datablurb .= '
<li class="im_icons">
<ol>';
foreach ($marker['custom_fields']['icons'] as $custom)
$datablurb .= '
<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
$datablurb .= '
</ol>
</li>';
}
Then a white page is displayed.

Changed it to this:
<li class="custom ' . $custom['col_name']. '">' . $custom['value'] . '</li>';

Then the page is displayed, but custom fields are not. I'm sure it's just a small thing.
Thanks a lot for the help.
Quality first

GL700Wing

Are you sure the columns "col_name" and "value" in the array "$marker['custom_fields']['icons']" actually contain data?
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Matthias

Yes, I have checked that.
Quality first

Arantor

The issue is exactly as I said before, you can't use , when you're not using echo. In this case replace the commas with the dot symbol. (Dot means "join two strings together".)
Holder of controversial views, all of which my own.


Matthias

Ok, but I think that's what I did.
<li class="custom ', $custom['col_name'], '">', $custom['value'], '</li>';
to this:
<li class="custom ' . $custom['col_name']. '">' . $custom['value'] . '</li>';
There are no error messages.

After all, I'm trying to learn something too....
Quality first

Arantor

I don't know the mod, I have no idea what code is what any more, but you cannot just grab pieces of code from one section and push them in another and hope it will work, that's just not how this works.
Holder of controversial views, all of which my own.


Doug Heffernan

Quote from: Matthias on April 11, 2022, 02:08:40 PMAfter all, I'm trying to learn something too....

Congratulations. As that saying goes, give a man a fish and you feed him for a day, teach a man to fish and you feed him for a lifetime.

That is the best way to go about learning imo, by practicing. Do not get discouraged if you get things wrong at the begining, or if you run into difficulties. That is all part of the learning curve.

 

Matthias

#251
I have revised the mod to work with 2.1.1.
The template was not responsive, I have also adjusted that.



Attention:
The mod does not work with the pins for male and female.
"Should the pins reflect members gender" must necessarily be turned off, otherwise no pins are displayed at all. Everything else works.

Programming this is not that easy. The Gender field is no longer a fixed field.
There should then be a dropdown list in the settings for the mod where you select the field for the gender. Read out the entries in the field and build them in accordingly. Maybe someday...
Quality first

Matthias

There was a little coding error at the template file. I have corrected this and attached the file.
Quality first

si-biest

Is it possible to add a pin to a map with a name that is not attached to an account on the forum, if possible, how?

lather

Is it possible to add a second instance of Google Member Map to my forum? Our club is a touring club and I would like to make a map showing the locations of our annual gatherings but I want to keep our member map.

Thanks!

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

4.0
+Added support for SMF 2.1 thanks to Matthias @Matthias
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Shades.

SMF 2.1.2
MemberMap 4.0

Working good all except...

The map is outside/below the bottom border. To fix...

In GoogleMap.template find/change (line 46):
<div id="map" style="width: auto; height: 500px;"></div>

To:
<div id="map" style="width: auto; height: 485px;"></div>

You cannot view this attachment.

Also in members profile the location box is useless, at least for me! If it can't be fixed/used how can I remove it?

You cannot view this attachment.

Other than that good job and thanks! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Michael Vail

I'm gonna test this mod out in the next few days. Thank you very much to vbgamer45 for making it and to everyone for all the work updating it. 

I just wanted to let vbgamer45 know the main mod page description info is out of date and needs to be updated for the updates in compatibility.

Thanks again!

Shades.

When uninstalling there is an error that says:

Quote./Themes/default/scripts/markerclusterer_packed.js   File not found

There is no "markerclusterer_packed.js" but there is a "markerclusterer_compiled.js"!
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: