Forum Replies Created

Viewing 15 replies - 1 through 15 (of 24 total)
  • Thread Starter billw16

    (@billw16)

    Awesome, thanks very much! It works great!

    I added 2 new tags for the infobar:
    {altitudeft} = Altitude in Feet
    {distancemi} = Distance in Miles

    Here are the sections of code I updated:

      trackserver.js:
    process_data: function (data, options)
            //	Added opts for altitudeft, distancemi (billw 10/11/18)
            this.set_mydata(options.div_id, options.track_id, 'altitude_ft', o.metadata.last_trkpt_altitude_ft);
            this.set_mydata(options.div_id, options.track_id, 'distance_mi', o.metadata.distance_mi);
    
    if (alltracks && alltracks[track_id])
            //	Added opts for altitudeft, distancemi (wcw 10/11/18)
            var altitude_ft = alltracks[track_id].metadata.last_trkpt_altitude_ft;
            var distance_mi = alltracks[track_id].metadata.distance_mi;
    
    if (mymapdata.infobar)
            infobar_text = infobar_text.replace(/\{altitudeft\}/gi, altitude_ft);
            infobar_text = infobar_text.replace(/\{distancemi\}/gi, distance_mi);
    
      trackserver.php:
    function get_metadata( $row, $extra_metadata = array() )
            //	Added opts for altitudeft, distancemi (billw 10/11/18)
            'last_trkpt_altitude_ft'  => number_format( (float) $row['altitude'] * 3.28084, 0),
    	'distance_mi'          => number_format( (float) $row['distance'] * 0.0006213712, 2 ),
    
    //	Added opts for altitudeft, distancemi (billw 10/11/18) (also {distance} was missing)	
    printf(
    	$format,
    	esc_html__( 'With live tracking, an information bar can be shown on the map, displaying some data from the latest trackpoint. ' .
    	'Here you can format the content of the infobar. Possible replacement tags are {lat}, {lon}, {timestamp}, {altitude}, {altitudeft}, ' .
    	'{speedms}, {speedkmh}, {speedmph}, {distance}, {distancemi}, {userid}, {userlogin}, {displayname}.', 'trackserver' )
    );
    

    If others are interested in this, perhaps you could roll it into your code when you have a chance. Thanks again for all your work on this great plugin!

    -Bill

    Thread Starter billw16

    (@billw16)

    Sorry but not sure what your point is, do you have a question?

    Thread Starter billw16

    (@billw16)

    Great! Thanks, will look forward to seeing these new features.

    Love your plugin!

    Thread Starter billw16

    (@billw16)

    Ok Great, thanks.

    I decided just to use simple html to add a notification in the header above the sidebar to show Message & Announcement counts only when there are any unread, and a scrolling banner across the top of the site when there is an unread announcement. In case anyone else wanted something like this, here’s the code I used…

    In header.php:

    <!-- Position this code to show the scrolling banner in the desired location of the header -->
    <?php 
      unset ($new_msg);
      unset ($new_ann);
      $new_msg = fep_get_new_message_number(); 
      $new_ann = fep_get_new_announcement_number();
    ?>				
    <?php if ($new_ann != 0): 
      if ($new_ann == 1){
        $s="There is an important new site announcement";
      } else {
        $s="There are " . $new_ann . " important new site announcements";
      }	
      $s = $s . " - please click here to read now...";
      ?>
      <a itemprop="url" href="<?php echo esc_url( home_url() . "/private-messages/?fepaction=announcements"); ?>" class="announce">
      <marquee behavior="scroll" direction="left"><b><?php echo $s; ?></b></marquee>
      </a>
    <?php endif; ?>	
    
    <!-- Position code to show # of unread messages/announcements in the desired location -->
    <div style="text-align:right">
      <?php if ($new_msg + $new_ann != 0): ?>
        <a itemprop="url" href="<?php echo esc_url( home_url() . "/private-messages/?fepaction=messagebox"); ?>" class="notice">
        <b>Unread Messages: </a><?php echo $new_msg; ?></b>
        <?php if ($new_ann != 0): ?>
          &nbsp;&nbsp;<a itemprop="url" href="<?php echo esc_url( home_url() . "/private-messages/?fepaction=announcements"); ?>"class="notice">
          <b>TEST_Site Announcements: </a><?php echo $new_ann; ?></b>
        <?php endif; ?>
      <?php endif; ?>
    </div>
    

    Added classes to Style.css:

    a.notice {
      color: red;
    }
    a.notice:hover {
      color: #ff6666;
      text-decoration: none;
    }
    a.announce {
      color: blue;
    }
    a.announce:hover {
      color: #8383af;
    }
    Thread Starter billw16

    (@billw16)

    Also, how can I access the content of unread announcements for the current user (to load in a $var in order to be displayed in a custom banner, for example)?

    Thread Starter billw16

    (@billw16)

    Ok, sorry Franky. This isn’t a problem with EME at all, but with the way Outlook opens iCal files. NOTE: The Google calendar feed was updating correctly.

    Opening the link created with the following does not ‘subscribe’ Outlook to a feed:
    Subscribe: [eme_ical_link scope=all]

    The resulting link is an ‘https://&#8217; address to your ical file. When you open such a link with MS Outlook the resulting calendar is NEVER updated, but remains static. There is a process which allows you to subscribe to a feed using this link, but it’s a little involved and varies depending on which version of Outlook you have. Far too much trouble just to get our calendar.
    Fortunately, there is a simple solution…

    Replace the prefix of the link created above with ‘webcal’ (or ‘webcals’ for ‘https’ security) as below:
    webcals://yoursite.com/?eme_ical=public&scope=all

    Opening this link from Outlook actually DOES ‘subscribe’ to the ical feed, it is automatically updated with any changes made to your EME calendar.

    Simple.

    • This reply was modified 8 years ago by billw16.
    Thread Starter billw16

    (@billw16)

    Ah, thanks! Very fast response.

    Thread Starter billw16

    (@billw16)

    Thanks for your quick reply, but that isn’t really the issue I’m having… The Calendars linked via iCal feed are totally static, they are never updated even after 2 months. This problem occurs in both the Google calendar as well as the iCal feed to MS Outlook. They act as if the link is not a feed at all, but rather a static snapshot of the calendar events at the time the link is created.

    As a test, I’ve added a new EME Calendar feed to both MS Outlook and also to a new Google Calendar using the same code as above (the original ones had already been deleted). I then updated several items; moving event dates, adding a new event, and deleting an existing one.

    I’ll wait to see if either calendar will show these changes, so far (>24hrs) none of the changes have appeared in either calendar.

    [Now on EME version 1.7.7]

    sorry posted in the wrong thread…

    • This reply was modified 8 years, 2 months ago by billw16.
    Thread Starter billw16

    (@billw16)

    Yes

    Thread Starter billw16

    (@billw16)

    Thanks, very glad this helped!

    Great! Thanks for the good work, look forward to using this for our site!

    Thread Starter billw16

    (@billw16)

    Ahh, very good! Thanks so much!

    Excellent Plugin!

    Thread Starter billw16

    (@billw16)

    Ok, Thanks. That’s what I was afraid of. Will look for another solution.

    Thread Starter billw16

    (@billw16)

    I DO understand that message isn’t from your plugin!

    HOWEVER, your plugin is REDIRECTING the user on login, which is CAUSING this message (as I stated above).

    MY QUESTION: How can I keep your plugin from causing the redirection, which results in this WP message (without creating a custom login page)?

    PLEASE NOTE:
    – When I activate your plugin I get this message.
    – When I deactivate your plugin I no longer get this message!

    Your plugin is CLEARLY CAUSING something to happen (redirect to a non-existent custom login page, maybe) that is resulting in this message, even though the message itself isn’t from your plugin.

    Thanks

Viewing 15 replies - 1 through 15 (of 24 total)