Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
look to your left
|
Nic Barnes
Member
Registered: 5th Apr 04
Location: nowhere near ginger people
User status: Offline
|
i see a tv with the blacburn spurs game on, a window, a set of calibra clocks and a mcdonalds application form?????
|
Marc
Member
Registered: 11th Aug 02
Location: York
User status: Offline
|
I had £5 on Spurs
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
Ok,
I have decided to have a staff reshuffle. What we need is moderating members that have a direct interest in VAG cars, and that are willing to visit the site to add there knowledge to posts on there.
At the moment the staff we have range from people who do post quite frequently but dont have an actual interest in VAG cars to people that own VAG cars and have an interest but never visit.
If anyone wants to nominate themselves then feel free. I want people that are willing to help spread the word about the site and that can frequent the site often. If you know anyone that might be interested let them know.
Thanks
PS you dont necessarily have to own a VAG car
[Edited on 03-12-2006 by Steve]
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
I have just updated the site to version 2.0.22 please can people go and see if they get any errors and that it checks out visually, especially apple mac people
thanks
|
Nic Barnes
Member
Registered: 5th Apr 04
Location: nowhere near ginger people
User status: Offline
|
looks ok steve apart from on explorer like i explained on my mac
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
yeah can anyone else with a mac confirm this is the case with them ta
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
You may or may not notice the new Members Map link in the toolbar at the top.
This is a map of all members locations in the UK.
If you wish to add yourself go into your profile and add an entry in the Location Postcode field.
It just needs the first part of the postcode ie WR11. You will then appear as a dot on the map.
If you have any concerns about revealing your location, the first part of the postcode is only accurate to within 20miles or so, so you have no worries there.
If you hover over the dots you get the username of that location and a link to the persons profile.
I am still tweaking this and hope to add features soon, such as different coloured dots if your logged in etc.
If you add your postcode and you dont appear, or appear in completely the wrong place, then please let me know your first half of the postcode and where it should be.
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
Nice code - I've always been a little bit funny about publishing actual postcodes and also I've got 1300-odd stored which would mean a lot of <area> tags!
I do like that though.
ps. online/offline is just a JOIN on your session table. I think I ended up with conditionals in the SQL query to make the PHP simpler, like if there was an online time integer then the field is the word green or something.
See if there is anything in here that fits the bill
http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html
[Edited on 27-03-2007 by Ian]
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
cheers will look at that 
im having trouble at the moment with an IF statement and the imagecolorallocate($image, 185, 10, 0); function
basically in my WHILE loop it gets all the records where the users stored postcode = the postcode in the database, and gets all coords and outputs the dots. Which obviously works fine.
I add a basic IF statement in that loop which checks if the userid it is retrieving = the userid of the logged in user. I have checked the syntax by echoeing out stuff and the IF statement is correct.
But it seems to make that imagecolorallocate($image, 185, 10, 0); unhappy.
Code:
while( $row = $db->sql_fetchrow($result) )
{
$col_ellipse = imagecolorallocate($image, 185, 10, 0);
if ($row['user_id'] == "2")
{
$col_ellipse = imagecolorallocate($image, 200, 10, 0);
}
$x = $row['coordx'];
$y = $row['coordy'];
$x = $x + 1000;
$x = $x / 2;
$yf = 900 - $y;
imagefilledellipse($image, $x, $yf, 8, 8, $col_ellipse);
};
now it appears that when the IF is true, it sets the colour of the dot, then the next pass for some reason the imagecolorallocate overwrites it back to the original colour, tis a bit weird and doesnt make any sense
|
AndyKent
Member
Registered: 3rd Sep 05
User status: Offline
|
Does it help if you do an 'else' after to set the first colorallocate?
eg.
if(logged) color = red
else color = blue
...or whatever....
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
nope same thing, I can get it to do it so it does them one colour, up until the IF statement is true, then it turns that dot another colour but then all the other dots after it turn that colour.
To do that i just remove the
$col_ellipse = imagecolorallocate($image, 185, 10, 0);
line.
You can see why this happens because once it changes the colour the colour isnt being reset on the next loop.
However if the colour is reset on the next loop it seems to change the dot back to the same colour it did on the previous loop
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
I would have two imagecolourallocates elsewhere beforehand somewhere then
if ($row['user_id'] == "2") {
imagefilledellipse($image, $x, $yf, 8, 8, $green);
} else {
imagefilledellipse($image, $x, $yf, 8, 8, $red);
}
Are you doing another query inside the loop or is it one big join?
You want an inner join between members and postcode and a left join between that and online table so you'll get null entries where users are not in the online table.
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
cheers that worked perfectly, so now when you view the map, if your logged in your dot will appear a different colour
|
Liam
Member
Registered: 19th Jan 06
Location: Stafford
User status: Offline
|

Also Steve, whenever I go on the site, i have to login, even though I click remember me, and have my password saved etc.
Is it meant to do this?
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
no delete your cookies
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
for those mofolos that care Some new stuff added to this, the ability to change your postcode from the map page itself (if your logged in) and the ability to set different overlays on the map to give different info, at the moment iv only added Regions, but I will add other stuff like major tracks and 1/4 mile strips later
http://www.vagweb.co.uk/forums/map.php
[Edited on 30-03-2007 by Steve]
[Edited on 30-03-2007 by Steve]
|
topshot_2k
Banned
Registered: 1st Dec 03
Location: Northampton Drives: Pug GTi-6
User status: Offline
|
|
Robin
Premium Member
Registered: 7th Jan 04
Location: Northants Drives: Clio 182 Cup
User status: Offline
|
Steve, which region am I in on your map? I seem to be on the border of 2
|
topshot_2k
Banned
Registered: 1st Dec 03
Location: Northampton Drives: Pug GTi-6
User status: Offline
|
you have just moved in on my patch
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
you in east midlands robin
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
other bright ideas for overlays welcomed.
nothing to specific like hotels or whatever as there would be so many it would become unclear
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
added motorway networks as an overlay, quite good one this as if you hover of click over parts of the motorway it tells you the motorway name and junction
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
http://www.vagweb.co.uk/forums/map.php?overlay=mway
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
Is that vector data or part of the bitmap?
|