Forum Replies Created

Viewing 15 replies - 61 through 75 (of 415 total)
  • Plugin Author tinuzz

    (@tinuzz)

    Please ask specific questions and describe what you tried and what didn’t work, otherwise people will not be able to help you.

    Best regards,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    No, the MapMyTracks protocol is supposed to be used with the WordPress username and password.

    Does it work with a user that has the Adminstrator or Editor role?

    It just occurred to me: are your users internal WordPress users, or are they in some kind of external SSO? Since you mentioned bearer tokens… I don’t think that will work. Trackserver uses the WordPress function wp_check_password() to verify the password, and in principle that cannot work with SSO.

    Cheers,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    1. Yes, but only in specific fomats meant for internal use by Trackserver, and in GPX format. See https://github.com/tinuzz/wp-plugin-trackserver look for the [tslink] shortcode. All of these methods are protected with WP nonces, so it’s generally not possible to call those URLs from outside WordPress.

    2. To use Trackserver, the user needs the ‘use_trackserver’ capability, which is normally only given to admins and editors. For now, you would need to use a plugin like https://nl.wordpress.org/plugins/user-role-editor/ to add the capability to other roles. In the future, I might make that easy from within Trackserver.

    3. No. AFAIK, you would only be able to specify a static name in the URL in OsmAnd, so why not set it in Trackserver, and be done with it? At least you can have time-based trackname rotation then. You can always create a feature request on Github, if you need it!

    4. Trackserver doesn’t work with bearer tokens. If you use the MapMyTracks protocol, the use of HTTP Basic Auth is mandatory. I suspect you use a plugin for OAuth in WordPress, and Trackserver should recognize the validity of the token? I guess that would be doable, but the point is that Trackserver is made to work with specific clients, meaning that the MapMyTracks protocol implementation is made for OruxMaps’ client impementation, which doesn’t do OAuth. So there never was any reason to implement it that way.

    I hope this helps,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    Are you sure that the Trackserver plugin is enabled? Because it seems like the shortcode isn’t parsed, which is weird.

    I don’t know what Divi theme is, but it could be the issue. Can you try another theme, for example one that comes with WordPress?

    Trackserver doesn’t currently have speed graphs or anything like that, sorry.

    Best regards,
    Martijn.

    • This reply was modified 5 years, 4 months ago by tinuzz.
    • This reply was modified 5 years, 4 months ago by tinuzz.
    Plugin Author tinuzz

    (@tinuzz)

    Ah, so you need the ‘href’ value part only, without the HTML tag…

    Trackserver doesn’t support that right now, but it would be quite easy to add:

    Find the function ‘handle_shortcode3’, in either class-trackserver-shortcode.php or class-trackserver.php (the structure of Trackserver’s code has changed a bit since the last official release).

    At the top of the function, add this to the $defaults array:

    'href_only' => false,

    Then, near the bottom of the function change this line:

    $out = '<a href="' . $alltracks_url . '" ' . $class_str . '>' . htmlspecialchars( $text ) . '</a>';

    to

          if ( $atts['href_only'] === false ) {
            $out = '<a href="' . $alltracks_url . '" ' . $class_str . '>' . htmlspecialchars( $text ) . '</a>';
          } else {
            $out = $alltracks_url;
          }
    

    Then, you can use

    [tslink id=... href_only=y]

    to generate the URL.

    If you use PHP code (template?) to render the button, you can get the link like this:

    $url = do_shortcode( '[tslink id=... href_only=y]' )

    I haven’t tested the latter, though. I think it should work.

    I’ll include the ‘href_only’ shortcode attribute in the next release.

    Does this help?

    Plugin Author tinuzz

    (@tinuzz)

    Use the [tslink] shortcode.

    Parameter descriptions and some examples are here:
    https://github.com/tinuzz/wp-plugin-trackserver

    Search for ‘tslink’ on the page.

    Plugin Author tinuzz

    (@tinuzz)

    Great!!

    Cheers,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Can you tell me a bit more about your use case, i.e. why are you using ‘track=1,2,3,4,5 live-true’, rather than ‘user=@,a,b,c,d’ ?

    In my mind, a single user should have only one track that is considered ‘live’. I know you can have multiple apps running, creating different (but mostly identical) tracks in parallel, but that doesn’t really sound very efficient to me in real life, or at least it doesn’t seem like something you’d want to bother your visitors with.

    Cheers,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    Hi Chris,

    The ‘maxage’ parameter only works for actual live tracks, i.e. tracks that are requested with the ‘user=’ parameter.

    Specifying tracks by ID and adding ‘live=true’ doesn’t make them live tracks in that sense, it merely tells the Javascript to reload the tracks every 10 seconds as if they were live tracks.

    I realize that this may be a bit confusing, and right now I can’t think of any compelling reasons why ‘maxage’ shouldn’t apply to all tracks, other than that it doesn’t really make a lot of sense, if you view tracks that are specified by ID as non-updating. It least, that’s how they were intended, and that’s why the concept of live tracks (user=) was invented.

    ‘Live=true’ is merely a hack, mainly intended to work with external files (GPX/KML).

    Best regards,
    Martijn.

    • This reply was modified 5 years, 9 months ago by tinuzz.
    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    Waypoint support in Trackserver is on the roadmap, but that will be a big change that is going to take a while to develop.

    At this time you have one option, which is using a GPX or KML file.

    Look for ‘External files’ on https://www.grendelman.net/wp/trackserver-wordpress-plugin/ for an example. External files can be combined with live tracks on the same map, so you should be able to do what you described.

    Cheers,
    Martijn.

    Forum: Plugins
    In reply to: [Trackserver] Label Marker
    Plugin Author tinuzz

    (@tinuzz)

    Glad you got it working! If you still want me to add this to Trackserver, please create e feature request issue on Github.

    https://github.com/tinuzz/wp-plugin-trackserver/issues

    Cheers,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    I think we can follow this up in your other topic about the same issue.

    Regards,
    Martijn.

    Forum: Plugins
    In reply to: [Trackserver] Label Marker
    Plugin Author tinuzz

    (@tinuzz)

    Isn’t this actually the same question as in the other topic?

    While this isn’t in Trackserver right now, it’s really easy to accomplish.

    In trackserver.js, find the infobar code, which looks something like this in summarized form:

    if (mymapdata.is_live) {
       if (track_id == follow_id) {
         if (mymapdata.infobar) {
           if (alltracks && alltracks[track_id]) {
             metadata = alltracks[track_id].metadata;
           }
           else {
             metadata = _this.get_mydata(div_id, track_id, 'metadata');
           }
           ...
           mymapdata.infobar_div.innerHTML = infobar_text;
         }
       }
     }
    

    If you pull the metadata assigment two levels up, you can very easily add a tooltip to the end_marker:

    if (mymapdata.is_live) {
       if (alltracks && alltracks[track_id]) {
         metadata = alltracks[track_id].metadata;
       }
       else {
         metadata = _this.get_mydata(div_id, track_id, 'metadata');
       }
       if (track_id == follow_id) {
         if (mymapdata.infobar) {
           ...
           mymapdata.infobar_div.innerHTML = infobar_text;
         }
       }
     }
     end_marker.bindTooltip(metadata.userlogin).openTooltip();
    

    That last line adds a tooltip with the user’s login name. You can als use the display name:

    end_marker.bindTooltip(metadata.displayname).openTooltip();

    or any other information that is available in the metadata.

    Does that help?

    Best regards,
    Martijn.

    Forum: Plugins
    In reply to: [Trackserver] Embedded map
    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    This is actually in the FAQ. Set up the shortcode to display only the end marker, and make the track transparent:

    [tsmap user=@ markers=e opacity=0.0]

    Best regards,
    Martijn.

    Forum: Plugins
    In reply to: [Trackserver] Label Marker
    Plugin Author tinuzz

    (@tinuzz)

    Hi,

    Can you clarify what exactly you have in mind for a ‘label’?

    Best regards,
    Martijn.

Viewing 15 replies - 61 through 75 (of 415 total)