Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 User Map with XThreads?
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #41
RE: User Map with XThreads?
(09-03-2011 05:31 AM)RocketFoot Wrote:  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

I think profile page isn't the main XThreads working area. You need to query the data from the custom thread fields if you want it to be automatically.

09-03-2011 05:42 AM
Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #42
RE: User Map with XThreads?
Ah, ok...I thought it would be something easy like using the code from the firstpost to the profile...LOL!

[Image: gallery_2_628_39582.jpg]
09-03-2011 05:49 AM
Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #43
RE: User Map with XThreads?
Do you guys know how I can change the color of the hyper text links in the ballon pop-ups?  I installed a new theme and the links are now not visible!  I can't change the whole forum links as the theme is black and the words have to be white to see.  I just need to alter the user map only!


Attached File(s) Thumbnail(s)
       

[Image: gallery_2_628_39582.jpg]
(This post was last modified: 10-21-2011 05:40 AM by RocketFoot.)
10-21-2011 05:34 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #44
RE: User Map with XThreads?
Try this way:
Edit your Geo Location custom thread fields. Find (in the Display Format, line #1):

Code:
<div><strong><a href=\"'.get_profile_link($thread['uid']).'\">


Change to:

Code:
<div class=\"gmap_if\"><strong><a href=\"'.get_profile_link($thread['uid']).'\">


Add .gmap_if class to your global.css
Something like this:

Code:
.gmap_if a {
	color: green;
}


10-21-2011 06:19 AM
Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #45
RE: User Map with XThreads?
Excellent!  That is what I needed!

Thanks RateU!!


Attached File(s) Thumbnail(s)
   

[Image: gallery_2_628_39582.jpg]
10-21-2011 06:32 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #46
RE: User Map with XThreads?
Update: We will try to use Marker Clusterer Plus to cluster our marker.
  • Download markerclusterer_packed.js from here. Upload it to our /jscripts/ dir/folder.
  • Edit our umap_geol (Geo Location) custom thread fields:
    • Display Format:

      Code:
      <if THIS_SCRIPT != 'forumdisplay.php' then>{VALUE}</if><setvar umap_title>$thread['uid'] ? '<div class=\"gmap_if\"><strong><a href=\"'.get_profile_link($thread['uid']).'\">'.htmlspecialchars_uni($thread['username']).'</a>, <a href=\"'.$threadurl.'\">'.htmlspecialchars_uni($thread['subject']).'</a></strong></div><div class=\"smalltext\"><em>Pinned: '.$thread['threaddate'].', '.$thread['threadtime'].'</em></div>' : '<div><strong>'.htmlspecialchars_uni($mybb->user['username']).', '.htmlspecialchars_uni($mybb->input['subject']).'</strong></div><div class=\"smalltext\"><em>Pinned: '.my_date($mybb->settings['dateformat'], TIME_NOW).', '.my_date($mybb->settings['timeformat'], TIME_NOW).'</em></div>'</setvar><setvar map_msg>'<div><div class=\"float_left\" style=\"margin: 5px;\">'.$GLOBALS['threadfields']['umap_img']['value'].'</div>'.$tplvars['umap_title'].'<br />'.$GLOBALS['threadfields']['umap_desc'].'</div>'</setvar><setvar mymarker>$mybb->user['uid'] ? '<a href="'.$forumurl_q.'filterxt_uid='.intval($mybb->user['uid']).'">Where is my marker?</a>' : ''</setvar><if THIS_SCRIPT == 'forumdisplay.php' then>[{VALUE$1},"<func htmlspecialchars_uni>{$thread['username']}: {$thread['subject']}</func>","{$GLOBALS['tplvars']['map_msg']}","{$threadurl}"],</if>

    • Text Mask Filter:

      Code:
      ^\(((-?)([0-9]*)(?:\.(\d*)), (-?)([0-9]*)(?:\.(\d*)))\)$

  • Edit our umap_threadlist template:

    HTML Code
    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
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
    {$headerinclude}
    {$rssdiscovery}
    <script type="text/javascript">
    <!--
    	lang.no_new_posts = "{$lang->no_new_posts}";
    	lang.click_mark_read = "{$lang->click_mark_read}";
    // -->
    </script>
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/markerclusterer_packed.js"></script>
    <script type="text/javascript">
    var gmarkers = [];
    var map = null;
    var infowindow = new google.maps.InfoWindow();
    var myLatlng = new google.maps.LatLng(0,0);
    function createMarker(latlng,name,html,url) {
    	var contentString = html;
    	var marker = new google.maps.Marker({
    		position: latlng,
    		map: map,
    		title: name
    	});
    	marker.myname = name;
    	gmarkers.push(marker);
    	
    	google.maps.event.addListener(marker, "click", function() {
    		window.location = url;
    	});
    
    	google.maps.event.addListener(marker, "rightclick", function() {
    		infowindow.setContent(contentString); 
    		infowindow.open(map,marker);
    	});
    }
    
    function initialize() {
    	var myOptions = {
    		zoom: 2,
    		center: myLatlng,
    		mapTypeId: google.maps.MapTypeId.ROADMAP
    	}
    	map = new google.maps.Map(document.getElementById('map_threadlist'), myOptions);
    	google.maps.event.addListener(map, 'click', function() {
    		infowindow.close();
    	});
    	var markers = [{$threads}];
    	var mcOptions = {gridSize: 50, maxZoom: 15, title: 'Click to view all pins inside this cluster'};
    	for (i = 0; i < markers.length; i++) {
    		var point = new google.maps.LatLng(markers[i][0],markers[i][1]);
    		var name = markers[i][2];
    		var html = markers[i][3];
    		var url = markers[i][4];
    		var marker = createMarker(point,name,html,url);
    	}	
    	var mc = new MarkerClusterer(map, gmarkers, mcOptions);
    }
    </script>
    </head>
    <body onload="initialize()">
    {$header}
    {$moderatedby}
    {$usersbrowsing}
    {$rules}
    <br class="clear" />
    <div class="float_left">
    	{$multipage}
    </div>
    <div class="float_right">
    	{$newthread}
    </div>
    <br class="clear" />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    	<tr>
    		<td class="thead">
    			<div class="float_right"><strong>{$tplvars['mymarker']}</strong></div>
    			<strong>{$foruminfo['name']}</strong>
    		</td>
    	</tr>
    	<tr>
    		<td class="trow1">
    			<div id="map_threadlist" style="width:100%; height:500px"></div>
    		</td>
    	</tr>
    </table>
    <div class="float_left">
    	{$multipage}
    </div>
    <div class="float_right" style="margin-top: 4px;">
    	{$newthread}
    </div>
    <br style="clear: both;" />
    <br />
    
    <div class="float_right" style="text-align: right;">
    	{$inlinemod}
    	{$searchforum}
    	{$forumjump}
    </div>
    <br style="clear: both" />
    <div class="smalltext" style="text-align: center;">
    {$foruminfo['name']}<br />
    Powered By <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> &ndash; <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$inline_edit_js}
    {$footer}
    </body>
    </html>

   
http://xtest.byethost7.com/forumdisplay.php?fid=5
When we click the cluster (the blue circle), it will zoom and display all pins inside the cluster.

As an additional features (optional), I've updated the plugin in the example application posts (need to deactivate the previous version first before using the new version).
  • Find $umap_fid under umap_nt() function. Change the value to our XThreads Usermap forum id for limiting the num of pin for each user. By default, it is disabled.
  • Find $umap_fid under umap_run() function. Change the value to our XThreads Usermap forum id for displaying user's location on their profile page. By default, it is disabled.
   
http://xtest.byethost7.com/member.php?ac...http://xtest.byethost7.com/member.php?action=pro

I've updated the example application post, and add the additional screenshots.

Please tell me if there is something wrong with the code above Smile

12-27-2011 06:19 AM
Find all posts by this user Quote this message in a reply
Lkwmonster Offline
Junior Member
**
Posts: 8
Joined: Jun 2012
Post: #47
RE: User Map with XThreads?
Hello,
in my forum, when I run the home of usermap, the following appears: -click here-
Can there be a map with all pins can view?
Mfg. Lkwmonster
06-06-2012 05:05 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #48
RE: User Map with XThreads?
I can't view your forum.

06-06-2012 05:10 AM
Find all posts by this user Quote this message in a reply
Lkwmonster Offline
Junior Member
**
Posts: 8
Joined: Jun 2012
Post: #49
RE: User Map with XThreads?
sorry, the Forum is open now
It would be nice if all the pins on the card with another list would be registered with all persons.
(This post was last modified: 06-06-2012 05:44 AM by Lkwmonster.)
06-06-2012 05:21 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #50
RE: User Map with XThreads?
It seems that the Output template start/end comments break it.

Try this way:
Edit your usermap forum, set the Settings Overrides setting:
  • Setting: Output template start/end comments?
  • Value: 0

Code:
tplhtmlcomments=0


(06-06-2012 05:21 AM)Lkwmonster Wrote:  It would be nice if all the pins on the card with another list would be registered with all persons.
I can't understand what you mean?

06-06-2012 06:03 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: