(09-03-2011 03:11 AM)RocketFoot Wrote: [ -> ]Would it be possible to link the location in my member's post bit profile and regular profile page to the map in their discussion thread?
I'm thinking it would be much like the bits used to link the vidoes and articles to the profile but I am unsure how to construct the bit!
Should be similar. Something like this:
Postbit:
HTML Code
<a href="link_to_usermap_forum&filterxt_uid={$post['uid']}">My Location</a>
|
Profile:
HTML Code
<a href="link_to_usermap_forum&filterxt_uid={$memprofile['uid']}">My Location</a>
|
I used this for the postbit:
Code:
<a href="forumdisplay.php?fid=85&filterxt_uid={$memprofile['uid']}">{$post['fid1']}</a>
|
Placed in postbit_author_user, But it links to the entire map...
Let me try yours...
This worked for me...
Code:
<a href="forumdisplay.php?fid=85&filterxt_uid={$post['uid']}">{$post['fid1']}</a>
|
Also, I edited my other post you may have not seen...
Would it be possible to add a small map tot he profile page with the member's marker? Or is that too much coding involved?
(09-03-2011 03:29 AM)RocketFoot Wrote: [ -> ]I used this for the postbit:
Code:
<a href="forumdisplay.php?fid=85&filterxt_uid={$memprofile['uid']}">{$post['fid1']}</a>
|
Placed in postbit_author_user, But it links to the entire map...
Because we can't use
$memprofile in postbit.
(09-03-2011 03:29 AM)RocketFoot Wrote: [ -> ]Would it be possible to add a small map tot he profile page with the member's marker?
For displaying the small map, maybe we can use the
Google Static Maps
I think that would be cool! My IPB forum has a small map that displays in the user's profile page. Clicking the marker takes you to the discussion page.
That would be a little more custom than just a link!
You need Template Conditionals or PHP In Template plugin for that. And you need a custom profile field to hold the user's address.
The basic example image URL (using location custom profile field - fid1):
HTML Code
http://maps.googleapis.com/maps/api/staticmap?zoom=14&size=450x200&center=<func urlencode>{$userfields['fid1']}</func>&markers=<func urlencode>{$userfields['fid1']}</func>&sensor=false
|
Modify it as your needs.
Not sure I follow...
Should I add the code above to a custom profile field?
It's the statics image URL. You need to put it inside the
member_profile template (wrap it with the img tag). Example:
HTML Code
<img src="http://maps.googleapis.com/maps/api/staticmap?zoom=14&size=450x200&center=<func urlencode>{$userfields['fid1']}</func>&markers=<func urlencode>{$userfields['fid1']}</func>&sensor=false" alt="" />
|
Your users need to put their address into the custom profile field (in this example: Location custom profile field).
Oh ok...I thought it would automatically link from this mod. I don't want to have to make them add even more info...LOL