• Resolved edwinwp

    (@edwinwp)


    Wow, great WP plugin!! Allready getting somewhat familiar with Foyer seeing the potential to use it for narrowcasting purposes ?? I would like to know if it would be possible to add two features 1) Adding optional digital clock/date at, for example, the upper right corner (using custom CSS). 2)adding a new single slide of type WYSIWYG HTML page (using TinyMCE or something). In my case I will use it to add a pricelist using a table that is easier to edit/modify than using HTML code in a Text type slide.

    Again, this is a great plugin with an extra few options added it’s the bomb!

    Cheers,
    Edwin

Viewing 6 replies - 1 through 6 (of 6 total)
  • Here are three clock function you can use with Foyer that will display as a full screen slide using the “External Website Page” slide option:

    Analog 12-hour With seconds:
    https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-analog-with-seconds.svg

    Analog 12-hour Without seconds:
    https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-analog.svg

    Digital 12-hour:
    https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-12hr.html

    Digital 12-hour With seconds:
    https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-12hr-with-seconds.html

    Digital 24-hour Without seconds:
    https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-24hr.html

    Digital 24-hour With seconds:
    https://www.nayuki.io/res/full-screen-clock-javascript/full-screen-clock-24hr-with-seconds.html

    • This reply was modified 5 years, 11 months ago by darnellsmith.
    • This reply was modified 5 years, 11 months ago by darnellsmith.
    Thread Starter edwinwp

    (@edwinwp)

    Thanx Darnell, very versitile creative solution. In the mean while I was troubleshooting and found a independent solution that suits my needs. For those people having the same wish of displaying time on text type slides, continue reading (no warrenties here!).

    I took a standard message and added a Custom HTML block to it. In this block I added the following code:

    <script>
    function startTime() {
      var today = new Date();
      var h = today.getHours();
      var m = today.getMinutes();
      var s = today.getSeconds();
      m = checkTime(m);
      s = checkTime(s);
      document.getElementById('klok').innerHTML =  h + ":" + m + ":" + s;
      document.getElementById("klok").style.position = "absolute";
      document.getElementById("klok").style.top = "10px";
      document.getElementById("klok").style.right = "150px";
      document.getElementById("klok").style.font = "normal bold 80px Calibri";
      document.getElementById("klok").style.color = "#1457A5";
      var t = setTimeout(startTime, 500);
    }
    function checkTime(i) {
      if (i < 10) {i = "0" + i};  // add zero in front of numbers < 10
      return i;
    }
    </script>
    
    <body onload="startTime()">

    Now make sure that this message is an active slide in the channel, else you will not see the clock on text type slides.

    Then, when I want to display the clock in the upper right corner on a text type slide I simply add <div id="klok"></div> to this slide and there it is… a running and independent digital clock!

    • This reply was modified 5 years, 11 months ago by edwinwp. Reason: spelling
    Thread Starter edwinwp

    (@edwinwp)

    … unfortunately this only applies to the index page (first slide). No idea yet how to solve this.

    Plugin Author Menno Luitjes

    (@mennolui)

    Hoi Edwin! Thanks!

    About that clock: It is on my wishlist too, I’d like to add widget areas and widgets like the time, logo, weather, but it will take some time to build.

    If you want to code something yourself I’ll try and point you in the right direction. To start you should add the clock HTML to the channel template (see plugin FAQ about overruling templates), not to individual slides, if you’d like it to be visible at all time. And the best way to add your JavaScript is the WordPress way, using wp_enqueue_script and the wp_enqueue_scripts action hook, so not with inline <script> tags.

    About the WYSIWYG HTML slide format: This is also on my list, but I still need to figure out how to support (or block?) HTML that contains JavaScript or generates JavaScript through shortcodes, because as you found out this will not simply work.

    Thread Starter edwinwp

    (@edwinwp)

    Thank you for your reply Menno,

    I’m afraid this is way too hard for me to understand. I hope you find a way to enhance the plugin in near future.

    Plugin Author Menno Luitjes

    (@mennolui)

    @edwinwp sure will! But it might take a while, working on other frequently requested features first.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Feature requests’ is closed to new replies.