Posts by: Alistair

Posts: 32
Post: 11599
Topic: TOTALLY IMPRESSED - But......I need a lil help.
Hello Neil. It would be great if you posted how you solved your issue so others can find and fix their similar issues just in case, you know what I mean?
Edited: 2 months ago
Post: 11590
Topic: Site Counter 4.1.1.1

[SOLVED]

I removed my IP address from settings, logged out, viewed some pages, logged in and all the missing data magically appeared. I re-added my IP address to filter that out, and the data remained - problem solved.

2 months ago
Post: 11589
Topic: Site Counter 4.1.1.1

Hi is anyone using this plug-in and if so, is there anything that could interfere it from operating? Analytics shows several visitors, but counter shows only 1 and thats probably me.

Thanks, Al.

2 months ago
Post: 11586
Topic: Adding script to title
Excellent but

(auckland_date.getMinutes() < 10 ? '0' : '')

use of ' ' code conflict here.

I changed it for readability to this:

 var auckland_minutes = auckland_date.getMinutes();

            + (auckland_minutes < 10 ? "0" : "")
            + auckland_minutes

note the quote/"

Pretty much perfect thanks Juergen. I wondered about the variable if(isadmin) found the function under jar files. But it doesnt seem to return anything under php; does it need to be globally declared?

Regards from NZ,

Alistair.

 

2 months ago
Post: 11583
Topic: Adding script to title

Much better, but still not work. This does thanks for ideas:

<?php
date_default_timezone_set("Pacific/Auckland");

$page->jQueryCode .= '

  CallAlistair = function(){
      var where_to_write = ".navbar-brand";
      utc_time = Date.now();
      var auckland_time = utc_time;
      var auckland_date = new Date(auckland_time);
      var auckland_hours = auckland_date.getHours();
      var auckland_minutes = auckland_date.getMinutes();
      // console.log(auckland_hours);

      if(auckland_hours > 8 && auckland_hours < 18)
      {
          $(where_to_write).html(
            "TheHomeNZ Waihi Beach - "
            + "Call Alistair mobile +64211748741"
          );
        }
        else{
          $(where_to_write).html(
            "TheHomeNZ Waihi Beach - "
            + "Local Time: "
            + auckland_hours
            + ":"
            + auckland_minutes);
        }
    };
  CallAlistair(); // immediate call
  setInterval(CallAlistair, 900000); // repeat every 15 minutes

';
?>

2 months ago
Post: 11581
Topic: Adding script to title

Its up with code here: view-source:https://thehomenz.co.nz/

There is a gpeasy daterange picker which has no business unless Im wrong, on this page embeded in the code I was wondering if that could be corrupting the extra .navbar-brand section.

Al.

2 months ago
Post: 11578
Topic: Adding script to title

Tried that ".navbar-brand" and ".title" and "title" and removed the <a > </a> ;nothing. dont concern, its no major thanks heaps for trying.

//What do you exactly mean with 'Title'?

I mean thats where the dynamic text should go; found under Settings/Config/General/Title which is currently TheHomeNZ Waihi Beach NZ (phone +mymobile)

 

2 months ago
Post: 11575
Topic: Adding script to title

Hi no problem, but Im still sure Im doing something wrong; Ive edited template.php in Bootswatch_Scss, adding your code to the very end after closing   </body>
</html>

nothing happens, Title remains the same.

I dont understand the way your code works in that how it replaces the content of page title in Settings/General/Title.

 

2 months ago
Post: 11573
Topic: Adding script to title
Thanks I did try that adding to Bootswatch_Scss template.php but nothing happened. Likely Im not understanding what you mean by .my-selector is the selector identifying the DOM node where JS will write the message.
2 months ago
Post: 11564
Topic: Adding script to title

Sorry but my replyto gishpuppy.com has crashed or closed down and I didnt get your reply. All fixed now.

In reply:

As I see it, in settings/title, thats text only, but thats where the script should be entered. I have a variable date/time/field which should go in the title.

It should change server-side depending on current net time. Source is as follows:

<p><script type="text/javascript">
// create Date object for current location
d = new Date();
// convert to msec since Jan 1 1970
localTime = d.getTime(); //gives your own local time
// obtain local UTC offset and convert to msec
localOffset = d.getTimezoneOffset() * 60000;
// obtain UTC time in msec
utc = localTime + localOffset;
// obtain and add destination's UTC time offset
// for example, Auckland which is UTC + 13 hours
offset = 13;  
auckland = utc + (3600000*offset);
// convert msec value to date string
nd = new Date(auckland);
hours=nd.getHours();
document.write("<strong>Local time:</strong> " + nd.toLocaleTimeString());
if (hours>8 && hours<18) {document.write(" Call Alistair on +xxxxxxxxxx");}
</script></p>

Edited: 2 months ago

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

HH-Support

Company located in T├│rshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In

  Register