Jump to content

Simon Law

Former Frog Staff
  • Posts

    59
  • Joined

  • Last visited

Everything posted by Simon Law

  1. Simon Law

    Cover

    Hi @Sue Busher your html above should work, however, Frog may hijack the clicking of the link in which case <span onclick="window.open('file:///S:/Path/to/Your/MainMenu.html', '_blank')">Weekly Cover</span> or <div onclick="window.open('file:///S:/Path/to/Your/MainMenu.html', '_blank')">Weekly Cover</div> may yield results
  2. Simon Law

    Cover

    I think I see the problem better now. I know I am thinking outside the Frog, but if a link could be made to open a new browser window that opened up the master menu, then you would then be able to view the day files by clicking on one of the links. eg <a href="file:///S:/Path/to/Your/MainMenu.html" target="_blank">Weekly Cover</a> where S is the network drive and the path goes to the main menu Or is the main menu not usable as a index page?
  3. Simon Law

    Cover

    Well, if your description of the problem is correct, the file is dropped onto a network drive, so could you not drop a network widget onto the page, displaying all the files in that directory, which you could then open ..... or am I missing an important piece of the jigsaw?
  4. Simon Law

    Code Help

    Always glad to hear something works outside of a firewall
  5. Simon Law

    Code Help

    Hi Sue, just as an update really, Your code was getting replacing the embed.js file each time a new page was clciked on, so I attempted to get it to load once, use cache if already there, something tockify suggest above, however it didn't seem to make the thing work. Not had a chance to look at it today
  6. Simon Law

    Code Help

    @Sue Busher can you tell me which pages have the code eg news -> home events, news -> christmas as your site has a lot of pages!
  7. We tend to use Chrome and always have the developer tools window open, the error console usually shows you what's wrong
  8. <script> function reloadIFrame() { document.Name1.location.reload(); } window.setInterval(reloadIFrame, 3000); </script> <iframe src="URL" name="Name1" style="height:70px;border:0px;padding:0px;margin:0px;"></iframe> couple of slight changes, good to go (after you change URL to a real URL
  9. Yes, you can. The HTML widget literally inserts whatever you put in the widget onto the site it is on. I will test you code and find out why it's not working
  10. <i class="fa fa-check" aria-hidden="true"></i> that might work, depends if our fontawsome font set has it
  11. Simon Law

    Code Help

    yes, it looks nice and it looks like our events need more things to attach to it,
  12. Simon Law

    Code Help

    No time wasted, it was my lunch time foray into the forum, it also give me a chance to see how/what you're using
  13. Simon Law

    Code Help

    @Sue Busher the code you posted works for me on a new site, so its not the code that's the problem. which site /page have you tried this on?
  14. Simon Law

    Flashcards

    does that make me a wizard?
  15. I suggest you add the debugger line, open up dev tools and step through the code to see where it is failing, because the code I just submitted worked
  16. <script> /////////////////////////////////////// //logic: /////Always hide widget.. ////Show widget if all criteria met /////////////////////////////////////// //declare and set vars //change these values as required //SL my widget has different uuid var widget_to_hide = "7E50015020028EF283501F8FD1F30A0096EE04DCC9DB2497"; var school_ip_lower = "10.0.112.1"; var school_ip_upper = "10.0.127.254"; var format = 'hh:mm:ss'; var time = moment(); var beforeTime = moment('07:30:00', format); //SL I am working late so I set for late night var afterTime = moment('19:00:00', format); var currentuser = FrogOS.getUser(); var dayOfWeek = moment().day(); //SL made theWidget so I could use it again and again var theWidget = $("div[data-content-uuid='"+widget_to_hide+"']"); //SL added debugger so I could step through in dev tools debugger; //hide widget theWidget.hide(); //SL logged in as not a student for testing if (currentuser.profile.type == "student") { //they are not a student - show the widget theWidget.show(); } else { //async load of users school ip address...waits for response... $.get( "../ipaddress.php", function( data ) { //SL added debugger so I don't have to step through ipaddress call debugger; var r = /\b(\d{1,3}).(\d{1,3}).(\d{1,3})\b/; var ip = data.match(r); // capture the individual parts of the ip address // my ip was 192.168.99 so I had to if condition if (ip && ip[1] === '192' && ip[2] === '168' && (parseInt(ip[3]) >= 90 && parseInt(ip[3]) <= 99)) { //they are at school //if (dayOfWeek === 1 || dayOfWeek === 2 || dayOfWeek === 3 || dayOfWeek === 4 || dayOfWeek === 5) { //SL cleaner to use inArray if ($.inArray(dayOfWeek, [1,2,3,4,5])) { //0=sunday, 1=monday etc BUT perhaps this isn't correct for US? //it should be Mon-Fri if (time.isBetween(beforeTime, afterTime)) { //it's within school hours //finally show the widget! theWidget.show(); } } } }); } </script> I had to alter code see //SL but it worked for me
  17. The regex has also changed and you need that too Where can I see the widget working/not working (site/page)?
  18. If I was javascript, I would probably not like You are trying to use an ip address as though it was a number and comparing it to ip[0] which is a string 10 is a number 10.0 is a number 10.0.112 is not a valid number 10.0.112.1 is not a valid number so ...... var r = /\b(\d{1,3}).(\d{1,3}).(\d{1,3})\b/; // capture the individual parts of the ip address var ip = data.match(r); if (ip && ip[1] === '10' && ip[2] === '0' && (parseInt(ip[3]) >= 112 && parseInt(ip[3]) <= 127)) {
  19. Hmm, just tested on iphone 6, safari, all good. what are you using? phone/app
  20. That's on my Samsung Galaxy Note 3
  21. and maybe a little bit of css fixes the indicators
  22. There still seems to be an issue with the carousel-indicators though
  23. Hi @Sue Busher, which site is it and what is the visible problem (screenshot would be nice) Thanks S
×
×
  • Create New...