Google Member Map

Started by Spuds, December 12, 2007, 01:49:12 PM

Previous topic - Next topic

luuuciano

No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).


MiY4Gi

I think he's saying they were abducted and shipped to Africa.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

none_free

Hi!

I want to use the Google Member Map mod with the Menu Icons mod.
This mod installs a set of icons on your SMF menu.

To use it with the Google Member Map I've to find the location (file) where it puts the information to the menu.
A question in the Menu Mod board returned the following answer:

Quote from: none_free on May 06, 2013, 03:13:19 PM
Quote from: Mick. on December 13, 2010, 05:21:32 PM
For those using mods like: gallery, arcade, etc..


Open:
/Sources/Subs.php

For SMF Gallery mod:

Find:
'title' => $txt['smfgallery_menu'],

Replace with:
'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/yourimage.png" alt="'.$txt['smfgallery_menu']. '"/>&nbsp; ' . $txt['smfgallery_menu'],



[...]

Hi,

I'm using the Gallery mod and the changes I made doing very well.

I'm using the Google Member Map mod too.

I'm not really familar with the internal structure of the SMF.
Could someone tell where to find the place to make this mod with the Menu Icons mod working?
I searched in the Subs.php but there is nothing.

Any help?

Jens
Quote from: Kindred on May 06, 2013, 03:20:56 PM

the main menu array is present in Subs.php, as indicated.
Adding additional images for mod-specific menu items would be done the same way that you quoted.... for each and every mod that adds itself to the main menu array.

The exception to that would be mods which use the menu hook to add themselves into the main menu rather than the direct code edits...  in which case, you would need to ask in the support thread for that specific mod, to find out which file contains the insert menu item hook code.
Quote from: Mick. on May 06, 2013, 03:25:27 PM
Correct. The Google Member Map uses 'hooks' in which i dont know which file the button was added.

What's to do?

Jens

none_free

I found it!

It's the GoogleMapIntegration.php file.
There I've to change following line:
Quote'title' => '<img align="absMiddle" src="'. $settings['images_url']. '/menu_icons/icon.png" alt="'.$txt['googleMap']. '"/>&nbsp; ' . $txt['googleMap'],
and add the global line the Settings variable.
Quoteglobal $txt, $scripturl, $modSettings, $settings;

Even it works now, I dont know if it's maybe a security risk to add the $Settings string to the line beginning with global. I've absolutely no knowledge about php...

Does anybody knows if it's dangerous?

Jens

Kindred

no, it should be fine. The only reason it was not called originally wasd because it was not needed for the code that was there
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

none_free

Quote from: Kindred on May 07, 2013, 01:29:07 PM
no, it should be fine. The only reason it was not called originally wasd because it was not needed for the code that was there

Thank you very much!

Jens

none_free

Hello,

I tested the mod on my test- and integration environment with success.
But on my identical live Systems it wont.
I can see the menu and I see also the map. But I can't place a pin.
I my Profile, the map isn't visible (click picture).



In the Apache log is nothing to see.
Is there another log file available?

What's to do?
Any help is appreciated!

Jens

Kindred

I suspect a missing or conflicting javascript
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

none_free

#1709
The JavaScript package is on the server installed.
How to check it works or version number?

Jens

Edit:
QuoteJavaScript is also the client side - isn't it?
The member map on the test- and integration system runs fine. The mod on the live system will not. Even if I use the same browser instance for test....

Kindred

when I said conflicting javascript I meant that there is some other script which is conflicting with the googlemap script.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

none_free

Hmmm - how to determine which other one is it?
The test- and integrationsystem is installed with exact the same modifications and Settings.

Jens

Kindred

use firefox + firebug and use the script debugger...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

none_free

Looks like a kinda magic...
I downloaded Firefox and checked the site and everything was fine.
I checked it again with Internet Explorer and everything is fine to...!!!

Maybe there was a cache thing or similar?

I don't know but I'm happy it works now  :)

Jens

MiY4Gi

#1714
I've managed to get the Google Map on the Registration page of my forum . To implement it I made a large amount of edits (1-2 lines of code in about 8 files), some of which were probably not necesssary, so I'm planning on reversing the edits to see which of them are needed, after which I'll post the necessary code here.

Once I'm done with that I'm planning to mod the map so that SMF pulls the location (i.e. country, city, suburb, etc) from the map and assigns it to a specified profile field (probably not the location field since I'd rather leave that as is).  From there on, you can serve content to users based on their Location. I also plan to enable members to join membergroups (or "mini-clubs") by clicking on "Membergroup pins" on the map.

I intend to implement quite a few features in the Member Map, so check back here often if you would like the code changes needed for those features.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

Kindred

Hi MiY4Gi,

Sinec this mod is released under the BSD license, then there is no problem at all with modding and releasing updates.

If you are making major updates and creating your own "package" for it, I would ask that you please submit it for review as a mod of your own rather than using this thread to make releases and support. :) (Just make sure that the BSD license requirements are met)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MiY4Gi

They won't really be major updates, just additional features. I'm not really familiar with the different licenses, but are you saying that there are some free mods at SimpleMachines.org that disallow you from editing the code of the mod, or sharing it? Mm, I guess next time I should scrutinize the license before sharing the code. Well, there are some programs that disallow you from making any changes to it, but I generally only use open source software. Oh, and I don't really know how to package mods (I don't even know how to make database calls) so for now I'll just stick to posting code changes. Once someone decides to update the mod, he can implement the code and he doesn't even need to notify me, or mention me in the mod. I'm not particularly fussy about receiving credit for it - I just thought someone else might find it useful, although it is nice when people thank you.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

Arantor

Quotebut are you saying that there are some free mods at SimpleMachines.org that disallow you from editing the code of the mod, or sharing it?

Yes. Unless the mod's page or author has explicitly said so by stating a suitable licence, you don't have the rights to redistribute a modified version.

If a mod does state a licence, the licence will dictate what the terms are in terms of modification. Like my last mod had a licence that didn't permit derivative versions being produced without my specific permission.
Holder of controversial views, all of which my own.


Kindred

MiY4Gi,

Quote
that disallow you from editing the code of the mod, or sharing it?
no and yes...
Once you download the mod for your own use (from SMF's customization size) you can  edit it to your heart's content for your own use.
Unless the mod is Creative Commons, BSD, MIT, or one of the other (fully open) license's you are not allowed to redistribute the mod or any variations of it.
(and basically, anything without a specified license must be assumed to be a fully restrictive license)
(something can still be open source without being distributable (like SMF 1.1.x))


And we all do appreciate folks who make mods and those who make (and share) tweaks to mods. :)
If you are interested, there are instructions making mods floating around here somewhere. :)
(and for database calls look at the smcFunc calls in an existing mod)
(actually, that's the way I learned to write mods entirely - look at a few existing mods and figure out the instruction set for the installation files (usually install.xml for code instructions, usually install.php for the create database stuff and the other xml for telling the package manager what to run during the install)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MiY4Gi

I see, thanks. Everything's clearer now. How does one go about licensing code? Is just stating the license sufficient for it to be under that license, or must you fill out forms and submit an application to a certain company or website?

Cool, I should'a thought of looking inside a packaged mod for hints. I'll probably check out the install.xml and install.php files of a few of the mods I got, over the weekend or next weekend, just to give me an idea about how all the code fits together. I'll also check out that smcFunc function you mentioned. Probably won't do it tomorrow though. Far too busy. 
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

Advertisement: