MyBB Community Forums

Full Version: Usermap
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Paretje Wrote:Run the convert system of MyBB, and it has to be fixed, normally.

Unfortunately, this did not fix the problem. I converted the table usermap_places to UTF-8 (which has not been until then), but the map still shows the �.
I deactivated the plugin and tried several options: installing 1.02 ...upgrading to 1.03. and then 1.04 and also activating 1.04 without the previous versions.

Now i run 1.02 again. However now I am not able to find "muenchen" or "munich" even. This had been working correctly before.... Sad

Thank you in advance for any help! Wink
@Paretje
do you now know, what i mean?
and if... is it possible to insert something like that?
well... seems that nobody noticed my new entry. that's why i'm doin this double post.
so... is there anybody out there who knows something about my aim?
would be more than just nice.
hope to get a reply
cheers
mia
(2008-05-30, 08:25 AM)the_griffin Wrote: [ -> ]
Paretje Wrote:Run the convert system of MyBB, and it has to be fixed, normally.

Unfortunately, this did not fix the problem. I converted the table usermap_places to UTF-8 (which has not been until then), but the map still shows the �.
I deactivated the plugin and tried several options: installing 1.02 ...upgrading to 1.03. and then 1.04 and also activating 1.04 without the previous versions.

Now i run 1.02 again. However now I am not able to find "muenchen" or "munich" even. This had been working correctly before.... Sad

Thank you in advance for any help! Wink

Convert mybb_users.

(2008-06-19, 09:39 AM)Mia Wrote: [ -> ]well... seems that nobody noticed my new entry. that's why i'm doin this double post.
so... is there anybody out there who knows something about my aim?
would be more than just nice.
hope to get a reply
cheers
mia

I had exams, so couldn't post Wink

Open usermap.php and find:
		/***********************************
		 *   Load locations of users, the pins
		 ***********************************/
		$count = 0;
		
		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE usermap_lat!='0' AND usermap_lon!='0'");

Replace with:
		/***********************************
		 *   Load locations of users, the pins
		 ***********************************/
		$count = 0;
		
		$query2 = $db->query("SELECT * FROM ".TABLE_PREFIX."profilefields WHERE name='Location'");
		$locationfield = $db->fetch_array($query2);
		
		$query = $db->query("SELECT u.*, p.fid".$locationfield['fid']." AS location
		FROM ".TABLE_PREFIX."users u
		LEFT JOIN ".TABLE_PREFIX."userfields p ON (u.uid=p.ufid)
		WHERE u.usermap_lat!='0' AND u.usermap_lon!='0'");

In the same file, find:
			//Avatar
			if(!empty($users['avatar']))
			{
				$avatar = "<br /><img src=\"".$users['avatar']."\" alt=\"\" />";
			}
			else
			{
				$avatar = "";
			}

After it, add:
			//Location
			if(!empty($users['location']))
			{
				$avatar .= "<br /><strong>Location:</strong> {$users['location']}";
			}
hmm... donno... seems that it's not working. after i made these new entries it's showing me an eror on line 155 after uploading the file.
i tried out notepad++ and the normal notepad the comes with windows.
may... could you upload an edited file for me... just for a try?
btw... thanks a lot... and ..i hope you passed your examsWink
cheers
mia
Thank you.

This one actually works on my site Smile
(2008-06-23, 10:08 PM)helpseeker Wrote: [ -> ]Thank you.

This one actually works on my site Smile

would you upload this file to this thread? would be so nice!+cheers
mia
Is it possible to hide the user who posted the pin?

As in, I would like to see the pin on the map, but I do not want other memebers to see where exactly other memebers are living in. I just want pins on the map and thats all.
(2008-06-23, 06:44 PM)Mia Wrote: [ -> ]hmm... donno... seems that it's not working. after i made these new entries it's showing me an eror on line 155 after uploading the file.
i tried out notepad++ and the normal notepad the comes with windows.
may... could you upload an edited file for me... just for a try?
btw... thanks a lot... and ..i hope you passed your examsWink
cheers
mia

I see, I made a little mistake, I fixed the code, and it has to work now.

(2008-06-23, 11:17 PM)xiaozhu Wrote: [ -> ]Is it possible to hide the user who posted the pin?

As in, I would like to see the pin on the map, but I do not want other memebers to see where exactly other memebers are living in. I just want pins on the map and thats all.

You mean to exclude the pin of the user who is looking now?
heyho....
sure that u fixed the code?
...still shwoing me this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/user/mi/mia/html/usermap.php on line 155

any ideas?
cheers
mia
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25