YaBB SE Community

YaBB SE Info => News From the YaBB SE Team => Topic started by: Joseph Fung on April 23, 2002, 01:16:12 PM

Title: yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 01:16:12 PM
Take a look at the new feature we added to the site.  While there is a location field in your profile, we thought it might be nice to see where people actually come from in relation to eachother.

On the menu in the left-hand column of our site, you'll see a YaBB SE Related catregory - the third option, yabb.info member map is the new one.  Give it a click! Tell us where you live :)

Cheers,

Joseph
Title: Re:yabb.info Member Map
Post by: Jalapeno on April 23, 2002, 01:19:06 PM
Nice idea, but it's a little small.
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 01:20:24 PM
The map size you mean?  I agree - but it's the best I could find on 2 minutes searching.  If you have a better one, send it to me and I'll change them.
Title: Re:yabb.info Member Map
Post by: Jeff Lewis on April 23, 2002, 01:32:00 PM
Interesting...now if only everyone had their lattitude and longitude co-ordinates we could have a pretty accurate reading ;)

For those who have any clue what I'm talking about... I am located at:

N   43o32.31666
W 080o30.84996



Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 01:33:38 PM
<groan> you and your gps unit  ::)
Title: Re:yabb.info Member Map
Post by: Greg Robson on April 23, 2002, 01:39:34 PM

Interesting...now if only everyone had their lattitude and longitude co-ordinates we could have a pretty accurate reading ;)


I can see it now - "Hi I was locating a nearby geocache and I remember that your coordinates were nearby!" :D
Title: Re:yabb.info Member Map
Post by: Mach8 on April 23, 2002, 02:16:57 PM
Here's a map you could use.

http://www.planethalflife.com/st/images/worldmap.jpg
Title: Re:yabb.info Member Map
Post by: joshxpcable11 on April 23, 2002, 02:23:40 PM
LOL, I put one where I really live, and one in the ocean (Where I was born!!! j/k)
Title: Re:yabb.info Member Map
Post by: perrera on April 23, 2002, 02:30:42 PM
Really cool...  ;D
Any chance that the "member map" become a "MOD"?
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 02:35:47 PM

LOL, I put one where I really live, and one in the ocean (Where I was born!!! j/k)

It's impossible for you to place more than one - all you did was move yours.  I've got it linked to the member's database.

I guess if I really wanted, I could make it draw your position in a different color.

Anyway, I made it so now it draws the pins as pins, not just dots.
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 02:36:40 PM

Here's a map you could use.

http://www.planethalflife.com/st/images/worldmap.jpg


Thanks, but if I change the image, 31 people would have to redo their pins.
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 02:37:23 PM

Really cool...  ;D
Any chance that the "member map" become a "MOD"?


It required the GD functionality that not all servers have.  So I'm not sure.
Title: Re:yabb.info Member Map
Post by: Jeff Lewis on April 23, 2002, 02:40:49 PM
GPS is fun :)
Title: Re:yabb.info Member Map
Post by: Mach8 on April 23, 2002, 02:48:35 PM

The map size you mean?  I agree - but it's the best I could find on 2 minutes searching.  If you have a better one, send it to me and I'll change them.


Hmm ;D

Ah well.

My dad bores me to death with GPS, he's got all this surveying stuff and is also obsessed with RADAR. I just hit him when he starts talking about it :D
Title: Re:yabb.info Member Map
Post by: Wezz6400 on April 23, 2002, 02:49:56 PM
The image won't load for me.
Title: Re:yabb.info Member Map
Post by: Curbow 5 on April 23, 2002, 02:55:15 PM
[takes a deep breath for a long sentence]I kinda just pinned the tail on the donkey there, because Europe was already way to crowded with pins from all these damn European YaBBers for me to even begin to see my tiny little country!

THAT'S RIGHT I'M DUTCH!

(And so are Wezz and a lot of others by the way  ;D Most of them are undercover here though LOL)
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 02:56:39 PM

The image won't load for me.

your browser probably doesn't support PNG image data then.  get a better browser ;)

Note: you would realize that if you'd read the message in that window before posting  ;)
Title: Re:yabb.info Member Map
Post by: Mach8 on April 23, 2002, 02:59:26 PM
I notice a few people in Antartica :P

Do they even have the net out there?
Title: Re:yabb.info Member Map
Post by: chris on April 23, 2002, 03:17:16 PM

Interesting...now if only everyone had their lattitude and longitude co-ordinates we could have a pretty accurate reading ;)

For those who have any clue what I'm talking about... I am located at:

N   43o32.31666
W 080o30.84996


My location:

N 51o10"
E 7o3"

Not as accurate as Jeffs Position but better than nothing *g*
Title: Re:yabb.info Member Map
Post by: Webby on April 23, 2002, 03:27:22 PM
I really like this, and would love the source code, because I have something like that on my website, and have to do everything manually !

Please, is it possible to get it somewhere ?
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 03:42:52 PM
Now, because I'm bored at work, *your* pin is blue (remember, is might be burried under other pins, so don't complain to me if you can't find it), and if you're logged in, you have the option to move your pin or se who's pin any given pin is.

If you click on pins that overlap, only 1 label will be displayed, so be careful where you click.

Also, us admins can delete pins that are just dumb  ;)

Oh yeah, and the cursor is a crosshair now  ;D
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 04:15:19 PM
And because I can, the box where is shows ther person's name (when you use the "who is this?" function) is 50% transparent as opposed to flat white.
Title: Re:yabb.info Member Map
Post by: alexrolko on April 23, 2002, 04:15:40 PM
I should of really discourgaed you from doing this LOL

but its soo cool now we'll see all the other BBS's make something simular
Title: Re:yabb.info Member Map
Post by: wmoura on April 23, 2002, 04:26:58 PM
The Member Map idea is very good. I've already located my pin but only using Internet Explorer.

Netscape 6.2 loads the map with the pins but it doesn't show the options buttons and neither the cursor.

Wanderley
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 23, 2002, 04:28:18 PM
Note, it'll only show the options if you're logged in.  Try with that netscape thing again - but log in first ;)
Title: Re:yabb.info Member Map
Post by: Jeff Lewis on April 23, 2002, 07:11:10 PM
Um, png is taking the place of gifs.  People people, learn to upgrade!!!
Title: Re:yabb.info Member Map
Post by: mediman on April 23, 2002, 07:15:54 PM
Quote
Why must it be in such format like PNG that half of users doesn't are able to use  ???


works with 80% of all browser, if not try a .htaccess with

Code: [Select]
AddType image/png .png
;)
Title: Re:yabb.info Member Map
Post by: Jeff Lewis on April 23, 2002, 07:17:09 PM
Hehe it's not a bug :)  I can see it here and at work just fine :)
Title: Re:yabb.info Member Map
Post by: Jeff Lewis on April 23, 2002, 07:33:55 PM
What browser are you using?
Title: Re:yabb.info Member Map
Post by: groundup on April 23, 2002, 09:09:04 PM
omg.. you guys are really wierd  ::)

i agree tho.. it is too small
Title: Re:yabb.info Member Map
Post by: David on April 24, 2002, 12:30:38 AM
You should make it so we can zoom in.
Title: Re:yabb.info Member Map
Post by: andrea on April 24, 2002, 04:34:29 AM
nice idea.

One could do the same with an arbitrary image in the background, right? I would love to add the analoguous in my board, with a swiss map instead.
Title: Re:yabb.info Member Map
Post by: Hanfcom on April 24, 2002, 05:36:02 AM
I want to have it on my boards  ;D.

Please, publish the source, make it possible to download as a mod.

I would take a European map. 8) ::)
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 24, 2002, 07:12:46 AM

If we all could see it in first place...or is it that small that it's invisible  ;D

What should i look for, image, icon or map or...whatever but...weird to make something that doesn't work on all browsers  >:(

It was a choice of poorer quality and jpg compression, or non-lossy compression and png, or non-lossy compression and wbmp.

But frankly, I made it cause It was kinda fun - not because I wanted it to work everywhere.
Title: Re:yabb.info Member Map
Post by: andrea on April 24, 2002, 07:17:14 AM
I have no problems with other browsers, its working with IE, opera and even with N47.
Title: Re:yabb.info Member Map
Post by: Hanfcom on April 24, 2002, 07:47:47 AM
Works with Mozilla 1.0 RC1 too.
Title: Re:yabb.info Member Map
Post by: Webby on April 24, 2002, 07:54:21 AM
Works, doesn't work, works, doesn't work, works, doesn't work, bla,bla !!

It is / was just for fun, so why make a big deal of it  >:(

I like it, and that's what matters for me  :)

Wish I could get the source code.......
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 24, 2002, 07:59:57 AM
Quote
Ha ha....not work everywhere, why advertise it at all, you should have made it for your self in that case  
And why not GIF...

LOL do you think I made it for you? hehe I made is because I wanted to know where people live ;)

And we couldn't use GIF because of the fact that we don't have a liscence to generate them.  Because of the liscencing, PHP no longer comes with GIF processing functionality.

Quote
I like it, and that's what matters for me

bingo :)
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 24, 2002, 08:53:38 AM
Interesting....someone deleting a certain someone's reply....hmmm... ahh well, I guess I won't post my needlessly sarcastic and caustic reply  ::)
Title: Re:yabb.info Member Map
Post by: dwp on April 24, 2002, 08:57:38 AM
I deleted my own replys, because this is that stupid thread  ;D
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 24, 2002, 10:40:36 AM
Hey, would anyone be interested in a drop down menu that listed all the pins, letting you pick a user to see where they are located?
Title: Re:yabb.info Member Map
Post by: P2D on April 24, 2002, 12:55:33 PM
WOW Really great work Joseph. I really like it :D
Title: Re:yabb.info Member Map
Post by: P2D on April 24, 2002, 12:56:25 PM
Hey, would anyone be interested in a drop down menu that listed all the pins, letting you pick a user to see where they are located?

Yea. but if possible, zoom functions can be good too.
Title: Re:yabb.info Member Map
Post by: dwp on April 24, 2002, 03:07:45 PM
Do something better, develop the board software to work correctly instead of this unecessery locator crap...I'm in madagaskar....ha ha...locate me there  ;D
Title: Re:yabb.info Member Map
Post by: Webby on April 24, 2002, 03:09:56 PM
Well, I'm a happy user now  ;D

Thanx Joseph !

(you can see it in action now ;))
Title: Re:yabb.info Member Map
Post by: andrea on April 24, 2002, 03:36:41 PM

Well, I'm a happy user now  ;D

Thanx Joseph !

(you can see it in action now ;))

Where is the link to your map? Couldn't find it...
Title: Re:yabb.info Member Map
Post by: Omar Bazavilvazo on April 24, 2002, 05:25:40 PM
Done! my clip..


but noone else if from Mexico *sigh* :P
Title: Re:yabb.info Member Map
Post by: Pegleg on April 24, 2002, 07:34:55 PM
Hey, I just checked, and my dot isn't there! ::) ;D
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 24, 2002, 08:14:23 PM
Wow - it's almost reach the point that you can't read the word "Europe".

Soon I'll have to make a "yabb user population density" map :P
Title: Re:yabb.info Member Map
Post by: Dave Smulders on April 24, 2002, 08:23:06 PM
Today it became clear to me how small a country the netherlands really is. I guess I've either dropped my pin in Germany or the sea :)
Title: Re:yabb.info Member Map
Post by: groundup on April 24, 2002, 09:00:56 PM

Hey, would anyone be interested in a drop down menu that listed all the pins, letting you pick a user to see where they are located?

good idea


Today it became clear to me how small a country the netherlands really is. I guess I've either dropped my pin in Germany or the sea :)

lol
Title: Re:yabb.info Member Map
Post by: Webby on April 25, 2002, 12:49:45 AM
Quote

Where is the link to your map? Couldn't find it...


http://www.salesplaza.nl/forum (upper-right corner : "landkaart")
Title: Re:yabb.info Member Map
Post by: Dave A on April 25, 2002, 12:58:36 AM
It's cool, I just put my pin between the USA and the Hawaiian Island! Because I like them both!  :)
Title: Re:yabb.info Member Map
Post by: P2D on April 25, 2002, 01:05:51 AM
For now i'm the only pin in israel ;D
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 25, 2002, 10:05:41 AM
airmon - it has nothing to do with your installation registration - it has to do with signing up to discuss on this forum - i.e. your airmon user.

The pin represents where YOU are, not your server - we're just trying to see where our community members are from ;)
Title: Re:yabb.info Member Map
Post by: Wezz6400 on April 25, 2002, 12:37:56 PM


The image won't load for me.

your browser probably doesn't support PNG image data then.  get a better browser ;)

Note: you would realize that if you'd read the message in that window before posting  ;)

Yeah nice, but now it works for me and I have not upgraded or changed a setting in my browser. You tell me how that is possible.

Oh well, I droped my pin somewhere arount Belgium, France, The Netherlands, Germany. It should be The Netherlands but I can't see it.
Title: Re:yabb.info Member Map
Post by: Pegleg on April 25, 2002, 12:42:36 PM
Same thing happened to me.  When I first looked at the map, it would not show up.  The next day it does and it does now.  I didn't change a thing in my browser either. :o
Title: Re:yabb.info Member Map
Post by: Webby on April 26, 2002, 04:50:59 AM
Joseph, would it be possible to show som info about the user when you HOVER over the pins ?

I really would like to use that, because on another page on my site I have to do everything manually.

Maybe it would be easy for you to make such a thing ?!
Title: Re:yabb.info Member Map
Post by: PetunuS on April 26, 2002, 05:24:43 AM
the easiest thing would be a map of the netherlands! ;D
Title: Re:yabb.info Member Map
Post by: chris on April 26, 2002, 05:32:27 AM

Today it became clear to me how small a country the netherlands really is. I guess I've either dropped my pin in Germany or the sea :)


No problem... You're always welcome in germany ;D
Title: Re:yabb.info Member Map
Post by: Webby on April 26, 2002, 05:45:13 AM

the easiest thing would be a map of the netherlands! ;D



I already have the map of the Netherlands  :P

Just look at my board (you'll have to sign up first to see it !)
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 26, 2002, 08:03:48 AM

Joseph, would it be possible to show som info about the user when you HOVER over the pins ?

I really would like to use that, because on another page on my site I have to do everything manually.

Maybe it would be easy for you to make such a thing ?!

Actually, it woudn't be easy at all.

There are 2 ways to do it - figure out an image map and use fake urls and alt tags to do the roll-overs, or use PHP to generate a flash file rather than just an image - and do the rollovers in flash.

May someday, but not in the near future :P sorry
Title: Re:yabb.info Member Map
Post by: andrea on April 26, 2002, 08:13:56 AM

Quote

Where is the link to your map? Couldn't find it...


http://www.salesplaza.nl/forum (upper-right corner : "landkaart")

Yea the button's there when you are logged in. The swiss map is now activated in my board, too. I activated the menu in the same manner as Webby did, by adding a new button to the <yabb menu>.

Thanks a lot, Joseph!  :-*
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 26, 2002, 08:43:25 AM
Ahh - so you did get it working - I wondered what happened :)
Title: Re:yabb.info Member Map
Post by: andrea on April 26, 2002, 09:14:41 AM

Ahh - so you did get it working - I wondered what happened :)

Adding the db prefix to the member query solved the last problem.

I had another problem with the worldmap.png image. It looks like there is a sensitivity to some png image settings. When I had an image bg color fitting to my site color, the member map showed a blank bg color, and some other colors were changed in the image. Now I changed back to a pure greyscale image, with this everything looks fine. Maybe I will make another try with a websafe color image, at some later time.
Title: Re:yabb.info Member Map
Post by: Jalapeno on April 28, 2002, 09:56:20 AM
It's amazing how few African (none) and Asian users this board has. Or maybe they just didn't place their pins, because Europe and Northamerica are absolutely crowded and Africa and Asia are virtually empty.
Title: Re:yabb.info Member Map
Post by: vorapoap (vory) on April 29, 2002, 12:39:51 PM
Maybe they are in Asian and African in Europe and America ???
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 30, 2002, 10:24:26 AM
just for the hell of it.  here
Title: Re:yabb.info Member Map
Post by: Viet on April 30, 2002, 11:34:08 AM
Thanks Joseph  :)

Can I replace the worldmap.png with other png pic?
Title: Re:yabb.info Member Map
Post by: Joseph Fung on April 30, 2002, 02:24:21 PM
no - I've released it like this and you have to use it as is  ::)
Title: Re:yabb.info Member Map
Post by: Webby on April 30, 2002, 02:28:05 PM
Whahaha  ;D

Guys, just TRY it !

You will notice it will work !
Title: Re:yabb.info Member Map
Post by: Hypocrite on April 30, 2002, 02:31:53 PM

Whahaha  ;D

Guys, just TRY it !

You will notice it will work !


LOL, no it won't. Bad memory? ;D
Title: Re:yabb.info Member Map
Post by: Webby on April 30, 2002, 02:34:32 PM
No, no bad memory.  Although my pc has a bad memory dimm..... ;D

Only change a few things, and it will work, or am I dreaming ?

http://www.salesplaza.nl/forum/index.php?board=;action=worldmap
Title: Re:yabb.info Member Map
Post by: Viet on April 30, 2002, 04:25:07 PM
nice :)

What did you change Webby?
Title: Re:yabb.info Member Map
Post by: Webby on April 30, 2002, 04:39:27 PM
Well, if you download the .zip file Joseph posted, you can read it in the textfile.  He explains it in that file.

(I added my PREFIXes in the code, and changed the path to the image(s).)

I was lucky, it worked immediately !

Others weren't so lucky, but with this .zip file they will probably be able to get it working ;)
Title: Re:yabb.info Member Map
Post by: Dave Smulders on April 30, 2002, 08:47:18 PM
I see we have putted Matt on antartica?

I already thought of him as very quiet lately....now I know why :)
Title: Re:yabb.info Member Map
Post by: Alan Cramer on May 02, 2002, 05:21:58 AM
I just added mine.  I seem to be the only person in Australia using YaBB SE (and developing), so I dunno what is going on.  Com'n Aussies, show your support!
Title: Re:yabb.info Member Map
Post by: vorapoap (vory) on May 02, 2002, 02:11:51 PM
 >:( And suddenly, all people in Antarctica were gone.

:'( :'( :'( :'( :'( :'( :'(
Title: Re:yabb.info Member Map
Post by: andrea on May 05, 2002, 02:56:41 AM

And suddenly, all people in Antarctica were gone.

Life is hard and dangerous in Antarctica...
Title: Re:yabb.info Member Map
Post by: Alan Cramer on May 05, 2002, 04:13:11 AM
I think I should start a huge advertising campaign on Australian TV about YaBB SE.  I don't think there is anybody else in Australia besides me.  Why don't half the people in Europe move to Australia?  An single females around 18 years of age are glad and welcome to move in with me ;D
Title: Re:yabb.info Member Map
Post by: Jeff Lewis on May 05, 2002, 09:03:13 AM

 An single females around 18 years of age are glad and welcome to move in with me ;D


HAHAHA LOL ;)
Title: Re:yabb.info Member Map
Post by: Jedi~ on May 05, 2002, 10:38:36 AM
I know I told this to you Joseph before, but I think I'll post it b/c it still doesn't work.

Earlier you said get a better browser if you can't see the img.....

So, what's better than IE6, Opera 6, AND NS 6? (Not that I think NS is a good browser.)
Title: Re:yabb.info Member Map
Post by: Delinquently insane on May 05, 2002, 11:17:55 AM
They All Suck Netcaptor Is Better  ;)
Title: Re:yabb.info Member Map
Post by: Jedi~ on May 05, 2002, 03:48:36 PM
I noticed that in your snapshot of a mod... yet it seems that IE is inside of it ;)
Title: Re:yabb.info Member Map
Post by: andrea on May 06, 2002, 07:32:48 PM

I know I told this to you Joseph before, but I think I'll post it b/c it still doesn't work.

Earlier you said get a better browser if you can't see the img.....

So, what's better than IE6, Opera 6, AND NS 6? (Not that I think NS is a good browser.)

Are you using win 98 ? One member of my board is not able to see my swiss map either, she is having IE6.0 and win 98.
Title: Re:yabb.info Member Map
Post by: SK15 on May 07, 2002, 11:14:24 AM
Very Interesting the idea....  
He grieves that in my area to a lot of wells SUX
Title: Re:yabb.info Member Map
Post by: Jedi~ on May 07, 2002, 04:46:27 PM
Yup, 98SE
Title: Re:yabb.info Member Map
Post by: Chris Cromer on May 07, 2002, 04:53:34 PM
Well I have both IE6 and 98 and it works for me.
Title: Re:yabb.info Member Map
Post by: SK15 on May 07, 2002, 05:13:43 PM

Well I have both IE6 and 98 and it works for me.


With me the same Thing
Title: Re:yabb.info Member Map
Post by: andrea on May 07, 2002, 06:35:53 PM


Well I have both IE6 and 98 and it works for me.


With me the same Thing

What presise version of IE6.0 are you using? Any plugins installed?
Just looking for a possible explanation. My member sees a broken image symbol instead of the map (which does not make any sense to me). She is indeed able to view a simple png test image I made for her, only the png map created by php she is not able to view. Unfortunately I have no win 98 any more, I could test only for win 2000 and win 95 which both were ok.
Title: Re:yabb.info Member Map
Post by: Chris Cromer on May 07, 2002, 06:45:14 PM
6.0.2600.0000IS
Title: Re:yabb.info Member Map
Post by: andrea on May 07, 2002, 07:05:47 PM
6.0.2600.0000IS
Does this Version number indicate that the "Cumulative Patch for Internet Explorer (Q316059)" is applied?
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q316059
Did you apply this patch on your win 98 installation? Maybe the win98 png problem is related to this patch?
Title: Re:yabb.info Member Map
Post by: Chris Cromer on May 07, 2002, 07:15:03 PM
I have not downloaded or installed ANY patches in my IE6.
Title: Re:yabb.info Member Map
Post by: Chris Cromer on May 19, 2002, 01:25:39 AM
Hah, lol. I am in outer space. :P ;)
Title: Re:yabb.info Member Map
Post by: sharmy on May 27, 2002, 07:23:06 PM
can not find chinese user :o ;D!?
Title: Re:yabb.info Member Map
Post by: Thunderace on June 11, 2002, 03:25:50 AM
Great mod, I need this. However I'm having problems.

If I go to worldmap_image.php the map comes up stating 0 pins but with no ability to add pins.

If I go to WorldMap.php I get a blank screen.

Do I need to adjust just worldmap_image.php and the mysql script or is there work to be done on WorldMap.php.

Also someone commented earlier on the need to add the prefix to members, is this necessary and if so what needs changing.

Thanks
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 01:51:51 PM
OK I've got it working to a point.

I put worldmap_image.php in main folder and WorldMap.php in sources.

I modified index.php to add a button to the menu and subs.php for the "include" function.

The map comes up it reads the db and shows 0 pins, it recognises admin, guests and users.

What it doesn't do is: -

1) Open in a new window
2) Place any pins

I'm thinking that problem 1) is leading to problem 2) perhaps, any help gratefully received.
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 01:54:29 PM
I just put it up last night.
http://www.agigames.com/board/?action=worldmap
Works like a charm!

Also could you give me a url so I can see what is happening?
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 01:58:53 PM
http://www.sportsbike.cc

Thanks m8, it's apreciated  ;)
Title: Re:yabb.info Member Map
Post by: Jedi~ on June 13, 2002, 02:00:16 PM
Hmm, I have the same version number, except for the IS at the end...
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 02:16:45 PM
Well the not opening in a new window is because of the <a href=""></a> in Subs.php you need to define a target.

As for problem number 2 I think you have the wrong location set in WoldMap.php

Could you post your WorldMap.php file here so I can see it?
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 02:19:16 PM
<?php


/**
* Short description.
*
* Detail description
* @param      none
* @global     none
* @since      1.0
* @access     private
* @return     void
* @update     date time
*/
function WorldMap()
{
   global $imagesdir,$ID_MEMBER,$db_prefix,$HTTP_GET_VARS,$settings;
   if ($HTTP_GET_VARS['t'] == 2 && $settings[7] != 'Administrator')
      $HTTP_GET_VARS['t'] = 0;

   if ($HTTP_GET_VARS['t'] == 1 && $ID_MEMBER==-1)
      $HTTP_GET_VARS['t'] = 0;

   if ($HTTP_GET_VARS['t'] == 0)
   {
      if (isset ($HTTP_GET_VARS['submitted']) && $HTTP_GET_VARS['submitted'] && $ID_MEMBER != -1)
      {
         $request = mysql_query ("SELECT * FROM {$db_prefix}world_map WHERE ID_MEMBER=$ID_MEMBER");
         if (mysql_num_rows($request) > 0)
            $request = mysql_query ("UPDATE {$db_prefix}world_map SET xPos=$HTTP_GET_VARS[map_x], yPos=$HTTP_GET_VARS[map_y] WHERE ID_MEMBER=$ID_MEMBER");
         else
            $request = mysql_query ("INSERT INTO {$db_prefix}world_map (ID_MEMBER,xPos,yPos) VALUES($ID_MEMBER, $HTTP_GET_VARS[map_x], $HTTP_GET_VARS[map_y])");
      }       
   }

   if ($ID_MEMBER == -1)
   {
      print "<font face=verdana,size=1><center><img src=\"http://www.sportsbike.cc/yabbse/worldmap_image.php\"></center>";    
   }
   else
   {
      if ($settings[7] == 'Administrator')
      {
         $adminTxt = " &nbsp;&nbsp;&nbsp; <input type=radio name=t value=2>Delete Pin";
          
      }
      print "<font face=verdana,size=1><form action=\"$scripturl\" method=get><input type=hidden name=action value=\"worldmap\"><center><input type=image src=\"http://www.sportsbike.cc/yabbse/worldmap_image.php?me=$ID_MEMBER&t=$HTTP_GET_VARS[t]&x=$HTTP_GET_VARS[map_x]&y=$HTTP_GET_VARS[map_y]\" name=map onclick=\"submit()\" style=\"cursor:crosshair\"><br> <input type=radio name=t value=1 checked>Who is this? &nbsp;&nbsp;&nbsp; <input type=radio name=t value=0>Place My Pin$adminTxt</center><input type=hidden name=submitted value=1></form>";    
   }

   print <<<EOT
      The most recent pin addition is hilighted by a blue circle, and your location is indicated by a blue pin.  The above image is a PNG, if you can't see it, your browser may not support the PNG file type. The yabb.info member map is a map of all the members who are registered on yabb.info and who have indicated their position on the world map.  If you haven't yet placed yourself, click on the map above to place your pin.  You can move your pin around at any time.  Also, you can only place a pin if you are a registered member and are logged in.<p align=right><a href="javascript:window.close()">Close Window</a>
      </font>
EOT;
   obExit();
}//end func
?>
Title: Re:yabb.info Member Map
Post by: andrea on June 13, 2002, 02:27:35 PM
You should also check the db-prefixes in the "worldmap_image.php" file.

As far I remember one had to add the db prefix (e.g. "yabbse_") in the queries of the "members" table (i.e. replace "members" by "yabbse_members").
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 02:30:58 PM
Thanks andrea

Currently it has {$db_prefix}members, should I change this to yabbse_members?
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 02:31:40 PM
Here use this and tell me if it works:

Code: [Select]
<?php<br><br>/**<br> * Short description. <br> *<br> * Detail description<br> * @param      none<br> * @global     none<br> * @since      1.0<br> * @access     private<br> * @return     void<br> * @update     date time<br>*/<br><br>function WorldMap()<br>{<br>print <<<EOT<br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><br><HTML><br><HEAD><br><TITLE>Chris's AGI Web Site</TITLE><br><META http-equiv=Content-Type content="text/html; charset=ISO-8859-1"><br></HEAD><br><body background="http://www.agigames.com/bg.jpg" bgcolor="#000000" text="#000000" link="#8B0000" vlink="#8B0000" alink="#8B0000"><br><table border=0 cellspacing=0 cellpadding=0 width="90%" align=center><br> <tr><br>  <td width=14><img src="YaBBImages/box_tl.gif"></td><br>  <td background="YaBBImages/box_tc.gif" align=center class=nav2 valign=top><img src="YaBBImages/blank.gif" height=6><br></td><br>  <td width=13><img src="YaBBImages/box_tr.gif"></td><br> </tr><br> <tr><br>  <td width=14 background="YaBBImages/box_ml.gif"><img src="YaBBImages/blank.gif" width=14></td><br>  <td background="YaBBImages/box_mc.gif"><div class=small><br>EOT;<br>   global $imagesdir, $ID_MEMBER, $db_prefix,$HTTP_GET_VARS, $settings;<br>   if ($HTTP_GET_VARS['t'] == 2 && $settings[7] != 'Administrator')<br>      $HTTP_GET_VARS['t'] = 0;<br><br>   if ($HTTP_GET_VARS['t'] == 1 && $ID_MEMBER==-1)<br>      $HTTP_GET_VARS['t'] = 0;<br><br>   if ($HTTP_GET_VARS['t'] == 0)<br>   {<br>      if (isset ($HTTP_GET_VARS['submitted']) && $HTTP_GET_VARS['submitted'] && $ID_MEMBER != -1)<br>      {<br>         $request = mysql_query ("SELECT * FROM {$db_prefix}world_map WHERE ID_MEMBER=$ID_MEMBER");<br>         if (mysql_num_rows($request) > 0)<br>            $request = mysql_query ("UPDATE {$db_prefix}world_map SET xPos=$HTTP_GET_VARS[map_x], yPos=$HTTP_GET_VARS[map_y] WHERE ID_MEMBER=$ID_MEMBER");<br>         else<br>            $request = mysql_query ("INSERT INTO {$db_prefix}world_map (ID_MEMBER,xPos,yPos) VALUES($ID_MEMBER, $HTTP_GET_VARS[map_x], $HTTP_GET_VARS[map_y])");<br>      }       <br>   }<br><br>   if ($ID_MEMBER == -1)<br>   {<br>      print "<font face=verdana,size=1><center><img src=\"http://www.agigames.com/board/worldmap_image.php\"></center>";<br>   }<br>   else<br>   {<br>      if ($settings[7] == 'Administrator')<br>      {<br>         $adminTxt = " &nbsp;&nbsp;&nbsp; <input type=radio name=t value=2>Delete Pin";<br>          <br>      }<br>      print "<font face=verdana,size=1><form action=\"$scripturl\" method=get><input type=hidden name=action value=\"membermap\"><center><input type=image src=\"http://www.agigames.com/board/worldmap_image.php?me=$ID_MEMBER&t=$HTTP_GET_VARS[t]&x=$HTTP_GET_VARS[map_x]&y=$HTTP_GET_VARS[map_y]\" name=map onclick=\"submit()\" style=\"cursor:crosshair\"><br> <input type=radio name=t value=1 checked>Who is this? &nbsp;&nbsp;&nbsp; <input type=radio name=t value=0>Place My Pin$adminTxt</center><input type=hidden name=submitted value=1></form>";<br>   }<br><br>   print <<<EOT<br>      The most recent pin addition is hilighted by a blue circle, and your location is indicated by a blue pin.  The above image is a PNG, if you can't see ityour browser may not support the PNG file typeThe member map is a map of all the members who are registered and who have indicated their position on the world map.  If you haven't yet placed yourself, click on the map above to place your pin.  You can move your pin around at any time.  Also, you can only place a pin if you are a registered member and are logged in.<p align=right><a href="javascript:window.close()">Close Window</a><br>      </font><br>EOT;<br>        print <<<EOT<br>  </td><br>  <td width=13 background="YaBBImages/box_mr.gif"><img src="YaBBImages/blank.gif" width=13></td><br> </tr><br> <tr><br>  <td width=14><img src="YaBBImages/box_bl.gif"></td><br>  <td background="YaBBImages/box_bc.gif" align=center class=nav2><img src="YaBBImages/blank.gif"></td><br>  <td width=13><img src="YaBBImages/box_br.gif"></td><br> </tr><br></table><br></body><br></html><br>EOT;<br>   obExit();<br>}//end func<br>?>

You used membermap as the action instead of worldmap... this will fix it(hopefully).
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 02:32:34 PM

Well the not opening in a new window is because of the <a href=""></a> in Subs.php you need to define a target.


Current subs line is: -

// membermap
       $yymenu .= "$menusep<a href=\"$scripturl?action=membermap \"><img src=\"$imagesdir/membermapbutton.png\"</a>";
Title: Re:yabb.info Member Map
Post by: andrea on June 13, 2002, 02:37:15 PM


// membermap
       $yymenu .= "$menusep<a href=\"$scripturl?action=membermap \" target="_blank"><img src=\"$imagesdir/membermapbutton.png\"</a>";


add target="_blank", this will cause to open a new window.
Title: Re:yabb.info Member Map
Post by: andrea on June 13, 2002, 02:58:10 PM

Thanks andrea

Currently it has {$db_prefix}members, should I change this to yabbse_members?

Not sure if the variable $db_prefix is present there, maybe safer to use "yabbse_". Also check in the same file that all queries on the worldmap table have the db prefix added, i.e. use "yabbse_worldmap".
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 03:09:01 PM
andrea: that wasn't the problem. He just used action=membermap instead of action=worldmap

if he uses the code I posted it will allow him to use membermap instead of worldmap.
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 03:10:38 PM



// membermap
       $yymenu .= "$menusep<a href=\"$scripturl?action=membermap \" target="_blank"><img src=\"$imagesdir/membermapbutton.png\"</a>";


add target="_blank", this will cause to open a new window.


Gives parse errors
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 03:14:53 PM
Hey Thunderace... I placed my pin :o lol.

But that is only because I know how to do it. ;)

If you use the code a posted a few posts back you should be able to get the pins to work.
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 03:19:36 PM
Also use this and see if it works:

Code: [Select]
// membermap
       $yymenu .= "$menusep<a href=\"$scripturl?action=membermap \" target=\"_blank\"><img src=\"$imagesdir/membermapbutton.png\"</a>";
Title: Re:yabb.info Member Map
Post by: andrea on June 13, 2002, 03:22:10 PM
Yes, Chris is right, you have to put the \ before the " characters.
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 03:27:28 PM
Chris I got: -

Fatal error: Call to undefined function: clicklog() in /var/www/vhosts/sportsbike.cc/httpdocs/yabbse/index.php on line 55
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 03:31:07 PM
with the membermap button stuff or the map itself?

well anyway I noticed something in that code I gave you... it included my directorys where the stuff was located... use this:

Code: [Select]
<?php<br><br><br>/**<br>* Short description.<br>*<br>* Detail description<br>* @param      none<br>* @global    none<br>* @since      1.0<br>* @access    private<br>* @return    void<br>* @update    date time<br>*/<br>function WorldMap()<br>{<br>   global $imagesdir,$ID_MEMBER,$db_prefix,$HTTP_GET_VARS,$settings;<br>   if ($HTTP_GET_VARS['t'] == && $settings[7] != 'Administrator')<br>      $HTTP_GET_VARS['t'] = 0;<br><br>   if ($HTTP_GET_VARS['t'] == && $ID_MEMBER==-1)<br>      $HTTP_GET_VARS['t'] = 0;<br><br>   if ($HTTP_GET_VARS['t'] == 0)<br>   {<br>      if (isset ($HTTP_GET_VARS['submitted']) && $HTTP_GET_VARS['submitted'] && $ID_MEMBER != -1)<br>      {<br>         $request mysql_query ("SELECT * FROM {$db_prefix}world_map WHERE ID_MEMBER=$ID_MEMBER");<br>         if (mysql_num_rows($request) > 0)<br>            $request mysql_query ("UPDATE {$db_prefix}world_map SET xPos=$HTTP_GET_VARS[map_x], yPos=$HTTP_GET_VARS[map_y] WHERE ID_MEMBER=$ID_MEMBER");<br>         else<br>            $request mysql_query ("INSERT INTO {$db_prefix}world_map (ID_MEMBER,xPos,yPos) VALUES($ID_MEMBER$HTTP_GET_VARS[map_x]$HTTP_GET_VARS[map_y])");<br>      }<br>   }<br><br>   if ($ID_MEMBER == -1)<br>   {<br>      print "<font face=verdana,size=1><center><img src=\"http://www.sportsbike.cc/yabbse/worldmap_image.php\"></center>";<br>   }<br>   else<br>   {<br>      if ($settings[7] == 'Administrator')<br>      {<br>         $adminTxt " &nbsp;&nbsp;&nbsp; <input type=radio name=t value=2>Delete Pin";<br><br>      }<br>      print "<font face=verdana,size=1><form action=\"$scripturl\" method=get><input type=hidden name=action value=\"membermap\"><center><input type=image src=\"http://www.sportsbike.cc/yabbse/worldmap_image.php?me=$ID_MEMBER&t=$HTTP_GET_VARS[t]&x=$HTTP_GET_VARS[map_x]&y=$HTTP_GET_VARS[map_y]\" name=map onclick=\"submit()\" style=\"cursor:crosshair\"><br> <input type=radio name=t value=1 checked>Who is this? &nbsp;&nbsp;&nbsp; <input type=radio name=t value=0>Place My Pin$adminTxt</center><input type=hidden name=submitted value=1></form>";<br>   }<br><br>   print <<<EOT<br>      The most recent pin addition is hilighted by a blue circle, and your location is indicated by a blue pin.  The above image is a PNG, if you can't see it, your browser may not support the PNG file type. The yabb.info member map is a map of all the members who are registered on yabb.info and who have indicated their position on the world map.  If you haven't yet placed yourselfclick on the map above to place your pin.  You can move your pin around at any time.  Alsoyou can only place a pin if you are a registered member and are logged in.<p align=right><a href="javascript:window.close()">Close Window</a><br>      </font><br>EOT;<br>   obExit();<br>}//end func<br>?>
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 03:44:34 PM

andrea: that wasn't the problem. He just used action=membermap instead of action=worldmap

if he uses the code I posted it will allow him to use membermap instead of worldmap.


I had membermap in both index and subs
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 03:46:02 PM
Also having used your suggestions Chris it opens in a new window, but as soon as I click it reverts to the forum
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 03:48:23 PM
yes I know. There is 2 options for you... you can use the code I just gave you... or you can go into index.php and subs.php and change membermap to worldmap.
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 04:26:06 PM

Also use this and see if it works:

Code: [Select]
// membermap
       $yymenu .= "$menusep<a href=\"$scripturl?action=membermap \" target=\"_blank\"><img src=\"$imagesdir/membermapbutton.png\"</a>";



Deleted and set all back to WorldMap, added your script above to open new window, still no joy  ???

I'm a newbie so I must be missing the screaming obvious.

Thanks for your help BTW
Title: Re:yabb.info Member Map
Post by: Chris Cromer on June 13, 2002, 04:28:30 PM
Not WorldMap... worldmap... and don't use the code for WorldMap.php I gave you when you change it, use the WorldMap.php that came in the zip(but with your url's in it)
Title: Re:yabb.info Member Map
Post by: Thunderace on June 13, 2002, 04:44:04 PM
Suddenly it all works great, trouble is I've absolutely no idea which bit I'd missed lol.


Big thanks To Chris Cromer for all his time today, Andrea too.
Title: Re:yabb.info Member Map
Post by: Thunderace on June 18, 2002, 10:56:08 AM
For anyone else who's interested in this, perhaps with a UK map mine is here (http://www.sportsbike.cc/yabbse/index.php?action=worldmap)

As an addition I integrated the excellent Bio Mod (http://www.yabb.info/community/index.php?board=158;action=display;threadid=8968) by Jedi so that you click on a pin then see the user and bio.
Title: Re:yabb.info Member Map
Post by: goosemoose on June 20, 2002, 04:46:13 PM
I have mine partly going and the map appears in windows xp, but in my xp machine it tries to download the php file and returns junk. Ideas?
http://www.goosemoose.com/rfc/worldmap_image.php
Title: Re:yabb.info Member Map
Post by: goosemoose on June 20, 2002, 05:12:46 PM
I also just edited subs.php and when I click on the icon the indexboard just reloads. What did I miss? Do I need to add something to index.php as well? Check out http://www.goosemoose.com/rfc
Title: Re:yabb.info Member Map
Post by: goosemoose on June 20, 2002, 05:22:24 PM
I am assuming its in my subs as well:
Code: [Select]
// membermap
       $yymenu .= "$menusep<a href=\"$scripturl?action=WorldMap\"><img src=\"$imagesdir/rfc/YaBBImages/membermap.gif\" alt=\"Member Map\" border=\"0\"></a>";
I have worldmap_images in the same dir as index.php and WorldMap.php in my sources dir. I tried changing action=WorldMap to worldmap_images and worldmap as well but it didn't do anything.
Title: Re:yabb.info Member Map
Post by: goosemoose on June 20, 2002, 06:02:33 PM
Wohoo fixed it, guess I Just needed the added code in index.php
Title: Re:yabb.info Member Map
Post by: goosemoose on June 21, 2002, 03:31:48 PM
Okay, I am now putting this on another forum and I am having a problem, the image won't appear! Funning php version 4.1.2. Everything else seems to be working okay. I also tried rewriting the code for a gif and uploaded it and the gif and still no go. Any idea? Http://www.damien-hs.edu/forum/index.php
test:test account is set up
http://www.damien-hs.edu/forum/info.php has server info
Title: Re:yabb.info Member Map
Post by: andrea on June 21, 2002, 03:52:33 PM
My ISP upgraded the server, and now my member map does not work any more ...  :'(

Looks exactly like goosemoose's map: a broken image symbol only.

(broken) map here:
http://www.1eltern.ch/community/index.php?action=worldmap
Title: Re:yabb.info Member Map
Post by: andrea on June 21, 2002, 08:56:53 PM
I suppose that the reason for the member map not running any longer is that the GD library is not installed any longer on my webserver. So the imagecreate() statement and related statements fail to run. I asked the ISP to install this library.
Title: Re:yabb.info Member Map
Post by: mediman on June 22, 2002, 06:45:00 AM
gd library was yesterday today ist Netpbm!
you can install own binaries if your isp is not willing to reinstall gd library!

mediman
Title: Re:yabb.info Member Map
Post by: goosemoose on June 22, 2002, 12:13:22 PM
Can you give me a link to the GD library so I can send it to my webhost or try to install myself. Thanks
Title: Re:yabb.info Member Map
Post by: andrea on June 22, 2002, 12:56:14 PM
Can you give me a link to the GD library so I can send it to my webhost or try to install myself. Thanks
@goosemoose: Here is the link:
http://www.php.net/manual/en/ref.image.php (http://www.php.net/manual/en/ref.image.php)



gd library was yesterday today ist Netpbm!
you can install own binaries if your isp is not willing to reinstall gd library!
@mediman: do you have a link to "Netpbm"?
Title: Re:yabb.info Member Map
Post by: mediman on June 22, 2002, 01:42:35 PM
of course!

netpbm http://sourceforge.net/projects/netpbm/

and gd lib http://www.boutell.com/gd/http/gd-1.8.4.zip

to install gd lib read also http://www.boutell.com/gd/manual1.8.4.html cause other libs are needed!

medi

if you have any questions....

btw: why using netpbm instead gd library?

(friendly stolen by menalto *gg*!)
Title: Re:yabb.info Member Map
Post by: andrea on June 23, 2002, 01:38:43 AM
Thanks for the links. Just downloaded and read a little in the netpbm documentations.

I have seen that netpbm is requiring ZLIB which also has been uninstalled from my webserver.

The fact that my ISP did not even activate ZLIB after the server "upgrade" looks to me not very qualified.

I suppose that it's easier to change provider than to invest days and nights of work for activating an own graphics library.  
Title: Re:yabb.info Member Map
Post by: mediman on June 23, 2002, 07:27:39 AM
hmm, do you know any image manipulating library that not need zlib?  ;) gd lib also need zlib!

but i agree, change the hosting provider! i think you will avoid a lot of trouble!

mediman
Title: Re:yabb.info Member Map
Post by: andrea on July 07, 2002, 04:08:48 AM

but i agree, change the hosting provider! ...

Done. Uploaded the files, and the member map is working again. It was just the GD library that has to be installed.
Title: Re:yabb.info Member Map
Post by: Peter Duggan on July 10, 2002, 07:14:10 PM
So I've just placed my pin somewhere on the north-western edge of a huge bunch of mutant redcurrants obscuring most of Europe! But I'd also like to direct the PNG-challenged to http://www.burnallgifs.org/ (http://www.burnallgifs.org/) for a graphic description of what's wrong with GIFs!
Title: Re:yabb.info Member Map
Post by: powergen on July 11, 2002, 05:10:19 PM
Hello guys.

I have downloaded the worldmap mod but I really need help in installing it.

I have already modified database prefix, all database data ...

... I have to add in subs.php and index.php the address to that file.

How can I manage that ?

As of now I have inserted a new function in the subs.php file stating that for that function the forum has to open worldmap.php ...

Is it correct ?

What's next ?

How can I add the link to this feature in the index or template file ?


Thanks for any help given. I really need it !


Andrea

Title: Re:yabb.info Member Map
Post by: powergen on July 11, 2002, 06:09:30 PM

I have installed the script that can be reached from here :

http://www.betasom.it/forum/Sources/BetasomMap_Image_0.php (http://www.betasom.it/forum/Sources/BetasomMap_Image_0.php)


The only thing is that the image doesn't appear at all.

What kind of software is required to work on .png ?


Here's the link to my phpinfo ...

http://www.betasom.it/phpinfo.php (http://www.betasom.it/phpinfo.php)


I have already installed netbpm .... but how can I use it on my png image ?

How to call it ?


Thanks for any help ...

Andrea



Title: Re:yabb.info Member Map
Post by: Michele on July 11, 2002, 11:58:52 PM
I finally got it mostly working, but when I check "Who is this?" and click on a pin, the picture no longer loads.

You can see it at http://ac2m.computers4gaming.com/forums/index.php?action=worldmap (http://ac2m.computers4gaming.com/forums/index.php?action=worldmap)

Click on the pin (or anywhere on the map for that matter), while "Who Is This?" is selected, and the page reloads, but the map doesn't. I just put this up, so there's only one pin there right now - want to get it working before it debuts in front of my users. :)

Thanks, Mad Moya
Title: Re:yabb.info Member Map
Post by: andrea on July 12, 2002, 12:47:53 AM
The only thing is that the image doesn't appear at all.

What kind of software is required to work on .png ?

Here's the link to my phpinfo ...

http://www.betasom.it/phpinfo.php (http://www.betasom.it/phpinfo.php)

@powergen:

Hi Andrea,

Your phpinfo() shows that the GD Library is not installed. So the member map won't work on your host.
Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 02:18:15 AM

Thanks Andrea ...

that's hard news to me ...  :(


Is there a way to ask my host to install it ...

I have a bin executable directory, can I add it there or there's nothing to do ?

Thanks for any help, let me know,

Andrea


btw ..... same name !!!


Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 02:26:43 AM
I have checked the GD documentation and download page ...

Ok, php uses this GD to manipulate images ... so how can we recall netpbm from php ?

And I should port to netbpm the script, shouldn't I ??

Oh ... my God !!

;D
Title: Re:yabb.info Member Map
Post by: andrea on July 12, 2002, 04:11:31 AM
Don't know how to teach php to use netpbm instead of GD library.

As far as I know one has to recompile php after the installation of the GD library, so for GD you anyway have to ask your provider. If for netpbm also a compilation of php is needed, I dont know. Also the ZLIB library is not installed on your host, as phpinfo() is showing. And ZLIB is needed for netpbm, too.

The easiest is to ask your provider to install GD for you. And if he won't move to a host where the stuff is already installed.
Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 04:55:36 AM

well, netbpm is available in binary with zlib already installed within I guess.

The problem is to take the code from Gd to netbpm ...

I have also asked help to mediman, hope he replies with tips and directions.

:)

Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 05:17:46 AM

Andrea, the simpliest way would be to ask my host for gd ....

... the problem is that I've asked them to install the latest php, current is 4.0.4 ... they told me no.

So I'll ask GD right away .... just hoping they do not tell me no again.

It's a paid hosting, €150 per year ... No free ...


... so I hope they help me ....


let you know, thanks again,

Andrea

Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 11:48:46 AM
Ok, I have got their YES !!

I hope they'll install latest version ....

I've been stunned by their gentle behavior ....

:o

They have told me they'll set up GD next week for me ....


Anyway, Andrea ....

... now I have these doubts ... I have seen many of your forums where you have the map displayed ...

I would really like to get the map displayed just when you click on a button in the forum template.

And it would open in a new window ....


Ok, I have managed to modify my template, to get a new window open ...

... BUT when it opens I call the function "worldmap" ....


Where should I add this function to the index.php or subs.php ??

And how ?


I have seen for example that there are many, lots of includes in the index.php and that all of them come grouped using a fastfind variable ....

Where should I put the action "worldmap" ?


Thanks for your kind help,


Andrea

Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 12, 2002, 12:00:12 PM
Search for this in index.php:

Code: [Select]
   else if ($action == 'listNewPosts') { include_once "$sourcedir/Recent.php"; ListNewPosts(); }
   else if ($action == 'test') { include_once "$sourcedir/UserLanguage.php"; LoadLanguage(); }


and add this after it:

Code: [Select]
       else if ($action == 'worldmap') { include_once "WorldMap.php"; WorldMap(); }
Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 12:17:19 PM

Chris, ok, thanks !!

Can I ask you why there ???

???
Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 12, 2002, 12:20:59 PM
Simple: That is where I have it in mine, and mine works.
URL REMOVED

Technical: You can put it here because it is in an else statement from the fastfind's which means it gets called if none of the others are true. You could also put it within the "w" fastfind as well so that it will be called as long as the first letter is w... which it is.
Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 12:25:57 PM
Just a thing ....

I have seen that this way it's open in another page but still inside the forum ... I mean the template ...

If I wanted to open it in another page but just the map as here in Yabb.info ??

Thanks, Andrea
Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 12, 2002, 12:27:51 PM
It won't do that for you, I altered WorldMap.php so it would do that. Just do what I say and it will be just like the one here.
Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 12:33:06 PM

No fear, I will manage that.

For sure !!

;D

Thanks !!

Andrea


Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 12, 2002, 12:36:23 PM
Glad to help, if you need anything else, just ask.
Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 03:25:48 PM

Ok Chris ... I have thought about it ...

I really would likt to have my map open inside the template of the forum and not outside.

It's really weird since when I was trying to make it work (I had the name of the function in worldmap.php set wrong) it tried to open inside the template ....

... but then when I correctly stated the name of the function and it did run .... well ... it ran in the same IE window but in a blank page .....


How can I set it to run inside the template ??

Do I have to modify the index.php ?


Please gimme some tips !  ;D

Thanks a lot,


Andrea

Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 12, 2002, 05:31:58 PM
To make it display inside the template you are going to have to add 3 functions to WorldMap.php

Here is what my edited WorldMap.php file looks like:

Code: [Select]
<?php<br><br>/**<br> * Short description. <br> *<br> * Detail description<br> * @param      none<br> * @global     none<br> * @since      1.0<br> * @access     private<br> * @return     void<br> * @update     date time<br>*/<br><br>function WorldMap()<br>{<br>   global $imagesdir$ID_MEMBER$db_prefix,$HTTP_GET_VARS$settings;<br>        template_header();<br>   if ($HTTP_GET_VARS['t'] == && $settings[7] != 'Administrator')<br>      $HTTP_GET_VARS['t'] = 0;<br><br>   if ($HTTP_GET_VARS['t'] == && $ID_MEMBER==-1)<br>      $HTTP_GET_VARS['t'] = 0;<br><br>   if ($HTTP_GET_VARS['t'] == 0)<br>   {<br>      if (isset ($HTTP_GET_VARS['submitted']) && $HTTP_GET_VARS['submitted'] && $ID_MEMBER != -1)<br>      {<br>         $request mysql_query ("SELECT * FROM {$db_prefix}world_map WHERE ID_MEMBER=$ID_MEMBER");<br>         if (mysql_num_rows($request) > 0)<br>            $request mysql_query ("UPDATE {$db_prefix}world_map SET xPos=$HTTP_GET_VARS[map_x], yPos=$HTTP_GET_VARS[map_y] WHERE ID_MEMBER=$ID_MEMBER");<br>         else<br>            $request mysql_query ("INSERT INTO {$db_prefix}world_map (ID_MEMBER,xPos,yPos) VALUES($ID_MEMBER$HTTP_GET_VARS[map_x]$HTTP_GET_VARS[map_y])");<br>      }       <br>   }<br><br>   if ($ID_MEMBER == -1)<br>   {<br>      print "<font face=verdana,size=1><center><img src=\"http://yapp.phpworld.net/worldmap_image.php\"></center>";<br>   }<br>   else<br>   {<br>      if ($settings[7] == 'Administrator')<br>      {<br>         $adminTxt " &nbsp;&nbsp;&nbsp; <input type=radio name=t value=2>Delete Pin";<br>          <br>      }<br>      print "<font face=verdana,size=1><form action=\"$scripturl\" method=get><input type=hidden name=action value=\"worldmap\"><center><input type=image src=\"http://yapp.phpworld.net/worldmap_image.php?me=$ID_MEMBER&t=$HTTP_GET_VARS[t]&x=$HTTP_GET_VARS[map_x]&y=$HTTP_GET_VARS[map_y]\" name=map onclick=\"submit()\" style=\"cursor:crosshair\"><br> <input type=radio name=t value=1 checked>Who is this? &nbsp;&nbsp;&nbsp; <input type=radio name=t value=0>Place My Pin$adminTxt</center><input type=hidden name=submitted value=1></form>";<br>   }<br><br>   print <<<EOT<br>      The most recent pin addition is hilighted by a blue circle, and your location is indicated by a blue pin.  The above image is a PNG, if you can't see it, your browser may not support the PNG file type. The member map is a map of all the members who are registered and who have indicated their position on the world map.  If you haven't yet placed yourselfclick on the map above to place your pin.  You can move your pin around at any time.  Alsoyou can only place a pin if you are a registered member and are logged in.<br>      </font><br>EOT;<br>        footer();<br>   obExit();<br>}//end func<br>?>

As you can see I added template_header(); to the beginning of it. and at the end of it I added footer(); and obExit();

Just add those 3 function calls to yours and it will make it load with the template.(don't use this code above since it has my site's specific stuff in it for the urls of the image.) Be sure to add them in the same place that I put them in this example.

Hope this helps.
Title: Re:yabb.info Member Map
Post by: powergen on July 12, 2002, 06:21:31 PM
Hey Chris !!!

THANKS !!

I really appreciated, thanks for sharing.

I have put the 3 tags, actually I already had the "obExit();" one.

It works !!


Ok, the close javascript button had not sense anymore, so I changed it to a more useful ..

<a href="$scripturl">


Just to take the user back to main menu, that's it ....

 ;D


That's all I have added .. and it's ready to roll as soon as my host get GD on the website ....

 :D


Thanks again, you are a great guy !!


powergen

Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 10:41:08 AM
Dear friends ....

unfortunately .... after my host gently installed the GD Library and also updated php and MySQL ....

After, I think, having correctly installed all files ... I still get the ugly "no pic" image from Internet Explorer ....

:-[

What could be wrong ??

Here's again my phpinfo and my link to the forum action command.....


http://www.betasom.it/phpinfo.php (http://www.betasom.it/phpinfo.php)


http://www.betasom.it/forum/?action=betasommap (http://www.betasom.it/forum/?action=betasommap)


I really do not know what is wrong ... I modified index.php, Subs.php, the image, all appears to be properly set.....

But it doesn't work.


Could you give me a tip, a hint .... a guess ??

Thanks a lot for any help,


Andrea


Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 17, 2002, 10:50:04 AM
Well first off the link needs to be action=worldmap not action=betasommap like you have. Second, I have both the WorldMap.php and the worldmap_image.php file in the main directory with the settings.php file. I can see that you have it in the Sources directory which is probably why the image isn't loading.
Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 11:01:00 AM
Thanks for the fast reply !

Ok, I have changed all ..

I have set action=betasommap

since it's not anymore a World Map ...


And also those links ....


Here we go ......... sorry to post all this ........

Code: [Select]
<?php


/**
 * Short description. 
 *
 * Detail description
 * @param      none
 * @global     none
 * @since      1.0
 * @access     private
 * @return     void
 * @update     date time
*/

function BetasomMap_0()
{
   global $scripturl,$imagesdir,$sourcedir$ID_MEMBER$db_prefix,$HTTP_GET_VARS$settings;
       
template_header();
   if ($HTTP_GET_VARS['t'] == && $settings[7] != 'Administrator')
      $HTTP_GET_VARS['t'] = 0;

   if ($HTTP_GET_VARS['t'] == && $ID_MEMBER==-1)
      $HTTP_GET_VARS['t'] = 0;

   if ($HTTP_GET_VARS['t'] == 0)
   {
      if (isset ($HTTP_GET_VARS['submitted']) && $HTTP_GET_VARS['submitted'] && $ID_MEMBER != -1)
      {
         $request mysql_query ("SELECT * FROM {$db_prefix}betasom_map_0 WHERE ID_MEMBER=$ID_MEMBER");
         if (mysql_num_rows($request) > 0)
            $request mysql_query ("UPDATE {$db_prefix}betasom_map_0 SET xPos=$HTTP_GET_VARS[map_x], yPos=$HTTP_GET_VARS[map_y] WHERE ID_MEMBER=$ID_MEMBER");
         else
            $request 
mysql_query ("INSERT INTO {$db_prefix}betasom_map_0 (ID_MEMBER,xPos,yPos) VALUES($ID_MEMBER$HTTP_GET_VARS[map_x]$HTTP_GET_VARS[map_y])");
      }       
   
}

   if ($ID_MEMBER == -1)
   {
      print "<font face=verdana size=1><center><img src=\"$sourcedir/BetasomMap_Image_0.php\"></center>";    
   }
   else
   
{
      if ($settings[7] == 'Administrator')
      {
         $adminTxt " &nbsp;&nbsp;&nbsp; <input type=radio name=t value=2>Cancella puntina";
          
      
}
      print "<font face=verdana size=1><form action=\"$scripturl\" method=get><input type=hidden name=action value=\"betasommap\"><center><input type=image src=\"$sourcedir/BetasomMap_Image_0.php?me=$ID_MEMBER&t=$HTTP_GET_VARS[t]&x=$HTTP_GET_VARS[map_x]&y=$HTTP_GET_VARS[map_y]\" name=map onclick=\"submit()\" style=\"cursor:crosshair\"><br> <input type=radio name=t value=1 checked>Chi è questo ? &nbsp;&nbsp;&nbsp; <input type=radio name=t value=0>Attacca la mia puntina$adminTxt</center><input type=hidden name=submitted value=1></form>";    
   }
   
   print 
<<<EOT
      L'ultima puntina affissa è evidenziata con un cerchio blu, la tua posizione è invece evidenziata con una puntina blu.  L'immagine sopra è in formato PNG, se non riesci a vederla può essere a causa del tuo browser che non supporta i file di formato PNG.  La Mappa Membri Betasom è una cartina che riporta i membri che sono registrati al Forum e che hanno indicato la loro posizione.  Se non lo hai ancora fatto, fai click sulla cartina qui sopra per porre la tua puntina.  Potrai spostarla in qualsiasi momento.  Puoi apporre una puntina solo se sei un Membro registrato del Forum e hai effettuato il login.<p align=right><a href="$scripturl">Ripiega Mappa</a>
   </font>
      
EOT;
       
footer();
   obExit();
}
//end func
?>



and the second one



Code: [Select]
<?

$dbcon = mysql_connect(XXX, 'XXX', 'XXX');
mysql_select_db(XXX');

$db_prefix = 'yabbse_';

$im = @imagecreatefrompng("http://www.betasom.it/pics/forum/italia.png"); /* Attempt to open */

$request = mysql_query("SELECT * FROM {$db_prefix}betasom_map_0");

$red = imagecolorallocate ($im, 255, 0, 0);
$darkred = imagecolorallocate ($im, 100, 0, 0);
$grey = imagecolorallocate ($im, 165, 165, 165);
$pink = imagecolorallocate ($im, 255, 195, 195);
$black = imagecolorallocate ($im, 0, 0, 0);
$blue = imagecolorallocate ($im, 0, 0, 200);
$darkblue = imagecolorallocate ($im, 0, 0, 80);
$lightblue = imagecolorallocate ($im, 195, 195, 255);
$white = imagecolorallocate ($im, 255, 255, 255);

if (!isset($x))
   $x = -100;
if (!isset($y))
   $y = -100;


$count = mysql_num_rows($request);
$labelX = -100;
$labelY = -100;
$labelID = -1;

while ($row = mysql_fetch_array($request))
{
   $count --;
   imagesetpixel ($im, $row['xPos'],$row['yPos'],$red);

   if (isOnPin($row['xPos'],$row['yPos'], $x, $y))
   {
      $labelX = $row['xPos'];
      $labelY = $row['yPos'];
      $labelID = $row['ID_MEMBER'];
      if ($t != 2)
      {
         if ($count == 0)
            imagearc ($im, $row['xPos'],$row['yPos'], 9, 9, 0, 360, $blue);
         drawPin ($im, $row['xPos'],$row['yPos'], $me==$row['ID_MEMBER']);          
      }
      else // delete the pin
      {
         $request2 = mysql_query("DELETE FROM {$db_prefix}betasom_map_0 WHERE ID_MEMBER=$row[ID_MEMBER]");
      }
   }
   else
   {
      if ($count == 0)
         imagearc ($im, $row['xPos'],$row['yPos'], 9, 9, 0, 360, $blue);
      drawPin ($im, $row['xPos'],$row['yPos'], $me==$row['ID_MEMBER']);
   }
}

if ($t==1)
{
    $request2 = mysql_query("SELECT realName FROM {$db_prefix}members WHERE ID_MEMBER=$labelID");
   if (mysql_num_rows($request2) > 0)
   {
      $row2 = mysql_fetch_array($request2);
   }
   drawAlphaFilledBox ($im, ($labelX+6), ($labelY-19), ($labelX + (strlen($row2['realName']) * 6) + 9), ($labelY-3), $white, .5);
   imagerectangle ($im, ($labelX+6), ($labelY-19), ($labelX + (strlen($row2['realName']) * 6) + 9), ($labelY-3), $black);
   imagestring ($im,2,$labelX+8,$labelY-17,$row2['realName'],$blue);             
}

$numPins = mysql_num_rows($request);

imagestring ($im,2,0,0,"Vi sono $numPins puntine",$blue);

imagepng ($im);

imagedestroy($im);


/**
 * Short description.
 *
 * Detail description
 * @param      none
 * @global     none
 * @since      1.0
 * @access     private
 * @return     void
 * @update     date time
*/
function drawPin($img, $x, $y, $me=false)
{
   global  $red, $pink, $darkred, $black, $grey, $blue, $darkblue, $lightblue;
   
   if ($me) {
      imageline ($img, $x+1,$y-2,$x+2,$y-2,$blue);
      imageline ($img, $x,$y-3,$x+3,$y-3,$blue);
      imagesetpixel ($img, $x+1,$y-4,$blue);

      imageline ($img, $x+2,$y-5,$x+4,$y-5,$blue);
      imageline ($img, $x+2,$y-6,$x+4,$y-6,$blue);
      imageline ($img, $x+3,$y-7,$x+4,$y-7,$blue);

      imagesetpixel ($img, $x+2,$y-4,$lightblue);
      imagesetpixel ($img, $x+3,$y-6,$lightblue);

      imagesetpixel ($img, $x,$y-2,$darkblue);
      imagesetpixel ($img, $x+3,$y-2,$darkblue);
      imagesetpixel ($img, $x+2,$y-5,$darkblue);
      imagesetpixel ($img, $x+4,$y-4,$darkblue);
      imagesetpixel ($img, $x+5,$y-6,$darkblue);        
   }
   else
   {
      imageline ($img, $x+1,$y-2,$x+2,$y-2,$red);
      imageline ($img, $x,$y-3,$x+3,$y-3,$red);
      imagesetpixel ($img, $x+1,$y-4,$red);

      imageline ($img, $x+2,$y-5,$x+4,$y-5,$red);
      imageline ($img, $x+2,$y-6,$x+4,$y-6,$red);
      imageline ($img, $x+3,$y-7,$x+4,$y-7,$red);

      imagesetpixel ($img, $x+2,$y-4,$pink);
      imagesetpixel ($img, $x+3,$y-6,$pink);

      imagesetpixel ($img, $x,$y-2,$darkred);
      imagesetpixel ($img, $x+3,$y-2,$darkred);
      imagesetpixel ($img, $x+2,$y-5,$darkred);
      imagesetpixel ($img, $x+4,$y-4,$darkred);
      imagesetpixel ($img, $x+5,$y-6,$darkred);
   }

   imagesetpixel ($img, $x,$y-1,$grey);

   imageline ($img, $x,$y,$x+1,$y,$black);
   imageline ($img, $x+1,$y-1,$x+3,$y-1,$black);
   imageline ($img, $x+4,$y-2,$x+4,$y-3,$black);
   imagesetpixel ($img, $x+3,$y-4,$black);
   imagesetpixel ($img, $x+5,$y-5,$black);
   
} // end func


/**
 * Short description.
 *
 * Detail description
 * @param      none
 * @global     none
 * @since      1.0
 * @access     private
 * @return     void
 * @update     date time
*/
function isOnPin($pinX, $pinY, $pointX, $pointY)
{
   if ($pointX < $pinX || $pointY > $pinY || $pointX > $pinX+5 || $pointY < $pinY-7)
   {
      return false;
   }
   else
   {
      if (($pointX==$pinX || $pointX == $pinX+1) && $pointY <= $pinY && $pointY >= ($pinY-3))
         return true;

      if ($pointX > $pinX && $pointX < ($pinX+4) && $pointY < $pinY && $pointY >= ($pinY-4))
         return true;

      if (($pointX==$pinX+3 || $pointX == $pinX+4) && $pointY <= ($pinY-2) && $pointY >= ($pinY-7))
         return true;

      if ($pointX >= ($pinX+2) && $pointX < ($pinX+5) && $pointY <= ($pinY-5) && $pointY >= ($pinY-6))
         return true;

      return false;
   }
   
} // end func


/**
 * Short description.
 *
 * Detail description
 * @param      none
 * @global     none
 * @since      1.0
 * @access     private
 * @return     void
 * @update     date time
*/
function drawAlphaFilledBox(&$im, $x1, $y1, $x2, $y2, $col, $trans)
{
   for ($i = $x1; $i <= $x2; $i++)
   {
      for ($k = $y1; $k <= $y2; $k++)
      {
         $ttt = imagecolorat ($im, $i, $k);
         $rgb1 = imagecolorsforindex ($im, imagecolorat ($im, $i, $k));
         $rgb2 = imagecolorsforindex ($im, $col);

         $red1 = ((1-$trans) * $rgb2['red']) + ($trans * $rgb1['red']);
         $green1 = ((1-$trans) * $rgb2['green']) + ($trans * $rgb1['green']);
         $blue1 = ((1-$trans) * $rgb2['blue']) + ($trans * $rgb1['blue']);

         $newCol = imagecolorresolve ($im, $red1, $green1, $blue1);

         imagesetpixel ($im, $i, $k, $newCol);
      }        
    }
} // end funcdraw
?>




What do you think Chris ?


 ::)


Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 17, 2002, 11:05:20 AM
You might want to edit that post, it contains your password.
Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 11:06:31 AM
Just done !!!

My God !!!

I'm so dumb ....................


Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 17, 2002, 11:09:40 AM
I don't really see anything wrong with it(on a fast inspection). I am not sure why it isn't working.
Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 11:12:40 AM

How could I verify that GD is really working ?

Or whatever ?


:-\
Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 11:30:28 AM
Maybe I have got the clue ...


Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 11:43:58 AM

By itself it works ...

http://www.betasom.it/forum/Sources/BetasomMap_Image_0.php (http://www.betasom.it/forum/Sources/BetasomMap_Image_0.php)
Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 17, 2002, 11:45:50 AM
Move it from the sources directory to the forum directory and change all the links in the source to point to it in the forum directory instead.
Title: Re:yabb.info Member Map
Post by: Michele on July 17, 2002, 12:49:35 PM
Chris, did you get my email yesterday?

Thanks, Moya
Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 01:39:52 PM
Chris I have found the problem.

It's all fault of the $sourcedir variable that does work well ....

.... but just for scripts ...

In the <img src= .... > tag you have to put the clear path to the second php file ...

I have just used another variable for doing that and that's it !


;D

Thanks for your help !!

powergen

Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 17, 2002, 01:52:28 PM
That is the reason I told you to change it. The sourcedir var has the directory of it not the url.
Title: Re:yabb.info Member Map
Post by: powergen on July 17, 2002, 04:07:36 PM

hehehe, thanks Chris .....


Next time I'll listen to you just from the start !!

The point is that I really like to understand things on my own ...

I know I have asked help ... but just after the first tip, I really want to scour and find the why underneath ...


::)

Title: Re:yabb.info Member Map
Post by: Michele on July 26, 2002, 08:38:55 PM
I'm having a small problem with the member map and YaPP... perhaps Chris or Jedi can find the problem?

I created a page in Admin (index.php?page=map) that looks like this:

Code: [Select]
global $imagesdir, $ID_MEMBER, $db_prefix, $HTTP_GET_VARS, $settings;
   if ($HTTP_GET_VARS['t'] == 2 && $settings[7] != 'Administrator')
      $HTTP_GET_VARS['t'] = 0;

   if ($HTTP_GET_VARS['t'] == 1 && $ID_MEMBER==-1)
      $HTTP_GET_VARS['t'] = 0;

   if ($HTTP_GET_VARS['t'] == 0)
   {
      if (isset ($HTTP_GET_VARS['submitted']) && $HTTP_GET_VARS['submitted'] && $ID_MEMBER != -1)
      {
         $request = mysql_query ("SELECT * FROM pre_world_map WHERE ID_MEMBER=$ID_MEMBER");
         if (mysql_num_rows($request) > 0)
            $request = mysql_query ("UPDATE pre_world_map SET xPos=$HTTP_GET_VARS[map_x], yPos=$HTTP_GET_VARS[map_y] WHERE ID_MEMBER=$ID_MEMBER");
         else
            $request = mysql_query ("INSERT INTO pre_world_map (ID_MEMBER,xPos,yPos) VALUES($ID_MEMBER, $HTTP_GET_VARS[map_x], $HTTP_GET_VARS[map_y])");
      }       
   }

   if ($ID_MEMBER == -1)
   {
      print "<font face=verdana,size=1><center><img src=\"worldmap_image.php\"></center>";    
   }
   else
   {
      if ($settings[7] == 'Administrator')
      {
         $adminTxt = "     <input type=radio name=t value=2>Delete Pin";
          
      }
print "<font face=verdana,size=1><form action=\"index.php\" method=get><input type=hidden name=page value=\"map\"><center><input type=image src=\"worldmap_image.php?me=$ID_MEMBER&t=$HTTP_GET_VARS[t]&x=$HTTP_GET_VARS[map_x]&y=$HTTP_GET_VARS[map_y]\" name=map onclick=\"submit()\" style=\"cursor:crosshair\">      <br> <input type=radio name=t value=1 checked>Who is this?     <input type=radio name=t value=0>Place My Pin$adminTxt</center><input type=hidden name=submitted value=1></form>";    
   }
print <<<EOT
The most recent pin addition is highlighted by a blue circle, and your location is indicated by a blue pin. The AC²M member map is a map of all members who are registered on AC²M and who have indicated their position on the world map.  If you haven't yet placed yourself, click on the map above to place your pin.   You can move your pin around at any time.  Also, you can only place a pin if you are a registered member and are logged in.</font>Please note that <b>Who is this?</b> isn't quite working yet.<p>
<hr width="80%">
EOT;
obexit();


Everything works except for when you click on "Who Is This?" then I get no pic. DELETE and ADD A PIN work fine though. Also, the obexit() stuff is preventing the copyright stuff from loading yet I get no error. If I remove obexit() I get errors in subs.php (or was it ssubs.php?).

The worldmap_image.php is in the same directory as the forums, and the image is in YaBBImages. Here's what worldmap_image.php looks like:

Code: [Select]
<?
$dbcon = mysql_connect('localhost', surprise', 'IWontTell');
mysql_select_db('NotHereEither');
$db_prefix = 'pre_';
$im = @imagecreatefromjpeg ("http://ac2m.computers4gaming.com/YaBBImages/dereth.jpg"); /* Attempt to open */
$request = mysql_query("SELECT * FROM pre_world_map");

$red = imagecolorallocate ($im, 255, 0, 0);
$darkred = imagecolorallocate ($im, 100, 0, 0);
$grey = imagecolorallocate ($im, 165, 165, 165);
$pink = imagecolorallocate ($im, 255, 195, 195);
$black = imagecolorallocate ($im, 0, 0, 0);
$blue = imagecolorallocate ($im, 0, 0, 200);
$darkblue = imagecolorallocate ($im, 0, 0, 80);
$lightblue = imagecolorallocate ($im, 195, 195, 255);
$white = imagecolorallocate ($im, 255, 255, 255);

if (!isset($x))
   $x = -100;
if (!isset($y))
   $y = -100;


$count = mysql_num_rows($request);
$labelX = -100;
$labelY = -100;
$labelID = -1;

while ($row = mysql_fetch_array($request))
{
   $count --;
   imagesetpixel ($im, $row['xPos'],$row['yPos'],$red);

   if (isOnPin($row['xPos'],$row['yPos'], $x, $y))
   {
      $labelX = $row['xPos'];
      $labelY = $row['yPos'];
      $labelID = $row['ID_MEMBER'];
      if ($t != 2)
      {
         if ($count == 0)
            imagearc ($im, $row['xPos'],$row['yPos'], 9, 9, 0, 360, $blue);
         drawPin ($im, $row['xPos'],$row['yPos'], $me==$row['ID_MEMBER']);
      }
      else // delete the pin
      {
         $request2 = mysql_query("DELETE FROM pre_world_map WHERE ID_MEMBER=$row[ID_MEMBER]");
      }
   }
   else
   {
      if ($count == 0)
         imagearc ($im, $row['xPos'],$row['yPos'], 9, 9, 0, 360, $blue);
      drawPin ($im, $row['xPos'],$row['yPos'], $me==$row['ID_MEMBER']);
   }
}

if ($t==1)
{
   $request2 = mysql_query("SELECT realName FROM pre_members WHERE ID_MEMBER=$labelID");
   if (mysql_num_rows($request2) > 0)
   {
      $row2 = mysql_fetch_array($request2);
   }
   drawAlphaFilledBox ($im, ($labelX+6), ($labelY-19), ($labelX + (strlen($row2['realName']) * 6) + 9), ($labelY-3), $white, .5);
   imagerectangle ($im, ($labelX+6), ($labelY-19), ($labelX + (strlen($row2['realName']) * 6) + 9), ($labelY-3), $black);
   imagestring ($im,2,$labelX+8,$labelY-17,$row2['realName'],$blue);             
}

$numPins = mysql_num_rows($request);

imagestring ($im,2,0,0,"There are $numPins pins",$blue);

imagejpeg ($im);

imagedestroy($im);


/**
* Short description.
*
* Detail description
* @param      none
* @global     none
* @since      1.0
* @access     private
* @return     void
* @update     date time
*/
function drawPin($img, $x, $y, $me=false)
{
   global  $red, $pink, $darkred, $black, $grey, $blue, $darkblue, $lightblue;
   
   if ($me) {
      imageline ($img, $x+1,$y-2,$x+2,$y-2,$blue);
      imageline ($img, $x,$y-3,$x+3,$y-3,$blue);
      imagesetpixel ($img, $x+1,$y-4,$blue);

      imageline ($img, $x+2,$y-5,$x+4,$y-5,$blue);
      imageline ($img, $x+2,$y-6,$x+4,$y-6,$blue);
      imageline ($img, $x+3,$y-7,$x+4,$y-7,$blue);

      imagesetpixel ($img, $x+2,$y-4,$lightblue);
      imagesetpixel ($img, $x+3,$y-6,$lightblue);

      imagesetpixel ($img, $x,$y-2,$darkblue);
      imagesetpixel ($img, $x+3,$y-2,$darkblue);
      imagesetpixel ($img, $x+2,$y-5,$darkblue);
      imagesetpixel ($img, $x+4,$y-4,$darkblue);
      imagesetpixel ($img, $x+5,$y-6,$darkblue);        
   }
   else
   {
      imageline ($img, $x+1,$y-2,$x+2,$y-2,$red);
      imageline ($img, $x,$y-3,$x+3,$y-3,$red);
      imagesetpixel ($img, $x+1,$y-4,$red);

      imageline ($img, $x+2,$y-5,$x+4,$y-5,$red);
      imageline ($img, $x+2,$y-6,$x+4,$y-6,$red);
      imageline ($img, $x+3,$y-7,$x+4,$y-7,$red);

      imagesetpixel ($img, $x+2,$y-4,$pink);
      imagesetpixel ($img, $x+3,$y-6,$pink);

      imagesetpixel ($img, $x,$y-2,$darkred);
      imagesetpixel ($img, $x+3,$y-2,$darkred);
      imagesetpixel ($img, $x+2,$y-5,$darkred);
      imagesetpixel ($img, $x+4,$y-4,$darkred);
      imagesetpixel ($img, $x+5,$y-6,$darkred);
   }

   imagesetpixel ($img, $x,$y-1,$grey);

   imageline ($img, $x,$y,$x+1,$y,$black);
   imageline ($img, $x+1,$y-1,$x+3,$y-1,$black);
   imageline ($img, $x+4,$y-2,$x+4,$y-3,$black);
   imagesetpixel ($img, $x+3,$y-4,$black);
   imagesetpixel ($img, $x+5,$y-5,$black);

} // end func


/**
* Short description.
*
* Detail description
* @param      none
* @global     none
* @since      1.0
* @access     private
* @return     void
* @update     date time
*/
function isOnPin($pinX, $pinY, $pointX, $pointY)
{
   if ($pointX < $pinX || $pointY > $pinY || $pointX > $pinX+5 || $pointY < $pinY-7)
   {
      return false;
   }
   else
   {
      if (($pointX==$pinX || $pointX == $pinX+1) && $pointY <= $pinY && $pointY >= ($pinY-3))
         return true;

      if ($pointX > $pinX && $pointX < ($pinX+4) && $pointY < $pinY && $pointY >= ($pinY-4))
         return true;

      if (($pointX==$pinX+3 || $pointX == $pinX+4) && $pointY <= ($pinY-2) && $pointY >= ($pinY-7))
         return true;

      if ($pointX >= ($pinX+2) && $pointX < ($pinX+5) && $pointY <= ($pinY-5) && $pointY >= ($pinY-6))
         return true;

      return false;
   }

} // end func


/**
* Short description.
*
* Detail description
* @param      none
* @global     none
* @since      1.0
* @access     private
* @return     void
* @update     date time
*/
function drawAlphaFilledBox(&$im, $x1, $y1, $x2, $y2, $col, $trans)
{
   for ($i = $x1; $i <= $x2; $i++)
   {
      for ($k = $y1; $k <= $y2; $k++)
      {
         $ttt = imagecolorat ($im, $i, $k);
         $rgb1 = imagecolorsforindex ($im, imagecolorat ($im, $i, $k));
         $rgb2 = imagecolorsforindex ($im, $col);

         $red1 = ((1-$trans) * $rgb2['red']) + ($trans * $rgb1['red']);
         $green1 = ((1-$trans) * $rgb2['green']) + ($trans * $rgb1['green']);
         $blue1 = ((1-$trans) * $rgb2['blue']) + ($trans * $rgb1['blue']);

         $newCol = imagecolorresolve ($im, $red1, $green1, $blue1);

         imagesetpixel ($im, $i, $k, $newCol);
      }        
   }
} // end funcdraw
?>


Again, everything works but the "Who is This" button, and I've been going over this code for several hours now and can't find it. You can see it not working right here:

http://ac2m.computers4gaming.com

Then click on "Where in Dereth? Link on the left. I've set up a dummy login account with a name of "testuser" and a password of "testpass" - let me know if you can figure out what's going on, I'm running on empty here.

Thanks, Mad Moya
Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 27, 2002, 03:04:36 AM
That isn't going to work because it uses the variable action while making a page in YaPP uses the variable page. The only way for this to work is for you to edit the source code and put it in yourself.
Title: Re:yabb.info Member Map
Post by: Michele on July 27, 2002, 08:37:19 AM
Well, it was mostly working when I posted the message, now it's not working at all for some reason...

Are you talking about the <form action="index.php" stuff? If so, I'll take a look at it and start playing and see what I come up with.

Thanks, MM

Title: Re:yabb.info Member Map
Post by: Jedi~ on July 27, 2002, 04:34:39 PM
Maybe I can get Chris to integrate the member map into YaPP, with permission of course :)

(I would, but 1.) I know nothing about it and 2.) I can't even see the stupid thing. )
Title: Re:yabb.info Member Map
Post by: Michele on July 28, 2002, 12:19:05 AM
Hehe, the map stopped working this morning, and my site stopped working sometime this evening, so I'm not surprised you couldn't see it. :(

Still awaiting a reply from my host's tech support. It looks like the Nameserver for my site is down, as I can still get there via the IP address.

There seems to be an issue with the line

imagejpeg ($im)

Sometimes it displays the map fine, sometimes it outputs gibberish, and sometimes it just outputs a broken link. I tried converting the jpeg to png, but it went from a 55K jpeg to a 450K png, so that wasn't a good solution. :)

Have fun, Moya
Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 28, 2002, 02:45:31 AM

Maybe I can get Chris to integrate the member map into YaPP, with permission of course :)

(I would, but 1.) I know nothing about it and 2.) I can't even see the stupid thing. )

The only problem is that the gd library must be installed for it to work. Should I put it into YaPP anyway?
Title: Re:yabb.info Member Map
Post by: Michele on July 28, 2002, 09:00:50 AM
Don't most hosts enable the gd library?

If you do integrate it, just remember to put a place for us to change the map file used! :)

Have fun, Moya
Title: Re:yabb.info Member Map
Post by: laidback on July 28, 2002, 11:28:40 AM

Hehe, the map stopped working this morning, and my site stopped working sometime this evening, so I'm not surprised you couldn't see it. :(

Still awaiting a reply from my host's tech support. It looks like the Nameserver for my site is down, as I can still get there via the IP address.



You wouldn't be using xnull would you?  My site and xnull itself both seem to be down, with myown site disappeared from the DNS.  >:(
Title: Re:yabb.info Member Map
Post by: Jedi~ on July 28, 2002, 12:32:59 PM

If you do integrate it, just remember to put a place for us to change the map file used! :)


Chris, make sure you do that ;)
Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 28, 2002, 12:58:16 PM
All you have to do is upload a new image in place of the other. Simple as that.
Title: Re:yabb.info Member Map
Post by: Michele on July 28, 2002, 03:53:24 PM



You wouldn't be using xnull would you?  My site and xnull itself both seem to be down, with myown site disappeared from the DNS.  >:(
Quote


Not xnull but dzones. When they moved me to a new server with a new IP last week they put me on the futzy DNS servers, so I moved them today to the good ones... now it just has to propagate again.

Have fun, Moya
Title: Re:yabb.info Member Map
Post by: Michele on July 28, 2002, 03:55:42 PM

All you have to do is upload a new image in place of the other. Simple as that.


Not quite true... the current php files use imagecreatefrompng and imagepng, those need to be changed if you use a jpg instead. Might as well make it a selectable option in the Admin panel. :)

Have fun, Moya
Title: Re:yabb.info Member Map
Post by: Chris Cromer on July 28, 2002, 04:03:21 PM
Oh sorry didn't understand what you meant, I thought you where talking about changing the name of the file. You want it to be an option to choose whether it will be jpg or gif.

I will see about adding that but no promises that it will be in 0.6.
Title: Re:yabb.info Member Map
Post by: Joseph Fung on July 28, 2002, 09:20:57 PM
Just as an added note, you should be able to determine the image type from the header, allowing users to use jpg, png or gif files (as the libraries allow).

What I would do, is have an option in the admin pannel to select a map image.  Then modify worldmap.php to look at the image type, and use the approrpriate image creationg function - creating a blank image with an error message "GIF file type not supported" or "PNG file type not supported" if applicable.
Title: Re:yabb.info Member Map
Post by: Jedi~ on July 28, 2002, 10:05:48 PM

Just as an added note, you should be able to determine the image type from the header, allowing users to use jpg, png or gif files (as the libraries allow).

What I would do, is have an option in the admin pannel to select a map image.  Then modify worldmap.php to look at the image type, and use the approrpriate image creationg function - creating a blank image with an error message "GIF file type not supported" or "PNG file type not supported" if applicable.


Good suggestion, thanks! Looks you need to add some more to your queue, Chris ;) :P
Title: Re:yabb.info Member Map
Post by: Joseph Fung on July 28, 2002, 10:09:08 PM
Quote
Good suggestion, thanks!

No problem.  It was something I always intended to do, but never got around to - and if someone else is willing to do the work for me, all the power to them :)
Title: Re:yabb.info Member Map
Post by: Jedi~ on July 29, 2002, 02:34:03 PM
Well, it'd be in our (YaPP) admin center, so it wouldn't do you much good ;) :P
Title: Re:yabb.info Member Map
Post by: powergen on August 03, 2002, 09:29:16 PM

Hello all !

After some time of actively diplaying and using the Mighty Map ... it got to my attention that all pins are somewhat light blue colored ....

I wonder if I can change their color to a more powerful red ....

How can I do that ??

Here's the link to the map : http://www.betasom.it/forum/index.php?action=betasommap (http://www.betasom.it/forum/index.php?action=betasommap)


Also, reading the php manual, the page on the
Code: [Select]
imagecreatefrompng command ...

it got to my attention that .... in order to get some colors in dynamically created images like this one, you have to place those colors in the background image too ...

Are the two things linked ?

How can I get the RED ??

??? ::) :P


Thanks in advance,


powergen



Title: Re:yabb.info Member Map
Post by: Chris Cromer on August 03, 2002, 09:32:51 PM
No the colors in the image are NOT link to the color of the pins. The color of the pins are set in the source file... but I don't know why ALL of the pins would be blue. Only 1 pin should be blue, the users pin, all others should be red.
Title: Re:yabb.info Member Map
Post by: Michele on August 03, 2002, 09:48:17 PM
Chris, when I was using a jpeg, all my pins were green. Dunno why, but I'm guessing it was the same reason that "Who is this?" didn't work with the jpeg.

If all his are blue, perhaps he's using something other than png too?

HTH, Mad Moya
Title: Re:yabb.info Member Map
Post by: powergen on August 03, 2002, 10:11:54 PM

Chris, have a look to my Mighty Map !!

The pins are light blue !!!

::) ::) ::)


I changed the image .... I didn't change the colors code  ...

:(


What else could it be ??


Title: Re:yabb.info Member Map
Post by: andrea on August 05, 2002, 05:29:33 PM
The pins in my map are red, as they should be. Maybe you are using to many colors in your map? I observed that when my png was transparent, the worldmap script was changing some of the colors, too. The same when I tried a non websafe background color, fitting to my website colors. The best results were when taking a nontransparent white background and a greyscale map image.
Title: Re:yabb.info Member Map
Post by: powergen on August 06, 2002, 09:02:46 AM
Andrea !!

THANKS !!!

PNG --> SAVE WEBSNAP --> RED PINS BACK !!!


;D ;D ;D

:-*


Thanks !!!!!!

Powergen


Title: Re:yabb.info Member Map
Post by: Shadowgate on August 06, 2002, 01:36:03 PM
I figured I would post a link to my member map...

http://www.newtiburon.com/yabbse/index.php?board=;action=worldmap

Working great!
Title: Re:yabb.info Member Map
Post by: powergen on August 06, 2002, 02:53:03 PM

Seen !

Cool one too !!


;D ;D ;D
Title: Re:yabb.info Member Map
Post by: Carsten on November 22, 2002, 07:45:38 PM
This is the MemberMap (http://www.langaa-net.dk/cgi-bin/kayabb/YaBB.pl?board=;action=mmall;defmap=europe)

Sorry it's for YaBB Gold 1 SP1/1.1  ;D
Title: Re:yabb.info Member Map
Post by: Jeff Lewis on November 23, 2002, 08:33:08 AM
Hey i like that map MOD :)
Title: Re:yabb.info Member Map
Post by: andrea on November 23, 2002, 04:11:13 PM

This is the MemberMap (http://www.langaa-net.dk/cgi-bin/kayabb/YaBB.pl?board=;action=mmall;defmap=europe)

Sorry it's for YaBB Gold 1 SP1/1.1  ;D


cool  8)
Title: Re:yabb.info Member Map
Post by: powergen on November 23, 2002, 05:03:26 PM

Hey i like that map MOD :)


It would rock translating it to YABBse !  ;D ;D ;D
Title: Re:yabb.info Member Map
Post by: nancy on August 15, 2003, 10:36:28 PM
Does that mean that I can't download it and use it in my YABBSE board?
I saw this map on someone's website and really like it and wanted to use it.  Is it not interchangeable with the YABBSE boards?

Nancy
Title: Re:yabb.info Member Map
Post by: Ben_S on August 16, 2003, 05:53:49 AM
Check the completed mods board
Title: Re:yabb.info Member Map
Post by: nancy on August 16, 2003, 08:38:47 PM
Thank you Ben.  I was looking in the wrong place but I've found it and downloaded it.  Appreciate your help.

Nancy