Location Mod

Started by Gobalopper, November 19, 2004, 01:43:12 AM

Previous topic - Next topic

kid astronaut

is it possible to take out the member flags entirely?
(and by this i mean just on the posts, not on the actual member map page.)

it seems to me like a bit cluttery to have the flag show every time you post... seems like a better place for it would be in the profile.

edi67

i repeat wonderful mod and correctly work

i have one question is possible have one flag to unknown nation IP ?
for example i have 7/8 users with LAN and IP unknown and i wanted put one flag specific for them

for example this IP: 174.6.52.212 is without flag for this mod. so i will had flag for this unknown ip

thx again Gobalopper for mod
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Slack

Quote from: Gobalopper on January 18, 2005, 11:58:24 PM
Can you send me a PM with a test account login?

Gobalopper, Did you ever have a chance to look at the problem?

Thanks,
slack

ディン1031

#203
Quote from: edi67 on January 20, 2005, 07:19:33 AM
i repeat wonderful mod and correctly work

i have one question is possible have one flag to unknown nation IP ?
for example i have 7/8 users with LAN and IP unknown and i wanted put one flag specific for them

for example this IP: 174.6.52.212 is without flag for this mod. so i will had flag for this unknown ip

thx again Gobalopper for mod
There are two ways to give them a standard flag:
First and i think the best way is the who.template.php =)
Find something like this:

<td width="20" align="center">', (empty($member['flag'][0]) ? '' : '<img src="' . $settings['default_images_url'] . '/flags/' . strtolower($member['flag'][0]) . '.png" alt="' . $member['flag'][1] . '" title="' . $member['flag'][1] . '" />'), '</td>

and replace it with something like this

<td width="20" align="center">', (empty($member['flag'][0]) ? '<img src="' . $settings['default_images_url'] . '/flags/00.png" alt="Unknown" title="Unknown" />' : '<img src="' . $settings['default_images_url'] . '/flags/' . strtolower($member['flag'][0]) . '.png" alt="' . $member['flag'][1] . '" title="' . $member['flag'][1] . '" />'), '</td>

and you must upload a flag with the name 00.png in the stardard flag images directory.
----
The Second way is not so good, because you must change the woh.php in the source directory:
Search for:

// Send the information to the template.

and put befor this line this:

if (empty($row['c2code'])) { $row['c2code'] = '00'; $row['name'] = 'Unknown'; }
      
and you must upload a flag with the name 00.png in the stardard flag images directory.
----

Both way work, the first one is the best one i think.
I'm only tested the first way, the second way is untested :D.
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

zillion

#204
To recap,  I wanted a zoomed-in map of Lancashire & Cheshire, and have cut & enlarged part of the GB-IE.gif.  I was meant to be trying not to trouble you, as you've enough on your plate already; but not had much success in that have I?  ;)

Quoteall maps have x/y co-ordinates as well as a scale value. So if you cut the map and enlarge it be sure to also increase the scale value. As for why the image itself is the wrong size it may be caused by the scale being off...

I don't think the X/Y co-ords are a problem, as that would show as the pins being out-of-place (wouldn't it?). 

But could you explain how the "scale" factor works?  For instance, North_West_Europe.gif has scale factor 2 and GB-IE.gif has scale factor 4.  Does that mean the GB-IE map is half the area of the NW-Europe map ....or what?    (Must admit I'm a bit puzzled the the World map is scale factor 0.16 ...I was expecting unity!)

PS Increasing the Scale factor DOES increase the size of the map on-screen, but it seems to top-out at Scale=11.  Perhaps there's some sort of limit within the script?   

Roger

Hallo, I have a problem with the mod not showing up, after I added some code.  This added code works on every other page, except on the member map page.  Here's the code I've added into a table in the header of the page:

<table border="0" cellspacing="10" cellpadding="0" width="100%" height="80" class="border">
<tr>
<td><img src="/img/logo.gif"></td>
<td align="right" width="90%">';

    if (@include(getenv('DOCUMENT_ROOT').'/_ad_server/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw = view_raw ('zone:1', 0, '_blank', '', '0', $phpAds_context);
    }

    // Assign the $phpAds_raw['html'] variable to your template
    // echo $phpAds_raw['html'];

echo $phpAds_raw['html'];

echo '</td>
</tr>
</table>


The phpAds part is the php code that I added.  Every other page of the forum owrks, except for the member map.  here's a link so you can see what happens:
http://www.fencecheck.com/forums/index.php?action=mm


Thanks,
Roger

Artras

Still can't get it to work in other themes :-(

I have SMF installed on : http://212.204.166.18/smf/
The theme is in : http://212.204.166.18/smf/themes/helios-red/

Into what should I change the following code in index.template.php?

// How about the [gallery] button?
echo '
<a href="http://www.yourdomain.net/gallery">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/gallery.gif" alt="' . $txt[801] . '" border="0" />' : $txt[801]), '</a>', $context['menu_separator'];

Redeye

When I try to download the mod from the SMF package server I get the following error:

Quote2: unpack(): Type H: not enough input, need 1, have 0

[Unknown]

Quote from: Redeye on January 22, 2005, 02:50:56 PM
When I try to download the mod from the SMF package server I get the following error:

Quote2: unpack(): Type H: not enough input, need 1, have 0

That means that, for whatever reason, the file is zero bytes.  Have you upgraded to 1.0.1 yet?

-[Unknown]

Redeye

No, not yet upgraded, should that be a problem?

[Unknown]

Yes, that's one of the things fixed by the upgrade.

-[Unknown]

Redeye

Upgraded to 1.0.1

Now get error:-

QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.

bulliedog

I had the same problem so I just manually FTP'd the zip file to the packages directory. Then I was able to install the MOD using the package manager as normal.

Redeye

Quote from: bulliedog on January 24, 2005, 05:37:42 PM
I had the same problem so I just manually FTP'd the zip file to the packages directory. Then I was able to install the MOD using the package manager as normal.

Cheers, that worked fine.

Can't place pins on map, get "Error on page" in browser  - javascript problem?

Slack- same problem as you I think?

SpectroPro

Ok...couple things:

1)  This is awesome!!!  Thank you!!!

2)  While I see this just fine, and I can place pins anywhere, many of my members can not. 

  2a)  I use Mozilla Firefox, and it works perfectly.  Same in my IE.
  2a1)  A friend of mine could NOT place his pin with Firefox at all.  And he saw MY pin out in the ocean way off the world.
           However, after doing a complete cache delete from Firefox, his side worked perfectly.  He could add the pin and delete the pin
           as well as see the pins in the correct position.

3)  A couple of my members are getting an error that "An Error Has Occurred!
                                                                                      You cannot view the member map. '   

     Both of these uses are registered and logged in. But they can not see the maps at all.  They have deleted chache, cookies, etc...  Still no go. 

HELP!!!!  The real problem is this:  There is NO error number nor is there any error showing up in the forum error log.  There is also no error showing up on my hosts error log.    I am at an absolute total loss.
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

http://www.therealityrocks.com    http://forum.therealityrocks.com/trr
- Greg

SpectroPro

I think I found the problem.  I did NOT notice that there is a setting in permissions.  DOH!  I have now turned that setting on and all is well.
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

http://www.therealityrocks.com    http://forum.therealityrocks.com/trr
- Greg

Redeye

Got it working - great mod.

I only use the UK-IE map and want to use the national flags of England Scotland Wales and N Ireland and Eire.
How do I get these to show up and the country's to show in the list

TIA

SpectroPro

I am not sure, but I installed the map and all was wonderful.  However, I got a huge crash of the system tonight.  Out of the blue.  I had luckily, just done a daily back up of the database.  The error was a database error (btw) and so I started looking at the db from yesterday and today.  I think there was a problem, so please tell me if it should have been like this....

yesterdays db size:  784k raw.
todays db size with map installed (did it last night after the backup):  4.79 MEGS

Is that normal?  Or did it double or triple install somehow???

Appreciate any ideas.  Btw, I just ripped the map db info (which was over 100 pages long) out of the db and saved and uploaded.  That fixed my site.
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

http://www.therealityrocks.com    http://forum.therealityrocks.com/trr
- Greg

James Woodcock

Well done on the Location Mod, much better.

However I still feel that the member map is a luxury.  I would much prefer just selecting your country etc and adding your city in your profile and having it displayed on your posts with the flag image.  No member map and pins etc.

Could you make a mod for just that?  Would simplify things :D

babylonking

Quote from: James Woodcock on January 28, 2005, 08:25:05 AM
Well done on the Location Mod, much better.

However I still feel that the member map is a luxury.  I would much prefer just selecting your country etc and adding your city in your profile and having it displayed on your posts with the flag image.  No member map and pins etc.

Could you make a mod for just that?  Would simplify things :D

Just like the one we used to have in old yabbse forum, But i do like the IP to country flag in who's online.

Advertisement: