-
Posts
59 -
Joined
-
Last visited
Posts posted by Simon Law
-
-
36 minutes ago, Sue Busher said:
@Simon Law Its so hard to describe. I am effectively after a menu which when clicked on would open the files. SIMS creates all these HTML documents and a master menu, if I use file drop, it doesn't display the master menu and shows all the documents - which is a bit overwhelming as we are a large school. However, as it wouldn't be me updating it every week, it would need to be very simple to update. I can't drop the files as it contains personal data. Do you know how other schools have addressed this problem?
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?
-
6 minutes ago, Sue Busher said:
As you are both so helpful, I wondered if you'd come across anything like my conumdrum above?
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?
-
3 hours ago, Sue Busher said:
Temporarily put the website 'live' and accessed it from home (outside school network) and it works fine. Would appear to be something behind our firewall stopping it working.
Thanks for your help @pconkie @Simon Law
Always glad to hear something works outside of a firewall
-
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
-
@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!
-
We tend to use Chrome and always have the developer tools window open, the error console usually shows you what's wrong
-
<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
-
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
-
<i class="fa fa-check" aria-hidden="true"></i>
that might work, depends if our fontawsome font set has it
-
5 hours ago, Sue Busher said:
What do you think? It is quite clever - you can add maps, RSVPs, add to your calendar etc.
yes, it looks nice and it looks like our events need more things to attach to it,
-
Just now, Sue Busher said:
Sorry Simon, I refreshed my screen and it works fine. Apologies for wasting your time.
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
-
3 hours ago, Sue Busher said:
I am so sorry to ask again, but we were given a bit more code and I can't seem to get it to display again. Would you mind working your magic once again - I promise I will try not to bother you again.
@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?
-
55 minutes ago, ADT said:
Unfortuanly its a Managed service policy.... would take the head to get unblocked!! And he isn't that interested in IT magic!!
does that make me a wizard?
-
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
-
<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
-
8 minutes ago, mmclaughlin said:
So I replaced the if statement with
Does not seem to have worked.
The regex has also changed and you need that too
Where can I see the widget working/not working (site/page)?
-
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)) {
-
16 minutes ago, Sue Busher said:
Nope .
Hmm, just tested on iphone 6, safari, all good. what are you using? phone/app
-
26 minutes ago, Sue Busher said:
@Simon Law @Graham Quince The code has changed but I am still seeing the stretching of the images on my iphone. I haven't used the new image carosuel as not really got to grips with it. Is there any training videos? As you say, at least it would be supported.
ok, your iphone is probably caching the css, I have changed the html widget to use 'carousel_davids' instead of 'carousel_david', this should be enough for the iphone to not use the cached css
-
That's on my Samsung Galaxy Note 3
-
40 minutes ago, Sue Busher said:
@Simon Law Was that in the code then Simon? Or something I could'should have done with the images?
I am still seeing this on mobile
@Sue Busher I think you are still seeing the old CSS styling on your mobile.
As graham said above, the replacement of the height for max-height solves the image sizing.
-
14 hours ago, Simon Law said:
There still seems to be an issue with the carousel-indicators though
and maybe a little bit of css fixes the indicators
-
2 hours ago, Sue Busher said:
ok, I'll have a look
The issue was the height setting on the image element, I have changed it to use max-height instead.
There still seems to be an issue with the carousel-indicators though
- 1
-
Hi @Sue Busher, which site is it and what is the visible problem (screenshot would be nice)
Thanks
S
Cover
in Coding
Posted
Hi @Sue Busher your html above should work, however, Frog may hijack the clicking of the link in which case
may yield results