MyBB Hacks

Full Version: User Map with XThreads?
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
(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&amp;filterxt_uid={$post['uid']}">My Location</a>


Profile:

HTML Code
<a href="link_to_usermap_forum&amp;filterxt_uid={$memprofile['uid']}">My Location</a>

I used this for the postbit:

Code:
<a href="forumdisplay.php?fid=85&amp;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&amp;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&amp;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!  Biggrin
(09-03-2011 04:57 AM)RocketFoot Wrote: [ -> ]Clicking the marker takes you to the discussion page.

Unfortunately, not to the showthread, only to the forumdisplay (uid filtered):
http://xtest.byethost7.com/member.php?ac...http://xtest.byethost7.com/member.php?action=pro
(09-03-2011 05:05 AM)RateU Wrote: [ -> ]
(09-03-2011 04:57 AM)RocketFoot Wrote: [ -> ]Clicking the marker takes you to the discussion page.

Unfortunately, not to the showthread, only to the forumdisplay (uid filtered):
http://xtest.byethost7.com/member.php?ac...http://xtest.byethost7.com/member.php?action=pro

That would still be ok...looks perfect!
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&amp;size=450x200&amp;center=<func urlencode>{$userfields['fid1']}</func>&amp;markers=<func urlencode>{$userfields['fid1']}</func>&amp;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&amp;size=450x200&amp;center=<func urlencode>{$userfields['fid1']}</func>&amp;markers=<func urlencode>{$userfields['fid1']}</func>&amp;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
Pages: 1 2 3 4 5 6 7 8 9
Reference URL's