Walking Trip …

Walking Trip

Walking Trip

Offenbach's Suite ... Warts 'n All

Offenbach's Suite ... Warts 'n All

 📅  

If this was interesting you may be interested in this too.

Posted in Photography, Trips | Tagged , , | 34 Comments

MacBook Air macOS Sequoia Install Tutorial

MacBook Air macOS Sequoia Install Tutorial

MacBook Air macOS Sequoia Install Tutorial

It’s been ages since we’ve performed an Apple MacBook macOS upgrade after macOS 11 (ie. Big Sur (and then there was macOS Sonoma version 14 in the mix as we went along)) lifted our head in Calendar Location Services Integration Tutorial.

But, today we decided to install macOS …

Sequoia 15.3.1 after reading “the blurb”. Really, it seems, at this early stage, full of great surprises we’ll get more into over time!


Previous relevant Calendar Location Services Integration Tutorial is shown below.

Calendar Location Services Integration Tutorial

Calendar Location Services Integration Tutorial

Of all those English question words …

  • why
  • which
  • how
  • what
  • who
  • when
  • where

… which is more apt as far as software goes? Well, and sorry to our regulars who have heard our theories so often, it goes in order of prominence …

  • where
  • when

… then the rest … ie. the reverse order of order way above, we reckon.

And so, being reminded on an upgrade of our macOS version to Big Sur version 11.6 the other day, opening the macOS Calendar desktop application version 11.0 (2811.5.1) (as we did earlier, with a previous version, with Calendar iCal Integration Itinerary Time Tutorial), that locations were honoured with an Apple Maps integration (should you permit Location Services to help you) along with news about Siri integration improving Calendar’s AI credentials, we were pretty much tickled pink to be combining the “when” with the “where” in the one desktop application.

Maybe you will be too?!


Previous relevant Calendar Location Services Integration Tutorial is shown below.

Calendar iCal Integration Itinerary Time Tutorial

Calendar iCal Integration Itinerary Time Tutorial

A while back we left off our software integration of Calendar iCal Events into Google Chart Timeline Chart functionality (last visited with Calendar iCal Integration Itinerary Post Tutorial as shown below) with the quote …

… closing the circle, for now, with our Calendar Event software integrated Timelines.

… but want to retreat from that “finality”, because it’s been burning away within us as an annoyance, regarding this software integration. We think we can do better (with the integration). And we now think that, doing the research and development on this, that it is technically fairly easy to make that improvement, which goes …

We want to have the Google Chart Timeline Chart date resolution to match the Calendar iCal Event resolution, which is to the nearest second, rather than to the nearest day, as it used to be for our Google Chart Timeline Charts

… but we are going to hang back from asking for time hh24:mi:ss entries in the Google Chart Timeline Chart web application itself (when executing as the “parent” web application), because we can accept time data coming in from, say, the Itinerary web application, specifying the date and times to the nearest second (optionally). The reason for this is that to ask for the time everywhere can be offputting when there are so many Timeline scenarios where it is not really the “go” … think, “dates in history” for example.

What is in the “innards” of the Google Chart Timeline Chart web application controlling this “date” (data) resolution? It is controlled by calls to create Javascript Date objects via Javascript Date object constructor (calls), and up to now, they have been exclusively of the form …


var date_object = new Date(year, month, date);

… and this set us to exploring other Javascript Date object constructors, and, as you’d expect … but is a little non-intuitive because of the “Date” object naming … well that’s my excuse, anyway … it allows for (the overload) …


var date_object = new Date(year, month, date, hour, minute, second);

But that is not to say that just to see that this (Javascript functionality) is so, doesn’t always make it so (for Google Chart usage). However, it just so happens, it does, in this case, because there are no problems changing these Date constructor calls as far as the software interface to the Google Charts Timeline Chart API is concerned (we unit tested to confirm) … yayyyy!!

It does mean, though, that the code should handle either type of constructor, and this constructor is significant to our Google Chart select (onclick) event coding, as we examine these constructors from document.head.innerHTML to glean this information.

We may, next, but not for now, extend the Google Chart Timeline Chart web application to ask for times optionally, perhaps, via the clicking of an HTML input type=checkbox element, but for now we’re happy, because a user can do any of …

  • Google Chart Timeline Chart web application execution where it is the parent web application … date resolution: day
  • Itinerary (web application) that displays into the Google Chart Timeline Chart web application … date resolution: second
  • Date and Time Timeline with Calendar iCal Events (web application) that displays into the Google Chart Timeline Chart web application … date resolution: second

… and the last two are available as links from the first, so, we figure, the user can end up with what they were after, with all these choices of execution modes.

And so, what timezones happen here?

  • Google Chart Timeline Chart web applications use your local date (and time)
  • Calendar iCal Event destination use your local date (and time) too … but …
  • iCal interfacing messages most easily use “Z” form, that uses GMT dates (and time)
  • Itinerary (or Date and Time Timeline with Calendar iCal Events) web application allows for times in any timezone you designate

… and we have to map any non-local timezone usage to local time, especially with the last option above, to avoid confusion, and to make Calendar iCal Event destination application data match the content, and now, resolution, of its Google Chart Timeline Chart counterpart. Annoyance over!

The results of this work consisted of …

  • no changes to external Javascript you could call gettopost.js … called defer=’defer’ by …
  • our PHP “Itinerary”, and now, also, “Generic Timeline with Dates and Times” code you could call itinerary.php which changed a lot, and has the “Itinerary” type of live run and has the “Generic Timeline with Dates and Times (and Calendar Events)” type of live run
  • our PHP above calls the original Google Chart Timeline Chart (with its “onclick” select event functionality) you could call timeline_chart.php which changed a little to recognize Timelines that can Involve Times (and Calendar Events) as well as the usual Dates (and if you want to try its live run … then there it went?!)

Previous relevant Calendar iCal Integration Itinerary Post Tutorial is shown below.

Calendar iCal Integration Itinerary Post Tutorial

Calendar iCal Integration Itinerary Post Tutorial

We’re improving software integration on a few fronts today, extending the existing Itinerary software from Calendar iCal Integration Itinerary Tutorial as shown below, namely …

  • realizing that the only difference between an “Itinerary” and any “Timeline Involving Dates and Times (and Calendar Events)” is the descriptive bits about airports and such things, so why not use the same code, and allow for a call a certain way, to turn that “Itinerary” code into the code for that generic “Timeline Involving Dates and Times (and Calendar Events)” … which affected …
  • the Google Chart Timeline Chart needs to allow for these new functionalities … and so it does with code in between <head> and </head> …

    setTimeout(itintobitsatend, 900);
    function itintobitsatend() {
    <?php
    if (file_exists("itinerary.php")) {
    echo "
    if (document.getElementById('bitsatend').innerHTML.indexOf('Itinerary') == -1) {
    document.getElementById('bitsatend').innerHTML+='&nbsp;<a target=_blank title=Itinerary href=http://www.rjmprogramming.com.au/PHP/TimelineChart/itinerary.php>Itinerary with Calendar Events</a>&nbsp;<a target=_blank title=Times href=http://www.rjmprogramming.com.au/PHP/TimelineChart/itinerary.php?justaddtime=y>Timeline with Dates and Times and Calendar Events</a>';
    }
    ";
    }
    ?>
    }

    … as well as …
  • our software integration improvement we did that “proof of concept” preparation about yesterday with HTML Div Overlay Jigsaw Talents Primer Tutorial that is actually the means by which we cater for large amounts of “Itinerary” or “Generic Timeline with Dates and Times” data by
    1. establishing a new external Javascript using HTML script property defer=’defer’ loaded after the local Javascript (that contains a “stub” function maybegettopost(instg, showit) { return instg; }) with two major functions … namely …
      • a page load setTimeout started function lookforjigsaw() that looks for an HTML div “jigsaw” arrangement like talked about yesterday, and if not, create the scenario, and leave the user with a 3 member array of HTML div id list for original content, iframe perhaps later overlays content, form to fire off iframe data as required content respectively, usage … and …
      • an external Javascript overloading version of function maybegettopost(instg, showit) that checks the length of the proposed get $_GET[] type parameter call (ie. using ? and & on address bar with long URLs), and if too long, convert that $_GET[] type parameter call data into $_POST[] type parameter call (remembering … doh … that the PHP (sorrrryyyy) receiver code should cater for this)
    2. change the “Itinerary” PHP web application code to, from now on, when calling another web application in a (default) $_GET[] type parameter call way, filter that call data through function maybegettopost(instg, showit) … the showit is a boolean that is true if we end up navigating to that call data “URL” (ie. we “show it”)

Maybe you need to see the software additions and changes to see this for yourself, which consisted of …

  • new external Javascript you could call gettopost.js … called defer=’defer’ by …
  • our PHP “Itinerary”, and now, also, “Generic Timeline with Dates and Times” code you could call itinerary.php which changed a little, and now has the “Itinerary” type of live run and has the “Generic Timeline with Dates and Times (and Calendar Events)” type of live run
  • our PHP above calls the original Google Chart Timeline Chart (with its “onclick” select event functionality) you could call timeline_chart.php which changed a little to recognize Timelines that can Involve Times (and Calendar Events) as well as the usual Dates (and if you want to try its live run … then there it was?!)

… closing the circle, for now, with our Calendar Event software integrated Timelines. With such software integration, break complex integrations into bits you can unit test, and don’t move on until that unit test works. On the next level of unit testing, make sure you prove that previous unit tests still work.


Previous relevant Calendar iCal Integration Itinerary Tutorial is shown below.

Calendar iCal Integration Itinerary Tutorial

Calendar iCal Integration Itinerary Tutorial

After the recent Calendar iCal Integration Timeline Tutorial you may have associated a Timeline with a Calendar event, even when the End Time of that event is not a defined concept, but what about a software integration, again with a Google Chart, but this time with …


Google Chart Timeline Chart

… “shaped” into a web application suitable to enter Itinerary information and then be able to associate these Timeline Start and End Events with iCal Calendar Starts and Ends to events, created …

  • interactively, using the user’s default iCal application … and/or (in the case of “mobile” we should say “but rather”) via …
  • email via PHP mail function

? This “Itinerary” concept has a huge amount of synergy with Calendar events, especially as a reminder service to people going on the trip (of the Itinerary) and/or to those affected by their absence, and so we found it a concrete type of web application to “start” out on. Yes, and there’s more! Tomorrow’s blog posting, you’ll have trouble believing, will have a connection, as a “proof of concept”, of where we go next with this project. So, after tomorrow’s explanation, we’ll probably see you back hereabouts in two days.

But, in the meantime, for starters, try the PHP source code of itinerary.php and its live run to see what we are getting at here. If you try it, you’ll see that the Emoji Overlay sizing is determined on a integration “parent” subject by integration “parent” subject basis.


Previous relevant Calendar iCal Integration Timeline Tutorial is shown below.

Calendar iCal Integration Timeline Tutorial

Calendar iCal Integration Timeline Tutorial

After the recent Calendar iCal Integration WordPress Tutorial we found another integration candidate for our Calendar Event (creating) (component) “tool” web application that could be used in a variety of ways by other web applications. The second cab off the rank for this we decided should be (this) …


Google Chart Annotated Timeline Chart

… which should come as no surprise of a candidate for Calendar integration.

So a few things have come together for this work, those being …

  • Calendar iCal Integration WordPress Tutorial got us into an integration with PHP and fitting in with existing Javascript DOM issues … but only for discrete Emoji concepts … whereas …
  • Emoji Overlay Share Tutorial yesterday was a proof of concept in two ways …
    1. code to respond to click events with regard to Emoji Overlays … but it also had within the code, and we tested it behind the scenes, the way it could …
    2. work off HTML primed with the special class “emojioverlay” and primed with a Javascript DOM property that would yield Emoji discrete “characters” but with the “#” missed out … believe me, this “kludgy feeling” idea saves a lot of bother because when you go back and retrieve the innerHTML property of Emoji data you do not easily arrive back at …

      &#[codepoint];

      … and we work via our homegrown Javascript docgetclass function to be able to overlay Emojis via the usual …

      • position:absolute property
      • opacity … and though it was optional for today’s work, we also included the third often used “overlay” CSS “player” … namely …
      • z-index

      … and this Javascript function …

      function checkforclass() {
      var buildup="";
      var cfcs=docgetclass('emojioverlay','*');
      for (var ij=0; ij<cfcs.length; ij++) {
      if (cfcs[ij].innerHTML.replace(/&amp;/g,'&').indexOf(';&') != -1) {
      var emjs=cfcs[ij].innerHTML.replace(/&amp;/g,'&').split("&");
      buildup='';
      cfcs[ij].style.opacity=eval(cfcs[ij].style.opacity / eval(-1 + emjs.length));
      for (var iemjs=1; iemjs<emjs.length; iemjs++) {
      buildup+='<span style="position:absolute;top:' + cfcs[ij].style.top + ';left:' + cfcs[ij].style.left + ';font-size:' + cfcs[ij].style.fontSize + ';opacity:' + cfcs[ij].style.opacity + ';z-index:' + cfcs[ij].style.zIndex + ';">&#' + emjs[iemjs].split(';')[0] + ';</span>';
      }
      cfcs[ij].innerHTML=buildup;
      cfcs[ij].style.visibility='visible';
      }
      }
      }

    … that is the method used today to display an Emoji Overlay “character” to reflect, for a mobile application WebView scenario, of PHP mail created email usage for the Calendar Event creation functionality

  • Google Chart Annotated Timeline Flash Legacy Tutorial introduced the flexible non-flash and flash toggling functionality of the Google Chart for Timelines PHP web application we wrote called annotatedtimeline_chart.php which changed quite a lot, like “function checkforclass” above, for this Calendar Event creation integration

Why not try a Google Chart Annotated Timeline Chart live run to see what we are getting at, and while you’re there, try turning on a Calendar Event linked to one of the Timeline Events?


Previous relevant Calendar iCal Integration WordPress Tutorial is shown below.

Calendar iCal Integration WordPress Tutorial

Calendar iCal Integration WordPress Tutorial

After yesterday’s Calendar iCal Integration Email Tutorial we hoped we had a Calendar Event (creating) (component) “tool” web application that could be used in a variety of ways by other web applications. The first cab off the rank for this we decided should be (this) …


WordPress Blog

… that being our TwentyTen themed local effort. One of the reasons we plumped for this is that it involves Publishing Dates and we can even get access to a Publishing Time and even a Publishing Timezone (though this last one is a “hardcoded” (piece of) knowledge, rather than it being gleaned by WordPress (data) in any way). So we had the choice of means of display of this new functionality …

  • adding to logic of the already hyperlinked Publishing Date data string
  • adding the Publishing Time as a new HTML a (hyper)link placed after the Publishing Date and linking to the Calendar functionality
  • adding relevant Emojis as new HTML a (hyper)links after the Publishing Date and linking to the Calendar functionality

… and we plumped for the last of these thoughts with our work today, as we liked the look of 📅 ➕ 📧 (that we tried out with our proof of concept p_o_f.html) to point at …

  • Create iCal Calendar Entry
  • Create and Email iCal Calendar Entry
  • Email (only) iCal Calendar Entry

… respectively. The “go” with the email functionalities could be that you share a tutorial link with a friend whose email you know and correspond with.

And so it behoves us to show you (good ol’) TwentyTen header.php (the usual suspect) changes to make this happen below, for your perusal and/or interest …


function docgetclass(inc, intag) {
if (document.getElementsByClassName) {
return document.getElementsByClassName(inc);
} else {
var ijl;
var anarris=[];
var huhs=document.getElementsByTagName(intag);
for (ijl=0; ijl<huhs.length; ijl++) {
if (huh[ijl].className.indexOf(inc) != -1) {
anarris.push(huhs[ijl]);
}
}
return anarris;
}
}

function calendar_pass() {
var thisc='', thiscc='', thist='', jiicp=0, thisdate='', thistime='', nexttime='', thishour=0, nexthour=0, thisminute='', thissecond='00', thisurl='';
var h1cps=docgetclass('entry-title','*'); //document.getElementsByTagName('h2');
var cps=document.getElementsByTagName('a');
for (var iicp=0; iicp<h1cps.length; iicp++) {
thist=h1cps[iicp].innerHTML.split(' <')[0].split('<')[0];
thisurl='';
if (h1cps[iicp].innerHTML.indexOf(' id="d') != -1) {
thisurl="https://www.rjmprogramming.com.au/ITblog/" + h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0];
}
if (jiicp < cps.length) {
while (jiicp < cps.length && (cps[jiicp].innerHTML.indexOf(' content="') == -1 || cps[jiicp].innerHTML.indexOf('&#') != -1)) {
jiicp++;
}
if (jiicp < cps.length) {
if (cps[jiicp].title.indexOf(':') != -1) {
thisdate=cps[jiicp].innerHTML.split(' content="')[1].split('"')[0].replace('-','').replace('-','');
thishour=eval(cps[jiicp].title.split(':')[0]);
nexthour=thishour;
if (cps[jiicp].title.indexOf(' pm') != -1 && thishour < 12) thishour+=12;
if (thishour < 12) {
nexthour+=12;
} else if (nexthour < 23) {
nexthour=23;
}
thisminute=cps[jiicp].title.split(':')[1].split(' ')[0];
thistime=':' + ('0' + thishour).slice(-2) + thisminute + thissecond;
nexttime=':' + ('0' + nexthour).slice(-2) + thisminute + thissecond;
//alert(thist + ' ' + thisurl + ' ' + thisdate + thistime);
//alert("http://www.rjmprogramming.com.au/PHP/ics_attachment.php?id=0&eventwords=test&title=" + encodeURIComponent(thist) + '&stage=' + encodeURIComponent(h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0]) + '&datestart=' + encodeURIComponent(thisdate + thistime) + '&dateend=' + encodeURIComponent(thisdate + thistime) + '&emode=Address&address=Address&description=Description&url=' + encodeURIComponent(thisurl));
//window.open("http://www.rjmprogramming.com.au/PHP/ics_attachment.php?id=0&tz=" + encodeURIComponent("Australia/Perth,Australia/Perth") + "&eventwords=test&title=" + encodeURIComponent(thist) + '&stage=' + encodeURIComponent(h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0]) + '&datestart=' + encodeURIComponent(thisdate + thistime) + '&dateend=' + encodeURIComponent(thisdate + nexttime) + '&emode=AndTo&address=' + encodeURIComponent('rmetcalfe15@gmail.com') + '&description=Description&url=' + encodeURIComponent(thisurl), '_blank', 'top=45,left=55,width=600,height=600');
thisc="http://www.rjmprogramming.com.au/PHP/ics_attachment.php?id=0&tz=" + encodeURIComponent("Australia/Perth,Australia/Perth") + "&eventwords=test&title=" + encodeURIComponent(thist) + '&stage=' + encodeURIComponent(h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0]) + '&datestart=' + encodeURIComponent(thisdate + thistime) + '&dateend=' + encodeURIComponent(thisdate + nexttime) + '&emode=To&address=emailAddress&description=Description&url=' + encodeURIComponent(thisurl);
thiscc="http://www.rjmprogramming.com.au/PHP/ics_attachment.php?id=0&tz=" + encodeURIComponent("Australia/Perth,Australia/Perth") + "&eventwords=test&title=" + encodeURIComponent(thist) + '&stage=' + encodeURIComponent(h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0]) + '&datestart=' + encodeURIComponent(thisdate + thistime) + '&dateend=' + encodeURIComponent(thisdate + nexttime) + '&emode=Address&address=&description=Description&url=' + encodeURIComponent(thisurl);
cps[jiicp].innerHTML+=' <a id="ce' + h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0] + '" title="Create iCal Calendar Event ' + thist + '" target=_blank href="' + "http://www.rjmprogramming.com.au/PHP/ics_attachment.php?id=0&tz=" + encodeURIComponent("Australia/Perth,Australia/Perth") + "&eventwords=test&title=" + encodeURIComponent(thist) + '&stage=' + encodeURIComponent(h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0]) + '&datestart=' + encodeURIComponent(thisdate + thistime) + '&dateend=' + encodeURIComponent(thisdate + nexttime) + '&emode=AndTo&address=' + encodeURIComponent('rmetcalfe15@gmail.com') + '&description=Description&url=' + encodeURIComponent(thisurl) + '">&#128197;</a>';
cps[jiicp].innerHTML+=' <iframe id="ice' + h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0] + '" src="about:blank" style="display:none;width:1px;height:1px;"></iframe><a title="Email and Create iCal Calendar Event ' + thist + '" target=_blank href="#" onclick=" var emtwo=prompt(' + "'" + 'Who do we email to?' + "','fillin@email.in'); document.getElementById('ice" + h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0] + "').src='" + thisc + "'.replace(/emailAddress/g, encodeURIComponent(emtwo)); window.open('" + thiscc + "','_blank'); \">&#10133;</a>";
cps[jiicp].innerHTML+=' <a id="ee' + h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0] + '" title="Email iCal Calendar Event ' + thist + '" target=_blank href="#" onclick=" var em=prompt(' + "'" + 'Who do we email to?' + "','fillin@email.in'); window.open('" + thisc + "'.replace(/emailAddress/g, encodeURIComponent(em)),'_blank'); \">&#128231;</a>";
jiicp+=3;
cps=document.getElementsByTagName('a');
}
}
}
}
}

</script>
<?php
if (isset($_GET['showtags'])) {
echo "<link href='//www.rjmprogramming.com.au/HTMLCSS/showtags.css' rel='stylesheet' type='text/css'>";
}
?>
</head>
<body onload=" checkonl(); setTimeout(initpostedoncc, 3000); sdescih(); widgetcon(); precc(); courseCookies(); cookie_fonts(); is_mentioned_by(); calendar_pass(); " <?php body_class(); ?>>

We hope you try out this WordPress TwentyTen themed blog functionality introduced with this code above.


Previous relevant Calendar iCal Integration Email Tutorial is shown below.

Calendar iCal Integration Email Tutorial

Calendar iCal Integration Email Tutorial

With yesterday’s Calendar iCal Integration Timezone Tutorial‘s emphasis on timezones, we turn our attention now, thinking of our web application as a “tool” and an integrated software product, to two interrelated issues …

  1. What does the future hold as far as using this Calendar “tool” (web application)? In other words, what software and/or operating system platforms will use it and in what way.
  2. How do we respond with this Calendar “tool” web application, fitting in with the requirements implicit in what the whole gammut of software and/or operating system platforms needing its services will need.

The most “asking” of “software and/or operating system platforms” that we can think of here is to cater for a mobile application WebView (please read here regarding Android WebView (using Eclipse or Android Studio IDEs) and iOS UIWebView (using Xcode IDE)) using the Calendar “tool” web application. Mobile platform WebViews can be programmed with Back and Forward navigation buttons, but that is not the ideal thing to rely on to get you out of a pickle that your web application may cause a mobile application WebView, if it navigates out to a place where there is no navigable return. The Back and Forward mobile application WebView buttons may work to return from a Calendar Event population event … honestly don’t know … but we’d prefer to cater for a new means by which such an “offshoot” feeling of navigation can be avoided. So in our new incarnation of the Calendar (event) web application we allow any/all of the following three modes of rjmprogramming-event.ics creation …

  1. Create iCal Calendar Entry
  2. Email (only) iCal Calendar Entry
  3. Create and Email iCal Calendar Entry

… where the second of those above would leave you, within the web application running within a mobile application’s WebView, not moving off the webpage you are on, and thus not falling foul of any “offshoot” navigation weaknesses (to the process).

This new emailing functionality, again only in serverside PHP (and not in clientside Javascript), is relatively easy to arrange by rearranging many of the PHP header statements and feeding that through to the PHP mail function to shoot off the email, given that the user, ahead of time, has supplied you with that filled in email address, which we also attend to today.

Our web application has, in two separate areas of the code, made use of an HTML select element’s child option elements’ title properties to contain useful information for the web application’s workings. We’ll show you below some code to access the information stored from such an arrangement …


<select onchange='document.getElementById("subb").value=this.options[this.selectedIndex].title;' id='emode' name='emode'><option title='Create iCal Calendar Entry' value='Address'>Address</option><option title='Email (only) iCal Calendar Entry' value='To'>Email To (only)</option><option title='Create and Email iCal Calendar Entry' value='AndTo'>Email To (as well)</option></select>

… and you might wonder about the destination for the HTML option title property storage here? We use it to rename our HTML form’s input type=submit button that fires off the callback message. The “guises” of our one HTML input type=submit thus have a one to one correspondence with the values on that HTML select (dropdown) element, and with that list of “modes of output” we showed above. This is our approach to this today, but there are other approaches to such requirements regarding HTML form element HTML input type=submit element arrangements, and you may prefer to use multiple forms and/or multiple input type=submit buttons as we talk about with the series of blog posts finishing, so far, with HTML Multiple Form Multiple Submit Buttons Primer Tutorial.

Actually yesterday we prepared for another eventuality down the road of usefulness for this web application, but before we tell you about that, what we’d encourage you to do yourself should you put such a Calendar (event) web application into production is, interface your data flow not with $_POST[] (nor $_GET[] … damn, gave away the secret) but we’d prefer you to have it be that data in and out, as required, is stored in a secure database of some sort, for security purposes. But back to our (not very well kept) secret, yesterday, we prepared the ground for the web application (callback functionality) to be accessible via PHP $_GET[] arguments.

So, sorry not to have moved off “tool” (web application) work today, but it is very important to try to think of most/all eventualities you can imagine, ahead of the time when you get to the integration tasks the other way around, that is, the integration from the viewpoint of the software acting as “parent” or “co-operative peer” to your Calendar (event) “tool” web application.

The reshaped PHP code now additionally catering for email “messaging” functionality you could call ics_attachment.php, which changed in this way, able to be run with this live run link. We hope you try out the new email functionality yourself.


Previous relevant Calendar iCal Integration Timezone Tutorial is shown below.

Calendar iCal Integration Timezone Tutorial

Calendar iCal Integration Timezone Tutorial

You might have thought with yesterday’s Calendar iCal Integration Primer Tutorial‘s emphasis on timezones we’d have …

  • had too much
  • seen too little
  • invited Goldilocks for some porridge

… but time is quite a complex scenario on Earth, when it comes to timezones for at least two reasons, one being a functional improvement, and one being to fix a bug, that being …

  1. things like WebEx or Skype or GoTo Meeting are not tied down by geography and you may want Calendar functionality to reflect this, or you may also want it to cater for airplane departure and arrival times in various timezones around the world, and it would be best if the HTML form user entry phase catered for a user specifying a date and time not necessarily in either of their local timezone nor the GMT timezone (of the iCal “Z” property special interest) … is the functional improvement, whereas …
  2. we had a bug, leaving off from yesterday’s work with timezones whose GMT offset involved half hour differences … and yes, that happens quite often … and the bug will occur as of yesterday’s code when you come to use those PHP DateTime object add and/or sub methods where the PT[offset]H argument has an [offset] involving a decimal point, so it behoves us to update that relevant PHP code snippet for you, again, below, regarding that (and remind … forgot yesterday … that $ts variable is a user HTML form passed date and time) …

    $di="PT" . str_replace("-","",("" . $start_end_offsets[$thisi])) . "H";
    $parsed_date = DateTime::createFromFormat('Ymd:His', $ts);
    if (strpos(("" . $start_end_offsets[$thisi]), "-") !== false) {
    if (strpos($di, ".") !== false) {
    $parsed_date->sub(new DateInterval(explode(".",$di)[0] . "H"));
    $parsed_date->sub(new DateInterval("PT30M"));
    } else {
    $parsed_date->sub(new DateInterval($di));
    }
    } else {
    if (strpos($di, ".") !== false) {
    $parsed_date->add(new DateInterval(explode(".",$di)[0] . "H"));
    $parsed_date->add(new DateInterval("PT30M"));
    } else {
    $parsed_date->add(new DateInterval($di));
    }
    }
    $outts = $parsed_date->format('Ymd:His');

Now allowing for the first idea above is not as involved as you may think, but only if you think serverside PHP, rather than think it will be easy with clientside Javascript. And what makes it a doddle, generally, are all those Open Source contributors to knowledge out there, and those great computing program language documenters out there exemplified in their brilliance with this totally useful link to the PHP timezone_identifiers_list and PHP DateTimeZone object method getOffset method links. So we allow the user to enter any of …

  • Local
  • GMT
  • Any of the half hour timezone numerical offset (indicators) from -24 to 24
  • Any of the timezone names as per those PHP methods above, with valid continental prefix names

… to define the start and end date and time parameters to express for their Calendar iCal Event that they define. Along the way we also add in dropdowns and HTML input type=number (year) elements to help for those not so keen on keyboard entry.

Guess you’d say we are still on the “tool” feel of the web application, but aim to move more on the “integration” front into the future.

Here is the renewed PHP code you could call ics_attachment.php, that changed in this way, able to be run with this live run link. We hope you try it out for yourself, especially as we’ve added some Google Chart Map Chart linking of the “when” and “where” of defined timezone thinking, via the use of PHP’s DateTimeZone object method getLocation, as you can see happening with today’s tutorial picture.


Previous relevant Calendar iCal Integration Primer Tutorial is shown below.

Calendar iCal Integration Primer Tutorial

Calendar iCal Integration Primer Tutorial

Do you remember us talking about the ICS extension file when we presented WebEx Prerecording Primer Tutorial as shown below? It is an integration input to working with iCal Calendar software.

So here we are at a “when” of life tutorial, which is always an interesting exercise in our book. And “book” could be the go for an application to use this type of functionality. When you “book” something, you’d often want to remind yourself and/or others of such an event. But for now, we are concentrating on making a “tool” type of web application that will suit future purposes.

We’ve built a web application around the useful logic presented in this great Git repository today, writing our code in PHP, because you are dealing with header manipulation here centering around …


header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: attachment; filename=rjmprogramming-event.ics');
echo $ical;

… where the PHP variable $ical contents has been pieced together in response to a callback from an earlier HTML form execution of the same ics_attachment.php code where the necessary details are collected off the user.

If you try the live run you’ll probably glean that most of our concern centered around the date and time, regarding timezone use so that we …

  • in the HTML form execution we use client Javascript to glean the local timezone and local date and time to default the form appropriately … so that …
  • in the HTML form execution the user fills out Calendar Event start and end times with respect to local time and this, along with an offset to get these times back to UTC or (Greenwich Mean Time) are passed to the callback web application (which is the same web application) … so that …
  • the second callback execution constructs the iCal (for an rjmprogramming-event.ics attachment) with these UTC (or GMT) date and times in mind, whereby the “Z” timezone parameter fits the bill nicely … and when …
  • the user saves this rjmprogramming-event.ics event into the iCal Calendar application, where the event will be shown back relative to the local date and time

The date and time functions used to make this happen are …

  1. Javascript’s Date object …

    var dd=new Date();
    var qw=eval((eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2]) - eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2] % 100)) / 100) + eval((0.0 + eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2] % 100)) / 60.0);
    if (dd.toTimeString().indexOf('+') != -1) qw=-qw;
    document.getElementById('tz').value=qw;
  2. Javascript’s Date object’s toTimeString method (as shown above) to glean the local timezone offset, and its opposite
  3. PHP’s DateTime object …

    $di="PT" . str_replace("-","",urldecode($_POST['tz'])) . "H";
    $parsed_date = DateTime::createFromFormat('Ymd:His', $ts);
    if (strpos(urldecode($_POST['tz']), "-") !== false) {
    $parsed_date->sub(new DateInterval($di));
    } else {
    $parsed_date->add(new DateInterval($di));
    }
    $outts = $parsed_date->format('Ymd:His');

  4. PHP’s DateTime object’s createFromFormat constructor method (as above) to create a DateTime object from the passed through user details
  5. PHP’s DateInterval object
  6. PHP’s DateTime object’s add and/or sub methods (as above) to create a DateTime object with a DateInterval offset to UTC (or GMT) (expressed in hours)
  7. PHP’s DateInterval object’s format method (as above) to end up with a UTC (or GMT) expression of date and time to be placed into the rjmprogramming-event.ics iCal message

We’ll probably be revisiting with improvements soon, but we hope you try it for yourself.


Previous relevant WebEx Prerecording Primer Tutorial is shown below.

WebEx Prerecording Primer Tutorial

WebEx Prerecording Primer Tutorial

We’ve been trying out WebEx (by Cisco) prerecording as a video conferencing idea as an alternative to …

… regarding video conferencing products we’ve tried at this blog.

Have to say, WebEx is great, even with respect to the “wide eyed and bushy tailed” reaction “this little black duck” has to all these networky communicaty ideas on the net (at least we spelt “net” correctly).

Have to thank my wife, Maree, for her expertise and the facilities her company, Thomson Reuters, supplies for the serving of WebEx recordings … thanks everyone. Have been assured they are periodically deleted, and my lame impersonations of the old “ducks on the wall” can rest in peace shortly.

And so, we have a slideshow starting with a WebEx email link to join a meeting, and we pan down the email to show you other WebEx functionalities, such as adding a Calendar reference to the meeting time, and though we haven’t shown you detail here, rest assured it handles timezone scenarios very well, unless you lie about living in Antarctica, that is … sorry, scientists in Antarctica reading this blog posting … all 237 of you.

During this “earlier than today exploration of WebEx” session the necessary software installs just happened for this MacBook Pro Mac OS X laptop as if we were shelling peas … it’s always good to have some handy when installing any software. So we won’t show you this unless we deem it essential at a later date. You can perhaps do as I did, and ask a real WebEx user invite you to a meeting, to set yourself up. In fact, today’s session meeting creation time you may notice is well in the past from that earlier introductory learning session Maree and I had, and you can bring back up that old email, and resurrect that meeting again and again, if you like … am not sure if there is an expiry date on this too, like with server stored WebEx prerecordings.

So also rest assured, WebEx handles …

  • video via webcam on your device
  • audio via microphone on your device (“Use Computer”) or via a phone line
  • the synchronization of the two above
  • mobile devices

Did you know?

A .ics extension file, as you can see being used as an email attachment file extension in is, as explained in this link‘s sublink

ICS is a global format for calendar files widely being utilized by various calendar and email programs including Google Calendar, Apple iCal, and Microsoft Outlook. These files enable users to share and publish information directly from their calendars over email or via uploading it to the world wide web.

… as helping interface meetings to online calendar appointments. Cute, huh?!

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Installers, Operating System, Tutorials | Tagged , , , , , , , | Leave a comment

PHP Geographicals Coriolis Effect Revisit Tutorial

PHP Geographicals Coriolis Effect Revisit Tutorial

PHP Geographicals Coriolis Effect Revisit Tutorial

Today we’re revisiting our inhouse Coriolis Effect calculator, further to work at PHP Geographicals Makeover Primer Tutorial, for a couple of reasons …

  1. we wanted to not show iframe that used to house the weather information any more when that information comes, these days, from a Google search engine query popup window … and …
  2. where it used to give a result such as …

    Earth Coriolis Force for Latitude,Longitude below represents a 6.84e-5 ms-2 deflection from → West to → East for each ms-1 of Southerly ↑ wind

    … it used to be possible for the dropdowns below that to not reflect the Latitude,Longitude entered in by the user via the clicking of links mentioning “Coriolis” … very annoying …

… and, yet again, we found it useful to use …

  • new HTML iframe …

    <iframe id="weather" frameborder=0 onerror=nochkit(this); onload=chkit(this); style="background-color: lightgray; display: BLOCK; height: 460px; width: 500px;" src="javascript: false;"></iframe>

    onload event logic … as well as …
  • new HTML iframe onerror event logic … Javascript …

    function nochkit(iois) {
    setTimeout(function(){ parent.document.getElementById('weather').style.display='none'; }, 1000);
    setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000); onealert=true; parent.document.getElementById('weather').style.display='none'; if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); } } }, 2000);
    }


    function sichkit() {
    if (aconto) {
    if (aconto.body.innerHTML.trim() != '') {
    if (aconto.body.innerHTML.indexOf('>Not Found') != -1) {
    parent.document.getElementById('weather').style.display='none';
    aconto.body.innerHTML='';
    }
    } else {
    parent.document.getElementById('weather').style.display='none';
    aconto.body.innerHTML='';
    }
    }
    }

    function chkit(iois) {
    var allthere=false;
    if (iois != null) { // check out window.svgDocument
    aconto = (iois.contentWindow || iois.contentDocument);
    if (aconto != null) {
    if (aconto.document) {
    aconto = aconto.document;
    if (notyet) { notyet=false; parent.document.getElementById('weather').style.backgroundColor='transparent'; return ''; }
    if (aconto.body.innerHTML.trim() != '') {
    if (aconto.body.innerHTML.indexOf('>Not Found') == -1) {
    iois.style.backgroundColor='lightgray';
    allthere=true;
    parent.document.getElementById('weather').style.display='block';
    } else if (1 == 3) {
    setTimeout(function(){ parent.document.getElementById('weather').style.display='none'; }, 1000);
    setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000); onealert=true; parent.document.getElementById('weather').style.display='none'; if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); } } }, 2000);
    } else {
    aconto.body.innerHTML='';
    parent.document.title+='4';
    setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000); onealert=true; parent.document.getElementById('weather').style.display='none'; if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); } } }, 2000);
    nochkit(iois);
    }
    } else {
    setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000); onealert=true; parent.document.getElementById('weather').style.display='none'; if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); } } }, 2000);
    nochkit(iois);
    }
    }
    }
    } else {
    if (notyet) { notyet=false; parent.document.getElementById('weather').style.backgroundColor='transparent'; return ''; }
    }
    if (!allthere) {
    parent.document.getElementById('weather').style.display='none';
    }
    }

… as contributors to making this happen better with coriolis_force_at.php changed in this way as a Coriolis Effect web application you can also try below …


Previous relevant PHP Geographicals Makeover Primer Tutorial is shown below.

PHP Geographicals Makeover Primer Tutorial

PHP Geographicals Makeover Primer Tutorial

A couple of days ago, when we added PHP Earth Rotational Speed Primer Tutorial as shown below, to our blogroll mix, it got us relooking at our Geographicals Suite of Web Applications at this blog that use this live run interface.

Perhaps you remember the last member of the Geographicals Suite we added, the PHP/Javascript/HTML Coriolis Effect Calculation Tutorial?

We found that, this time around, we wanted to …

  • rework how the weather information is gleaned … we now use a Google Search of a place name + ” weather”
  • get rid of a PHP warning regarding “header has already been sent” … a bug
  • make the interface look a bit better with some CSS for ul->li styling involving emojis a lot like talked about at WordPress Bullet Point CSS Styling Emoji Tutorial and the oft-used CSS H1 CSS Embossed Text Primer Tutorial
  • make the Google Maps “saddr=” and “daddr=” type calls work for mobile platform scenarios

Below is the list of changed parts of the suite …

It is often good to revisit software and see what can be improved with fresh eyes.


Previous relevant PHP Earth Rotational Speed Primer Tutorial is shown below.

PHP Earth Rotational Speed Primer Tutorial

PHP Earth Rotational Speed Primer Tutorial

We discovered a way to calculate the Earth’s rotational speed for a given latitude. When you see how fast we’re moving relative to somebody still in space you’ll be amazed and think gravity is pretty cool. Even if you’re standing on your head right now, you’d have to agree with me that “ytivarg” is not such a bad concept also … “can tell you it saved my bacon back in ’66 when that boar from yonder ridge fell on me when I was stuck practising them thar cartwheely thingos, and got stuck not the right way up … if youse knows what ah mean” … but we digress.

The Earth is like a ball with a rod through it coming out at the North and South poles, and if you can imagine this, then you can probably imagine that the rotational speeds are the biggest near the Equator and get a lot smaller near the Poles.

Still and all, at pretty big latitudes like for Archangel, in Russia, the rotational speeds get up with what we were taught was the speed of a Jumbo jet … back in the day. As for Singapore … wow … take a look at our tutorial picture or try a live run for yourself, and this is our PHP source code you could call rotational_speed_at.php

Ahhhh … the “where” of life … so interesting?!

Believe it or not, the equation to calculate this we found in “New Century Maths 9 (second edition) Stages 5.2/5.3” so thanks. It goes like …


Earth Rotational Speed (in km/h) = ( 2 x Π x 6371 x cos(latitude) ) / 24

… where 6371 will do as radius of Earth in kilometres and 24 is the number of hours in an Earth day and latitude (for most functionalities such as Javascript’s Maths.cos() function) should be expressed in radians (where 1 degree = ( 1 x Π ) / 180 radians), and Π is, well, Π

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , | Leave a comment

WordPress Emoji Menu Revamp Tutorial

WordPress Emoji Menu Revamp Tutorial

WordPress Emoji Menu Revamp Tutorial

We really like HTML iframe usage around here. In terms of …

Software Need Not Be Hard

… being our company byline, they tick a lot of boxes. You’ll read online, though, issues with security and whatnot regarding them, so, as with all these matters, it is better to read around. However, if you intend building up lots of web applications in your domain, online, HTML iframe elements …

  1. allow for chance to modularize …
  2. without it, necessarily, looking clunky … as well as …
  3. is a means to introduce onload event logic not tied to document.body onload event … like a chance to “reset” … as well as …
  4. can be a means, what we like to call “Client Pre-emptive Iframe” thinking, to test for the existence of a URL … as well as …
  5. the HTML iframe name attribute can tee up with second argument of Javascript window.open to think of “the dreaded popup window actually being the more acceptable iframe window (relatively speaking)” … as well as …
  6. the HTML iframe src attribute is a good Javascript DOM access point to use an iframe when you know the URL … versus …
  7. the HTML iframe srcdoc attribute is a good Javascript DOM access point to use an iframe when you know the content

Hence, iframe usage got front and centre when thinking on how to revamp the Emoji Menu arrangements, at this blog, talked about at WordPress Emoji Menu Primer Tutorial. That old arrangement opened new (second _blank arguments to window.open) to new windows, only, and felt a bit over the top, to us, especially because these Emoji Menus predominantly showcased Inhouse Web Applications. Why not, at least, involve HTML iframe elements into the mix?

That got us adjusting a WordPress “Emoji Menu” Page for “clicking the Emoji Menu, here at this blog (or in new window), purposes” scenario and then there was the changed emoji_widget_idea.htm standalone Emoji Menu web application we wrote for the “hovering over the Emoji Menu, here at this blog, purposes” scenario.

We think the filling in of webpage space to the right of the Emoji Menu dropdown element is more elegant. What do you think?


Previous relevant WordPress Emoji Menu Primer Tutorial is shown below.

WordPress Emoji Menu Primer Tutorial

WordPress Emoji Menu Primer Tutorial

The Emoji Menu concept mentioned in the previous Fixed Sticky Header Top Window Document Tutorial has been the inspiration to …

  • add a new WordPress primary menu level “Emoji Menu” option (via the WordPress administration section’s Add Page option) … that …
  • onclick calls a (WordPress) Page that is a select (dropdown) element size=9 (for non-mobile browser usefulness) whose innerHTML (ie. what you see) consists of emojis … and on a selection …
  • opens into a new webpage a web application from the RJM Programming domain … similarly for the …
  • onmouseover (hover (Ajax feeling functionality), for non-mobile browser usefulness) immediate display of a (smaller) select (dropdown) element directly below the “Emoji Menu” option heading … facilitated by a changed header.php coding change …

    <script type="text/javascript">
    function donow() {
    var sbitis='<select size=9 id="emojih" onchange=window.open(this.value,"_blank");><option title="Web Audio" style="cursor:pointer;text-decoration:none;font-size:36px;" target="iweb_audio" id="aweb_audio" value="//www.rjmprogramming.com.au/HTMLCSS/web_audio.htm">&#128266;</option><option title="Square Hr Tracing" style="cursor:pointer;text-decoration:none;font-size:36px;" target="isquare_hr_tracing" id="asquare_hr_tracing" value="//www.rjmprogramming.com.au/HTMLCSS/square_hr_tracing.htm">&#128207;</option><option title="Emoji Walk Animation" style="cursor:pointer;text-decoration:none;font-size:36px;" target="iemoji_walk_animation" id="aemoji_walk_animation" value="//www.rjmprogramming.com.au/HTMLCSS/emoji_walk_animation.htm">&#127939;&#127998;&#8205;&#9792;&#65039;</option><option title="Fruits" style="cursor:pointer;text-decoration:none;font-size:36px;" target="ifruits" id="afruits" value="//www.rjmprogramming.com.au/HTMLCSS/fruits.html">&#127820;</option><option title="Name Your Mascot" style="cursor:pointer;text-decoration:none;font-size:36px;" target="iname_your_mascot" id="aname_your_mascot" value="//www.rjmprogramming.com.au/HTMLCSS/name_your.html">&#128231;</option><option title="Sushi Train" style="cursor:pointer;text-decoration:none;font-size:36px;" target="isushi_train" id="asushi_train" value="//www.rjmprogramming.com.au/HTMLCSS/circuit.htm">&#127857;</option><option title="Flag Quiz" style="cursor:pointer;text-decoration:none;font-size:36px;" target="iflag_quiz" id="aflag_quiz" value="//www.rjmprogramming.com.au/HTMLCSS/flagquiz.htm">&#127462;&#127465;</option><option title="Emoji Overlay" style="cursor:pointer;text-decoration:none;font-size:36px;" target="iemoji_overlay" id="aemoji_overlay" value="//www.rjmprogramming.com.au/HTMLCSS/emoji_overlay.htm">&#128285;</option><option value="" selected></option></select>';
    sbitis='<iframe src="//www.rjmprogramming.com.au/HTMLCSS/emoji_widget_idea.htm"></iframe>';
    var isdone=0, is2done=0;
    if (document.getElementsByClassName){
    var x304x = document.getElementsByClassName('page-item-304');
    x304x[0].onmouseover = function() { var xl=document.getElementById('x2language'); xl.style.display = 'block'; };
    isdone = 1;
    var x46544x = document.getElementsByClassName('page-item-46575');
    x46544x[0].onmouseover = function() { if (this.innerHTML.replace('iframe ','select ').indexOf('select ') == -1) { this.innerHTML+=sbitis; } };
    is2done = 1;

    } else { // IE
    //var qis = document.getElementById("pick_content").contentWindow.document;
    var ilis = 0;
    var eleis, ele2is;
    var lisis = document.getElementsByTagName("li");
    while (eleis = lisis[ilis++]) {
    if (eleis.className == "page-item-304" && isdone == 0) {
    eleis.onmouseover = function() { var xl=document.getElementById('x2language'); xl.style.display = 'block'; };
    isdone = 1;
    }
    if (eleis.className.indexOf("page-item-46575") != -1 && is2done == 0) {
    eleis.onmouseover = function() { var xl2=document.getElementById('emojih'); xl2.style.display = 'block'; };
    is2done = 1;
    }

    }
    }
    }


    setTimeout(donow,2000);


    </script>

… that HTML iframe emoji_widget_idea.htm content (live run) preference above arising from our desire to add more flexibility to this content down the track.


Previous relevant Fixed Sticky Header Top Window Document Tutorial is shown below.

Fixed Sticky Header Top Window Document Tutorial

Fixed Sticky Header Top Window Document Tutorial

The recent Fixed Sticky Header Primer Tutorial involved …

  • a supervisory “emoji menu” web application hosting …
  • supervised iframe element hosted web applications

… and you may think, if all this is going on with web applications on the same domain, what’s the big deal? What could go wrong? (These words always bringing a knowing chuckle around here!)

For the most part, it’s true, there were no issues, but one “supervised iframe element hosted web application” we tried did not behave with all its functionality happening. Lo and behold, applying a web inspector showed up an error, with a codeline (in Javascript) that went …


mcp=parent.document.getElementById('lcp').value;

… and then we summed this up in two different strands of thought …

  • can we write a generic external piece of Javascript called just before </body> that can pluck out lines of code, with corresponding line codes, and see if “parent.document” or “top.document” occur in them and effectively “better debug” within an errorHandler function that further examines this “null” return error … which looking into is not as easy as first optimistically envisaged … versus …
  • get in there specifically with the web inspector, adjust the code of the “supervised iframe element hosted web application” and have it work being …
    1. additionally supervised this way … and more importantly …
    2. still work the way it used to unsupervised, as ever it has worked up to now

… via the simple (age old) paradigm, involving debugging (web applications, at the client level) via tools like (the web browser) Safari’s Web Inspector …

  • Using Web Inspector type tools:

    Identify the issue via …

    Error line
    Error line number
  • Using Web Inspector type tools:

    Fix the issue until no errors happen

And what would have been the better generic coding for a web application that may become a “supervised web application” (in different ways) into the future.

Don’t just …

if (window.top.document) {
if (window.top.document != window.document) {
document.getElementById('reout').style.height='250px';
if (window.top.document != window.parent.document) {
mcp=parent.document.getElementById('lcp').value;
rcp=top.document.getElementById('rcp').value;
lcp=top.document.getElementById('lcp').value;
// more logic here
} else {
mcp=parent.document.getElementById('mcp').value;
rcp=parent.document.getElementById('rcp').value;
lcp=parent.document.getElementById('lcp').value;
// more logic here
}
}
}
But do

if (top.window && parent.window) { // if (window.top.document) {
var plcp=parent.document.getElementById('lcp');
if (window.top.document != window.document) {
document.getElementById('reout').style.height='250px';
if (window.top.document != window.parent.document && parent.document.getElementById('lcp')) {
mcp=parent.document.getElementById('lcp').value;
rcp=top.document.getElementById('rcp').value;
lcp=top.document.getElementById('lcp').value;
// more logic here
} else if (parent.window && plcp) {
mcp=parent.document.getElementById('mcp').value;
rcp=parent.document.getElementById('rcp').value;
lcp=parent.document.getElementById('lcp').value;
// more logic here
}
}
}

… in other words, check window object existence, before you assume document object existence, with the changed emoji_slideshow.htm part within the emoji menu supervisor live run link’s changed fixed_top.html code.


Previous relevant Fixed Sticky Header Primer Tutorial is shown below.

Fixed Sticky Header Primer Tutorial

Fixed Sticky Header Primer Tutorial

Just like with the W3schools How To series inspired HTML and Javascript and CSS Survey Levelling Tutorial we have another W3schools inspired web application idea called “Sticky Header”.

To quote W3schools regarding the design aspects to the fixed_top.html “proof of concept” web application

On Scroll Sticky Header
The header will stick to the top when you reach its scroll position.
Scroll back up to remove the sticky effect.

Which takes us to what we wanted to try as an inhouse addition to functionality. We like emojis, as “text meets button design”. Hence, we also like the “text” emoji being like an “a” link “button”, for two biggish reasons …

  • emoji buttons save space
  • emoji buttons can look like images that can attract user attention, and be like an Internationizational improvement to your web application, given some careful consideration

… that lead us to want to have the “Sticky Header” contain an “emoji menu” of “emoji buttons”, the “onclick” events of which show content below the “Sticky Header” in a one row table that pushes the latest content to the left of that row (so that our hashtagging logic will still see the emojis along with the latest selected content), yet allow an intrepid user venture right to “uncontrolled lands of functionality” should they wish. We’re sticking left … chortle, chortle.


Previous relevant HTML and Javascript and CSS Survey Levelling Tutorial is shown below.

HTML and Javascript and CSS Survey Levelling Tutorial

HTML and Javascript and CSS Survey Levelling Tutorial

With the “terrestrial” side to Land Surveying (ie. that of the small distances kind), two “get out there and do it” skills spring to mind, those being …

  • performing a traverse via the use of a theodolite (or “total station”) (as the web application works the mathematics of, off the field book, with the previous HTML and Javascript and CSS Survey Traverse Tutorial) working out the (“X”,”Y”) of 2D “life” … and today, we add to that with …
  • performing a levelling run via the use of a level (or “total station”) …

… and with today’s web application we simulate, to some degree, minus “how to level a level”, looking through the “level” viewer towards a “surveying staff” (held level and straight) on a point of something you want to know the elevation (or (3D “life”) “Z”) of in terrestrial terms, relative to known elevations you will probably want to start pointing at (the “surveying staff” being on) with your first (often a known “datum”) …

  • Backsight … then …
  • (however many Inter Sights followed by a) Foresight (and then back to Backsight, as necessary)

… series of measurements (or “reading”) to derive “reduced levels” for each point the “surveying staff” visits. This, in most practice, involves alternately leapfrogging (each other, at different times) …

  • Land Surveyor recording and levelling the “level” … and a …
  • Chainperson levelling and straightening the “surveying staff”

… the “surveying staff” we simulate in our web application (somewhat) thanks to Cody.

That’s the “what” of the web application, but what about the “how” (let alone the who)? Here, we thank the great W3schools parallax ideas.

The “central CSS smart” of these parallax ideas is the idea of …


<style>
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
</style>

So take a look at parallax_example.html‘s live run link to see what we mean.


Previous relevant HTML and Javascript and CSS Survey Traverse Tutorial is shown below.

HTML and Javascript and CSS Survey Traverse Tutorial

HTML and Javascript and CSS Survey Traverse Tutorial

Here is a tutorial showing some client-side basics in HTML and Javascript and CSS all in the one HTML file, to simplify concepts. The tutorial subject matter is a webpage to perform Survey Traverse calculations. A Survey Traverse is:

Traverse is a method in the field of surveying to establish control networks.[1] It is also used in geodesy. Traverse networks involve placing survey stations along a line or path of travel, and then using the previously surveyed points as a base for observing the next point. Traverse networks have many advantages, including:

Less reconnaissance and organization needed;
While in other systems, which may require the survey to be performed along a rigid polygon shape, the traverse can change to any shape and thus can accommodate a great deal of different terrains;
Only a few observations need to be taken at each station, whereas in other survey networks a great deal of angular and linear observations need to be made and considered;
Traverse networks are free of the strength of figure considerations that happen in triangular systems;
Scale error does not add up as the traverse is performed. Azimuth swing errors can also be reduced by increasing the distance between stations.

The traverse is more accurate than triangulateration[2] (a combined function of the triangulation and trilateration practice).[3]

Let’s see some simple HTML in action in a tutorial …

Link to HTML “spiritual home” … at W3Schools has many tutorials.
Link to Survey Traverse live run … here.
Link to Survey Traverse live run (additional Google Line Chart functionality) here.
Link to Survey Traverse information … from Wikipedia from which quote above comes.
Link to some downloadable HTML code … rename to SurveyTraverse.html which packages up a lot of Javascript and a little bit of CSS … or JaCvasScriptS … not sure whether this would ever catch on.
Link to some downloadable PHP programming code (additional Google Line Chart functionality) … rename to SurveyTraverse.php

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

WordPress Blog Plus Searches Tutorial

WordPress Blog Plus Searches Tutorial

WordPress Blog Plus Searches Tutorial

After a few days of trying out the WordPress Blog (TwentyTen themed) search functionality (searching for GETME[space]) and creating Oldest link ideas from the recent WordPress Blog Getme Searches Tutorial we have come to two conclusions …

  • (though we dislike changing the premise of a modification, we’re going to) change the appending delimiting character from a space to a + (plus) character because it fits in better with previous functionalities offered … and all that withstanding …
  • we like the basic idea (of searching for the genesis of a search regarding this blog) and want to extend it to other non-GETME searches … to just have it that (all in TwentyTen theme’s header.php)

<?php echo ”

document.getElementById('s').placeholder='Space appended compares to whole posting content. One plus (+) after GETME (or, actually, now, any) search facilitates Oldest link.';

“; ?>

… and, in so doing, came up with a more robust …

<?php echo ”

function chkinodo() {
var mkh=0, lastahelsid='', lastahelstitle='';
var bihis='';
//if (document.URL.indexOf('&max=') != -1) { alert(0); }
if (document.URL.indexOf('s=') != -1 && document.URL.replace('&max=','wopenall=').indexOf('wopenall=') != -1 && document.URL.indexOf('ifnooldestdoone=') != -1 && document.URL.replace('&max=','paZge=').replace('/page','page=').indexOf('page=') == -1) {
bihis=document.body.innerHTML;
//if (document.URL.indexOf('&max=') != -1) { bihis=bihis.replace(/lder\ post/g, ''); }
var hels=document.getElementsByTagName('h1');
//if (document.URL.indexOf('&max=') != -1) { alert('' + hels.length + ' ... ' + document.getElementsByTagName('a').length); }
if (document.URL.indexOf('&paged=') != -1 && document.URL.indexOf('ifnooldestdoone=') != -1 && eval('' + hels.length) > 0 && document.body.innerHTML.indexOf('lder post') != -1 && document.URL.replace('&paged=','&max=').indexOf('&max=') != -1) {
location.href=document.URL.replace('&paged=' + document.URL.split('&paged=')[1].split('&')[0].split('#')[0], '&paged=' + eval(1 + eval('' + document.URL.split('&paged=')[1].split('&')[0].split('#')[0])));
return '';
} //else if (document.URL.indexOf('&paged=') != -1 && document.URL.indexOf('ifnooldestdoone=') != -1 && document.URL.indexOf('&max=') != -1) {
//alert('' + eval('' + hels.length) + ' nextpage=' + eval(1 + eval('' + document.URL.split('&paged=')[1].split('&')[0].split('#')[0])));
//alert(document.body.innerHTML.indexOf('lder post'));
//}
if (eval('' + hels.length) > 0 && (bihis.indexOf('lder post') == -1 || document.URL.indexOf('&max=') != -1)) {
//if (document.URL.indexOf('&max=') != -1) { alert(11); }
if (hels[0].innerHTML.indexOf('ldest') == -1) {
//if (document.URL.indexOf('&max=') != -1) { alert(111); }
if (hels[0].innerHTML.toLowerCase().indexOf('search result') != -1) {
//if (document.URL.indexOf('&max=') != -1) { alert(1111); }
var ahels=document.getElementsByTagName('a');
var asthere=false;
//hels[0].innerHTML+=',';
for (var jkh=0; jkh<ahels.length; jkh++) {
//if (document.URL.indexOf('&max=') != -1) { alert('jhk=' + jhk); }
if (('' + ahels[jkh].title).indexOf('Permalink to ') != -1) {
if (('' + ahels[jkh].outerHTML).indexOf(' id=') == -1) {
asthere=true;
ahels[jkh].id='mya' + mkh;
lastahelsid='' + ahels[jkh].id;
lastahelstitle='' + ('' + ahels[jkh].title).split('Permalink to ')[1];
mkh++;
} else {
asthere=true;
lastahelsid='' + ahels[jkh].id;
lastahelstitle='' + ('' + ahels[jkh].title).split('Permalink to ')[1];
}
}
}
if (!asthere) {
setTimeout(chkinodo, 5000);
}
}
}
if (lastahelsid != '' && lastahelstitle != '') {
hels[0].innerHTML+=' ... <a id=reposa href="#' + lastahelsid + '" title="' + lastahelstitle + '">Oldest</a> ';
if (document.URL.replace('&paged=','&max=').indexOf('&max=') != -1) {
if (document.getElementById('reposa')) {
document.getElementById('reposa').click();
} else {
location.href='#' + lastahelsid;
}
}
}
}
}
}

“; ?>

… better dealing with multiple page result sets, called into play better via …

<?php echo ”

function sipreradiocc() {
//if (document.getElementById('s').value.trim().indexOf('GETME') != -1) { alert(document.getElementById('s').value); }
if (document.getElementById('s').value.indexOf('++') == -1) {
if ((document.getElementById('s').value + '~').replace('_GETME','-GETME').indexOf('-GETME+~') != -1) {
//alert('yes');
if (document.URL.indexOf('?s=' + encodeURIComponent(document.getElementById('s').value.replace(/\+$/g,'')) + '&') == -1) {
location.href=document.URL.split('?')[0].split('#')[0].split('/ITblog')[0].split('/wordpress')[0] + '/ITblog/?s=' + encodeURIComponent(document.getElementById('s').value.replace(/\+$/g,'')) + '&wopenall=' + encodeURIComponent(document.getElementById('s').value.trim()) + '&ifnooldestdoone=y&paged=0';
}
} else if ((document.getElementById('s').value + '~~').replace('_GETME','-GETME').indexOf('+~~') != -1) {
//alert(document.getElementById('s').value + '~~');
if (document.URL.indexOf('?s=' + encodeURIComponent(document.getElementById('s').value.replace(/\+$/g,'')) + '&') == -1) {
location.href=document.URL.split('?')[0].split('#')[0].split('/ITblog')[0].split('/wordpress')[0] + '/ITblog/?s=' + encodeURIComponent(document.getElementById('s').value.replace(/\+$/g,'')) + '&max=256&step=256&ifnooldestdoone=y&paged=0#nav-below';
}
} //else if (document.getElementById('s').value.trim().indexOf('GETME') != -1) {
//alert('why ' + (document.getElementById('s').value + '~').replace('_GETME','-GETME'));
//}
}
}

“; ?>

… and ready for you to try yourself, sometime, we’re hoping, to get to “first mentions” of your search string(s) at this WordPress Blog’s search textbox.


Previous relevant WordPress Blog Getme Searches Tutorial is shown below.

WordPress Blog Getme Searches Tutorial

WordPress Blog Getme Searches Tutorial

We noted, looking at our Apache Status report, that fairly often readers of this blog, thanks, search for mention of a particular GETME file, it being our “source control” basis whereby …

  • first draft of a “source control” file, named cowsay.php as an example, would be called …

    cowsay.php_GETME
  • and then subsequent drafts use s rather than _ meaning a “second draft” would be called …

    cowsay.php-GETME

    … and a fourth …

    cowsay.php---GETME

You go through with a particularized search like that and you’d be looking for specific referencing, we reckon. And yet, once the project rolls along a search for cowsay.php_GETME as your example will land you on four or five or six mentioning tutorials, the way we do it around here. We want to tell a story, and build it up (but please do your own research regarding Google SEO before thinking this is such a good idea, as repeating content is quite often a no-no). But, like we’re intimating, such a particularized search result set like this may annoy many people looking for some quick, definitive answer.

Well, we think for some such searches, again using cowsay.php_GETME as an example, the adding and then clicking of …


Oldest

… and lobbing you in the direction of …


Python Cowsay API Primer Tutorial

… as the oldest mention of cowsay.php_GETME, could be a useful new feature … ie. getting to it’s genesis. Many people will be most interested going back to this genesis, but please note, in the case we’ve mentioned, using our “present as a book” emoji button (📖 &#128214;) functionality (reading like a book, functionality talked about with WordPress Blog Posting Thread Book Primer Tutorial) on the topmost (usually, but regarding hot off the press business “topmost that does not have the title WordPress Blog Getme Searches Tutorial“) link you are presented with would do a good job here too.

Okay, so how does a user start getting to this additional Oldest link creation logic? Well, in our changed bits on our WordPress blog TwentyTen themed header.php (a modus operandi also used for WordPress Blog Byline Zoom Fix Tutorial)

<?php echo ”

function sipreradiocc() {
//if (document.getElementById('s').value.trim().indexOf('GETME') != -1) { alert(document.getElementById('s').value); }
if ((document.getElementById('s').value + '~').replace('_GETME','-GETME').indexOf('-GETME ~') != -1) {
//alert('yes');
location.href=document.URL.split('?')[0].split('#')[0].split('/ITblog')[0].split('/wordpress')[0] + '/ITblog/?s=' + encodeURIComponent(document.getElementById('s').value.trim()) + '&wopenall=' + encodeURIComponent(document.getElementById('s').value.trim()) + '&ifnooldestdoone=y';
} //else if (document.getElementById('s').value.trim().indexOf('GETME') != -1) {
//alert('why ' + (document.getElementById('s').value + '~').replace('_GETME','-GETME'));
//}
}


function preradiocc() {
//document.title='' + (document.getElementById('s').value + '~').replace('_GETME','-GETME').indexOf('-GETME ~') + ' ... ' + (document.getElementById('s').value + '~').replace('_GETME','-GETME');
if ((document.getElementById('s').value + '~').replace('_GETME','-GETME').indexOf('-GETME ~') != -1) {
location.href=document.URL.split('?')[0].split('#')[0].split('/ITblog')[0].split('/wordpress')[0] + '/ITblog/?s=' + encodeURIComponent(document.getElementById('s').value.trim()) + '&wopenall=' + encodeURIComponent(document.getElementById('s').value.trim()) + '&ifnooldestdoone=y';
} else
if (document.getElementById('s').value != "" && radis != "") {
radiocc(radis);
}
}

“; ?>

… reading between the lines and taking into consideration a changed codeline in function precc …

<?php echo ”

document.getElementById('s').placeholder='Space appended compares to whole posting content. Spaces after GETME search facilitates Oldest link.';
setInterval(sipreradiocc, 5000);

“; ?>

… in conjunction with a new document.body onload Javascript function …

<?php echo ”

function chkinodo() {
var mkh=0, lastahelsid='', lastahelstitle='';
if (document.URL.indexOf('s=') != -1 && document.URL.indexOf('wopenall=') != -1 && document.URL.indexOf('ifnooldestdoone=') != -1 && document.URL.replace('/page','page=').indexOf('page=') == -1) {
var hels=document.getElementsByTagName('h1');
if (eval('' + hels.length) > 0 && document.body.innerHTML.indexOf('lder post') == -1) {
if (hels[0].innerHTML.indexOf('ldest') == -1) {
if (hels[0].innerHTML.toLowerCase().indexOf('search result') != -1) {
var ahels=document.getElementsByTagName('a');
for (var jkh=0; jkh<ahels.length; jkh++) {
if (('' + ahels[jkh].title).indexOf('Permalink to ') != -1) {
if (('' + ahels[jkh].outerHTML).indexOf(' id=') == -1) {
ahels[jkh].id='mya' + mkh;
lastahelsid='' + ahels[jkh].id;
lastahelstitle='' + ('' + ahels[jkh].title).split('Permalink to ')[1];
mkh++;
} else {
lastahelsid='' + ahels[jkh].id;
lastahelstitle='' + ('' + ahels[jkh].title).split('Permalink to ')[1];
}
}
}
}
}
if (lastahelsid != '' && lastahelstitle != '') {
hels[0].innerHTML+=' ... <a href="#' + lastahelsid + '" title="' + lastahelstitle + '">Oldest</a> ';
}
}
}
}

“; ?>

… the user just adds a trailing space to their entered GETME search textbox entry, to pre-empt the underlying HTML form navigation and, instead, do a navigation such as …


https://www.rjmprogramming.com.au/ITblog/?s=cowsay.php_GETME&wopenall=cowsay.php_GETME&ifnooldestdoone=y

… to, sometimes, see these new Oldest type hashtag link helpers.


Previous relevant WordPress Blog Byline Zoom Fix Tutorial is shown below.

WordPress Blog Byline Zoom Fix Tutorial

WordPress Blog Byline Zoom Fix Tutorial

That’s it! We’re doing something today regarding …

How on non-mobile, with this blog, the byline …
A “Dot Dot Dot” Information Technology Blog
… can mal-align as a user zooms in or out.

And we were doing things for the first time we can remember, regarding the fix, which we weren’t expecting. So …

For the first time we can remember …

  • for a position: absolute “overlay” scenerio … we did not use a left: 123px style of positioning … but, rather …
  • used a right: 45.6% style of positioning …
  • lining the byline’s right with the blog title’s right … more or less …
  • making the byline more central …
  • giving it more “wander room” as a user zooms in or out

Ever since the advent of “mobile” platforms, the idea of “zoom” has become more and more of a “mute point”, but not for “non-mobile”, as with this “kind of unusual” adding, via “overlay” idea, regarding HTML elements.

On this topic, we’d like to thank this excellent link which reminded us that “responsive design”‘s biggest friend is the percent (ie. “%”) unit of webpage measure!

By the way, even on “non-mobile”, the window.onresize event is triggered we found, but once there we struggled to do much about the mal-alignment zooming in or out was sometimes doing to the byline off to the left.

The new code (intervention, that made the difference), in good ol’ header.php?

<?php echo ”

function bylinedo() {
var ahuhrect=document.getElementById('access').getBoundingClientRect();
var huhrect=document.getElementById('ahomeis').getBoundingClientRect();
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('ahomeis').innerHTML=document.getElementById('ahomeis').innerHTML.replace(' Blog', ' <span id=sbyline><font size=2><i><strong>... I.T.</strong></i></font></span> Blog');
} else {
//document.getElementById('hdgspan').innerHTML+='<span id=sbyline style="position:absolute;left:' + ahuhrect.left + 'px;top:' + eval(53 + eval('' + huhrect.top)) + 'px;"><font size=2><i><strong>A "Dot Dot Dot" Information Technology Blog</strong></i></font></span>';
//alert('sw=' + screen.width + ' al=' + ahuhrect.left + ' ... ' + eval(100 * eval('' + screen.width) / eval('' + ahuhrect.left)));
// Thanks to https://stackoverflow.com/questions/995914/catch-browsers-zoom-event-in-javascript
document.getElementById('hdgspan').innerHTML+='<span id=sbyline style="position:absolute;right:' + eval(100 * eval('' + huhrect.right) / eval('' + screen.width)) + '%;top:' + eval(53 + eval('' + huhrect.top)) + 'px;"><font size=2><i><strong>A "Dot Dot Dot" Information Technology Blog</strong></i></font></span>';
//window.onresize=function(){ alert(65); var bhuhrect=document.getElementById('access').getBoundingClientRect(); document.getElementById('hdgspan').style.left='' + bhuhrect.left + 'px'; };
}
}

“; ?>

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in Database, eLearning, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Inhouse Slideshow AlmaLinux Multiple Filtered Content Tutorial

Inhouse Slideshow AlmaLinux Multiple Filtered Content Tutorial

Inhouse Slideshow AlmaLinux Multiple Filtered Content Tutorial

Onto yesterday’s Inhouse Slideshow AlmaLinux Filtered Content Tutorial we did want to offer the user the chance to …

  • enter in more than one image filtering “verb” … space separated … as well as …
  • chance for user to establish their own arguments relevant to some of the “verbs”


substanceverb=ourprompt('Please enter word image filter idea(s), separated by space ... ' + String.fromCharCode(10) + String.fromCharCode(10) + 'emboss edge negedge sharpen boxblur negate colourizered colourizeblue colourizegreen colourize pixellate smooth contrast brightness sketchy mean_removal flipvertical fliphorizontal flip ' + String.fromCharCode(10) + String.fromCharCode(10) + ' ... or none for original, while comma separate your own arguments with no spaces in amongst those? Eg. emboss,array([-2,-1,3],[-1,4,3],[0,4,3]) brightness', '');

This involved making PHP function new_content recursive by nature (exemplified by)

<?php

$sanum++;
$saname=str_replace("arg0", "arg", "substancearg" . $sanum);
$curnum++;
if ($curnum >= $totnum) { $sanum=0; $curnum=0; $saname=str_replace("arg0", "arg", "substancearg" . $sanum); $curlist=$totlist; return file_get_contents($slidename); }
$curlist=str_replace('brightness','',$curlist);
return new_content(file_get_contents($slidename));

?>

… when these multiple filtering verbs are encountered. In this way, sometimes, rather than return a static value, function new_content might return it’s own recalled return value.

Again, coming from the serverside we decided to pack more into …

… you can try out for yourself with Blurb.


Previous relevant Inhouse Slideshow AlmaLinux Filtered Content Tutorial is shown below.

Inhouse Slideshow AlmaLinux Filtered Content Tutorial

Inhouse Slideshow AlmaLinux Filtered Content Tutorial

There’s …

… we’re using the great PHP GD library image filtering talents to open up to the user in “name”, that is, any numerical arguments fixed in a static way by us (and we’ll see about otherwise into the future).

The user can pick (so far one at a time, but we’ll review into the future) from …

… and some of the resultant effects can be quite startling.

Coming from the serverside we decided to pack more into …

… to make these optional and additional image filtering options to be available to users of Inhouse Slideshows (eg. Jenkins) hereabouts.

Did you know?

Keen observers will know that we (just about) always assemble a group of image screenshot slides into animated GIFs these days. And if you have read some oldish tutorials you will know, about RJM Programming history

  • for many years it was hosted on a CentOS Apache/PHP5/MySql Linux web server where we had both …
    1. disk inode count
    2. diskspace (in bytes)

    hair trigger issues to worry about for several years … until …

  • recently a migration to AlmaLinux Apache/PHP8/MySql Linux web server eased those worries in both senses

But, analogous (in motivation) to how programmers worked with limited amounts of memory in those early Windows and Mac OS X days, we switched tack using inhouse slideshow concepts (eating into the CentOS inode count, hence the push over that time, to get PHP zip help to have the one zipfile be used to zip/(temporarily)unzip the image slide files) in favour of (the one file) animated GIF paradigm. Do we change back? We (with consultation) are not that tempted because …

  • we’ve gotten better with animated GIF creation functionality …
  • though inhouse slideshow can have cute features, it is a pretty resource intensive way to go about things

… and so (with consultation) we’ll see … and Nala says to say “hear” … and Luna says to say “smell” (and she’s right in that that “smellorama” project is still on the go).


Previous relevant Inhouse Slideshow AlmaLinux CSS Style Tutorial is shown below.

Inhouse Slideshow AlmaLinux CSS Style Tutorial

Inhouse Slideshow AlmaLinux CSS Style Tutorial

Yes, we like, where possible, and we’ve invisaged it, we prefer to give the user “a stake” in …

  • less often how the web application functions … and/or …
  • how the web application looks

And under “looks” that can mean …

  • media content and/or …
  • CSS styling

… and today think “option twos” above regarding our recent Inhouse Slideshow “push”, started, this time around, because of …

  • PHP Zip deprecation … handled by each Inhouse Slideshow overseeing PHP (along with it’s new included ziphelper.php helper) … then …
  • new media creation dropdown options … as with yesterday’s Inhouse Slideshow AlmaLinux Media Tutorial … handled by each Inhouse Slideshow overseeing PHP and cowsay Python API interfacer and changed inhouse_slideshow.js Inhouse Slideshow external Javascript helper … and now, today …
  • new CSS Style dropdown option … handled by the changed inhouse_slideshow.js Inhouse Slideshow external Javascript helper only

Of course, that is what external Javascript design is all about. You adjust one code source only, to affect a whole lot of web applications, rather than the worry of many code source changes. We know which we prefer, as programmers?!

Is your way into programming via CSS styling? Perhaps it would tempt you if we pointed out that there are I.T. jobs out there asking for people with expert CSS styling skills. By this, you may understand it can be an art form transforming dreary looking HTML content into dynamic and vibrant looking webpages (all with the same content).

We’ve learnt most about CSS styling, fast, via web browser web inspectors and seeing an initial webpage look change before our eyes via tweaks applied dynamically. We recommend this highly, but don’t expect everyone to be that keen. In any case, we’re trying to channel that dynamism today, offering the user to see our Inhouse Slideshow change it’s look via user CSS Styling entries in a prompt window instigated by a new “Style” dropdown option.

CSS styling does well with webpages dynamically because, quite often, the Javascript DOM approach (where yourselectorpluscss contains CSS styling code) …


document.body.innerHTML+='<style> ' + yourselectorpluscss + ' </style>';

… will both do no harm to existant content as well as dynamically change webpage aesthetics instantly.

Regarding CSS we know we have much to learn and try regarding the …


selector { styling; }

Only the other day with cartoons we used (clauses like) …

<style>

td[id$='5'] { styling; }

</style>

… types of CSS clauses to mildly change the styling for each cartoon slide. After using this, for the first time, we wrote down for future tutorial ideas “write a web application helping users improve on their selector smarts”. But we think this Inhouse Slideshow opportunity might be a better dynamic approach for this.


Previous relevant Inhouse Slideshow AlmaLinux Media Tutorial is shown below.

Inhouse Slideshow AlmaLinux Media Tutorial

Inhouse Slideshow AlmaLinux Media Tutorial

The recent Inhouse Slideshow AlmaLinux Tutorial did help with PHP Zip deprecations, and today, this being Inhouse Slideshows, full of …

moving pictures

… we can add two more dropdown modus operandi options for …

  • Video
  • Animated GIF

… feeding it through to a changed latest draft cowsay.php media creator via slides via ffmpeg inhouse talent, called by our inhouse slideshow external Javascript helper …


function changeto(tvis) {
if (tvis.toLowerCase().indexOf('video') == 0) {
document.getElementById('divcowpf').innerHTML+='<input type=hidden name=fromindex id=fromindex value=y></input>';
document.getElementById('vlist').click();
document.getElementById('mycowifr').style.display='block';
document.getElementById('mycowifr').style.visibility='hidden';
document.getElementById('mycowifr').style.height='1px';
//document.getElementById('mycowifr').scrollIntoView();
//location.href='#mycowifr';
setTimeout(function(){ document.getElementById('mycowifr').scrollIntoView(); }, 8000);
} else if (tvis.toLowerCase().indexOf('animated gif') == 0) {
document.getElementById('divcowpf').innerHTML+='<input type=hidden name=fromindex id=fromindex value=y></input>';
document.getElementById('aglist').click();
document.getElementById('mycowifr').style.display='block';
document.getElementById('mycowifr').style.visibility='hidden';
document.getElementById('mycowifr').style.height='1px';
//document.getElementById('mycowifr').scrollIntoView();
//location.href='#mycowifr';
setTimeout(function(){ document.getElementById('mycowifr').scrollIntoView(); }, 8000);
} else
if (tvis.toLowerCase().indexOf('exif') == 0) {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?exif=y');
} else {
location.href=posturl(document.URL.split('#')[0].replace(/pdf\=/g, 'pdTf=') + '&exif=y');
}
} else if (tvis.toLowerCase().indexOf('pdf') == 0) {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?pdf=y');
} else {
location.href=posturl(document.URL.split('#')[0].replace(/exif\=/g, 'exTif=') + '&pdf=y');
}
} else if (tvis.toLowerCase().indexOf('emoji') == 0) {
//var borderis=prompt('Please enter comma separated HTML decimal entity(s) for your Emoji Border to slideshow. Can use an Emoji Menu entry.', '');
var bbsuffix=' Optionally append &[text|image]css=[CSSstyle] to change styling. Optionally justify some text via &[ul|uc|ur|ml|[mc]|mr|bl|bc|br]text=[someText%0AsecondLine] to change styling. Eg. ' + String.fromCodePoint(127958) + '&css=opacity:0.9;&textcss=font-size:20px;&ultext=Hello%0AThere ';
borderblurb='Please enter comma separated HTML decimal entity(s) for your Emoji Border to slideshow. Can use an Emoji Menu entry (eg. control-command-space for macOS or Mac OS X, logo key + . (period) for Windows, control+space for iOS, top left + for Android keyboard). ' + bbsuffix;
var borderis=prompt(borderblurb, '');
var emojiy='', emojisuffix='';
if (borderis == null) {
borderis='';
} else if (borderis.indexOf('&') != -1) {
if (borderis.split('&')[0].trim() == '') {
emojisuffix=encodeURIComponent(borderis.replace(/\%23[cC][iI][rR][cC][lL][eE]/g, '#circle').replace(/\%23[eE][lL][lL][iI][pP][sS][eE]/g, '#ellipse').replace(/\%23[tT][eE][xX][tT]/g, '#text').replace(/\%23[lL][iI][nN][eE]/g, '#line').replace(/\%23[pP][oO][lL][yY][lL][iI][nN][eE]/g, '#polyline').replace(/\%23[pP][oO][lL][yY][gG][oO][nN]/g, '#polygon').replace(/\%23/g, encodeURIComponent('%23')).replace(/\%23/g, encodeURIComponent('%23')).replace(/\%0a/g, encodeURIComponent('%0A')).replace(/\%0A/g, encodeURIComponent('%0A'))); //.replace(/\&/g,'%26').replace(/\=/g,'%3D');
borderis='';
} else {
emojisuffix=encodeURIComponent(borderis.replace(borderis.split('&')[0], '').replace(/\%23[cC][iI][rR][cC][lL][eE]/g, '#circle').replace(/\%23[eE][lL][lL][iI][pP][sS][eE]/g, '#ellipse').replace(/\%23[tT][eE][xX][tT]/g, '#text').replace(/\%23[lL][iI][nN][eE]/g, '#line').replace(/\%23[pP][oO][lL][yY][lL][iI][nN][eE]/g, '#polyline').replace(/\%23[pP][oO][lL][yY][gG][oO][nN]/g, '#polygon').replace(/\%23/g, encodeURIComponent('%23')).replace(/\%23/g, encodeURIComponent('%23')).replace(/\%0a/g, encodeURIComponent('%0A')).replace(/\%0A/g, encodeURIComponent('%0A'))); //.replace(/\&/g,'%26').replace(/\=/g,'%3D');
borderis=postbb(borderis.split('&')[0]);
}
} else {
borderis=postbb(borderis.split('&')[0]);
}
if ((borderis + emojisuffix) != '') { emojiy='emoji=' + encodeURIComponent(borderis) + emojisuffix; }
if (emojiy != '') {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?' + emojiy);
} else {
location.href=posturl(document.URL.split('#')[0].replace(/emoji\=/g, 'emojTi=') + '&' + emojiy);
}
}
} else {
if (document.URL.indexOf('exif=') != -1 || document.URL.indexOf('pdf=') != -1) {
location.href=posturl(document.URL.split('#')[0].replace(/exif\=/g, 'exTif=').replace(/pdf\=/g, 'pdTf='));
} else {
location.href=posturl(document.URL.split('#')[0] + '&eHuhxif=y');
}
}
}

… called by a changed example PHP inhouse slideshow creator web application.


Previous relevant Inhouse Slideshow AlmaLinux Tutorial is shown below.

Inhouse Slideshow AlmaLinux Tutorial

Inhouse Slideshow AlmaLinux Tutorial

Today we wanted to add so much more to our blog posting title. But, then, we also didn’t want to give the game away?! What a dilemma.

That blog posting title mentions …

  • AlmaLinux … as RJM Programming’s Apache/PHP/MySql web server “brand”, using …
  • PHP 8 … as distinct from the PHP 5’s of the CentOS web server days … and so we suppose we should expect issues like the dreaded …
  • Deprecation … of …
  • Zip … functionality … so sad seeing the early symptoms of this with …
  • Inhouse Slideshow presentations … (as last talked about with Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial) deprecation warnings

Surprising to us, trying to logically walk though a solution, currently up at our AlmaLinux web server here the PHP …


function_exists

… approach we have used successfully recently did not work here. Anyway, deprecated or non-existant it doesn’t matter, we decided to resort to good ol’ PHP exec methodologies in a new “inhouse slideshow” (featuring in a changed example PHP inhouse slideshow creator web application) call …

<?php

include($_SERVER['DOCUMENT_ROOT'] . "/ziphelper.php");

?>

… containing …


<?php
// ziphelper.php
// RJM Programming
// February, 2025

$gzip_read_output=null;
$gzip_open_handle=null;
$gzip_entry_filename='';
$gzip_filename='';
$gzip_entry_len=0;
$gzip_number=0;
$gzip_log_text='';
if (strpos($_SERVER['REQUEST_URI'], 'index.') !== false) {
$hereis='' . dirname(__FILE__) . explode("index.", $_SERVER['REQUEST_URI'])[0];
} else if (basename($_SERVER['SCRIPT_FILENAME']) != '') {
$hereis=explode(basename($_SERVER['SCRIPT_FILENAME']), realpath($_SERVER['SCRIPT_FILENAME']))[0];
} else {
$hereis='' . dirname(__FILE__) . str_replace('//','/',explode("?", $_SERVER['REQUEST_URI'])[0] . '/');
}
$zipisis='' . $hereis . 'slideshow_0.zip';
$alreadythere=false;

if (file_exists($zipisis)) {
$items = glob($hereis . "*[-_][0-9]*of.[jJgGpP][pPiInN]*");
foreach ($items as $key => $val) {
$alreadythere=true;
}
}

if (!function_exists("zip_entry_read")) {
function zip_entry_read($zip_read_output, $zip_entry_len) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_read_output, $gzip_entry_len;
return 'pork';
}
}

if (!function_exists("zip_entry_filesize")) {
function zip_entry_filesize($zip_read_filename) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_entry_filename;
return 'pork';
}
}

if (!function_exists("zip_read")) {
function zip_read($zip_oben_handle) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle;
return 'pork';
}
}

if (!function_exists("zip_open")) {
function zip_open($zip_filename) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_filename;
$gzip_filename=$zip_filename;
$gzip_number=0;
$gzip_open_handle='pork';
return 'pork';
}
}

if (!function_exists("zip_entry_name")) {
function zip_entry_name($zip_read_output) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_read_output;
return 'pork';
}
}

if (!function_exists("zip_entry_open")) {
function zip_entry_open($zip_open_handle, $zip_read_output, $inmode) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle, $gzip_read_output;
return 'pork';
}
}

if (!function_exists("zip_close")) {
function zip_close($zip_open_handle) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle;
return 'pork';
}
}

if (file_exists($zipisis)) {
if (!$alreadythere) {
file_put_contents($hereis . 'please.wait', "cd " . $hereis . ' ; unzip ' . $zipisis);
sleep(2);
exec("cd " . $hereis . ' ; unzip ' . $zipisis);
sleep(2);
unlink($hereis . 'please.wait');
//exec("cd " . $hereis . ' ; rm -f please.wait');
//if (1 == 1) {
//header('Location: ' . explode('?',$_SERVER['REQUEST_URI'])[0] . '?rand=' . rand(0,674532));
//exit;
//} else {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
//if (basename($_SERVER['SCRIPT_FILENAME']) == 'index.php') {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
//sleep(9);
//echo '<html><body onload="location.href=' . "'" . explode("?", $_SERVER['REQUEST_URI'])[0] . '?rand=' . rand(0,5645342) . "';\"></body></html>";
//exit;
} //else if (basename($_SERVER['SCRIPT_FILENAME']) == 'index.php') {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
}
?>

… as a first draft. We have much more to do trying to resurrect, if possible, some other inhouse PHP web applications we’ve based on the use of Zip in PHP. Pardon us, until tomorrow, while we have a little cry.


Previous relevant Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial

Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial

Crontab is that great scheduling tool that we make use of, a lot, on our RJM Programming Linux CentOS web server. But it’s not only …

  • the timing … of a procedure that is so good about crontab … it is, also, for us, it’s teaming with …
  • curl

… that means we can back up a “peer based” solution such as talked about with Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial (ie. done as a user is surfing the net with some PHP of ours) methodology should it fail. We think we have an occasionally failing one as far as the tidy up of zipped up inhouse slideshows goes. It could be to do with a search engine crawling operation, we have not found out for sure, but we’ve decided to write our own …

  • PHP … via …
  • crontab
  • curl

… based independent tidying up procedure we’ll run once an hour via crontab record …


*/53 * * * curl http://www.rjmprogramming.com.au/slideshow_zero.php

… arrangement. We realize the contents of this PHP procedure may bore some, but interest a few, and so here is what it amounted to …

<?php

// slideshow_zero.php
// Zip and Unzip Tidy Up
// RJM Programming
// Decemeber, 2022
set_time_limit(3600);

if (file_exists("slideshow_zero.txt")) {
unlink("slideshow_zero.txt");
}

if (file_exists("slideshow_zero.kkk")) {
unlink("slideshow_zero.kkk");
}

exec("find " . dirname(__FILE__) . DIRECTORY_SEPARATOR . " -name 'slideshow_0.zip' 2> /dev/null > " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txt");

$lines=file(dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txt");

$htmlis="<html><body><textarea>
</textarea></body></html>";

for ($i=0; $i<sizeof($lines); $i++) {
$lines[$i]=explode("\n", $lines[$i])[0];
if (file_exists(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) {
if (('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) == '38794') {
if (file_exists("slideshow_zero.txx")) {
unlink("slideshow_zero.txx");
}
exec("unzip -l " . $lines[$i] . " | grep '.jpg' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/ /s// /g' | sed '/ /s// /g' | sed '/ /s// /g' | sed '/ /s// /g' | cut -f4 -d' ' | grep '-' > " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txx");
if (file_exists("slideshow_zero.txx")) {
$sublines=file(dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txx");
for ($j=0; $j<sizeof($sublines); $j++) {
$sublines[$j]=explode(" ", explode("\n", $sublines[$j])[0])[0];
$fis=explode("slideshow_0.zip", $lines[$i])[0] . $sublines[$j];
if (file_exists($fis)) {
$md=filemtime($fis);
if ($md) {
if ((time() - $md) > 1200) {
if (file_exists("slideshow_zero.kkk")) {
exec("rm -f " . $fis); //file_put_contents("slideshow_zero.kkk", file_get_contents("slideshow_zero.kkk") . "rm -f " . $fis . "\n");
} else {
exec("rm -f " . $fis); //file_put_contents("slideshow_zero.kkk", "rm -f " . $fis . "\n");
}
}
}
}
}
}
} else if (1 == 3) {
if (file_exists("slideshow_zero.kkk")) {
file_put_contents("slideshow_zero.kkk", file_get_contents("slideshow_zero.kkk") . "# " . ('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) . " is not 38794 " . str_replace("slideshow_0.zip", "index.php", $lines[$i]) . "\n");
} else {
file_put_contents("slideshow_zero.kkk", "# " . ('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) . " is not 38794 " . str_replace("slideshow_0.zip", "index.php", $lines[$i]) . "\n");
}
}
}
}

if (file_exists("slideshow_zero.txx")) {
unlink("slideshow_zero.txx");
}

if (file_exists("slideshow_zero.txt")) {
unlink("slideshow_zero.txt");
}

if (file_exists("slideshow_zero.kkk")) {
unlink("slideshow_zero.kkk");
}

//echo $htmlis;
exit;

?>

… as that “ahhhhhhhh, what a relief” reliever of tension running the RJM Programming website. The subtext is, our inode limits are a concern!

We think another lesson here is that PHP can be a good alternative to scripting languages such as Korn Shell to create “operational” procedures, especially when you consider that curl means it can be like writing your “surfing the net” type of PHP (slideshow_zero.php) work.


Previous relevant Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial

Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial

The thing about yesterday’s Inhouse Slideshow Backup Tidy Up Report Tutorial is that …

  • it creates useful report content … but …
  • it is information we do not want everyone to be able to see (easily, shall we say) … and in the sense that …
  • the report is stored away from RJM Programming’s “public_html” folder (ie. its Apache/PHP/MySql “Document Root”) is good … but even with today’s work …
  • hidden from everybody who does not have access to the RJM Programming’s web server … but …
  • the administrator of the RJM Programming’s web server (yoo hoo!) wants a mechanism to view the report that does not involve some “arcane procedure” each time to view it

… and so we decided that because …


the administrator of the RJM Programming's web server = the administrator of this blog

… we’d like to organize a system that latches onto that “security footing” and only show a “broom emoji button” (🧹 &#129529;) way to access the report when the administrator of this blog is logged in. We can do this by amending our Twenty Ten theme’s good ol’ header.php as per (where the “function mlater” you may recall from the days of WordPress Blog Email Post Collaboration Ajax Image Tutorial) …

<?php

$fns="36";

function doisr() {
global $fns;
$inmb="";
if (('' . get_current_user_id()) != '0' && ('' . get_current_user_id()) == '1') {
if (file_exists('/tmp/slideshow_cleanup.txt')) {
$fns="24";
$inmb="<a style=font-size:24px; title='Inhouse Slideshow Tidy Up Report' onclick=\"var iswo=window.open('','_blank','top=100,left=100,height=600,width=730'); iswo.document.write('<html><head><title>Inhouse Slideshow Tidy Up Report</title></head><body><pre>" . str_replace("\n","<br>",file_get_contents('/tmp/slideshow_cleanup.txt')) . "</pre></body></html>'); \">&#129529;</a> ";
}
}
return str_replace("'","' + String.fromCharCode(39) + '",$inmb);
}


?>

… PHP affects some (PHP writes) Javascript below …

<?php

function mlater() {
if (1 == 1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPod|Opera Mini|IEMobile/i)) {
if (dbihis == '') { dbihis=document.body.innerHTML; }
var xstih=document.getElementById('site-title').innerHTML;
if (xstih.indexOf("up" + "top") == -1) {
document.getElementById('site-title').innerHTML+='<?php echo doisr(); ?>' + '<a id="avs" style="text-decoration:none;font-size:<?php global $fns; echo $fns; ?>px;" href=# onmouseover="getVisualSynopsis(event);" onmouseout="yehbut();" ontouchstart="getVisualSynopsis(event);" ontouchend="yehbut();" onclick=" uptop(); " title="... you can wait for the long hover functionality about Visual Synopsis (Slideshows)">&#127910;</a> <a style="cursor:pointer;text-decoration:none;font-size:<?php global $fns; echo $fns; ?>px;" onclick="diffphpfix(this);" title="Code Difference Functional Links">&#128214;</a> <a style="cursor:pointer;text-decoration:none;font-size:36px;" onclick="popselid();" title="Filter Content via Div ID">&#10135;</a> <a style="cursor:pointer;text-decoration:none;visibility:hidden;font-size:<?php global $fns; echo $fns; ?>px;" title="Blog post contents reduced to summary" id="eds" onclick="pre_details_summary();">&#10134;</a>' + printscreen(0);
if (document.URL.indexOf("visualsynopsis=") != -1) document.getElementById('avs').click();
}
}
}

?>


Previous relevant Inhouse Slideshow Backup Tidy Up Report Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Report Tutorial

Inhouse Slideshow Backup Tidy Up Report Tutorial

Yesterday’s Inhouse Slideshow Backup Tidy Up Tutorial presented a …

  • non-automated
  • user instigated
  • snapshot

… Inhouse Slideshow “tidying up” PHP web application. This web application is like a …

  • procedure … that a …
  • system operator

… might be interested in using. But not many “system operators” would continue putting up with such a modus operandi. We can improve by …

  • allowing any of …
    1. surfing the net
    2. curl
    3. command line

    … modes of use … allowing …

  • crontab scheduling via …

    */49 * * * * ksh -c "curl HTTP://www.rjmprogramming.com.au/slideshow_cleanup.php?all=all"

    … to allow for a …
  • scheduled report available … and make sure we …
  • disallow overlapping execution runs

… with our changed slideshow_cleanup.php “Inhouse Slideshow” unzipped image “tidyer upperer“.


Previous relevant Inhouse Slideshow Backup Tidy Up Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Tutorial

Inhouse Slideshow Backup Tidy Up Tutorial

There are two aspects to diskspace maintainence up at the web server for RJM Programming.

  • df -k /
  • df -i /
# diskspace
# inode count

… and it is often that inode count we are concerned about, and looking out for ways to reduce the number of files we create on the web server.

The Inhouse Slideshow ways of Inhouse Slideshow Mobile Google Crawl Tutorial

  • use zip files to “scrunch up” a series of image files into the one zip file … for the vast majority of time … but when asked to, by a user …
  • unzip the image files when required by a user wanting to see them … and then …
  • tidy up, after some delay in time

… but we want to design a PHP way to independently tidy up as a backup mechanism. And we say, with PHP code, that if such files have been on the web server longer than ten minutes, this PHP callable slideshow_cleanup.php code …

<?php

// slideshow_cleanup.php
// RJM Programming
// May, 2022

$cdis=dirname(__FILE__) . DIRECTORY_SEPARATOR;
exec("cd " . $cdis . "; find . -name 'slideshow_0.zip' 2> /dev/null > /tmp/slideshow_cleanup.txt");


$lines = file('/tmp/slideshow_cleanup.txt');
date_default_timezone_set('Australia/Perth');

foreach ($lines as $line_num => $line) {
$ji=0;
if (substr($line,0,1) == '.') { $ji=2; }
$thisdir=explode('slideshow_0.zip', $line)[0];
$uzc=shell_exec("unzip -l " . $cdis . substr($line, $ji));
foreach (glob($thisdir . '*-[0-9]*of.[jJpPgG][pPnNiI]*') as $zipmember) {
$ij=0;
if (substr($zipmember,0,1) == '.') { $ij=2; }
$thisfile=$cdis . substr($zipmember, $ij);
if (strpos($uzc, (' ' . explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij))[-1 + sizeof(explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij)))]) ) !== false) {
if ((time() - filectime($thisfile)) > 600) { // more than 10 minutes old
unlink($thisfile); //echo "analyze " . $thisfile . " " . (time() - filectime($thisfile)) . ' seconds ago ' . "\n";
}
}
}
foreach (glob($thisdir . '*-[0-9]{[0-9]*}.[jJpPgG][pPnNiI]*') as $zipmember) {
$ij=0;
if (substr($zipmember,0,1) == '.') { $ij=2; }
$thisfile=$cdis . substr($zipmember, $ij);
if (strpos($uzc, (' ' . explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij))[-1 + sizeof(explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij)))]) ) !== false) {
if ((time() - filectime($thisfile)) > 600) {
unlink($thisfile); //echo "Analyze " . $thisfile . " " . (time() - filectime($thisfile)) . ' seconds ago ' . "\n";
}
}
}
}


?>

… should do its thaing!


Previous relevant Inhouse Slideshow Mobile Google Crawl Tutorial is shown below.

Inhouse Slideshow Mobile Google Crawl Tutorial

Inhouse Slideshow Mobile Google Crawl Tutorial

The recent Inhouse Slideshow Mobile Tutorial did not satisfy all the “mobile usability” tests performed by the “Google Crawl” algorithm, failing on “Content wider than screen”, and you can read some background to this with Google Crawl Viewport Geographicals Tutorial. And so we try some refinements here today, with an idea to control on mobile platforms the max-width CSS property of the document.body of a Inhouse Slideshow webpage, which made up the URLs failing this test at the Google Search Console.

We were reading this great and useful link, thanks, and decided to see whether this stopping of scrolling in X on mobile platform versions of the Inhouse Slideshow webpages gels better with Google Search Console “Google Crawl” Mobility Usability algorithms.

Yet again, deployment of these changes is similar to that last time, and the times before that, as per …

Unit testing completed, the deployment, again, matches those ideas of the recent PDF Slideshow and Form Creation Helper Slideshow Tutorial … in that …

Here are changes we’ll be testing up at Google …


<head>
<script type='text/javascript'>
// Other Javascript code here ...
//
//
// Of relevance today bold below ...

function blater() {
var tdsare=document.getElementsByTagName('td');
var rectg=tdsare[2].getBoundingClientRect(); //document.getElementById('i0').getBoundingClientRect();
tdsare[2].style.borderRight='2px solid white';
document.body.style.backgroundImage="URL('" + document.getElementById('i0').src + "')";
var rl=eval('' + rectg.left);
rl+=eval('' + rectg.width);
rl+=10;
document.body.style.backgroundPosition=" " + rl + "px " + Math.floor(rectg.top) + "px";
document.body.style.backgroundRepeat="no-repeat";
document.body.style.backgroundClip="content-box";
}



function zoom_maybe() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//document.getElementById('rfs').innerHTML='<style> html { zoom: .5; } </style>';
document.getElementById('rfs').innerHTML='<style> html { zoom: 0.4; body { max-width: 100%; max-height: 80vh; } table { max-width: <?php if (strpos($_SERVER['QUERY_STRING'],'exif=') !== false) { echo "100"; } else { echo "95"; } ?>%; max-height: 80vh; margin: auto; overflow-x: hidden; } </style>';
}
}


function nwpdf(iithis) {
if (('' + iithis.src).length > 0) {
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
window.open(iithis.src,'_blank');
}
}
}


function mytw() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.body.style.width='' + (window.orientation == 0 ? Math.floor(eval(2.5 * window.screen.width)) : window.screen.height) + 'px';
document.getElementById('myt').style.width='100%'; //'' + (window.orientation == 0 ? window.screen.width : window.screen.height) + 'px';
}
}



window.setInterval(function(){havealook(1)},2000);
</script>
<style>
td { vertical-align:top; }
@media only screen and (max-width: 800px) {
body { max-width: 100%; max-height: 80vh; } table { max-width: <?php if (strpos($_SERVER['QUERY_STRING'],'exif=') !== false) { echo "100"; } else { echo "95"; } ?>%; max-height: 80vh; margin: auto; overflow-x: hidden; }
}

</style>
</head>
<body onload=" mytw(); zoom_maybe(); if (document.URL.indexOf('pdf=') != -1) { document.getElementById('selmode').value='PDF Slideshow'; if (document.getElementById('tdfirst')) { document.getElementById('s0').style.width=document.getElementById('tdfirst').style.width; document.getElementById('s0').style.height=document.getElementById('tdfirst').style.height; } } if (document.URL.indexOf('exif=') != -1) { document.getElementById('selmode').value='Exif Slideshow'; if (document.getElementById('tdfirst')) { document.getElementById('s0').style.width=document.getElementById('tdfirst').style.width; document.getElementById('s0').style.height=document.getElementById('tdfirst').style.height; } } document.title=document.title + ' ' + lastone; ol(); ">


Previous relevant Inhouse Slideshow Mobile Tutorial is shown below.

Inhouse Slideshow Mobile Tutorial

Inhouse Slideshow Mobile Tutorial

The recent PDF Slideshow and Form Creation Helper Slideshow Tutorial changes were made on a MacBook Pro laptop. Did it show that we have put off until today, to look at that functionality with mobile platforms?!

In a “going off to the right table row of cells” arrangement like this, what are some considerations that improve the user experience (of our inhouse slideshows) for mobile platform users?

  • turn the “@” link into an “emoji button” as per ➡ ( &#10145; )
  • for both mobile and non-mobile, we’ve decided …
    1. UTF-8 meta …
      <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

    2. <style>
      td { vertical-align:top; }
      </style>
    3. change the h4 element to be h2 to help with legibility
  • for mobile, we’ve decided …
    1. viewport …
      <meta name=”viewport” content=”width=device-width, initial-scale=0.4, minimum-scale=0.1, maximum-scale=8, user-scalable=yes”>

    2. <style>
      html { zoom: .5; }
      </style>
    3. iOS (ie. iPad and iPhone) PDF iframe elements have known scrolling issues, which we decided to bypass by opening these PDF creations in a new webpage window

Deployment of these changes is similar to that last time, and the times before that, as per …

Unit testing completed, the deployment, again, matches those ideas of the recent PDF Slideshow and Form Creation Helper Slideshow Tutorial … in that …


Previous relevant PDF Slideshow and Form Creation Helper Slideshow Tutorial is shown below.

PDF Slideshow and Form Creation Helper Slideshow Tutorial

PDF Slideshow and Form Creation Helper Slideshow Tutorial

The first “integration cab” off the rank for yesterday’s PDF Slideshow and Form Creation Helper Primer Tutorial underlying usefulness is with our Inhouse Slideshow arrangements last talked about at Inhouse Slideshow Design Exif Order Tutorial. That generic PHP code now has three display dropdown options of …

  • Slideshow
  • Exif Slideshow … and the new, as of today’s work …
  • PDF Slideshow

… that little bit different in that a PDF Slideshow occupies just the one table cell (rather than the many horizontal cells of the other display modes) and the resultant embedded PDF data vertically scrolls when multiple image slides are involved.

This new option also adds onto this “Inhouse Slideshow” functionality the chance to download and keep a PDF representation of that slideshow to your local system. Perhaps this makes this be of interest to you?!

The changed form_creator.php‘s live run is what gets integrated into the “Inhouse Slideshow” “sisterhood”. We say “sisterhood” because this “Inhouse Slideshow” is designed as a single PHP codefile “hived off” to a lot of other web server folders as their default “index.php” web browser default webpage in a “peer to peer” feeling arrangement. Such an arrangement asks a bit of the deployment arrangements, and we’ve talked about this before (with underlying links pointing to today’s work, should you be interested) …

Unit testing completed, the deployment, again, matches those ideas of the recent Inhouse Slideshow Design Exif Zip Tutorial … in that …

But when we say “Unit testing completed” above, we need to fill you in on a Fpdf issue we came across during unit testing of our changes. We were getting a …


FPDF Error: Not a JPEG file

… Fpdf error message choosing the new “PDF Slideshow” option on some, but not all, “Inhouse Slideshow” address bar URLs. And so the online research began as per …

… almost getting us there to a solution (and as far as the last link goes “that was before we posted the suggestion below”). Then we took one of the error messages at its word …


FPDF error: Not a JPEG file: ../Mac/Linux_drutil-238of.jpg

… and independently looked into the issue via Linux (or macOS command line) file command …


# cd $HOME/public_html/Mac
# ls -l Linux_dr*
-rw-r--r-- 1 owner group 724353 Oct 29 08:00 Linux_drutil-238of.jpg
-rw-r--r-- 1 owner group 132707 Oct 29 08:00 Linux_drutil-239of.jpg
-rw-r--r-- 1 owner group 109595 Oct 29 08:00 Linux_drutil-240of.jpg
# file Linux_drutil-238of.jpg
Linux_drutil-238of.jpg: PNG image data, 1280 x 800, 8-bit/color RGBA, non-interlaced
# file Linux_drutil-239of.jpg
Linux_drutil-239of.jpg: JPEG image data, JFIF standard 1.01
#

… when the penny dropped (about our (macOS) Paintbrush slideshow slide creation habits)! We quote our entry into “php – FPDF error: Not a JPEG file: http://10.11.201.93:81/webdocc/uploaded/tes3.jpg – Stack Overflow” …

Have found that constructing slideshows with Paintbrush on a MacBook Pro for years have sometimes been saving what “file jpeg_filename.jpg” determines is a PNG, as a JPEG, which is not the end of the world as far as the browsers go rendering this. Within FPDF’s fpdf.php I fixed my own shortcomings that were resulting in “FPDF Error: Not a JPEG file” via the kludgy “if($a[2]==3) { return $this->_parsepng($file); }” additional codeline below …

function _parsejpg($file)
{
// Extract info from a JPEG file
$a = getimagesize($file);
if(!$a)
$this->Error(‘Missing or incorrect image file: ‘.$file);
if($a[2]==3) { return $this->_parsepng($file); }
if($a[2]!=2)
$this->Error(‘Not a JPEG file: ‘.’ ‘.$a[2].’ ‘.$file);
if(!isset($a[‘channels’]) || $a[‘channels’]==3)
$colspace = ‘DeviceRGB’;
elseif($a[‘channels’]==4)
$colspace = ‘DeviceCMYK’;
else
$colspace = ‘DeviceGray’;
$bpc = isset($a[‘bits’]) ? $a[‘bits’] : 8;
$data = file_get_contents($file);
return array(‘w’=>$a[0], ‘h’=>$a[1], ‘cs’=>$colspace, ‘bpc’=>$bpc, ‘f’=>’DCTDecode’, ‘data’=>$data);
}

… and this change to Fpdf’s fpdf.php fixed the issue in our case for a lot of our previously erroneous “PDF Slideshow” displays of “Inhouse Slideshows”.


Previous relevant PDF Slideshow and Form Creation Helper Primer Tutorial is shown below.

PDF Slideshow and Form Creation Helper Primer Tutorial

PDF Slideshow and Form Creation Helper Primer Tutorial

Our recent work involving the great Fpdf creator of PDF files when we presented Ajax FormData Object No Body PHP PDF Tutorial has got us starting on a new PDF (PHP) web application we are starting out thinking will help with …

  • online forms (probably via thinking in terms of Fpdf open source programmers like Rick van Buuren and Clément Lavoillotte‘s excellent HTML table rendering ideas) via HTML table intermediate user interactions … and …
  • slideshows

… but we will not be surprised if the project branches out into other ideas. We’ll see over time.

We hope you come along for the trip starting with a bit of a proof of concept form_creator.php‘s live run for you to try, where we allow you to enter (and be able to change) some HTML table code (if that’s what you end up with?!) in a pink HTML textarea element, and that will become PDF should you click the underlying HTML form’s yellow submit button.

Hope to see you for tomorrow’s PDF writing developments here.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Inhouse Slideshow AlmaLinux Filtered Content Tutorial

Inhouse Slideshow AlmaLinux Filtered Content Tutorial

Inhouse Slideshow AlmaLinux Filtered Content Tutorial

There’s …

… we’re using the great PHP GD library image filtering talents to open up to the user in “name”, that is, any numerical arguments fixed in a static way by us (and we’ll see about otherwise into the future).

The user can pick (so far one at a time, but we’ll review into the future) from …

… and some of the resultant effects can be quite startling.

Coming from the serverside we decided to pack more into …

… to make these optional and additional image filtering options to be available to users of Inhouse Slideshows (eg. Jenkins) hereabouts.

Did you know?

Keen observers will know that we (just about) always assemble a group of image screenshot slides into animated GIFs these days. And if you have read some oldish tutorials you will know, about RJM Programming history

  • for many years it was hosted on a CentOS Apache/PHP5/MySql Linux web server where we had both …
    1. disk inode count
    2. diskspace (in bytes)

    hair trigger issues to worry about for several years … until …

  • recently a migration to AlmaLinux Apache/PHP8/MySql Linux web server eased those worries in both senses

But, analogous (in motivation) to how programmers worked with limited amounts of memory in those early Windows and Mac OS X days, we switched tack using inhouse slideshow concepts (eating into the CentOS inode count, hence the push over that time, to get PHP zip help to have the one zipfile be used to zip/(temporarily)unzip the image slide files) in favour of (the one file) animated GIF paradigm. Do we change back? We (with consultation) are not that tempted because …

  • we’ve gotten better with animated GIF creation functionality …
  • though inhouse slideshow can have cute features, it is a pretty resource intensive way to go about things

… and so (with consultation) we’ll see … and Nala says to say “hear” … and Luna says to say “smell” (and she’s right in that that “smellorama” project is still on the go).


Previous relevant Inhouse Slideshow AlmaLinux CSS Style Tutorial is shown below.

Inhouse Slideshow AlmaLinux CSS Style Tutorial

Inhouse Slideshow AlmaLinux CSS Style Tutorial

Yes, we like, where possible, and we’ve invisaged it, we prefer to give the user “a stake” in …

  • less often how the web application functions … and/or …
  • how the web application looks

And under “looks” that can mean …

  • media content and/or …
  • CSS styling

… and today think “option twos” above regarding our recent Inhouse Slideshow “push”, started, this time around, because of …

  • PHP Zip deprecation … handled by each Inhouse Slideshow overseeing PHP (along with it’s new included ziphelper.php helper) … then …
  • new media creation dropdown options … as with yesterday’s Inhouse Slideshow AlmaLinux Media Tutorial … handled by each Inhouse Slideshow overseeing PHP and cowsay Python API interfacer and changed inhouse_slideshow.js Inhouse Slideshow external Javascript helper … and now, today …
  • new CSS Style dropdown option … handled by the changed inhouse_slideshow.js Inhouse Slideshow external Javascript helper only

Of course, that is what external Javascript design is all about. You adjust one code source only, to affect a whole lot of web applications, rather than the worry of many code source changes. We know which we prefer, as programmers?!

Is your way into programming via CSS styling? Perhaps it would tempt you if we pointed out that there are I.T. jobs out there asking for people with expert CSS styling skills. By this, you may understand it can be an art form transforming dreary looking HTML content into dynamic and vibrant looking webpages (all with the same content).

We’ve learnt most about CSS styling, fast, via web browser web inspectors and seeing an initial webpage look change before our eyes via tweaks applied dynamically. We recommend this highly, but don’t expect everyone to be that keen. In any case, we’re trying to channel that dynamism today, offering the user to see our Inhouse Slideshow change it’s look via user CSS Styling entries in a prompt window instigated by a new “Style” dropdown option.

CSS styling does well with webpages dynamically because, quite often, the Javascript DOM approach (where yourselectorpluscss contains CSS styling code) …


document.body.innerHTML+='<style> ' + yourselectorpluscss + ' </style>';

… will both do no harm to existant content as well as dynamically change webpage aesthetics instantly.

Regarding CSS we know we have much to learn and try regarding the …


selector { styling; }

Only the other day with cartoons we used (clauses like) …

<style>

td[id$='5'] { styling; }

</style>

… types of CSS clauses to mildly change the styling for each cartoon slide. After using this, for the first time, we wrote down for future tutorial ideas “write a web application helping users improve on their selector smarts”. But we think this Inhouse Slideshow opportunity might be a better dynamic approach for this.


Previous relevant Inhouse Slideshow AlmaLinux Media Tutorial is shown below.

Inhouse Slideshow AlmaLinux Media Tutorial

Inhouse Slideshow AlmaLinux Media Tutorial

The recent Inhouse Slideshow AlmaLinux Tutorial did help with PHP Zip deprecations, and today, this being Inhouse Slideshows, full of …

moving pictures

… we can add two more dropdown modus operandi options for …

  • Video
  • Animated GIF

… feeding it through to a changed latest draft cowsay.php media creator via slides via ffmpeg inhouse talent, called by our inhouse slideshow external Javascript helper …


function changeto(tvis) {
if (tvis.toLowerCase().indexOf('video') == 0) {
document.getElementById('divcowpf').innerHTML+='<input type=hidden name=fromindex id=fromindex value=y></input>';
document.getElementById('vlist').click();
document.getElementById('mycowifr').style.display='block';
document.getElementById('mycowifr').style.visibility='hidden';
document.getElementById('mycowifr').style.height='1px';
//document.getElementById('mycowifr').scrollIntoView();
//location.href='#mycowifr';
setTimeout(function(){ document.getElementById('mycowifr').scrollIntoView(); }, 8000);
} else if (tvis.toLowerCase().indexOf('animated gif') == 0) {
document.getElementById('divcowpf').innerHTML+='<input type=hidden name=fromindex id=fromindex value=y></input>';
document.getElementById('aglist').click();
document.getElementById('mycowifr').style.display='block';
document.getElementById('mycowifr').style.visibility='hidden';
document.getElementById('mycowifr').style.height='1px';
//document.getElementById('mycowifr').scrollIntoView();
//location.href='#mycowifr';
setTimeout(function(){ document.getElementById('mycowifr').scrollIntoView(); }, 8000);
} else
if (tvis.toLowerCase().indexOf('exif') == 0) {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?exif=y');
} else {
location.href=posturl(document.URL.split('#')[0].replace(/pdf\=/g, 'pdTf=') + '&exif=y');
}
} else if (tvis.toLowerCase().indexOf('pdf') == 0) {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?pdf=y');
} else {
location.href=posturl(document.URL.split('#')[0].replace(/exif\=/g, 'exTif=') + '&pdf=y');
}
} else if (tvis.toLowerCase().indexOf('emoji') == 0) {
//var borderis=prompt('Please enter comma separated HTML decimal entity(s) for your Emoji Border to slideshow. Can use an Emoji Menu entry.', '');
var bbsuffix=' Optionally append &[text|image]css=[CSSstyle] to change styling. Optionally justify some text via &[ul|uc|ur|ml|[mc]|mr|bl|bc|br]text=[someText%0AsecondLine] to change styling. Eg. ' + String.fromCodePoint(127958) + '&css=opacity:0.9;&textcss=font-size:20px;&ultext=Hello%0AThere ';
borderblurb='Please enter comma separated HTML decimal entity(s) for your Emoji Border to slideshow. Can use an Emoji Menu entry (eg. control-command-space for macOS or Mac OS X, logo key + . (period) for Windows, control+space for iOS, top left + for Android keyboard). ' + bbsuffix;
var borderis=prompt(borderblurb, '');
var emojiy='', emojisuffix='';
if (borderis == null) {
borderis='';
} else if (borderis.indexOf('&') != -1) {
if (borderis.split('&')[0].trim() == '') {
emojisuffix=encodeURIComponent(borderis.replace(/\%23[cC][iI][rR][cC][lL][eE]/g, '#circle').replace(/\%23[eE][lL][lL][iI][pP][sS][eE]/g, '#ellipse').replace(/\%23[tT][eE][xX][tT]/g, '#text').replace(/\%23[lL][iI][nN][eE]/g, '#line').replace(/\%23[pP][oO][lL][yY][lL][iI][nN][eE]/g, '#polyline').replace(/\%23[pP][oO][lL][yY][gG][oO][nN]/g, '#polygon').replace(/\%23/g, encodeURIComponent('%23')).replace(/\%23/g, encodeURIComponent('%23')).replace(/\%0a/g, encodeURIComponent('%0A')).replace(/\%0A/g, encodeURIComponent('%0A'))); //.replace(/\&/g,'%26').replace(/\=/g,'%3D');
borderis='';
} else {
emojisuffix=encodeURIComponent(borderis.replace(borderis.split('&')[0], '').replace(/\%23[cC][iI][rR][cC][lL][eE]/g, '#circle').replace(/\%23[eE][lL][lL][iI][pP][sS][eE]/g, '#ellipse').replace(/\%23[tT][eE][xX][tT]/g, '#text').replace(/\%23[lL][iI][nN][eE]/g, '#line').replace(/\%23[pP][oO][lL][yY][lL][iI][nN][eE]/g, '#polyline').replace(/\%23[pP][oO][lL][yY][gG][oO][nN]/g, '#polygon').replace(/\%23/g, encodeURIComponent('%23')).replace(/\%23/g, encodeURIComponent('%23')).replace(/\%0a/g, encodeURIComponent('%0A')).replace(/\%0A/g, encodeURIComponent('%0A'))); //.replace(/\&/g,'%26').replace(/\=/g,'%3D');
borderis=postbb(borderis.split('&')[0]);
}
} else {
borderis=postbb(borderis.split('&')[0]);
}
if ((borderis + emojisuffix) != '') { emojiy='emoji=' + encodeURIComponent(borderis) + emojisuffix; }
if (emojiy != '') {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?' + emojiy);
} else {
location.href=posturl(document.URL.split('#')[0].replace(/emoji\=/g, 'emojTi=') + '&' + emojiy);
}
}
} else {
if (document.URL.indexOf('exif=') != -1 || document.URL.indexOf('pdf=') != -1) {
location.href=posturl(document.URL.split('#')[0].replace(/exif\=/g, 'exTif=').replace(/pdf\=/g, 'pdTf='));
} else {
location.href=posturl(document.URL.split('#')[0] + '&eHuhxif=y');
}
}
}

… called by a changed example PHP inhouse slideshow creator web application.


Previous relevant Inhouse Slideshow AlmaLinux Tutorial is shown below.

Inhouse Slideshow AlmaLinux Tutorial

Inhouse Slideshow AlmaLinux Tutorial

Today we wanted to add so much more to our blog posting title. But, then, we also didn’t want to give the game away?! What a dilemma.

That blog posting title mentions …

  • AlmaLinux … as RJM Programming’s Apache/PHP/MySql web server “brand”, using …
  • PHP 8 … as distinct from the PHP 5’s of the CentOS web server days … and so we suppose we should expect issues like the dreaded …
  • Deprecation … of …
  • Zip … functionality … so sad seeing the early symptoms of this with …
  • Inhouse Slideshow presentations … (as last talked about with Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial) deprecation warnings

Surprising to us, trying to logically walk though a solution, currently up at our AlmaLinux web server here the PHP …


function_exists

… approach we have used successfully recently did not work here. Anyway, deprecated or non-existant it doesn’t matter, we decided to resort to good ol’ PHP exec methodologies in a new “inhouse slideshow” (featuring in a changed example PHP inhouse slideshow creator web application) call …

<?php

include($_SERVER['DOCUMENT_ROOT'] . "/ziphelper.php");

?>

… containing …


<?php
// ziphelper.php
// RJM Programming
// February, 2025

$gzip_read_output=null;
$gzip_open_handle=null;
$gzip_entry_filename='';
$gzip_filename='';
$gzip_entry_len=0;
$gzip_number=0;
$gzip_log_text='';
if (strpos($_SERVER['REQUEST_URI'], 'index.') !== false) {
$hereis='' . dirname(__FILE__) . explode("index.", $_SERVER['REQUEST_URI'])[0];
} else if (basename($_SERVER['SCRIPT_FILENAME']) != '') {
$hereis=explode(basename($_SERVER['SCRIPT_FILENAME']), realpath($_SERVER['SCRIPT_FILENAME']))[0];
} else {
$hereis='' . dirname(__FILE__) . str_replace('//','/',explode("?", $_SERVER['REQUEST_URI'])[0] . '/');
}
$zipisis='' . $hereis . 'slideshow_0.zip';
$alreadythere=false;

if (file_exists($zipisis)) {
$items = glob($hereis . "*[-_][0-9]*of.[jJgGpP][pPiInN]*");
foreach ($items as $key => $val) {
$alreadythere=true;
}
}

if (!function_exists("zip_entry_read")) {
function zip_entry_read($zip_read_output, $zip_entry_len) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_read_output, $gzip_entry_len;
return 'pork';
}
}

if (!function_exists("zip_entry_filesize")) {
function zip_entry_filesize($zip_read_filename) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_entry_filename;
return 'pork';
}
}

if (!function_exists("zip_read")) {
function zip_read($zip_oben_handle) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle;
return 'pork';
}
}

if (!function_exists("zip_open")) {
function zip_open($zip_filename) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_filename;
$gzip_filename=$zip_filename;
$gzip_number=0;
$gzip_open_handle='pork';
return 'pork';
}
}

if (!function_exists("zip_entry_name")) {
function zip_entry_name($zip_read_output) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_read_output;
return 'pork';
}
}

if (!function_exists("zip_entry_open")) {
function zip_entry_open($zip_open_handle, $zip_read_output, $inmode) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle, $gzip_read_output;
return 'pork';
}
}

if (!function_exists("zip_close")) {
function zip_close($zip_open_handle) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle;
return 'pork';
}
}

if (file_exists($zipisis)) {
if (!$alreadythere) {
file_put_contents($hereis . 'please.wait', "cd " . $hereis . ' ; unzip ' . $zipisis);
sleep(2);
exec("cd " . $hereis . ' ; unzip ' . $zipisis);
sleep(2);
unlink($hereis . 'please.wait');
//exec("cd " . $hereis . ' ; rm -f please.wait');
//if (1 == 1) {
//header('Location: ' . explode('?',$_SERVER['REQUEST_URI'])[0] . '?rand=' . rand(0,674532));
//exit;
//} else {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
//if (basename($_SERVER['SCRIPT_FILENAME']) == 'index.php') {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
//sleep(9);
//echo '<html><body onload="location.href=' . "'" . explode("?", $_SERVER['REQUEST_URI'])[0] . '?rand=' . rand(0,5645342) . "';\"></body></html>";
//exit;
} //else if (basename($_SERVER['SCRIPT_FILENAME']) == 'index.php') {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
}
?>

… as a first draft. We have much more to do trying to resurrect, if possible, some other inhouse PHP web applications we’ve based on the use of Zip in PHP. Pardon us, until tomorrow, while we have a little cry.


Previous relevant Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial

Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial

Crontab is that great scheduling tool that we make use of, a lot, on our RJM Programming Linux CentOS web server. But it’s not only …

  • the timing … of a procedure that is so good about crontab … it is, also, for us, it’s teaming with …
  • curl

… that means we can back up a “peer based” solution such as talked about with Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial (ie. done as a user is surfing the net with some PHP of ours) methodology should it fail. We think we have an occasionally failing one as far as the tidy up of zipped up inhouse slideshows goes. It could be to do with a search engine crawling operation, we have not found out for sure, but we’ve decided to write our own …

  • PHP … via …
  • crontab
  • curl

… based independent tidying up procedure we’ll run once an hour via crontab record …


*/53 * * * curl http://www.rjmprogramming.com.au/slideshow_zero.php

… arrangement. We realize the contents of this PHP procedure may bore some, but interest a few, and so here is what it amounted to …

<?php

// slideshow_zero.php
// Zip and Unzip Tidy Up
// RJM Programming
// Decemeber, 2022
set_time_limit(3600);

if (file_exists("slideshow_zero.txt")) {
unlink("slideshow_zero.txt");
}

if (file_exists("slideshow_zero.kkk")) {
unlink("slideshow_zero.kkk");
}

exec("find " . dirname(__FILE__) . DIRECTORY_SEPARATOR . " -name 'slideshow_0.zip' 2> /dev/null > " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txt");

$lines=file(dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txt");

$htmlis="<html><body><textarea>
</textarea></body></html>";

for ($i=0; $i<sizeof($lines); $i++) {
$lines[$i]=explode("\n", $lines[$i])[0];
if (file_exists(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) {
if (('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) == '38794') {
if (file_exists("slideshow_zero.txx")) {
unlink("slideshow_zero.txx");
}
exec("unzip -l " . $lines[$i] . " | grep '.jpg' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/ /s// /g' | sed '/ /s// /g' | sed '/ /s// /g' | sed '/ /s// /g' | cut -f4 -d' ' | grep '-' > " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txx");
if (file_exists("slideshow_zero.txx")) {
$sublines=file(dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txx");
for ($j=0; $j<sizeof($sublines); $j++) {
$sublines[$j]=explode(" ", explode("\n", $sublines[$j])[0])[0];
$fis=explode("slideshow_0.zip", $lines[$i])[0] . $sublines[$j];
if (file_exists($fis)) {
$md=filemtime($fis);
if ($md) {
if ((time() - $md) > 1200) {
if (file_exists("slideshow_zero.kkk")) {
exec("rm -f " . $fis); //file_put_contents("slideshow_zero.kkk", file_get_contents("slideshow_zero.kkk") . "rm -f " . $fis . "\n");
} else {
exec("rm -f " . $fis); //file_put_contents("slideshow_zero.kkk", "rm -f " . $fis . "\n");
}
}
}
}
}
}
} else if (1 == 3) {
if (file_exists("slideshow_zero.kkk")) {
file_put_contents("slideshow_zero.kkk", file_get_contents("slideshow_zero.kkk") . "# " . ('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) . " is not 38794 " . str_replace("slideshow_0.zip", "index.php", $lines[$i]) . "\n");
} else {
file_put_contents("slideshow_zero.kkk", "# " . ('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) . " is not 38794 " . str_replace("slideshow_0.zip", "index.php", $lines[$i]) . "\n");
}
}
}
}

if (file_exists("slideshow_zero.txx")) {
unlink("slideshow_zero.txx");
}

if (file_exists("slideshow_zero.txt")) {
unlink("slideshow_zero.txt");
}

if (file_exists("slideshow_zero.kkk")) {
unlink("slideshow_zero.kkk");
}

//echo $htmlis;
exit;

?>

… as that “ahhhhhhhh, what a relief” reliever of tension running the RJM Programming website. The subtext is, our inode limits are a concern!

We think another lesson here is that PHP can be a good alternative to scripting languages such as Korn Shell to create “operational” procedures, especially when you consider that curl means it can be like writing your “surfing the net” type of PHP (slideshow_zero.php) work.


Previous relevant Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial

Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial

The thing about yesterday’s Inhouse Slideshow Backup Tidy Up Report Tutorial is that …

  • it creates useful report content … but …
  • it is information we do not want everyone to be able to see (easily, shall we say) … and in the sense that …
  • the report is stored away from RJM Programming’s “public_html” folder (ie. its Apache/PHP/MySql “Document Root”) is good … but even with today’s work …
  • hidden from everybody who does not have access to the RJM Programming’s web server … but …
  • the administrator of the RJM Programming’s web server (yoo hoo!) wants a mechanism to view the report that does not involve some “arcane procedure” each time to view it

… and so we decided that because …


the administrator of the RJM Programming's web server = the administrator of this blog

… we’d like to organize a system that latches onto that “security footing” and only show a “broom emoji button” (🧹 &#129529;) way to access the report when the administrator of this blog is logged in. We can do this by amending our Twenty Ten theme’s good ol’ header.php as per (where the “function mlater” you may recall from the days of WordPress Blog Email Post Collaboration Ajax Image Tutorial) …

<?php

$fns="36";

function doisr() {
global $fns;
$inmb="";
if (('' . get_current_user_id()) != '0' && ('' . get_current_user_id()) == '1') {
if (file_exists('/tmp/slideshow_cleanup.txt')) {
$fns="24";
$inmb="<a style=font-size:24px; title='Inhouse Slideshow Tidy Up Report' onclick=\"var iswo=window.open('','_blank','top=100,left=100,height=600,width=730'); iswo.document.write('<html><head><title>Inhouse Slideshow Tidy Up Report</title></head><body><pre>" . str_replace("\n","<br>",file_get_contents('/tmp/slideshow_cleanup.txt')) . "</pre></body></html>'); \">&#129529;</a> ";
}
}
return str_replace("'","' + String.fromCharCode(39) + '",$inmb);
}


?>

… PHP affects some (PHP writes) Javascript below …

<?php

function mlater() {
if (1 == 1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPod|Opera Mini|IEMobile/i)) {
if (dbihis == '') { dbihis=document.body.innerHTML; }
var xstih=document.getElementById('site-title').innerHTML;
if (xstih.indexOf("up" + "top") == -1) {
document.getElementById('site-title').innerHTML+='<?php echo doisr(); ?>' + '<a id="avs" style="text-decoration:none;font-size:<?php global $fns; echo $fns; ?>px;" href=# onmouseover="getVisualSynopsis(event);" onmouseout="yehbut();" ontouchstart="getVisualSynopsis(event);" ontouchend="yehbut();" onclick=" uptop(); " title="... you can wait for the long hover functionality about Visual Synopsis (Slideshows)">&#127910;</a> <a style="cursor:pointer;text-decoration:none;font-size:<?php global $fns; echo $fns; ?>px;" onclick="diffphpfix(this);" title="Code Difference Functional Links">&#128214;</a> <a style="cursor:pointer;text-decoration:none;font-size:36px;" onclick="popselid();" title="Filter Content via Div ID">&#10135;</a> <a style="cursor:pointer;text-decoration:none;visibility:hidden;font-size:<?php global $fns; echo $fns; ?>px;" title="Blog post contents reduced to summary" id="eds" onclick="pre_details_summary();">&#10134;</a>' + printscreen(0);
if (document.URL.indexOf("visualsynopsis=") != -1) document.getElementById('avs').click();
}
}
}

?>


Previous relevant Inhouse Slideshow Backup Tidy Up Report Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Report Tutorial

Inhouse Slideshow Backup Tidy Up Report Tutorial

Yesterday’s Inhouse Slideshow Backup Tidy Up Tutorial presented a …

  • non-automated
  • user instigated
  • snapshot

… Inhouse Slideshow “tidying up” PHP web application. This web application is like a …

  • procedure … that a …
  • system operator

… might be interested in using. But not many “system operators” would continue putting up with such a modus operandi. We can improve by …

  • allowing any of …
    1. surfing the net
    2. curl
    3. command line

    … modes of use … allowing …

  • crontab scheduling via …

    */49 * * * * ksh -c "curl HTTP://www.rjmprogramming.com.au/slideshow_cleanup.php?all=all"

    … to allow for a …
  • scheduled report available … and make sure we …
  • disallow overlapping execution runs

… with our changed slideshow_cleanup.php “Inhouse Slideshow” unzipped image “tidyer upperer“.


Previous relevant Inhouse Slideshow Backup Tidy Up Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Tutorial

Inhouse Slideshow Backup Tidy Up Tutorial

There are two aspects to diskspace maintainence up at the web server for RJM Programming.

  • df -k /
  • df -i /
# diskspace
# inode count

… and it is often that inode count we are concerned about, and looking out for ways to reduce the number of files we create on the web server.

The Inhouse Slideshow ways of Inhouse Slideshow Mobile Google Crawl Tutorial

  • use zip files to “scrunch up” a series of image files into the one zip file … for the vast majority of time … but when asked to, by a user …
  • unzip the image files when required by a user wanting to see them … and then …
  • tidy up, after some delay in time

… but we want to design a PHP way to independently tidy up as a backup mechanism. And we say, with PHP code, that if such files have been on the web server longer than ten minutes, this PHP callable slideshow_cleanup.php code …

<?php

// slideshow_cleanup.php
// RJM Programming
// May, 2022

$cdis=dirname(__FILE__) . DIRECTORY_SEPARATOR;
exec("cd " . $cdis . "; find . -name 'slideshow_0.zip' 2> /dev/null > /tmp/slideshow_cleanup.txt");


$lines = file('/tmp/slideshow_cleanup.txt');
date_default_timezone_set('Australia/Perth');

foreach ($lines as $line_num => $line) {
$ji=0;
if (substr($line,0,1) == '.') { $ji=2; }
$thisdir=explode('slideshow_0.zip', $line)[0];
$uzc=shell_exec("unzip -l " . $cdis . substr($line, $ji));
foreach (glob($thisdir . '*-[0-9]*of.[jJpPgG][pPnNiI]*') as $zipmember) {
$ij=0;
if (substr($zipmember,0,1) == '.') { $ij=2; }
$thisfile=$cdis . substr($zipmember, $ij);
if (strpos($uzc, (' ' . explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij))[-1 + sizeof(explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij)))]) ) !== false) {
if ((time() - filectime($thisfile)) > 600) { // more than 10 minutes old
unlink($thisfile); //echo "analyze " . $thisfile . " " . (time() - filectime($thisfile)) . ' seconds ago ' . "\n";
}
}
}
foreach (glob($thisdir . '*-[0-9]{[0-9]*}.[jJpPgG][pPnNiI]*') as $zipmember) {
$ij=0;
if (substr($zipmember,0,1) == '.') { $ij=2; }
$thisfile=$cdis . substr($zipmember, $ij);
if (strpos($uzc, (' ' . explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij))[-1 + sizeof(explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij)))]) ) !== false) {
if ((time() - filectime($thisfile)) > 600) {
unlink($thisfile); //echo "Analyze " . $thisfile . " " . (time() - filectime($thisfile)) . ' seconds ago ' . "\n";
}
}
}
}


?>

… should do its thaing!


Previous relevant Inhouse Slideshow Mobile Google Crawl Tutorial is shown below.

Inhouse Slideshow Mobile Google Crawl Tutorial

Inhouse Slideshow Mobile Google Crawl Tutorial

The recent Inhouse Slideshow Mobile Tutorial did not satisfy all the “mobile usability” tests performed by the “Google Crawl” algorithm, failing on “Content wider than screen”, and you can read some background to this with Google Crawl Viewport Geographicals Tutorial. And so we try some refinements here today, with an idea to control on mobile platforms the max-width CSS property of the document.body of a Inhouse Slideshow webpage, which made up the URLs failing this test at the Google Search Console.

We were reading this great and useful link, thanks, and decided to see whether this stopping of scrolling in X on mobile platform versions of the Inhouse Slideshow webpages gels better with Google Search Console “Google Crawl” Mobility Usability algorithms.

Yet again, deployment of these changes is similar to that last time, and the times before that, as per …

Unit testing completed, the deployment, again, matches those ideas of the recent PDF Slideshow and Form Creation Helper Slideshow Tutorial … in that …

Here are changes we’ll be testing up at Google …


<head>
<script type='text/javascript'>
// Other Javascript code here ...
//
//
// Of relevance today bold below ...

function blater() {
var tdsare=document.getElementsByTagName('td');
var rectg=tdsare[2].getBoundingClientRect(); //document.getElementById('i0').getBoundingClientRect();
tdsare[2].style.borderRight='2px solid white';
document.body.style.backgroundImage="URL('" + document.getElementById('i0').src + "')";
var rl=eval('' + rectg.left);
rl+=eval('' + rectg.width);
rl+=10;
document.body.style.backgroundPosition=" " + rl + "px " + Math.floor(rectg.top) + "px";
document.body.style.backgroundRepeat="no-repeat";
document.body.style.backgroundClip="content-box";
}



function zoom_maybe() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//document.getElementById('rfs').innerHTML='<style> html { zoom: .5; } </style>';
document.getElementById('rfs').innerHTML='<style> html { zoom: 0.4; body { max-width: 100%; max-height: 80vh; } table { max-width: <?php if (strpos($_SERVER['QUERY_STRING'],'exif=') !== false) { echo "100"; } else { echo "95"; } ?>%; max-height: 80vh; margin: auto; overflow-x: hidden; } </style>';
}
}


function nwpdf(iithis) {
if (('' + iithis.src).length > 0) {
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
window.open(iithis.src,'_blank');
}
}
}


function mytw() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.body.style.width='' + (window.orientation == 0 ? Math.floor(eval(2.5 * window.screen.width)) : window.screen.height) + 'px';
document.getElementById('myt').style.width='100%'; //'' + (window.orientation == 0 ? window.screen.width : window.screen.height) + 'px';
}
}



window.setInterval(function(){havealook(1)},2000);
</script>
<style>
td { vertical-align:top; }
@media only screen and (max-width: 800px) {
body { max-width: 100%; max-height: 80vh; } table { max-width: <?php if (strpos($_SERVER['QUERY_STRING'],'exif=') !== false) { echo "100"; } else { echo "95"; } ?>%; max-height: 80vh; margin: auto; overflow-x: hidden; }
}

</style>
</head>
<body onload=" mytw(); zoom_maybe(); if (document.URL.indexOf('pdf=') != -1) { document.getElementById('selmode').value='PDF Slideshow'; if (document.getElementById('tdfirst')) { document.getElementById('s0').style.width=document.getElementById('tdfirst').style.width; document.getElementById('s0').style.height=document.getElementById('tdfirst').style.height; } } if (document.URL.indexOf('exif=') != -1) { document.getElementById('selmode').value='Exif Slideshow'; if (document.getElementById('tdfirst')) { document.getElementById('s0').style.width=document.getElementById('tdfirst').style.width; document.getElementById('s0').style.height=document.getElementById('tdfirst').style.height; } } document.title=document.title + ' ' + lastone; ol(); ">


Previous relevant Inhouse Slideshow Mobile Tutorial is shown below.

Inhouse Slideshow Mobile Tutorial

Inhouse Slideshow Mobile Tutorial

The recent PDF Slideshow and Form Creation Helper Slideshow Tutorial changes were made on a MacBook Pro laptop. Did it show that we have put off until today, to look at that functionality with mobile platforms?!

In a “going off to the right table row of cells” arrangement like this, what are some considerations that improve the user experience (of our inhouse slideshows) for mobile platform users?

  • turn the “@” link into an “emoji button” as per ➡ ( &#10145; )
  • for both mobile and non-mobile, we’ve decided …
    1. UTF-8 meta …
      <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

    2. <style>
      td { vertical-align:top; }
      </style>
    3. change the h4 element to be h2 to help with legibility
  • for mobile, we’ve decided …
    1. viewport …
      <meta name=”viewport” content=”width=device-width, initial-scale=0.4, minimum-scale=0.1, maximum-scale=8, user-scalable=yes”>

    2. <style>
      html { zoom: .5; }
      </style>
    3. iOS (ie. iPad and iPhone) PDF iframe elements have known scrolling issues, which we decided to bypass by opening these PDF creations in a new webpage window

Deployment of these changes is similar to that last time, and the times before that, as per …

Unit testing completed, the deployment, again, matches those ideas of the recent PDF Slideshow and Form Creation Helper Slideshow Tutorial … in that …


Previous relevant PDF Slideshow and Form Creation Helper Slideshow Tutorial is shown below.

PDF Slideshow and Form Creation Helper Slideshow Tutorial

PDF Slideshow and Form Creation Helper Slideshow Tutorial

The first “integration cab” off the rank for yesterday’s PDF Slideshow and Form Creation Helper Primer Tutorial underlying usefulness is with our Inhouse Slideshow arrangements last talked about at Inhouse Slideshow Design Exif Order Tutorial. That generic PHP code now has three display dropdown options of …

  • Slideshow
  • Exif Slideshow … and the new, as of today’s work …
  • PDF Slideshow

… that little bit different in that a PDF Slideshow occupies just the one table cell (rather than the many horizontal cells of the other display modes) and the resultant embedded PDF data vertically scrolls when multiple image slides are involved.

This new option also adds onto this “Inhouse Slideshow” functionality the chance to download and keep a PDF representation of that slideshow to your local system. Perhaps this makes this be of interest to you?!

The changed form_creator.php‘s live run is what gets integrated into the “Inhouse Slideshow” “sisterhood”. We say “sisterhood” because this “Inhouse Slideshow” is designed as a single PHP codefile “hived off” to a lot of other web server folders as their default “index.php” web browser default webpage in a “peer to peer” feeling arrangement. Such an arrangement asks a bit of the deployment arrangements, and we’ve talked about this before (with underlying links pointing to today’s work, should you be interested) …

Unit testing completed, the deployment, again, matches those ideas of the recent Inhouse Slideshow Design Exif Zip Tutorial … in that …

But when we say “Unit testing completed” above, we need to fill you in on a Fpdf issue we came across during unit testing of our changes. We were getting a …


FPDF Error: Not a JPEG file

… Fpdf error message choosing the new “PDF Slideshow” option on some, but not all, “Inhouse Slideshow” address bar URLs. And so the online research began as per …

… almost getting us there to a solution (and as far as the last link goes “that was before we posted the suggestion below”). Then we took one of the error messages at its word …


FPDF error: Not a JPEG file: ../Mac/Linux_drutil-238of.jpg

… and independently looked into the issue via Linux (or macOS command line) file command …


# cd $HOME/public_html/Mac
# ls -l Linux_dr*
-rw-r--r-- 1 owner group 724353 Oct 29 08:00 Linux_drutil-238of.jpg
-rw-r--r-- 1 owner group 132707 Oct 29 08:00 Linux_drutil-239of.jpg
-rw-r--r-- 1 owner group 109595 Oct 29 08:00 Linux_drutil-240of.jpg
# file Linux_drutil-238of.jpg
Linux_drutil-238of.jpg: PNG image data, 1280 x 800, 8-bit/color RGBA, non-interlaced
# file Linux_drutil-239of.jpg
Linux_drutil-239of.jpg: JPEG image data, JFIF standard 1.01
#

… when the penny dropped (about our (macOS) Paintbrush slideshow slide creation habits)! We quote our entry into “php – FPDF error: Not a JPEG file: http://10.11.201.93:81/webdocc/uploaded/tes3.jpg – Stack Overflow” …

Have found that constructing slideshows with Paintbrush on a MacBook Pro for years have sometimes been saving what “file jpeg_filename.jpg” determines is a PNG, as a JPEG, which is not the end of the world as far as the browsers go rendering this. Within FPDF’s fpdf.php I fixed my own shortcomings that were resulting in “FPDF Error: Not a JPEG file” via the kludgy “if($a[2]==3) { return $this->_parsepng($file); }” additional codeline below …

function _parsejpg($file)
{
// Extract info from a JPEG file
$a = getimagesize($file);
if(!$a)
$this->Error(‘Missing or incorrect image file: ‘.$file);
if($a[2]==3) { return $this->_parsepng($file); }
if($a[2]!=2)
$this->Error(‘Not a JPEG file: ‘.’ ‘.$a[2].’ ‘.$file);
if(!isset($a[‘channels’]) || $a[‘channels’]==3)
$colspace = ‘DeviceRGB’;
elseif($a[‘channels’]==4)
$colspace = ‘DeviceCMYK’;
else
$colspace = ‘DeviceGray’;
$bpc = isset($a[‘bits’]) ? $a[‘bits’] : 8;
$data = file_get_contents($file);
return array(‘w’=>$a[0], ‘h’=>$a[1], ‘cs’=>$colspace, ‘bpc’=>$bpc, ‘f’=>’DCTDecode’, ‘data’=>$data);
}

… and this change to Fpdf’s fpdf.php fixed the issue in our case for a lot of our previously erroneous “PDF Slideshow” displays of “Inhouse Slideshows”.


Previous relevant PDF Slideshow and Form Creation Helper Primer Tutorial is shown below.

PDF Slideshow and Form Creation Helper Primer Tutorial

PDF Slideshow and Form Creation Helper Primer Tutorial

Our recent work involving the great Fpdf creator of PDF files when we presented Ajax FormData Object No Body PHP PDF Tutorial has got us starting on a new PDF (PHP) web application we are starting out thinking will help with …

  • online forms (probably via thinking in terms of Fpdf open source programmers like Rick van Buuren and Clément Lavoillotte‘s excellent HTML table rendering ideas) via HTML table intermediate user interactions … and …
  • slideshows

… but we will not be surprised if the project branches out into other ideas. We’ll see over time.

We hope you come along for the trip starting with a bit of a proof of concept form_creator.php‘s live run for you to try, where we allow you to enter (and be able to change) some HTML table code (if that’s what you end up with?!) in a pink HTML textarea element, and that will become PDF should you click the underlying HTML form’s yellow submit button.

Hope to see you for tomorrow’s PDF writing developments here.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Microsoft 365 on iOS Install Primer Tutorial

Microsoft 365 on iOS Install Primer Tutorial

Microsoft 365 on iOS Install Primer Tutorial

Is it meaningful to …

Document Process

… on a device the size of an iPhone? We’ll leave the answer up to you, but we would say …

  • a lot of the world’s population is asked, at various points of their life … to work with …
  • documents and letters or spreadsheets or presentations or book publications … to us, under the umbrella term …
  • Document Processing

… and we figure there will be times you are out and about, cornered to deal with an issue, and want some access to professional document editing smarts. Here we’ve talked about Open Source ways (such as with Word to HTML to CSV Delimitation Primer Tutorial below) that did not involve any Microsoft Office functionality, and we still use LibreOffice around here on our MacBook Air (using macOS), for these purposes. But what about the iPhone or iPad (on iOS) regarding this thinking, and embracing the expertise of Microsoft in the Document Processing arena?

Well, we came across the, initially free, Microsoft 365 product (for iOS), that might fit the requirements of a lot of iPhone or iPad users out there.

It certainly looks the part and wherever Microsoft meets iOS has got to be a crossover reason to celebrate … right?!


Previous relevant Word to HTML to CSV Delimitation Primer Tutorial is shown below.

Word to HTML to CSV Delimitation Primer Tutorial

Word to HTML to CSV Delimitation Primer Tutorial

The modern document applications allow conversion to HTML. What happens during that process, exactly? Well, that’s “under the hood” stuff. A little background, though, and context …

  • Why would you want to convert, say a Word file, to HTML (using, perhaps, LibreOffice, in our case, or Microsoft Word)? … well, as a mere mortal programmer …
  • (any form of) text is easier to deal with for “mere mortal programmer” languages we might want to use like …
  • PHP … is very good at the delimiter processing bits that allow the programmer be useful …
  • converting … the data into other guises, the one that interested us being …
  • CSV (comma separated value) data … to be fed into spreadsheet applications like Excel or LibreOffice’s one … and then create charts

… and to do useful delimiter work in PHP you need to know, or suss out, “what happens”, or evidence of that … think hex dumps (where $dr is a PHP variable containing an HTML file record) …

<?php

echo bin2hex($dr) . "\n";
// ... gave, in our case, output such as ...
// c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020c2a020546f74616c207c20c2a020c2a02036302c30333220c2a020c2a020c2a03130302e3030

?>

And so we line up all the useful contributors …

  1. CP3O
  2. C2A0
  3. R2D2
  4. … … …

Hang on?! What’s with C2A0? And for that matter, the pitiful “am typing” simulation “… … … “?!

Well, we asked around, and got to this useful link telling us these are non-ascii characters describing a …


Non-breaking space

… scenario programmers of HTML will know can be those …


&nbsp;

… HTML entities in your webpage content. Well, now, at least to us, that all makes sense. But, for our job, that could be the tip of the “UTF-8 headache” situation! We know we’re only interested in ascii data characters for the conversion job we are trying to do. Is there a way to simplify this “middleperson” HTML data content? Well, this other useful link … got us to use …

<?php

$dr=preg_replace('/[\x7F-\xFF]/ui', '', $dr);

?>

… helped us with …

  1. sanity
  2. simplification

… as far as the PHP delimitation logic went. This was an inhouse job, but we’ll show you a skeletal of how we used …

  • input Word report … we are calling from_word_to_html.html … say …
  • containing spreadsheetable data …
  • we wanted to extract into …
  • individual CSV files … ready to …
  • open as useful spreadsheets … and perhaps onto some chart production …
  • processing via command line command …

    php dostuff.php

    … where that PHP is (very informally) …
  • dostuff.php

… in case these ideas interest you?!

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, GUI, Installers, iOS, Operating System, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

Inhouse Slideshow AlmaLinux CSS Style Tutorial

Inhouse Slideshow AlmaLinux CSS Style Tutorial

Inhouse Slideshow AlmaLinux CSS Style Tutorial

Yes, we like, where possible, and we’ve invisaged it, we prefer to give the user “a stake” in …

  • less often how the web application functions … and/or …
  • how the web application looks

And under “looks” that can mean …

  • media content and/or …
  • CSS styling

… and today think “option twos” above regarding our recent Inhouse Slideshow “push”, started, this time around, because of …

  • PHP Zip deprecation … handled by each Inhouse Slideshow overseeing PHP (along with it’s new included ziphelper.php helper) … then …
  • new media creation dropdown options … as with yesterday’s Inhouse Slideshow AlmaLinux Media Tutorial … handled by each Inhouse Slideshow overseeing PHP and cowsay Python API interfacer and changed inhouse_slideshow.js Inhouse Slideshow external Javascript helper … and now, today …
  • new CSS Style dropdown option … handled by the changed inhouse_slideshow.js Inhouse Slideshow external Javascript helper only

Of course, that is what external Javascript design is all about. You adjust one code source only, to affect a whole lot of web applications, rather than the worry of many code source changes. We know which we prefer, as programmers?!

Is your way into programming via CSS styling? Perhaps it would tempt you if we pointed out that there are I.T. jobs out there asking for people with expert CSS styling skills. By this, you may understand it can be an art form transforming dreary looking HTML content into dynamic and vibrant looking webpages (all with the same content).

We’ve learnt most about CSS styling, fast, via web browser web inspectors and seeing an initial webpage look change before our eyes via tweaks applied dynamically. We recommend this highly, but don’t expect everyone to be that keen. In any case, we’re trying to channel that dynamism today, offering the user to see our Inhouse Slideshow change it’s look via user CSS Styling entries in a prompt window instigated by a new “Style” dropdown option.

CSS styling does well with webpages dynamically because, quite often, the Javascript DOM approach (where yourselectorpluscss contains CSS styling code) …


document.body.innerHTML+='<style> ' + yourselectorpluscss + ' </style>';

… will both do no harm to existant content as well as dynamically change webpage aesthetics instantly.

Regarding CSS we know we have much to learn and try regarding the …


selector { styling; }

Only the other day with cartoons we used (clauses like) …

<style>

td[id$='5'] { styling; }

</style>

… types of CSS clauses to mildly change the styling for each cartoon slide. After using this, for the first time, we wrote down for future tutorial ideas “write a web application helping users improve on their selector smarts”. But we think this Inhouse Slideshow opportunity might be a better dynamic approach for this.


Previous relevant Inhouse Slideshow AlmaLinux Media Tutorial is shown below.

Inhouse Slideshow AlmaLinux Media Tutorial

Inhouse Slideshow AlmaLinux Media Tutorial

The recent Inhouse Slideshow AlmaLinux Tutorial did help with PHP Zip deprecations, and today, this being Inhouse Slideshows, full of …

moving pictures

… we can add two more dropdown modus operandi options for …

  • Video
  • Animated GIF

… feeding it through to a changed latest draft cowsay.php media creator via slides via ffmpeg inhouse talent, called by our inhouse slideshow external Javascript helper …


function changeto(tvis) {
if (tvis.toLowerCase().indexOf('video') == 0) {
document.getElementById('divcowpf').innerHTML+='<input type=hidden name=fromindex id=fromindex value=y></input>';
document.getElementById('vlist').click();
document.getElementById('mycowifr').style.display='block';
document.getElementById('mycowifr').style.visibility='hidden';
document.getElementById('mycowifr').style.height='1px';
//document.getElementById('mycowifr').scrollIntoView();
//location.href='#mycowifr';
setTimeout(function(){ document.getElementById('mycowifr').scrollIntoView(); }, 8000);
} else if (tvis.toLowerCase().indexOf('animated gif') == 0) {
document.getElementById('divcowpf').innerHTML+='<input type=hidden name=fromindex id=fromindex value=y></input>';
document.getElementById('aglist').click();
document.getElementById('mycowifr').style.display='block';
document.getElementById('mycowifr').style.visibility='hidden';
document.getElementById('mycowifr').style.height='1px';
//document.getElementById('mycowifr').scrollIntoView();
//location.href='#mycowifr';
setTimeout(function(){ document.getElementById('mycowifr').scrollIntoView(); }, 8000);
} else
if (tvis.toLowerCase().indexOf('exif') == 0) {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?exif=y');
} else {
location.href=posturl(document.URL.split('#')[0].replace(/pdf\=/g, 'pdTf=') + '&exif=y');
}
} else if (tvis.toLowerCase().indexOf('pdf') == 0) {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?pdf=y');
} else {
location.href=posturl(document.URL.split('#')[0].replace(/exif\=/g, 'exTif=') + '&pdf=y');
}
} else if (tvis.toLowerCase().indexOf('emoji') == 0) {
//var borderis=prompt('Please enter comma separated HTML decimal entity(s) for your Emoji Border to slideshow. Can use an Emoji Menu entry.', '');
var bbsuffix=' Optionally append &[text|image]css=[CSSstyle] to change styling. Optionally justify some text via &[ul|uc|ur|ml|[mc]|mr|bl|bc|br]text=[someText%0AsecondLine] to change styling. Eg. ' + String.fromCodePoint(127958) + '&css=opacity:0.9;&textcss=font-size:20px;&ultext=Hello%0AThere ';
borderblurb='Please enter comma separated HTML decimal entity(s) for your Emoji Border to slideshow. Can use an Emoji Menu entry (eg. control-command-space for macOS or Mac OS X, logo key + . (period) for Windows, control+space for iOS, top left + for Android keyboard). ' + bbsuffix;
var borderis=prompt(borderblurb, '');
var emojiy='', emojisuffix='';
if (borderis == null) {
borderis='';
} else if (borderis.indexOf('&') != -1) {
if (borderis.split('&')[0].trim() == '') {
emojisuffix=encodeURIComponent(borderis.replace(/\%23[cC][iI][rR][cC][lL][eE]/g, '#circle').replace(/\%23[eE][lL][lL][iI][pP][sS][eE]/g, '#ellipse').replace(/\%23[tT][eE][xX][tT]/g, '#text').replace(/\%23[lL][iI][nN][eE]/g, '#line').replace(/\%23[pP][oO][lL][yY][lL][iI][nN][eE]/g, '#polyline').replace(/\%23[pP][oO][lL][yY][gG][oO][nN]/g, '#polygon').replace(/\%23/g, encodeURIComponent('%23')).replace(/\%23/g, encodeURIComponent('%23')).replace(/\%0a/g, encodeURIComponent('%0A')).replace(/\%0A/g, encodeURIComponent('%0A'))); //.replace(/\&/g,'%26').replace(/\=/g,'%3D');
borderis='';
} else {
emojisuffix=encodeURIComponent(borderis.replace(borderis.split('&')[0], '').replace(/\%23[cC][iI][rR][cC][lL][eE]/g, '#circle').replace(/\%23[eE][lL][lL][iI][pP][sS][eE]/g, '#ellipse').replace(/\%23[tT][eE][xX][tT]/g, '#text').replace(/\%23[lL][iI][nN][eE]/g, '#line').replace(/\%23[pP][oO][lL][yY][lL][iI][nN][eE]/g, '#polyline').replace(/\%23[pP][oO][lL][yY][gG][oO][nN]/g, '#polygon').replace(/\%23/g, encodeURIComponent('%23')).replace(/\%23/g, encodeURIComponent('%23')).replace(/\%0a/g, encodeURIComponent('%0A')).replace(/\%0A/g, encodeURIComponent('%0A'))); //.replace(/\&/g,'%26').replace(/\=/g,'%3D');
borderis=postbb(borderis.split('&')[0]);
}
} else {
borderis=postbb(borderis.split('&')[0]);
}
if ((borderis + emojisuffix) != '') { emojiy='emoji=' + encodeURIComponent(borderis) + emojisuffix; }
if (emojiy != '') {
if (document.URL.indexOf('?') == -1) {
location.href=posturl(document.URL.split('#')[0] + '?' + emojiy);
} else {
location.href=posturl(document.URL.split('#')[0].replace(/emoji\=/g, 'emojTi=') + '&' + emojiy);
}
}
} else {
if (document.URL.indexOf('exif=') != -1 || document.URL.indexOf('pdf=') != -1) {
location.href=posturl(document.URL.split('#')[0].replace(/exif\=/g, 'exTif=').replace(/pdf\=/g, 'pdTf='));
} else {
location.href=posturl(document.URL.split('#')[0] + '&eHuhxif=y');
}
}
}

… called by a changed example PHP inhouse slideshow creator web application.


Previous relevant Inhouse Slideshow AlmaLinux Tutorial is shown below.

Inhouse Slideshow AlmaLinux Tutorial

Inhouse Slideshow AlmaLinux Tutorial

Today we wanted to add so much more to our blog posting title. But, then, we also didn’t want to give the game away?! What a dilemma.

That blog posting title mentions …

  • AlmaLinux … as RJM Programming’s Apache/PHP/MySql web server “brand”, using …
  • PHP 8 … as distinct from the PHP 5’s of the CentOS web server days … and so we suppose we should expect issues like the dreaded …
  • Deprecation … of …
  • Zip … functionality … so sad seeing the early symptoms of this with …
  • Inhouse Slideshow presentations … (as last talked about with Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial) deprecation warnings

Surprising to us, trying to logically walk though a solution, currently up at our AlmaLinux web server here the PHP …


function_exists

… approach we have used successfully recently did not work here. Anyway, deprecated or non-existant it doesn’t matter, we decided to resort to good ol’ PHP exec methodologies in a new “inhouse slideshow” (featuring in a changed example PHP inhouse slideshow creator web application) call …

<?php

include($_SERVER['DOCUMENT_ROOT'] . "/ziphelper.php");

?>

… containing …


<?php
// ziphelper.php
// RJM Programming
// February, 2025

$gzip_read_output=null;
$gzip_open_handle=null;
$gzip_entry_filename='';
$gzip_filename='';
$gzip_entry_len=0;
$gzip_number=0;
$gzip_log_text='';
if (strpos($_SERVER['REQUEST_URI'], 'index.') !== false) {
$hereis='' . dirname(__FILE__) . explode("index.", $_SERVER['REQUEST_URI'])[0];
} else if (basename($_SERVER['SCRIPT_FILENAME']) != '') {
$hereis=explode(basename($_SERVER['SCRIPT_FILENAME']), realpath($_SERVER['SCRIPT_FILENAME']))[0];
} else {
$hereis='' . dirname(__FILE__) . str_replace('//','/',explode("?", $_SERVER['REQUEST_URI'])[0] . '/');
}
$zipisis='' . $hereis . 'slideshow_0.zip';
$alreadythere=false;

if (file_exists($zipisis)) {
$items = glob($hereis . "*[-_][0-9]*of.[jJgGpP][pPiInN]*");
foreach ($items as $key => $val) {
$alreadythere=true;
}
}

if (!function_exists("zip_entry_read")) {
function zip_entry_read($zip_read_output, $zip_entry_len) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_read_output, $gzip_entry_len;
return 'pork';
}
}

if (!function_exists("zip_entry_filesize")) {
function zip_entry_filesize($zip_read_filename) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_entry_filename;
return 'pork';
}
}

if (!function_exists("zip_read")) {
function zip_read($zip_oben_handle) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle;
return 'pork';
}
}

if (!function_exists("zip_open")) {
function zip_open($zip_filename) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_filename;
$gzip_filename=$zip_filename;
$gzip_number=0;
$gzip_open_handle='pork';
return 'pork';
}
}

if (!function_exists("zip_entry_name")) {
function zip_entry_name($zip_read_output) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_read_output;
return 'pork';
}
}

if (!function_exists("zip_entry_open")) {
function zip_entry_open($zip_open_handle, $zip_read_output, $inmode) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle, $gzip_read_output;
return 'pork';
}
}

if (!function_exists("zip_close")) {
function zip_close($zip_open_handle) {
global $gzip_filename, $gzip_number, $gzip_log_text, $gzip_open_handle;
return 'pork';
}
}

if (file_exists($zipisis)) {
if (!$alreadythere) {
file_put_contents($hereis . 'please.wait', "cd " . $hereis . ' ; unzip ' . $zipisis);
sleep(2);
exec("cd " . $hereis . ' ; unzip ' . $zipisis);
sleep(2);
unlink($hereis . 'please.wait');
//exec("cd " . $hereis . ' ; rm -f please.wait');
//if (1 == 1) {
//header('Location: ' . explode('?',$_SERVER['REQUEST_URI'])[0] . '?rand=' . rand(0,674532));
//exit;
//} else {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
//if (basename($_SERVER['SCRIPT_FILENAME']) == 'index.php') {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
//sleep(9);
//echo '<html><body onload="location.href=' . "'" . explode("?", $_SERVER['REQUEST_URI'])[0] . '?rand=' . rand(0,5645342) . "';\"></body></html>";
//exit;
} //else if (basename($_SERVER['SCRIPT_FILENAME']) == 'index.php') {
//sleep(60);
//exec("cd " . $hereis . ' ; rm -f ' . $hereis . '*[-_][0-9]*of.[jJgGpP][pPiInN]*');
//}
}
?>

… as a first draft. We have much more to do trying to resurrect, if possible, some other inhouse PHP web applications we’ve based on the use of Zip in PHP. Pardon us, until tomorrow, while we have a little cry.


Previous relevant Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial

Inhouse Slideshow Backup Tidy Up Crontab Curl PHP Tutorial

Crontab is that great scheduling tool that we make use of, a lot, on our RJM Programming Linux CentOS web server. But it’s not only …

  • the timing … of a procedure that is so good about crontab … it is, also, for us, it’s teaming with …
  • curl

… that means we can back up a “peer based” solution such as talked about with Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial (ie. done as a user is surfing the net with some PHP of ours) methodology should it fail. We think we have an occasionally failing one as far as the tidy up of zipped up inhouse slideshows goes. It could be to do with a search engine crawling operation, we have not found out for sure, but we’ve decided to write our own …

  • PHP … via …
  • crontab
  • curl

… based independent tidying up procedure we’ll run once an hour via crontab record …


*/53 * * * curl http://www.rjmprogramming.com.au/slideshow_zero.php

… arrangement. We realize the contents of this PHP procedure may bore some, but interest a few, and so here is what it amounted to …

<?php

// slideshow_zero.php
// Zip and Unzip Tidy Up
// RJM Programming
// Decemeber, 2022
set_time_limit(3600);

if (file_exists("slideshow_zero.txt")) {
unlink("slideshow_zero.txt");
}

if (file_exists("slideshow_zero.kkk")) {
unlink("slideshow_zero.kkk");
}

exec("find " . dirname(__FILE__) . DIRECTORY_SEPARATOR . " -name 'slideshow_0.zip' 2> /dev/null > " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txt");

$lines=file(dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txt");

$htmlis="<html><body><textarea>
</textarea></body></html>";

for ($i=0; $i<sizeof($lines); $i++) {
$lines[$i]=explode("\n", $lines[$i])[0];
if (file_exists(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) {
if (('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) == '38794') {
if (file_exists("slideshow_zero.txx")) {
unlink("slideshow_zero.txx");
}
exec("unzip -l " . $lines[$i] . " | grep '.jpg' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/^ /s///g' | sed '/ /s// /g' | sed '/ /s// /g' | sed '/ /s// /g' | sed '/ /s// /g' | cut -f4 -d' ' | grep '-' > " . dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txx");
if (file_exists("slideshow_zero.txx")) {
$sublines=file(dirname(__FILE__) . DIRECTORY_SEPARATOR . "slideshow_zero.txx");
for ($j=0; $j<sizeof($sublines); $j++) {
$sublines[$j]=explode(" ", explode("\n", $sublines[$j])[0])[0];
$fis=explode("slideshow_0.zip", $lines[$i])[0] . $sublines[$j];
if (file_exists($fis)) {
$md=filemtime($fis);
if ($md) {
if ((time() - $md) > 1200) {
if (file_exists("slideshow_zero.kkk")) {
exec("rm -f " . $fis); //file_put_contents("slideshow_zero.kkk", file_get_contents("slideshow_zero.kkk") . "rm -f " . $fis . "\n");
} else {
exec("rm -f " . $fis); //file_put_contents("slideshow_zero.kkk", "rm -f " . $fis . "\n");
}
}
}
}
}
}
} else if (1 == 3) {
if (file_exists("slideshow_zero.kkk")) {
file_put_contents("slideshow_zero.kkk", file_get_contents("slideshow_zero.kkk") . "# " . ('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) . " is not 38794 " . str_replace("slideshow_0.zip", "index.php", $lines[$i]) . "\n");
} else {
file_put_contents("slideshow_zero.kkk", "# " . ('' . filesize(str_replace("slideshow_0.zip", "index.php", $lines[$i]))) . " is not 38794 " . str_replace("slideshow_0.zip", "index.php", $lines[$i]) . "\n");
}
}
}
}

if (file_exists("slideshow_zero.txx")) {
unlink("slideshow_zero.txx");
}

if (file_exists("slideshow_zero.txt")) {
unlink("slideshow_zero.txt");
}

if (file_exists("slideshow_zero.kkk")) {
unlink("slideshow_zero.kkk");
}

//echo $htmlis;
exit;

?>

… as that “ahhhhhhhh, what a relief” reliever of tension running the RJM Programming website. The subtext is, our inode limits are a concern!

We think another lesson here is that PHP can be a good alternative to scripting languages such as Korn Shell to create “operational” procedures, especially when you consider that curl means it can be like writing your “surfing the net” type of PHP (slideshow_zero.php) work.


Previous relevant Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial

Inhouse Slideshow Backup Tidy Up Report Viewing Tutorial

The thing about yesterday’s Inhouse Slideshow Backup Tidy Up Report Tutorial is that …

  • it creates useful report content … but …
  • it is information we do not want everyone to be able to see (easily, shall we say) … and in the sense that …
  • the report is stored away from RJM Programming’s “public_html” folder (ie. its Apache/PHP/MySql “Document Root”) is good … but even with today’s work …
  • hidden from everybody who does not have access to the RJM Programming’s web server … but …
  • the administrator of the RJM Programming’s web server (yoo hoo!) wants a mechanism to view the report that does not involve some “arcane procedure” each time to view it

… and so we decided that because …


the administrator of the RJM Programming's web server = the administrator of this blog

… we’d like to organize a system that latches onto that “security footing” and only show a “broom emoji button” (🧹 &#129529;) way to access the report when the administrator of this blog is logged in. We can do this by amending our Twenty Ten theme’s good ol’ header.php as per (where the “function mlater” you may recall from the days of WordPress Blog Email Post Collaboration Ajax Image Tutorial) …

<?php

$fns="36";

function doisr() {
global $fns;
$inmb="";
if (('' . get_current_user_id()) != '0' && ('' . get_current_user_id()) == '1') {
if (file_exists('/tmp/slideshow_cleanup.txt')) {
$fns="24";
$inmb="<a style=font-size:24px; title='Inhouse Slideshow Tidy Up Report' onclick=\"var iswo=window.open('','_blank','top=100,left=100,height=600,width=730'); iswo.document.write('<html><head><title>Inhouse Slideshow Tidy Up Report</title></head><body><pre>" . str_replace("\n","<br>",file_get_contents('/tmp/slideshow_cleanup.txt')) . "</pre></body></html>'); \">&#129529;</a> ";
}
}
return str_replace("'","' + String.fromCharCode(39) + '",$inmb);
}


?>

… PHP affects some (PHP writes) Javascript below …

<?php

function mlater() {
if (1 == 1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPod|Opera Mini|IEMobile/i)) {
if (dbihis == '') { dbihis=document.body.innerHTML; }
var xstih=document.getElementById('site-title').innerHTML;
if (xstih.indexOf("up" + "top") == -1) {
document.getElementById('site-title').innerHTML+='<?php echo doisr(); ?>' + '<a id="avs" style="text-decoration:none;font-size:<?php global $fns; echo $fns; ?>px;" href=# onmouseover="getVisualSynopsis(event);" onmouseout="yehbut();" ontouchstart="getVisualSynopsis(event);" ontouchend="yehbut();" onclick=" uptop(); " title="... you can wait for the long hover functionality about Visual Synopsis (Slideshows)">&#127910;</a> <a style="cursor:pointer;text-decoration:none;font-size:<?php global $fns; echo $fns; ?>px;" onclick="diffphpfix(this);" title="Code Difference Functional Links">&#128214;</a> <a style="cursor:pointer;text-decoration:none;font-size:36px;" onclick="popselid();" title="Filter Content via Div ID">&#10135;</a> <a style="cursor:pointer;text-decoration:none;visibility:hidden;font-size:<?php global $fns; echo $fns; ?>px;" title="Blog post contents reduced to summary" id="eds" onclick="pre_details_summary();">&#10134;</a>' + printscreen(0);
if (document.URL.indexOf("visualsynopsis=") != -1) document.getElementById('avs').click();
}
}
}

?>


Previous relevant Inhouse Slideshow Backup Tidy Up Report Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Report Tutorial

Inhouse Slideshow Backup Tidy Up Report Tutorial

Yesterday’s Inhouse Slideshow Backup Tidy Up Tutorial presented a …

  • non-automated
  • user instigated
  • snapshot

… Inhouse Slideshow “tidying up” PHP web application. This web application is like a …

  • procedure … that a …
  • system operator

… might be interested in using. But not many “system operators” would continue putting up with such a modus operandi. We can improve by …

  • allowing any of …
    1. surfing the net
    2. curl
    3. command line

    … modes of use … allowing …

  • crontab scheduling via …

    */49 * * * * ksh -c "curl HTTP://www.rjmprogramming.com.au/slideshow_cleanup.php?all=all"

    … to allow for a …
  • scheduled report available … and make sure we …
  • disallow overlapping execution runs

… with our changed slideshow_cleanup.php “Inhouse Slideshow” unzipped image “tidyer upperer“.


Previous relevant Inhouse Slideshow Backup Tidy Up Tutorial is shown below.

Inhouse Slideshow Backup Tidy Up Tutorial

Inhouse Slideshow Backup Tidy Up Tutorial

There are two aspects to diskspace maintainence up at the web server for RJM Programming.

  • df -k /
  • df -i /
# diskspace
# inode count

… and it is often that inode count we are concerned about, and looking out for ways to reduce the number of files we create on the web server.

The Inhouse Slideshow ways of Inhouse Slideshow Mobile Google Crawl Tutorial

  • use zip files to “scrunch up” a series of image files into the one zip file … for the vast majority of time … but when asked to, by a user …
  • unzip the image files when required by a user wanting to see them … and then …
  • tidy up, after some delay in time

… but we want to design a PHP way to independently tidy up as a backup mechanism. And we say, with PHP code, that if such files have been on the web server longer than ten minutes, this PHP callable slideshow_cleanup.php code …

<?php

// slideshow_cleanup.php
// RJM Programming
// May, 2022

$cdis=dirname(__FILE__) . DIRECTORY_SEPARATOR;
exec("cd " . $cdis . "; find . -name 'slideshow_0.zip' 2> /dev/null > /tmp/slideshow_cleanup.txt");


$lines = file('/tmp/slideshow_cleanup.txt');
date_default_timezone_set('Australia/Perth');

foreach ($lines as $line_num => $line) {
$ji=0;
if (substr($line,0,1) == '.') { $ji=2; }
$thisdir=explode('slideshow_0.zip', $line)[0];
$uzc=shell_exec("unzip -l " . $cdis . substr($line, $ji));
foreach (glob($thisdir . '*-[0-9]*of.[jJpPgG][pPnNiI]*') as $zipmember) {
$ij=0;
if (substr($zipmember,0,1) == '.') { $ij=2; }
$thisfile=$cdis . substr($zipmember, $ij);
if (strpos($uzc, (' ' . explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij))[-1 + sizeof(explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij)))]) ) !== false) {
if ((time() - filectime($thisfile)) > 600) { // more than 10 minutes old
unlink($thisfile); //echo "analyze " . $thisfile . " " . (time() - filectime($thisfile)) . ' seconds ago ' . "\n";
}
}
}
foreach (glob($thisdir . '*-[0-9]{[0-9]*}.[jJpPgG][pPnNiI]*') as $zipmember) {
$ij=0;
if (substr($zipmember,0,1) == '.') { $ij=2; }
$thisfile=$cdis . substr($zipmember, $ij);
if (strpos($uzc, (' ' . explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij))[-1 + sizeof(explode(DIRECTORY_SEPARATOR, substr($zipmember, $ij)))]) ) !== false) {
if ((time() - filectime($thisfile)) > 600) {
unlink($thisfile); //echo "Analyze " . $thisfile . " " . (time() - filectime($thisfile)) . ' seconds ago ' . "\n";
}
}
}
}


?>

… should do its thaing!


Previous relevant Inhouse Slideshow Mobile Google Crawl Tutorial is shown below.

Inhouse Slideshow Mobile Google Crawl Tutorial

Inhouse Slideshow Mobile Google Crawl Tutorial

The recent Inhouse Slideshow Mobile Tutorial did not satisfy all the “mobile usability” tests performed by the “Google Crawl” algorithm, failing on “Content wider than screen”, and you can read some background to this with Google Crawl Viewport Geographicals Tutorial. And so we try some refinements here today, with an idea to control on mobile platforms the max-width CSS property of the document.body of a Inhouse Slideshow webpage, which made up the URLs failing this test at the Google Search Console.

We were reading this great and useful link, thanks, and decided to see whether this stopping of scrolling in X on mobile platform versions of the Inhouse Slideshow webpages gels better with Google Search Console “Google Crawl” Mobility Usability algorithms.

Yet again, deployment of these changes is similar to that last time, and the times before that, as per …

Unit testing completed, the deployment, again, matches those ideas of the recent PDF Slideshow and Form Creation Helper Slideshow Tutorial … in that …

Here are changes we’ll be testing up at Google …


<head>
<script type='text/javascript'>
// Other Javascript code here ...
//
//
// Of relevance today bold below ...

function blater() {
var tdsare=document.getElementsByTagName('td');
var rectg=tdsare[2].getBoundingClientRect(); //document.getElementById('i0').getBoundingClientRect();
tdsare[2].style.borderRight='2px solid white';
document.body.style.backgroundImage="URL('" + document.getElementById('i0').src + "')";
var rl=eval('' + rectg.left);
rl+=eval('' + rectg.width);
rl+=10;
document.body.style.backgroundPosition=" " + rl + "px " + Math.floor(rectg.top) + "px";
document.body.style.backgroundRepeat="no-repeat";
document.body.style.backgroundClip="content-box";
}



function zoom_maybe() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//document.getElementById('rfs').innerHTML='<style> html { zoom: .5; } </style>';
document.getElementById('rfs').innerHTML='<style> html { zoom: 0.4; body { max-width: 100%; max-height: 80vh; } table { max-width: <?php if (strpos($_SERVER['QUERY_STRING'],'exif=') !== false) { echo "100"; } else { echo "95"; } ?>%; max-height: 80vh; margin: auto; overflow-x: hidden; } </style>';
}
}


function nwpdf(iithis) {
if (('' + iithis.src).length > 0) {
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
window.open(iithis.src,'_blank');
}
}
}


function mytw() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.body.style.width='' + (window.orientation == 0 ? Math.floor(eval(2.5 * window.screen.width)) : window.screen.height) + 'px';
document.getElementById('myt').style.width='100%'; //'' + (window.orientation == 0 ? window.screen.width : window.screen.height) + 'px';
}
}



window.setInterval(function(){havealook(1)},2000);
</script>
<style>
td { vertical-align:top; }
@media only screen and (max-width: 800px) {
body { max-width: 100%; max-height: 80vh; } table { max-width: <?php if (strpos($_SERVER['QUERY_STRING'],'exif=') !== false) { echo "100"; } else { echo "95"; } ?>%; max-height: 80vh; margin: auto; overflow-x: hidden; }
}

</style>
</head>
<body onload=" mytw(); zoom_maybe(); if (document.URL.indexOf('pdf=') != -1) { document.getElementById('selmode').value='PDF Slideshow'; if (document.getElementById('tdfirst')) { document.getElementById('s0').style.width=document.getElementById('tdfirst').style.width; document.getElementById('s0').style.height=document.getElementById('tdfirst').style.height; } } if (document.URL.indexOf('exif=') != -1) { document.getElementById('selmode').value='Exif Slideshow'; if (document.getElementById('tdfirst')) { document.getElementById('s0').style.width=document.getElementById('tdfirst').style.width; document.getElementById('s0').style.height=document.getElementById('tdfirst').style.height; } } document.title=document.title + ' ' + lastone; ol(); ">


Previous relevant Inhouse Slideshow Mobile Tutorial is shown below.

Inhouse Slideshow Mobile Tutorial

Inhouse Slideshow Mobile Tutorial

The recent PDF Slideshow and Form Creation Helper Slideshow Tutorial changes were made on a MacBook Pro laptop. Did it show that we have put off until today, to look at that functionality with mobile platforms?!

In a “going off to the right table row of cells” arrangement like this, what are some considerations that improve the user experience (of our inhouse slideshows) for mobile platform users?

  • turn the “@” link into an “emoji button” as per ➡ ( &#10145; )
  • for both mobile and non-mobile, we’ve decided …
    1. UTF-8 meta …
      <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

    2. <style>
      td { vertical-align:top; }
      </style>
    3. change the h4 element to be h2 to help with legibility
  • for mobile, we’ve decided …
    1. viewport …
      <meta name=”viewport” content=”width=device-width, initial-scale=0.4, minimum-scale=0.1, maximum-scale=8, user-scalable=yes”>

    2. <style>
      html { zoom: .5; }
      </style>
    3. iOS (ie. iPad and iPhone) PDF iframe elements have known scrolling issues, which we decided to bypass by opening these PDF creations in a new webpage window

Deployment of these changes is similar to that last time, and the times before that, as per …

Unit testing completed, the deployment, again, matches those ideas of the recent PDF Slideshow and Form Creation Helper Slideshow Tutorial … in that …


Previous relevant PDF Slideshow and Form Creation Helper Slideshow Tutorial is shown below.

PDF Slideshow and Form Creation Helper Slideshow Tutorial

PDF Slideshow and Form Creation Helper Slideshow Tutorial

The first “integration cab” off the rank for yesterday’s PDF Slideshow and Form Creation Helper Primer Tutorial underlying usefulness is with our Inhouse Slideshow arrangements last talked about at Inhouse Slideshow Design Exif Order Tutorial. That generic PHP code now has three display dropdown options of …

  • Slideshow
  • Exif Slideshow … and the new, as of today’s work …
  • PDF Slideshow

… that little bit different in that a PDF Slideshow occupies just the one table cell (rather than the many horizontal cells of the other display modes) and the resultant embedded PDF data vertically scrolls when multiple image slides are involved.

This new option also adds onto this “Inhouse Slideshow” functionality the chance to download and keep a PDF representation of that slideshow to your local system. Perhaps this makes this be of interest to you?!

The changed form_creator.php‘s live run is what gets integrated into the “Inhouse Slideshow” “sisterhood”. We say “sisterhood” because this “Inhouse Slideshow” is designed as a single PHP codefile “hived off” to a lot of other web server folders as their default “index.php” web browser default webpage in a “peer to peer” feeling arrangement. Such an arrangement asks a bit of the deployment arrangements, and we’ve talked about this before (with underlying links pointing to today’s work, should you be interested) …

Unit testing completed, the deployment, again, matches those ideas of the recent Inhouse Slideshow Design Exif Zip Tutorial … in that …

But when we say “Unit testing completed” above, we need to fill you in on a Fpdf issue we came across during unit testing of our changes. We were getting a …


FPDF Error: Not a JPEG file

… Fpdf error message choosing the new “PDF Slideshow” option on some, but not all, “Inhouse Slideshow” address bar URLs. And so the online research began as per …

… almost getting us there to a solution (and as far as the last link goes “that was before we posted the suggestion below”). Then we took one of the error messages at its word …


FPDF error: Not a JPEG file: ../Mac/Linux_drutil-238of.jpg

… and independently looked into the issue via Linux (or macOS command line) file command …


# cd $HOME/public_html/Mac
# ls -l Linux_dr*
-rw-r--r-- 1 owner group 724353 Oct 29 08:00 Linux_drutil-238of.jpg
-rw-r--r-- 1 owner group 132707 Oct 29 08:00 Linux_drutil-239of.jpg
-rw-r--r-- 1 owner group 109595 Oct 29 08:00 Linux_drutil-240of.jpg
# file Linux_drutil-238of.jpg
Linux_drutil-238of.jpg: PNG image data, 1280 x 800, 8-bit/color RGBA, non-interlaced
# file Linux_drutil-239of.jpg
Linux_drutil-239of.jpg: JPEG image data, JFIF standard 1.01
#

… when the penny dropped (about our (macOS) Paintbrush slideshow slide creation habits)! We quote our entry into “php – FPDF error: Not a JPEG file: http://10.11.201.93:81/webdocc/uploaded/tes3.jpg – Stack Overflow” …

Have found that constructing slideshows with Paintbrush on a MacBook Pro for years have sometimes been saving what “file jpeg_filename.jpg” determines is a PNG, as a JPEG, which is not the end of the world as far as the browsers go rendering this. Within FPDF’s fpdf.php I fixed my own shortcomings that were resulting in “FPDF Error: Not a JPEG file” via the kludgy “if($a[2]==3) { return $this->_parsepng($file); }” additional codeline below …

function _parsejpg($file)
{
// Extract info from a JPEG file
$a = getimagesize($file);
if(!$a)
$this->Error(‘Missing or incorrect image file: ‘.$file);
if($a[2]==3) { return $this->_parsepng($file); }
if($a[2]!=2)
$this->Error(‘Not a JPEG file: ‘.’ ‘.$a[2].’ ‘.$file);
if(!isset($a[‘channels’]) || $a[‘channels’]==3)
$colspace = ‘DeviceRGB’;
elseif($a[‘channels’]==4)
$colspace = ‘DeviceCMYK’;
else
$colspace = ‘DeviceGray’;
$bpc = isset($a[‘bits’]) ? $a[‘bits’] : 8;
$data = file_get_contents($file);
return array(‘w’=>$a[0], ‘h’=>$a[1], ‘cs’=>$colspace, ‘bpc’=>$bpc, ‘f’=>’DCTDecode’, ‘data’=>$data);
}

… and this change to Fpdf’s fpdf.php fixed the issue in our case for a lot of our previously erroneous “PDF Slideshow” displays of “Inhouse Slideshows”.


Previous relevant PDF Slideshow and Form Creation Helper Primer Tutorial is shown below.

PDF Slideshow and Form Creation Helper Primer Tutorial

PDF Slideshow and Form Creation Helper Primer Tutorial

Our recent work involving the great Fpdf creator of PDF files when we presented Ajax FormData Object No Body PHP PDF Tutorial has got us starting on a new PDF (PHP) web application we are starting out thinking will help with …

  • online forms (probably via thinking in terms of Fpdf open source programmers like Rick van Buuren and Clément Lavoillotte‘s excellent HTML table rendering ideas) via HTML table intermediate user interactions … and …
  • slideshows

… but we will not be surprised if the project branches out into other ideas. We’ll see over time.

We hope you come along for the trip starting with a bit of a proof of concept form_creator.php‘s live run for you to try, where we allow you to enter (and be able to change) some HTML table code (if that’s what you end up with?!) in a pink HTML textarea element, and that will become PDF should you click the underlying HTML form’s yellow submit button.

Hope to see you for tomorrow’s PDF writing developments here.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment