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

DuckDuckGo Web Browser Primer Tutorial

DuckDuckGo Web Browser Primer Tutorial

DuckDuckGo Web Browser Primer Tutorial

We tried out a relatively new Web Browser player called DuckDuckGo on our MacBook Air the other day …

Tired of being tracked online? We can help.
Get seamless privacy protection on your browser for free with one download:

Private Search
Tracker Blocking
Site Encryption

… to install as a separate new web browser application or install as an existant web browser extension.

That interesting DuckDuckGo possibility of stopping trackers during your DuckDuckGo web browsing session seemed to operate very well and adds to the Privacy mix of product functionality out there.

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

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

Python Cowsay API Cartoon Speech Content Tutorial

Python Cowsay API Cartoon Speech Content Tutorial

Python Cowsay API Cartoon Speech Content Tutorial

If you were to ask most people what is more onerous filling in online web forms on the way to making something happen …

  • we’re guessing, rather than saying button presses …
  • we’re guessing, they’re more likely to say typing out text …

… with it’s associated tabbing out to negotiate as well. But, supposing we could offer you a “speech to text” approach to performing “typing out text” in our latest cowsay Python API / Command-line tool interfacing PHP web application?

For some years now, we’ve interfaced to a …

  • non-mobile
  • Google Chrome
  • secure URL via https: protocol
  • allowing access to microphone

… means by which we normally access via a “top” hierarchy level call to our inhouse Google Speech to Text API interfacing web application helper.

Isn’t a popup window awkward here? Well, you might think so, but today, we discovered with the Google Chrome browser we used on macOS …

  • we initially call our inhouse Google Speech to Text API interfacing web application helper as a popup sitting in front of the cowsay interfacing parent window …
    <?php echo ”

    function anop() {
    if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
    topwo=window_open('https://www.google.com/intl/en/chrome/demos/speech.html','_blank','top=120,left=' + eval(eval('' + screen.width) - 690) + ',width=690,height=550');
    setTimeout(function(){ topwo.scrollTo(0,0); topwo.document.getElementById('tdm').style.opacity='0.0'; }, 6000);
    setInterval(function(){ if (!topwo.closed) { topwo.focus(); } topwo.location.href='https://www.rjmprogramming.com.au/PHP/speech_supervisor.php?rand=' + Math.floor(Math.random() * 1987967) + '&mode=4'; setTimeout(function(){ topwo.scrollTo(0,0); topwo.document.getElementById('tdm').style.opacity='0.0'; }, 6000); }, 30000);
    } else {
    topwo=window.open('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php?rand=' + Math.floor(Math.random() * 1987967) + '&mode=4','_blank','top=120,left=' + eval(eval('' + screen.width) - 690) + ',width=690,height=550');
    setTimeout(function(){ topwo.scrollTo(0,0); topwo.document.getElementById('tdm').style.opacity='0.0'; }, 6000);
    setInterval(function(){ if (!topwo.closed) { topwo.focus(); } topwo.location.href='https://www.rjmprogramming.com.au/PHP/speech_supervisor.php?rand=' + Math.floor(Math.random() * 1987967) + '&mode=4'; setTimeout(function(){ topwo.scrollTo(0,0); topwo.document.getElementById('tdm').style.opacity='0.0'; }, 6000); }, 30000);
    }
    }

    “; ?>
  • and found that it was visible until any click or focus back to the cowsay interfacing parent window … normally an annoyance …
  • but not if …
    1. we semi regularly reload the our inhouse Google Speech to Text API interfacing web application helper … to refresh it’s red “recording” button instigation … and then …
    2. even if it remains hidden, it is still apparent to the focussed cowsay interfacing parent window on account of an orange “microphone on recording” icon appearing for the Google Chrome web browser user up at it’s Menu Bar … and …
    3. audio being “sight independent” the user does not have to refocus our inhouse Google Speech to Text API interfacing web application helper, just talk into the microphone just after that new icon appears … so that …
    4. the Google Speech to Text smarts help transfer that resultant text over to the textarea of the cowsay interfacing parent window, even avoiding any need to tab out of that textarea element … ahead of …
    5. the rest of the dropdown selections and button presses needed to achieve the user aim of establishing a new slide, perhaps for a Cartoon being created

… you can see happening with today’s animated GIF presentation on top of the work of yesterday’s Python Cowsay API Cartoon Tutorial in our changed “fourth draft” Cartoon creation and email sharing capable PHP web application you can also try below.


Previous relevant Python Cowsay API Cartoon Tutorial is shown below.

Python Cowsay API Cartoon Tutorial

Python Cowsay API Cartoon Tutorial

We’ve long been interested in online web application ideas that end up with a half decent cartoon the user can create, and share, themselves. “Half decent” becomes “fully decent” with a user who has a great imagination. And so, onto yesterday’s Python Cowsay API Primer Tutorial‘s start with interfacing to the great cowsay Python API / Command-line tool we access via the PHP exec method conduit to our AlmaLinux Apache/PHP/MySql Linux web server, today we’ve extended that …

  • “proof of concept” thinking … onto …
  • cartoon creation “smarts” … starting with (also egged on here by mobile platform problems with monospaced fonts, it seems like)
  • allowing a tabular display of our cowsay components … into …
  • table cells horizontally aligned (and so, less vulnerable to monospacing inaccuracies) … also allowing …
  • within any table cell there is a topmost th table cell wording part above a cowsay character td cell lower part …
  • “half decent” looking via static CSS
    <?php echo ”

    <style>
    margin: 0 0 0 0;
    padding: 0 0 0 0;
    tr { vertical-align: top; }
    td { vertical-align: top; }
    th { vertical-align: top; }

    * { font-family:'Courier New',Courier,monospace; }
    .img-hor { // thanks to https://stackoverflow.com/questions/32875695/flip-mirror-an-image-horizontally-vertically-with-css
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    filter: FlipH;
    -ms-filter: 'FlipH';
    }
    .img-ver { // thanks to https://stackoverflow.com/questions/32875695/flip-mirror-an-image-horizontally-vertically-with-css
    -moz-transform: scaleY(-1);
    -o-transform: scaleY(-1);
    -webkit-transform: scaleY(-1);
    transform: scaleY(-1);
    filter: FlipV;
    -ms-filter: 'FlipV';
    }

    .glow {
    -webkit-animation: glow 1s linear infinite alternate;
    -moz-animation: glow 1s linear infinite alternate;
    animation: glow 1s linear infinite alternate;
    }

    /* Thanks to https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_glowing_text */

    @-webkit-keyframes glow {
    from {
    box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
    }

    to {
    box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
    }
    }

    th[id$='0'] {
    background: rgba(224,240,240,0.6); //#e0f0f0;
    }

    th[id$='1'] {
    background: rgba(225,241,241,0.6); //#e1f1f1;
    }

    th[id$='2'] {
    background: rgba(226,242,242,0.6); //#e2f2f2;
    }

    th[id$='3'] {
    background: rgba(227,243,243,0.6); //#e3f3f3;
    }

    th[id$='4'] {
    background: rgba(228,244,244,0.6); //#e4f4f4;
    }

    th[id$='5'] {
    background: rgba(229,245,245,0.6); //#e5f5f5;
    }

    th[id$='6'] {
    background: rgba(230,246,246,0.6); //#e6f6f6;
    }

    th[id$='7'] {
    background: rgba(231,247,247,0.6); //#e7f7f7;
    }

    th[id$='8'] {
    background: rgba(232,248,248,0.6); //#e2f2f2;
    }

    th[id$='9'] {
    background: rgba(233,249,249,0.6); //#e9f9f9;
    }

    td[id$='0'] {
    background: rgba(240,240,240,0.3); //#f0f0f0;
    text-shadow:-1px 1px 1px #ff2d90;
    }

    td[id$='1'] {
    background: rgba(241,241,241,0.3); //#f1f1f1;
    text-shadow:-1px 1px 1px #ff2d91;
    float: bottom;
    }

    td[id$='2'] {
    background: rgba(242,242,242,0.3); //#f2f2f2;
    text-shadow:-1px 1px 1px #ff2d92;
    }

    td[id$='3'] {
    background: rgba(243,243,243,0.3); //#f3f3f3;
    text-shadow:-1px 1px 1px #ff2d93;
    }

    td[id$='4'] {
    background: rgba(244,244,244,0.3); //#f4f4f4;
    text-shadow:-1px 1px 1px #ff2d94;
    }

    td[id$='5'] {
    background: rgba(245,245,245,0.3); //#f5f5f5;
    text-shadow:-1px 1px 1px #ff2d95;
    }

    td[id$='6'] {
    background: rgba(246,246,246,0.3); //#f6f6f6;
    text-shadow:-1px 1px 1px #ff2d96;
    }

    td[id$='7'] {
    background: rgba(247,247,247,0.3); //#f7f7f7;
    text-shadow:-1px 1px 1px #ff2d97;
    }

    td[id$='8'] {
    background: rgba(248,248,248,0.3); //#f8f8f8;
    text-shadow:-1px 1px 1px #ff2d98;
    }

    td[id$='9'] {
    background: rgba(249,249,249,0.3); //#f9f9f9;
    text-shadow:-1px 1px 1px #ff2d99;
    }

    table tbody tr:first-child {
    background: transparent; //#f6f6e6;
    }
    </style>

    “; ?>
    … and then …
  • whenever new cell content happens padding-top adding CSS Javascript DOM nuanced display logic via …
    <?php echo ”

    function paddingtopit() {
    var maxtwo=0, thistwo=0;
    var thhs=[], tdhs=[], it=0;
    var thdids=[];
    //trthtd1
    //trtdtd1
    var tds=document.getElementsByTagName('td');
    for (it=0; it<tds.length; it++) {
    if (('' + tds[it].id).indexOf('trtdtd') != -1) {
    if (('' + tds[it].style.paddingTop).replace(/^null/g,'').replace(/^undefined/g,'').trim() != '') {
    tds[it].style.paddingTop='0px';
    }
    }
    }
    for (it=0; it<tds.length; it++) {
    if (('' + tds[it].id).indexOf('trtdtd') != -1) {
    tdhs.push(eval('' + tds[it].getBoundingClientRect().height));
    thdids.push('' + tds[it].id);
    }
    }
    var ths=document.getElementsByTagName('th');
    for (it=0; it<ths.length; it++) {
    if (('' + ths[it].id).indexOf('trthtd') != -1) {
    thhs.push(eval('' + ths[it].getBoundingClientRect().height));
    thistwo=eval(thhs[it] + tdhs[it]);
    if (thistwo > maxtwo) { maxtwo=thistwo; }
    }
    }
    for (it=0; it<tdhs.length; it++) {
    thistwo=eval(thhs[it] + tdhs[it]);
    if (thistwo < maxtwo) {
    document.getElementById(thdids[it]).style.paddingTop='' + eval(maxtwo - thistwo) + 'px';
    }
    }
    }

    “; ?>
    … so that …
  • cartoons present with “speech bubble” wording aligned to the top in our “cells” (ie. th contenteditable=true editable wording on top of td horizontal flip (double click) and/or vertical flop (right click) editable lower part) with those characters aligned to the bottom

… in our changed “third draft” Cartoon creation and email sharing capable PHP web application you can also try below.


Previous relevant Python Cowsay API Primer Tutorial is shown below.

Python Cowsay API Primer Tutorial

Python Cowsay API Primer Tutorial

We discovered an interesting Open Source Python API / Command-line tool called cowsay which we installed up at our AlmaLinux web server via …


pip install cowsay

… with an integration purpose in mind, so thanks. Before many readers’ time indeed, but some may remember those cute banner printouts that told you who owned the next printout on a spooling “crude graphics” printout in the late 70’s … well cowsay encapsulates those heady days (and who can forget punch cards)?! Before integration, though, we want to test it via a new PHP supervisor on exec method Linux command line interfacings to cowsay.

So we started, with this “first draft” getting places and then this “second draft” with a little more sophistication to leave the day with this interfacer

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 Not Categorised | Leave a comment

WordPress Blog Course via Landing Page Design Tutorial

Wordpress Blog Course via Landing Page Design Tutorial

Wordpress Blog Course via Landing Page Design Tutorial

We had occasion to revisit our inhouse “Design a Course” PHP web application we talked about at WordPress Blog Course via Landing Page Topic Tutorial. It is commonplace on “revisits” to see ways to improve, and this “revisit” was no different.

The first, what we’d categorize as an annoyance, using it was the lack of a designed “back button” equivalent, so that a user does not have to figure this out for themselves, useful for when the multiple selection dropdown page displays, and the user may want to go back to the previous initial webpage.

<?php

<a target=_self href=./design_a_course.php title=Back>Cou</a><a target=_blank href=./design_a_course.php title=New>rse</a> Name:

?>

We thought that when the user gets to that multiple selection dropdown page we saw that a double click on the dropdown caused some more content to show, but for non-mobile onmouseover and for any onclick events associated with the dropdown option elements we should do more over to the right where nothing was happening before, via, in the HTML, encasing the page content within a new table element consisting of two cells, the right hand one (id=’tdright’) …

<?php

echo "<html><head><script type='text/javascript'> var isonclick=1; var multi=1; var comma=''; " . $ctn . " </script><title>Ask About Course</title></head><body style='background-color:lightgray;'>" . $bodyi . "<table id=mytable style=width:100%;><tr id=mytr><td id=tdleft style=vertical-align:top;width:70%;><h1 id=myh1 align='center'>" . $thetopic . " Course Designer</h1><h3 id='sofar'></h3><br><form align='center' action='./design_a_course.php?show=y' method='POST'><input type='hidden' name='courselsq' id='courselsq' value=''></input><input type='hidden' name='coursesq' id='coursesq' value=''></input><a target=_self href=./design_a_course.php title=Back>Cou</a><a target=_blank href=./design_a_course.php title=New>rse</a> Name: <input type='text' style='display:block;' name='coursename' id='coursename' value='" . $topics[0] . "'></input><br><div id='list' style='display:none;'>" . via("") . "</div><select title='Tutorials for course ... you can double click for a preview of any one tutorial below when in Multiple selection mode' id='bc' onchange=' if (multi == 1) { multi = 0; document.getElementById(\"topic\").innerHTML = document.getElementById(\"topic\").innerHTML.replace(/size=20 multiple/g, \"\"); } else { multi=1; document.getElementById(\"topic\").innerHTML = document.getElementById(\"topic\").innerHTML.replace(/select /g, \"select size=20 multiple \"); } '><option value='Multiple'>Multiple (entry mode below)</option><option value='Single'>Single (has advantage that date order can be changed)</option></select><div id='topic' style='display:block;'>" . str_replace("ChangeTutNow(this);", " if (multi == 0) { var ahuh=this.value.split(\"=\"); if (ahuh[ahuh.length - 1] != \"\") { var bhuh=ahuh[1].split(\"&\"); document.getElementById(\"coursesq\").value = document.getElementById(\"coursesq\").value + comma + bhuh[0]; document.getElementById(\"courselsq\").value = document.getElementById(\"courselsq\").value + comma + ahuh[ahuh.length - 1].replace(/_/g, \" \"); document.getElementById(\"sofar\").innerHTML = document.getElementById(\"sofar\").innerHTML + \"<\" + \"br\" + \">\" + ahuh[ahuh.length - 1].replace(/_/g, \" \"); document.getElementById(\"topic\").innerHTML = document.getElementById(\"topic\").innerHTML.replace(ahuh[ahuh.length - 1],\"\").replace(ahuh[ahuh.length - 1],\"\"); comma=\",\"; } } ", via($topics[0])) . "</div><br><br><input onclick='return(ChangeTutNow(document.getElementById(\"" . $thetopic . "tuts\")));' onmouseover=' isonclick=0; ChangeTutNow(document.getElementById(\"" . $thetopic . "tuts\")); isonclick=1; ' align='center' type='submit' name='submit' id='submit' value='Create Your " . $thetopic . " Course Design'></input></form>" . "<h3 id='sofar1'></h3></td><td id=tdright style=vertical-align:top;></td></tr></table></body></html>";

?>

… ready to contain blog content via Javascript DOM logic associated with those events talked about above …

<?php echo ”

var lasturl='';

function wopen(oopt) {
var ooptouterHTML=oopt.outerHTML.replace(/\&quot\;/g,'\"');
if (ooptouterHTML.indexOf('windowopen(') != -1) {
var pone=ooptouterHTML.split('windowopen(')[1].substring(1).split(ooptouterHTML.split('windowopen(')[1].substring(0,1))[0];
if (pone.indexOf('title=') != -1 && pone.indexOf('?') != -1) {
document.getElementById('tdright').innerHTML='<iframe style=width:100%;height:90vh; src=\"' + pone.split('?')[0] + pone.split('title=')[1].toLowerCase().replace(/\//g,'').replace(/\_/g,'-') + '#content\"></iframe>';
if (lasturl != pone) { lasturl=pone; setTimeout(function(){ window.scrollTo(0,0); }, 5000); }
} else if (pone.trim() != '') {
document.getElementById('tdright').innerHTML='<iframe style=width:100%;height:90vh; src=\"' + pone + '#content\"></iframe>';
if (lasturl != pone) { lasturl=pone; setTimeout(function(){ window.scrollTo(0,0); }, 5000); }
}
}
}

function windowopen(pone,ptwo) {
if (pone.indexOf('title=') != -1 && pone.indexOf('?') != -1) {
document.getElementById('tdright').innerHTML='<iframe style=width:100%;height:90vh; src=\"' + pone.split('?')[0] + pone.split('title=')[1].toLowerCase().replace(/\//g,'').replace(/\_/g,'-') + '#content\"></iframe>';
if (lasturl != pone) { lasturl=pone; setTimeout(function(){ window.scrollTo(0,0); }, 5000); }
} else if (pone.trim() != '') {
document.getElementById('tdright').innerHTML='<iframe style=width:100%;height:90vh; src=\"' + pone + '#content\"></iframe>';
if (lasturl != pone) { lasturl=pone; setTimeout(function(){ window.scrollTo(0,0); }, 5000); }
}
return null;
}

“; ?>

… regarding the changed design_a_course.php inhouse Course Designer web application you should feel free to (re-)try.


Previous relevant WordPress Blog Course via Landing Page Topic Tutorial is shown below.

Wordpress Blog Course via Landing Page Topic Tutorial

Wordpress Blog Course via Landing Page Topic Tutorial

Yesterday’s WordPress Blog Course via Landing Page Tutorial addressed interfacing …

  • Landing Page dropdown navigation to …
  • blog posting “thread” ideas (where those horizontal rule <hr /> elements “continue the conversation”) … but today we want to add …
  • blog posting “topic” ideas …

… by taking that (“FirstWord”) blog posting title’s “lead word” as getting us to construct a new “Suggestion” select (dropdown) element collection of relevant blog postings of a “topic”.

Think of a “lead word” like Javascript as an example. “Thread wise” the blog posting “Javascript Rectangle Analyze Follow Up Tutorial” teamed up with blog posting “Javascript Convex Polygon Analyze Tutorial” helps with context and blog posting logic flow. But the user may be interested in other blog posts where the “lead word” of the title (or “topic”) is also Javascript. We gather these blog posting “lead word” Javascript blog postings together into a “Suggestion” select (dropdown) element to overlay onto the “Next” link’s “Suggestion” (wording) hardcoding (as of yesterday’s work), as per PHP code in wp-content/themes/twentyten/functions.php off the WordPress Blog’s document root directory needing to change …

<?php

if ( ! function_exists( 'may_be_obsolete' ) ) :
/**
* Truncate unknown previous/next.
*
* @since October 2014 by RJM Programming
*/
function may_be_obsolete($proposed, $seca, $poti, $idlist) {
if (str_replace("#content","",$seca) == "") {
if (strpos($proposed, ">Previous") !== false) {
if (strpos(($proposed . "&"), "&pp=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pp=", "", str_replace("&pn", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
$proposed = str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed);
}
}
} else if (strpos($proposed, ">Next") !== false) {
if (strpos(($proposed . "&"), "&pn=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pn=", "", str_replace("&pp", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
$proposed = str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed);
}
}
}
} else if (strpos($proposed, ">Next") !== false && $poti != "") {
if ($idlist == "") { $idlist=file_get_contents(dirname(__FILE__) . "/../../../../index.html"); }
// <option id='MyNew-20200317' onclick='windowopen("//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial","_blank"); ' value='//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial'>Javascript Convex Polygon Analyze Tutorial (20200317)</option>
$ibitsx=explode(">" . $poti, $idlist);
if (sizeof($ibitsx) > 1) {
if (strpos($ibitsx[0], ">" . explode(" ", $poti)[0] . " ") !== false) {
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[0]);
if (sizeof($jbitsx) > 1) {
$newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
$newu=str_replace("&", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
//file_put_contents("xzc.xzc66", $proposed . "\n" . $newt . "\n" . $newu);
if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
}
}
}
}
//file_put_contents("xzc.xzc44", $poti . "\n" . $idlist);
} else if (strpos($proposed, ">Previous") !== false && $poti != "") {
if ($idlist == "") { $idlist=file_get_contents(dirname(__FILE__) . "/../../../../index.html"); }
// <option id='MyNew-20200317' onclick='windowopen("//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial","_blank"); ' value='//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial'>Javascript Convex Polygon Analyze Tutorial (20200317)</option>
$ibitsx=explode(">" . $poti, $idlist);
if (sizeof($ibitsx) > 1) {
if (strpos($ibitsx[1], ">" . explode(" ", $poti)[0] . " ") !== false) {
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[1]);
if (sizeof($jbitsx) > 1) {
$newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
$newu=str_replace("&", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
//file_put_contents("xzc.xzc666", $proposed . "\n" . $newt . "\n" . $newu);
if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
$allselect="<sel" . "ect " . str_replace("windowopen", "window.open", explode("<sel" . "ect ", $ibitsx[0])[-1 + sizeof(explode("<sel" . "ect ", $ibitsx[0]))]) . ">" . $poti . " " . str_replace("windowopen", "window.open", explode("</sel" . "ect>", $ibitsx[1])[0]) . "</sel" . "ect>";
$presel=str_replace("90%;", "200px;display:inline-block;", str_replace("ChangeTutNow(this)", "location.href=this.value;", "</a> <" . explode(">", substr($allselect,1))[0] . " onclick='event.stopPropagation();'><option value='#'>Suggestion</option>"));
$postsel="</sel" . "ect><a href=#>";
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $allselect);
for ($jii=1; $jii<sizeof($jbitsx); $jii++) {
$presel.=str_replace("/wordpress/", "/ITblog/", str_replace(" onclick=", " data-onclick=", "<opt" . "ion " . explode("<opt" . "ion ", $jbitsx[-1 + $jii])[-1 + sizeof(explode("<opt" . "ion ", $jbitsx[-1 + $jii]))] . ">" . explode(" ", $poti)[0] . " " . explode("</opt" . "ion>", $jbitsx[$jii])[0] . "</opt" . "ion>"));
}
$presel.=$postsel;
return str_replace(" Suggestion", $presel, explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1]);

// return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
}
}
}
}
//file_put_contents("xzc.xzc44", $poti . "\n" . $idlist);
}
return $proposed;
}
endif;

?>


Previous relevant WordPress Blog Course via Landing Page Tutorial is shown below.

Wordpress Blog Course via Landing Page Tutorial

Wordpress Blog Course via Landing Page Tutorial

We’re revisiting Online Course ideas onto the last ideas at WordPress Blog Course Design Double Click Tutorial by adding to the previously catered for “Course Design at a peer to peer level by users”, in favour of offering the idea that simply navigating to this WordPress Blog off the RJM Programming Landing Page‘s blog posting dropdown element (improves on the current iframe content all the same as the current blog post) will use …

  1. the blog posting title as selected by the user …
  2. as applicable, the blog post pointed to down past the first relevant <hr /> …
  3. as applicable, previous blog post of interest down below in the Landing Page dropdown content (latest blog posts up the top) that matches the first word of the current blog post title as selected by the user …
  4. as applicable, next blog post of interest up above in the Landing Page dropdown content (latest blog posts up the top) that matches the first word of the current blog post title as selected by the user …

… to navigate the user to a web page that goes …

WordPress Blog Content via the blog posting title as selected by the user
Previous FirstWord Suggestion (link to 3 above) Hashtag Link to Current Blog Post … Next FirstWord Suggestion (link to 4 above)
WordPress Blog Iframe Content (as of 2 above) WordPress Blog Iframe Content (as of the blog posting title as selected by the user)

… to offer the user the optional chance to get the context of any previous blog postings of relevance, immediately, presented to them, before their eyes.

The PHP code in wp-content/themes/twentyten/functions.php off the WordPress Blog’s document root directory needed to change quite a bit …

<?php

if ( ! function_exists( 'may_be_obsolete' ) ) :
/**
* Truncate unknown previous/next.
*
* @since October 2014 by RJM Programming
*/
function may_be_obsolete($proposed, $seca, $poti, $idlist) {
if (str_replace("#content","",$seca) == "") {
if (strpos($proposed, ">Previous") !== false) {
if (strpos(($proposed . "&"), "&pp=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pp=", "", str_replace("&pn", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
$proposed = str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed);
}
}
} else if (strpos($proposed, ">Next") !== false) {
if (strpos(($proposed . "&"), "&pn=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pn=", "", str_replace("&pp", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
$proposed = str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed);
}
}
}
} else if (strpos($proposed, ">Next") !== false && $poti != "") {
if ($idlist == "") { $idlist=file_get_contents(dirname(__FILE__) . "/../../../../index.html"); }
// <option id='MyNew-20200317' onclick='windowopen("//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial","_blank"); ' value='//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial'>Javascript Convex Polygon Analyze Tutorial (20200317)</option>
$ibitsx=explode(">" . $poti, $idlist);
if (sizeof($ibitsx) > 1) {
if (strpos($ibitsx[0], ">" . explode(" ", $poti)[0] . " ") !== false) {
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[0]);
if (sizeof($jbitsx) > 1) {
$newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
$newu=str_replace("&", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
//file_put_contents("xzc.xzc66", $proposed . "\n" . $newt . "\n" . $newu);
if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
}
}
}
}
//file_put_contents("xzc.xzc44", $poti . "\n" . $idlist);
} else if (strpos($proposed, ">Previous") !== false && $poti != "") {
if ($idlist == "") { $idlist=file_get_contents(dirname(__FILE__) . "/../../../../index.html"); }
// <option id='MyNew-20200317' onclick='windowopen("//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial","_blank"); ' value='//www.rjmprogramming.com.au/ITblog/?p=48271&pp=&pn=&title=Javascript_Convex_Polygon_Analyze_Tutorial'>Javascript Convex Polygon Analyze Tutorial (20200317)</option>
$ibitsx=explode(">" . $poti, $idlist);
if (sizeof($ibitsx) > 1) {
if (strpos($ibitsx[1], ">" . explode(" ", $poti)[0] . " ") !== false) {
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[1]);
if (sizeof($jbitsx) > 1) {
$newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
$newu=str_replace("&", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
//file_put_contents("xzc.xzc666", $proposed . "\n" . $newt . "\n" . $newu);
if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
}
}
}
}
//file_put_contents("xzc.xzc44", $poti . "\n" . $idlist);
}
return $proposed;
}
endif;

if ( ! function_exists( 'get_other_one' ) ) :
/**
* Get unknown previous/next.
*
* @since October 2014 by RJM Programming
*/
function get_other_one($proposedp, $onetogetprefix, $onep, $othv) {
$hashsuffix="";
if (file_exists("../PHP/" . $proposedp . "_" . $_SERVER['REMOTE_ADDR'] . ".npg")) {
$prehuh = file_get_contents("../PHP/" . $proposedp . "_" . $_SERVER['REMOTE_ADDR'] . ".npg");
$xxpa = explode(str_replace("&", "", $onetogetprefix), $prehuh);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $proposedp . $onetogetprefix . $xxpaa[0];
} else if (file_exists("../PHP/" . $onep . "_" . $_SERVER['REMOTE_ADDR'] . ".npg")) {
$prehuh = file_get_contents("../PHP/" . $onep . "_" . $_SERVER['REMOTE_ADDR'] . ".npg");
$xxpa = explode(str_replace("&", "", $onetogetprefix), $prehuh);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $onep . $onetogetprefix . $xxpaa[0];
}
$huh = file_get_contents(dirname(__FILE__) . "/../../../../index.html");
//file_put_contents("xzc.xzc00", $proposedp);
if ($proposedp == "") {
if ($othv == "<hr" . " />") {
//file_put_contents("xzc.xzc000", $onep);
if ($onep == "") {
$nextcontis=explode($othv, file_get_contents($_SERVER['REQUEST_URI']));
//file_put_contents("xzc.xzc0000", sizeof($nextcontis));
} else {
$nextcontis=explode($othv, file_get_contents("https://www.rjmprogramming.com.au/ITblog/?p=" . ($onep)));
}
if (sizeof($nextcontis) > 2) {
if (strpos($nextcontis[1], "/ITblog/") !== false && strpos($nextcontis[1], "'>") !== false) {
$hashsuffix="#" . explode("&", explode("/", explode("'>", explode("/ITblog/", $nextcontis[2])[1])[0])[0])[0];
//if ($onep == "") {
// file_put_contents("xzc.xzc55", "https://www.rjmprogramming.com.au/ITblog/?p=" . get_the_ID() . " ... " . $hashsuffix . "\n" . explode("/ITblog/", $nextcontis[1])[1]);
//} else {
// file_put_contents("xzc.xzc555", "https://www.rjmprogramming.com.au/ITblog/?p=" . may_be_obsolete($onep) . " ... " . $hashsuffix);
//}
} else if (strpos($nextcontis[1], "/ITblog/") !== false && strpos($nextcontis[1], '">') !== false) {
$hashsuffix="#" . explode("&", explode("/", explode('">', explode("/ITblog/", $nextcontis[2])[1])[0])[0])[0];
//file_put_contents("xzc.xzc6", "https://www.rjmprogramming.com.au/ITblog/?p=" . may_be_obsolete($onep) . " ... " . $hashsuffix);
}
}
}
$xxp = explode("?p=" . $onep . "&", $huh);
if (sizeof($xxp) > 1) {
$xxpa = explode(str_replace("&", "", $onetogetprefix), $xxp[1]);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $onep . $onetogetprefix . $xxpaa[0] . $hashsuffix;
}
return $onep . $hashsuffix;
} else {
if ($othv == "<hr" . " />") {
//file_put_contents("xzc.xzd000", $proposedp);
if ($proposedp == "") {
$nextcontis=explode($othv, file_get_contents($_SERVER['REQUEST_URI']));
//file_put_contents("xzc.xzd0000", sizeof($nextcontis));
} else {
$nextcontis=explode($othv, file_get_contents("https://www.rjmprogramming.com.au/ITblog/?p=" . ($proposedp)));
}
if (sizeof($nextcontis) > 1) {
if (strpos($nextcontis[1], "/ITblog/") !== false && strpos($nextcontis[1], "'>") !== false) {
$hashsuffix="#" . explode("&", explode("/", explode("'>", explode("/ITblog/", $nextcontis[1])[1])[0])[0])[0];
//if ($onep == "") {
// file_put_contents("xzc.xzd55", "https://www.rjmprogramming.com.au/ITblog/?p=" . get_the_ID() . " ... " . $hashsuffix . "\n" . explode("/ITblog/", $nextcontis[1])[1]);
//} else {
// file_put_contents("xzc.xzd555", "https://www.rjmprogramming.com.au/ITblog/?p=" . may_be_obsolete($proposedp) . " ... " . $hashsuffix);
//}
} else if (strpos($nextcontis[1], "/ITblog/") !== false && strpos($nextcontis[1], '">') !== false) {
$hashsuffix="#" . explode("&", explode("/", explode('">', explode("/ITblog/", $nextcontis[1])[1])[0])[0])[0];
//file_put_contents("xzc.xzd6", "https://www.rjmprogramming.com.au/ITblog/?p=" . may_be_obsolete($proposedp) . " ... " . $hashsuffix);
}
}
}
$xxp = explode("?p=" . $proposedp . "&", $huh);
if (sizeof($xxp) > 1) {
$xxpa = explode(str_replace("&", "", $onetogetprefix), $xxp[1]);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $proposedp . $onetogetprefix . $xxpaa[0] . $hashsuffix;
}
return $proposedp . $hashsuffix;
}
return $proposedp . $hashsuffix;
}
endif;

?>

… called by …

<?php

if ( ! function_exists( 'previous_next' ) ) :
/**
* Allow for next and previous via &pn= and &pp= respectively.
*
* @since October 2014 by RJM Programming
*/
function previous_next($both = true) {
if (isset($_GET['pp']) || isset($_GET['pn'])) {
$getp="";
if (!isset($_GET['p'])) {
$getp=get_the_ID(); //$post->ID;
} else {
$getp=$_GET['p'];
}
$prefix = " id='atop";
if ($both) $prefix = " id='abottom";
$topic = "";
$topsuff = "";
$tget = "";
$isuff = "#content";
$jsuff = "#content";
$isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad');
if ($isiPad === false) {
$isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPhone');
}
if ($isiPad === false) {
$isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'Android');
}
if ($isiPad) $isuff = "&content=y";
if (isset($_GET['title'])) {
$tget = "&title=" . $_GET['title'];
$topic = str_replace("~", " ", get_tutorial_topic(str_replace("_", " ", $_GET['title'])));
if ($both) {
$topsuff = "<span>  <a href='#content' title='Back to " . str_replace("~", " ", $_GET['title']) . "'>^</a>  </span>";
}
} else {
$topic = str_replace("~", " ", get_tutorial_topic($post->title));
}
if (strpos(($_SERVER['QUERY_STRING'] . "&"), "&pp=&pn=&") !== false) {
$prefix = $prefix;
} else {
echo "<table style='width:150%; background-color: #F6F5F1;'><tbody><tr>";
$cbackto = "";
if (isset($_GET['backto'])) $isuff = "&content=y";
if (isset($_GET['backto'])) $cbackto = "&backto=" . urldecode($_GET['backto']);
$pnv="";
$ppv="";
if (isset($_GET['pp'])) {
$ppv=may_be_obsolete(get_other_one($_GET['pp'], "&pp=", $getp, "<hr" . " />") . "&pn=" . $getp . $tget . $cbackto . "'>Previous" . $topic . " Suggestion", "","","");
$ppvs=explode("#", $ppv);
if (sizeof($ppvs) >= 2) {
$isuff="#" . explode("&", $ppvs[1])[0];
//file_put_contents("xzc.xzc0", $isuff . " ... " . str_replace("#" . $ppvs[1], "", $ppv));
$ppv=str_replace("#" . $ppvs[1], "", $ppv);
}
}
if (isset($_GET['pn'])) {
$pnv=may_be_obsolete(get_other_one($_GET['pn'], "&pn=", $getp, "") . "&pp=" . $getp . $tget . $cbackto . "'>Next" . $topic . " Suggestion", "","","");
$pnvs=explode("#", $pnv);
if (sizeof($pnvs) >= 2) {
$jsuff="#" . explode("&", $pnvs[1])[0];
$pnv=str_replace("#" . $pnvs[1], "", $pnv);
}
}
$atopsuff=$topsuff;
if (str_replace("#content","",($isuff . $jsuff)) != "") {
$topsuff="";
} else {
$atopsuff="";
}
if (isset($_GET['pp'])) {
echo "<th><a" . $prefix . "p' target=_blank title='Previous' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . may_be_obsolete(get_other_one($_GET['pp'], "&pp=", $getp, $pnv) . "&pn=" . $getp . $tget . $cbackto . "'>Previous" . $topic . " Suggestion",($isuff . $jsuff),get_the_title( get_the_ID() ),"") . "</a>" . $topsuff . "</th>";
$topsuff = "";
}
if (isset($_GET['pn'])) {
echo "<th>" . $atopsuff . "<a" . $prefix . "n' style=display:inline-block; target=_blank title='Next' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . may_be_obsolete(get_other_one($_GET['pn'], "&pn=", $getp, $ppv) . "&pp=" . $getp . $tget . $cbackto . "'>Next" . $topic . " Suggestion",($isuff . $jsuff),get_the_title( get_the_ID() ),"") . "</a><th>";
}
if (isset($_GET['backto'])) {
echo "<th><a target=_top href='" . urldecode($_GET['backto']) . "' title='Back to Learning Programming'>Learning Programming</a></th>";
}
if ($both) {
echo "</tr><tr>";
if (isset($_GET['pp'])) {
$turlis=str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . $isuff;
if (strpos($turlis, "#") !== false && strpos($turlis, "&") !== false) {
if (strpos($turlis, "#") < strpos($turlis, "&")) {
$atendis="#" . explode("&", explode("#", $turlis)[1])[0];
//file_put_contents("xzc.xzc7", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
$turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
} else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
$turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
} else {
$turlis=str_replace(explode("/ITblog/", $turlis)[1], substr($atendis,1) . "#content", $turlis);
}
} else if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
$turlis=str_replace("'>", $atendis . "'>", str_replace($atendis, "", $turlis));
} else {
$turlis=str_replace($atendis, "", $turlis) . $atendis;
}
}
} else if (strpos($turlis, "#") !== false && strpos($isuff, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
$atendis="" . $isuff;
//file_put_contents("xzc.xzc70", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
$turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
} else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
$turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
} else {
$turlis=str_replace(explode("/ITblog/", $turlis)[1], substr($atendis,1) . "#content", $turlis);
}
}
}
echo "<td style='vertical-align:top;'><iframe style=width:100%;height:800px; src='" . $turlis . "'></iframe></td>";
}
if (isset($_GET['pn'])) {
$turlis=str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . $jsuff;
if (strpos($turlis, "#") !== false && strpos($turlis, "&") !== false) {
if (strpos($turlis, "#") < strpos($turlis, "&")) {
$atendis="#" . explode("&", explode("#", $turlis)[1])[0];
//file_put_contents("xzc.xzc8", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
$turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
} else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
$turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
}
} else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
$turlis=str_replace('">', $atendis . '">', str_replace($atendis, "", $turlis));
} else {
$turlis=str_replace($atendis, "", $turlis) . $atendis;
}
}
} else if (strpos($turlis, "#") !== false && strpos($jsuff, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
$atendis="#" . $jsuff;
//file_put_contents("xzc.xzc80", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
$turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
} else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
$turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
}
}
}
echo "<td style='vertical-align:top;'><iframe style=width:100%;height:800px; src='" . $turlis . "'></iframe></td>";
}
}
echo "</tr></tbody></table>";
}
}
}
endif;

?>


Previous relevant WordPress Blog Course Design Double Click Tutorial is shown below.

Wordpress Blog Course Design Double Click Tutorial

Wordpress Blog Course Design Double Click Tutorial

As a web application programmer do you go around looking at a webpage design and think in an “event driven” way for ways to add functionality? I’m forever thinking this way, as what has mostly disappointed me as an “out there” (but pretty mild, you’d have to agree) way to “leave things as they are but” (the land surveyor’s adage (without that danged “but” … and isn’t there always a “but”?!!) around farmer gates for example) extend functionality is the Javascript event …


ondblclick

But … it got out on “good behaviour” and smooching with the parole officer … go figure … today, we think we’ve found a really good and practical use for the …


HTML select element's ondblclick ("on double click") event, on the proviso that the select element is in multiple selection mode

Can you picture this scenario? Sorry, mobile “touch” gestures aren’t relevant here. This scenario is normally accompanied by an HTML input type=button (or HTML button element) (or some other HTML element “onclick” event scenario) that is responsible to say …

Hey, web browser?!
Yeh, waddaUwant.
We’ve finished selecting. Howse about analyzing, bud! Pal?! My liege.
Yeh, waddevvvvvvvver.

This thing about clicking in an HTML select element, though, is that it is so tied up with selections you can’t differentiate that from another purpose unless the ondblclick event (sorry, no mobile usage applicability here) can be “purloined” into use. And we do have another usage in mind for today’s application of all this, namely …


Design a Course (which we last talked about at WordPress Blog Course Design Word Tutorial)

… WordPress blog functionality here at this blog. Have you ever tried it? Up at the menu above there is a “Course” menu item. Click it and you are offered lots of ways to arrive at a single word … recently modifications allowing for the word to be situated …

  • anywhere in a blog posting title … and always it has been the case that it could be …
  • the first word of a blog posting title

… either way, once you get past this, you arrive at an …


HTML select element (dropdown) in multiple selection mode that today's changes add on a new ondblclick ("on double click") event piece of logic

How does this logic proceed? It depends on a global variable … shock, horror!! within our Design a Course‘s PHP design_a_course.php changed this way (and which can be seen in its WordPress blog context at this link) … initialized …


var dblclickedlist=',';

… that is “analyzed” each time this HTML select (dropdown) detects an ondblclick event, and if a selected option value appears in that dropdown’s selected item hasn’t yet appeared in that global variable


function odcc(sin) {
if (multi == 1 && parent.document.getElementById('dblcdiv')) {
for (var i=0; i<sin.options.length; i++) {
if (sin.options[i].selected) {
if (dblclickedlist.indexOf(',' + sin.options[i].value + ',') == -1) {
dblclickedlist+=sin.options[i].value + ',';
parent.document.getElementById('dblcdiv').style.marginTop='-260px';
parent.document.getElementById('dblcdiv').style.width='100%';
parent.document.getElementById('dblcdiv').style.height='1500px';
parent.document.getElementById('dblcdiv').innerHTML='<iframe style=width:100%;height:1500px; src=' + sin.options[i].value + '#content></iframe>';
}

}
}
}
}

… you get a preview of the blog posting hosted in an HTML iframe element (within that aforesaidlater mentioned HTML div element), below.

Also, setting up the “creation” of that HTML select element (dropdown) within design_a_course.php we needed to (within PHP function via()) …


return "<select ondblclick='odcc(this);' size=20 multiple " . str_replace("tuts'", $infind . "tuts'", $xsel[0]) . ">" . str_replace("</OPTION>", "</option>", $newih) . "</select>";

And second lastly you will have noticed in the “if” controlling whether we do any of this functionality it was on the proviso that the WordPress blog webpage “parent” had in it (existant) an HTML element with an ID=dblcdiv (we make this an HTML div element). Where’s that done? Well, that’s done within the WordPress Blog’s “Add Page” administration area under where design_a_course.php is housed within its HTML iframe element …


<div id='mydi'><iframe id="icourse" src="../PHP/design_a_course.php?show=Y" width="100%" height="800"></iframe></div>
<div id=dblcdiv></div>

And lastly it’s good to give the user a hint that they can use this functionality, and we choose to apply this to HTML select (dropdown) element (as they hover over it) above the multiple mode dropdown we have been discussing above (still within design_a_course.php‘s PHP) …


echo "<html><head><script type='text/javascript'> var isonclick=1; var multi=1; var comma=''; " . $ctn . " </script><title>Ask About Course</title></head><body style='background-color:lightgray;'>" . $bodyi . "<h1 align='center'>" . $thetopic . " Course Designer</h1><h3 id='sofar'></h3><br><form align='center' action='./design_a_course.php?show=y' method='POST'><input type='hidden' name='courselsq' id='courselsq' value=''></input><input type='hidden' name='coursesq' id='coursesq' value=''></input>Course Name: <input type='text' style='display:block;' name='coursename' id='coursename' value='" . $topics[0] . "'></input><br><div id='list' style='display:none;'>" . via("") . "</div><select title='Tutorials for course ... you can double click for a preview of any one tutorial below when in Multiple selection mode' id='bc' onchange=' if (multi == 1) { multi = 0; document.getElementById(\"topic\").innerHTML = document.getElementById(\"topic\").innerHTML.replace(/size=20 multiple/g, \"\"); } else { multi=1; document.getElementById(\"topic\").innerHTML = document.getElementById(\"topic\").innerHTML.replace(/select /g, \"select size=20 multiple \"); } '><option value='Multiple'>Multiple (entry mode below)</option><option value='Single'>Single (has advantage that date order can be changed)</option></select><div id='topic' style='display:block;'>" . str_replace("ChangeTutNow(this);", " if (multi == 0) { var ahuh=this.value.split(\"=\"); if (ahuh[ahuh.length - 1] != \"\") { var bhuh=ahuh[1].split(\"&\"); document.getElementById(\"coursesq\").value = document.getElementById(\"coursesq\").value + comma + bhuh[0]; document.getElementById(\"courselsq\").value = document.getElementById(\"courselsq\").value + comma + ahuh[ahuh.length - 1].replace(/_/g, \" \"); document.getElementById(\"sofar\").innerHTML = document.getElementById(\"sofar\").innerHTML + \"<\" + \"br\" + \">\" + ahuh[ahuh.length - 1].replace(/_/g, \" \"); document.getElementById(\"topic\").innerHTML = document.getElementById(\"topic\").innerHTML.replace(ahuh[ahuh.length - 1],\"\").replace(ahuh[ahuh.length - 1],\"\"); comma=\",\"; } } ", via($topics[0])) . "</div><br><br><input onclick='return(ChangeTutNow(document.getElementById(\"" . $thetopic . "tuts\")));' onmouseover=' isonclick=0; ChangeTutNow(document.getElementById(\"" . $thetopic . "tuts\")); isonclick=1; ' align='center' type='submit' name='submit' id='submit' value='Create Your " . $thetopic . " Course Design'></input></form>" . "<h3 id='sofar1'></h3></body></html>";

Voila! A completely independent “add-on” piece of functionality, and the kind we are very fond of here … the type that …

  • doesn’t interfere with the expected (or main) workflow of the web application
  • one that may have occurred to a user to try, anyway, in that intuitive way a lot of us navigate the web

… at least in our programming dreams.

Which brings us to the question? How do the web browsers differentiate an onclick (event) from an ondblclick (event)? Sorry, have to go! See you! Can you just post me the answer! Taaaaaaa!


Previous relevant WordPress Blog Course Design Word Tutorial is shown below.

Wordpress Blog Course Design Word Tutorial

Wordpress Blog Course Design Word Tutorial

The recent “Feedback” web application’s Contact Us Feedback Filtering WordPress Tutorial had us scouring blog posting titles here at this blog for a sorted wordlist to offer in an HTML select (dropdown) element to facilitate more savvy user functionality. This same logic can also be useful to the “Design a Course” we have here at this blog in its menu (pages) and that we talked about at WordPress Blog Course Design Cookies Tutorial for your perusal.

You will see in today’s tutorial picture a newly introduced HTML select (dropdown) element with a list of words. Sounds familiar? No? If you are a goldfish click here.

We were able to use that “Feedback” web application’s “reduced” functionality call in an HTML iframe element within design_a_course.php (changed this way) …


$bodyi .= "<br><iframe style='display:none;' id='jcourse' src='//www.rjmprogramming.com.au/HTMLCSS/feedback.htm?justideas=Y' width='100%' height='200'></iframe><br>";
echo "<html><head><script type='text/javascript'> var comma=''; " . $ctn . " </script><title>Ask About Course</title></head><body style='background-color:yellow;'>" . $bodyi . "<h1 id='header_course_designer' align='center'>Course Designer</h1><form align='center' action='./design_a_course.php?show=y' method='POST'><input type='hidden' name='coursesq' id='coursesq' value=''></input><input type='text' style='display:none;' name='coursename' id='coursename' value=''></input><div id='list' style='display:block;'>" . str_replace("ChangeTutNow(this);", " var ahuh=this.value.split(\"=\"); location.href = \"./design_a_course.php?topic=\" + ahuh[ahuh.length - 1].replace(\"#\", \"%23\"); ", via("")) . "</div><div id='topic' style='display:none;'>" . via("C++") . "</div><br><br><input style='display:none;' align='center' type='submit' name='submit' id='submit' value='Submit'></input></form>" . "</body></html>";

Populating that new HTML select (dropdown) wordlist and the establishment of a new “logic set” for that dropdown’s onchange event is the job for feedback.htm (changed this way) …


awordlistc.sort();
wordlistc='';
for (ioptl=0; ioptl<awordlistc.length; ioptl++) {
wordlistc+='<option value="' + awordlistc[ioptl].toLowerCase() + '">' + awordlistc[ioptl] + '</option>';
}
var wow=false;
if (parent.document) {
if (parent.document.getElementById('header_course_designer')) {
wow=true;
}
}
if (wow) {
var hdg=parent.document.getElementById('header_course_designer').innerHTML;
parent.document.getElementById('header_course_designer').innerHTML="<select title=\"Course Word Anywhere in Blog Title\" onchange=\" if (this.value != '') { location.href='//www.rjmprogramming.com.au/PHP/design_a_course.php?topic=' + encodeURIComponent(this.value) + '&anywhere=y'; } \"><option value=''></option>" + wordlistc + "</select> " + hdg;
} else
if (specifically == '') {
document.getElementById('bigselect').innerHTML+=wordlistc;
}

… making use of the parent/child webpage/iframe arrangements that cause parent.document to be defined (and being the object of that webpage).


Previous relevant WordPress Blog Course Design Cookies Tutorial is shown below.

Wordpress Blog Course Design Cookies Tutorial

Wordpress Blog Course Design Cookies Tutorial

As the last follow up to … “This WordPress blog could benefit from a directed order of tutorials studied for a particular topic. This may not suit everybody, but it may suit some, and if a system is created that is optional, that can sit on top of what functionality is already there, all the better.” … how about we improve the looks and cookie functionality (panned out that it was best to use cookies to remember the client’s last course viewed) of the WordPress page by which users of this blog can control what order tutorials for a range of subjects or topics could be for Course they design from the list of tutorials at this blog, building on the tutorial of a couple of days ago called WordPress Blog Course Design Looks Tutorial as shown below?

How about we work on the “Course” WordPress “New Page” ( as of a few days ago … as simple as <iframe id="icourse" src="../PHP/design_a_course.php?show=y" width="100%" height="800"></iframe> )) that appears in the top menu that contains up to three parts:

  • new (as of two days ago) optional dropdown up the top that exists if another IP address user has shared any/all of their Course Designs, that you can include in your own IP address user list of Course Designs so that they then show in the next section down as a link (with background image)
  • links (with background images) to previously created courses by any user on the IP address involved (yes, cookie logic introduced today to allow user to go back to last course blog posting undertaken via a new “Last” menu option (on top of the “Course” menu option)) … like a few days back, but as of a couple of days ago there was an improved look, via CSS and PHP
  • an iframe to some PHP which asks the user to optionally create new Course Design for users of the IP address involved … like a few days back, but as of a couple of days ago there was an improved look, via CSS and lots more functionality via PHP

So what changes were needed to the landing page updater? None, but we needed to update the PHP file for the iframe as mentioned above, as below …

… and to handle the cookie logic we need client-side Javascript and HTML as per …

… and there were changes needed for PHP code in wp-content/themes/twentyten/header.php because it establishes the header Javascript and two sections of code are involved …


var ourck=location.search.split('ck=')[1] ? location.search.split('ck=')[1].split('&')[0] : '';
var ourpp=location.search.split('pp=')[1] ? location.search.split('pp=')[1].split('&')[0] : '';
var ourpn=location.search.split('pn=')[1] ? location.search.split('pn=')[1].split('&')[0] : '';
var ourpage=location.search.split('page_id=')[1] ? location.search.split('page_id=')[1].split('&')[0] : '';
var ourp=location.search.split('p=')[1] ? location.search.split('p=')[1].split('&')[0] : '';
var ourcourseurl='';
var ourcoursetitle='';

… at the top just under <script type=’text/javascript’> and …

function topViaDelay() {
parent.scroll(0, 0);
}

function courseCookies() {
if (document.URL.indexOf("#content") != -1) {
setTimeout(topViaDelay, 2000);
} else {
if ((ourpp != "" || ourpn != "") && ourpp != ourp && ourpn != ourp) {
document.getElementById("content").innerHTML = "<iframe width=1 height=1 id='myccor' src='" + document.URL.replace("/wordpress/", "/PHP/coursecookies.html") + "'></iframe>" + document.getElementById("content").innerHTML;
setTimeout(topViaDelay, 2000);
} else {
document.getElementById("content").innerHTML = "<iframe width=1 height=1 id='myccor' src='../PHP/coursecookies.html'></iframe>" + document.getElementById("content").innerHTML;
}
}
}
</script>
</head>

<body onload="courseCookies();" <?php body_class(); ?>>

… around </script>

An idea for a live run could be to look at the WordPress blog’s Newish (menu) Page called “Course”, and note that if you ever follow through, yourself, and ever undertake a course then a cookie will be created so that the next time you visit the blog a new “Last” menu item will be over the usual “Course” menu item to allow you to go to that last Course blog posting you were last visiting however long ago (within last 6 months, I think). Hope the tutorial can help you out in some way.


Previous relevant WordPress Blog Course Design Looks Tutorial is shown below.

Wordpress Blog Course Design Looks Tutorial

Wordpress Blog Course Design Looks Tutorial

As another further follow up to … “This WordPress blog could benefit from a directed order of tutorials studied for a particular topic. This may not suit everybody, but it may suit some, and if a system is created that is optional, that can sit on top of what functionality is already there, all the better.” … how about we improve the looks and functionality of the WordPress page by which users of this blog can control what order tutorials for a range of subjects or topics could be for Course they design from the list of tutorials at this blog, building on yesterday’s WordPress Blog Course Design Page Tutorial as shown below?

How about we work on the “Course” WordPress “New Page” ( as of yesterday … as simple as <iframe id="icourse" src="../PHP/design_a_course.php?show=y" width="100%" height="800"></iframe> )) that appears in the top menu that contains up to three parts:

  • new optional dropdown up the top that exists if another IP address user has shared any/all of their Course Designs, that you can include in your own IP address user list of Course Designs so that they then show in the next section down as a link (with background image)
  • links (with background images) to previously created courses by any user on the IP address involved (no cookies used yet) … like yesterday, but today there is an improved look, via CSS and PHP
  • an iframe to some PHP which asks the user to optionally create new Course Design for users of the IP address involved … like yesterday, but today there is an improved look, via CSS and lots more functionality via PHP

So what changes were needed to the landing page updater? None, but we needed to update the PHP file for the iframe as mentioned above, as below:

An idea for a live run could be to look at the WordPress blog’s Newish (menu) Page called “Course”. Hope the tutorial can help you out in some way.


Previous relevant WordPress Blog Course Design Page Tutorial is shown below.

Wordpress Blog Course Design Page Tutorial

Wordpress Blog Course Design Page Tutorial

As a further follow up to … “This WordPress blog could benefit from a directed order of tutorials studied for a particular topic. This may not suit everybody, but it may suit some, and if a system is created that is optional, that can sit on top of what functionality is already there, all the better.” … how about we set up a WordPress page by which users of this blog can control what order tutorials for a range of subjects or topics could be for Course they design from the list of tutorials at this blog?

How about we create a “Course” WordPress “New Page” ( as simple as <iframe id="icourse" src="../PHP/design_a_course.php?show=y" width="100%" height="800"></iframe> ) that appears in the top menu and it contains two parts:

  • links to previously created courses by any user on the IP address involved (no cookies used yet)
  • an iframe to some PHP which asks the user to optionally create new Course Design for users of the IP address involved

So what changes to the landing page updater are required? None, but we need to create a new PHP file for the iframe as mentioned above, as below:

And did the PHP code in wp-content/themes/twentyten/functions.php off the WordPress Blog’s document root directory need to change … yes, to code so that there is no “Previous link” for the first tutorial of a course and no “Next link” for the last tutorial of a course:


if ( ! function_exists( 'may_be_obsolete' ) ) :
/**
* Truncate unknown previous/next.
*
* @since October 2014 by RJM Programming
*/
function may_be_obsolete($proposed) {
if (strpos($proposed, ">Previous") !== false) {
if (strpos(($proposed . "&"), "&pp=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pp=", "", str_replace("&pn", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
$proposed = str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed);
}
}
} else if (strpos($proposed, ">Next") !== false) {
if (strpos(($proposed . "&"), "&pn=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pn=", "", str_replace("&pp", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
$proposed = str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed);
}
}
}
return $proposed;
}
endif;

if ( ! function_exists( 'get_other_one' ) ) :
/**
* Get unknown previous/next.
*
* @since October 2014 by RJM Programming
*/
function get_other_one($proposedp, $onetogetprefix, $onep) {

if (file_exists("../PHP/" . $proposedp . "_" . $_SERVER['REMOTE_ADDR'] . ".npg")) {
$prehuh = file_get_contents("../PHP/" . $proposedp . "_" . $_SERVER['REMOTE_ADDR'] . ".npg");
$xxpa = explode(str_replace("&", "", $onetogetprefix), $prehuh);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $proposedp . $onetogetprefix . $xxpaa[0];
} else if (file_exists("../PHP/" . $onep . "_" . $_SERVER['REMOTE_ADDR'] . ".npg")) {
$prehuh = file_get_contents("../PHP/" . $onep . "_" . $_SERVER['REMOTE_ADDR'] . ".npg");
$xxpa = explode(str_replace("&", "", $onetogetprefix), $prehuh);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $onep . $onetogetprefix . $xxpaa[0];
}

$huh = file_get_contents(dirname(__FILE__) . "/../../../../index.html");
if ($proposedp == "") {
$xxp = explode("?p=" . $onep . "&", $huh);
if (sizeof($xxp) > 1) {
$xxpa = explode(str_replace("&", "", $onetogetprefix), $xxp[1]);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $onep . $onetogetprefix . $xxpaa[0];
}
return $onep;
} else {
$xxp = explode("?p=" . $proposedp . "&", $huh);
if (sizeof($xxp) > 1) {
$xxpa = explode(str_replace("&", "", $onetogetprefix), $xxp[1]);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $proposedp . $onetogetprefix . $xxpaa[0];
}
return $proposedp;
}
return $proposedp;
}
endif;

if ( ! function_exists( 'get_tutorial_topic' ) ) :
/**
* Get tutorial topic (word).
*
* @since October 2014 by RJM Programming
*/
function get_tutorial_topic($thistopic) {
$words = explode(" ", str_replace(" ", "++", str_replace("~~", "#~", $thistopic)));
if (sizeof($words) > 1) {
return " " . $words[0];
}
return "";
}
endif;

if ( ! function_exists( 'previous_next' ) ) :
/**
* Allow for next and previous via &pn= and &pp= respectively.
*
* @since October 2014 by RJM Programming
*/
function previous_next($both = true) {
if (isset($_GET['pp']) || isset($_GET['pn'])) {

$prefix = " id='atop";
if ($both) $prefix = " id='abottom";
$topic = "";
$tget = "";
if (isset($_GET['title'])) {
$tget = "&title=" . $_GET['title'];

$topic = str_replace("~", " ", get_tutorial_topic(str_replace("_", " ", $_GET['title'])));

} else {

$topic = str_replace("~", " ", get_tutorial_topic($post->title));

}
if (strpos(($_SERVER['QUERY_STRING'] . "&"), "&pp=&pn=&") !== false) {
$prefix = $prefix;
} else {
echo "<table style='width:98%; background-color: #F6F5F1;'><tbody><tr>";
if (isset($_GET['pp'])) {

echo "<th><a" . $prefix . "p' target=_blank title='Previous' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . may_be_obsolete(get_other_one($_GET['pp'], "&pp=", $_GET['p']) . "&pn=" . $_GET['p'] . $tget . "'>Previous" . $topic . " Suggestion") . "</a></th>";

}
if (isset($_GET['pn'])) {

echo "<th><a" . $prefix . "n' target=_blank title='Next' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . may_be_obsolete(get_other_one($_GET['pn'], "&pn=", $_GET['p']) . "&pp=" . $_GET['p'] . $tget . "'>Next" . $topic . " Suggestion") . "</a><th>";

}

if ($both) {
echo "</tr><tr>";
if (isset($_GET['pp'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . "#content' width=400 height=800></iframe></td>";
}
if (isset($_GET['pn'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . "#content' width=400 height=800></iframe></td>";
}
}
echo "</tr></tbody></table>";
}

}

}
endif;

An idea for a live run could be to look at the WordPress blog’s New (menu) Page called “Course”. Hope the tutorial is of some interest for you, and see you later.


Previous relevant WordPress Blog Course Design Database Tutorial is shown below.

Wordpress Blog Course Design Database Tutorial

Wordpress Blog Course Design Database Tutorial

As another follow up to … “This WordPress blog could benefit from a directed order of tutorials studied for a particular topic. This may not suit everybody, but it may suit some, and if a system is created that is optional, that can sit on top of what functionality is already there, all the better.” … how about we set up a WordPress database means by which the the administrator of this blog can control what order tutorials for a range of subjects or topics could be?

How about we allow for the WordPress MySql wp_posts table’s post_excerpt field be used to contain either …

  • a degree of difficulty numerical rating
  • the query string parts &pp=[blog id of previous blog post of interest to current one] and &pn=[blog id of next blog post of interest to current one]&title=[blog posting title]

… because the post_excerpt database column is currently not being utilized, and is easier to implement than WordPress custom fields.

So what changes to the landing page updater are required? For the background to it please read the blog posting called Extended Linux Crontab Curl Tutorial would hold the answer to where the most efficient solution to this lies, in adjusting the PHP code called tutorial_options.php here as below:

And did the PHP code in wp-content/themes/twentyten/functions.php off the WordPress Blog’s document root directory need to change … do fish swim? … see the bits in bold, in particular below:


if ( ! function_exists( 'get_other_one' ) ) :
/**
* Get unknown previous/next.
*
* @since October 2014 by RJM Programming
*/
function get_other_one($proposedp, $onetogetprefix, $onep) {
$huh = file_get_contents(dirname(__FILE__) . "/../../../../index.html");
if ($proposedp == "") {
$xxp = explode("?p=" . $onep . "&", $huh);
if (sizeof($xxp) > 1) {
$xxpa = explode(str_replace("&", "", $onetogetprefix), $xxp[1]);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $onep . $onetogetprefix . $xxpaa[0];
}
return $onep;
} else {
$xxp = explode("?p=" . $proposedp . "&", $huh);
if (sizeof($xxp) > 1) {
$xxpa = explode(str_replace("&", "", $onetogetprefix), $xxp[1]);
$xxpaa = explode("&", $xxpa[sizeof($xxpa) - 1]);
return $proposedp . $onetogetprefix . $xxpaa[0];
}
return $proposedp;
}
return $proposedp;
}
endif;

if ( ! function_exists( 'get_tutorial_topic' ) ) :
/**
* Get tutorial topic (word).
*
* @since October 2014 by RJM Programming
*/
function get_tutorial_topic($thistopic) {
$words = explode(" ", str_replace(" ", "++", str_replace("~~", "#~", $thistopic)));
if (sizeof($words) > 1) {
return " " . $words[0];
}
return "";
}
endif;

if ( ! function_exists( 'previous_next' ) ) :
/**
* Allow for next and previous via &pn= and &pp= respectively.
*
* @since October 2014 by RJM Programming
*/
function previous_next($both = true) {
if (isset($_GET['pp']) || isset($_GET['pn'])) {

$prefix = " id='atop";
if ($both) $prefix = " id='abottom";
$topic = "";
$tget = "";
if (isset($_GET['title'])) {
$tget = "&title=" . $_GET['title'];

$topic = str_replace("~", " ", get_tutorial_topic(str_replace("_", " ", $_GET['title'])));

} else {

$topic = str_replace("~", " ", get_tutorial_topic($post->title));

}
if (strpos(($_SERVER['QUERY_STRING'] . "&"), "&pp=&pn=&") !== false) {
$prefix = $prefix;
} else {
echo "<table style='width:98%; background-color: #F6F5F1;'><tbody><tr>";
if (isset($_GET['pp'])) {

echo "<th><a" . $prefix . "p' target=_blank title='Previous' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . get_other_one($_GET['pp'], "&pp=", $_GET['p']) . "&pn=" . $_GET['p'] . $tget . "'>Previous" . $topic . " Suggestion</a></th>";

}
if (isset($_GET['pn'])) {

echo "<th><a" . $prefix . "n' target=_blank title='Next' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . get_other_one($_GET['pn'], "&pn=", $_GET['p']) . "&pp=" . $_GET['p'] . $tget . "'>Next" . $topic . " Suggestion</a><th>";

}

if ($both) {
echo "</tr><tr>";
if (isset($_GET['pp'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . "#content' width=400 height=800></iframe></td>";
}
if (isset($_GET['pn'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . "#content' width=400 height=800></iframe></td>";
}
}
echo "</tr></tbody></table>";
}

}

}
endif;

… and you may want to compare this to the code of the previous WordPress Blog Course Design Follow Up Tutorial as shown below. Today’s explanation of a “live run” is to:

  1. Access the rjmprogramming.com.au domain Landing Page
  2. At the tutorial dropdown you’ll see the 3 blog postings that had their post_excerpt fields filled out up the top and you could “motor” down to the second one dated 20130722 … these are blog posts flagged as part of a course in the order from start of course through to end of course where the Course name is the first word of the blog posting title as shown on the dropdown (so you can tell where one course starts and the next starts)
  3. Hopefully … voila (as per live run as was the “live run” from tutorial way below + a Course name inclusion functionality improvement so that it is like … live run again) … do the same for 20141006 (today’s) and you don’t get the new functionality, but hopefully it doesn’t cause any bugs (as you change code the top priority should be firstly not to break other parts that used to work, and to proceed successfully with new functionality that works)

By the way, the file methodologies of the tutorial below are still active, and we still have to explain how a user can control their own personalized Course Designs, and this file method will come back to the fore then, am pretty sure.

Hope to see you yet again next time.


Previous relevant WordPress Blog Course Design Follow Up Tutorial is shown below.

Wordpress Blog Course Design Follow Up Tutorial

Wordpress Blog Course Design Follow Up Tutorial

As a follow up to … “This WordPress blog could benefit from a directed order of tutorials studied for a particular topic. This may not suit everybody, but it may suit some, and if a system is created that is optional, that can sit on top of what functionality is already there, all the better.” … how about we set up the means by which the user or the administrator of this blog (I knew it) can control what order tutorials for a range of subjects or topics could be?

If you’re designing this (and please don’t get any ideas that there is just the way suggested here) you set a “get parameters” way to express the fact that you want this “guided” Course Design help but don’t know what is a good tutorial to come before nor after, and what logic paths, in order …

  1. accept last recorded &pp=[blog id of previous blog post of interest to current one] and &pn=[blog id of next blog post of interest to current one] advice for this current blog posting from this user (ie. use cookies)
  2. accept last recorded &pp=[blog id of previous blog post of interest to current one] and &pn=[blog id of next blog post of interest to current one] advice for this current blog posting from this client using their IP address
  3. accept last recorded &pp=[blog id of previous blog post of interest to current one] and &pn=[blog id of next blog post of interest to current one] advice for this current blog posting from the administrator of this blog
  4. accept last recorded &pp=[blog id of previous blog post to current one] and &pn=[blog id of next blog post to current one]
  5. disregard display of previous and next suggested tutorials

… to follow in order to come up with the blog posting display that you end up with.

Let’s just first concentrate on options 3 and 4 and 5 above … how about we use &pp=&pn= to mean that if no previous and/or next tutorial information is found anywhere you should (5) “disregard display of previous and next suggested tutorials”, whereas if you specify &pn=&pp= to mean that if no previous and/or next tutorial information is found anywhere you should (4) “accept last recorded &pp=[blog id of previous blog post to current one] and &pn=[blog id of next blog post to current one]”.

This sounds a silly detail to worry about, but the fact is, if this detail is sorted out, this whole “guided” Course Design system can be automated from this domain’s landing page‘s tutorial dropdown, or any other dropdown you want to design to direct people to this WordPress Blog’s tutorials.

And where could we intervene to fix this up? Well, well, well (three holes in the ground … chortle, chortle) … you’d have to be an avid follower of this blog to remember, but the blog posting called Extended Linux Crontab Curl Tutorial would hold the answer to where the most efficient solution to this lies, in adjusting the PHP code called tutorial_options.php here as below …

… to enable an ID= on the links to allow for future Javascript DOM possibilities and a file arrangement for admin and/or IP user based tailoring of previous and/or next blog posting “get” parameters. Future tutorials on this “theme” will look at functionality to maintain and populate these files in a sensible way.

Another question occurs to me. Shouldn’t the name of the proposed Course a blog posting belongs to be part of the display? No, I wouldn’t do that! “Yeah, but who asked you? You’re a cat, remember?” No furry beastings were hurt during the creation of this blog posting.

Is the name of the Course a thing that the Course Designer should designate, or can it be derived from the WordPress blog? This will vary in people’s outlook. Some will be fine for (one of) the WordPress blog posting Category (or Tag?) (names) to suffice, and think I’d be in that camp. But I’m also in the camp that says this could be overridden by a user or administrator defined method … feel a “get parameter” coming on … so let’s see what the adjusted code for the “framework” of these new requirements looks like (the tutorial_options.php needed adjustment for this concept as well) … it panned out to be better to focus on the first word of the blog posting’s title as a better bet for what the Course name could be derived from … the PHP code (snippet) goes into wp-content/themes/twentyten/functions.php off the WordPress Blog’s document root directory …



if ( ! function_exists( 'get_tutorial_topic' ) ) :
/**
* Get tutorial topic (word).
*
* @since October 2014 by RJM Programming
*/
function get_tutorial_topic($thistopic) {
$words = explode(" ", str_replace(" ", "++", str_replace("~~", "#~", $thistopic)));
if (sizeof($words) > 1) {
return " " . $words[0];
}
return "";
}
endif;

if ( ! function_exists( 'previous_next' ) ) :
/**
* Allow for next and previous via &pn= and &pp= respectively.
*
* @since October 2014 by RJM Programming
*/
function previous_next($both = true) {
if (isset($_GET['pp']) || isset($_GET['pn'])) {

$prefix = " id='atop";
if ($both) $prefix = " id='abottom";
$topic = "";
$tget = "";
if (isset($_GET['title'])) {
$tget = "&title=" . $_GET['title'];
$topic = get_tutorial_topic(str_replace("_", " ", $_GET['title']));
} else {
$topic = get_tutorial_topic($post->title);
}
if (strpos(($_SERVER['QUERY_STRING'] . "&"), "&pp=&pn=&") !== false) {
$prefix = $prefix;
} else {
echo "<table style='width:98%; background-color: #F6F5F1;'><tbody><tr>";
if (isset($_GET['pp'])) {
echo "<th><a" . $prefix . "p' target=_blank title='Previous' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . "&pn=" . $_GET['p'] . $tget . "'>Previous" . $topic . " Suggestion</a></th>";
}
if (isset($_GET['pn'])) {
echo "<th><a" . $prefix . "n' target=_blank title='Next' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . "&pp=" . $_GET['p'] . $tget . "'>Next" . $topic . " Suggestion</a><th>";
}

if ($both) {
echo "</tr><tr>";
if (isset($_GET['pp'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . "#content' width=400 height=800></iframe></td>";
}
if (isset($_GET['pn'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . "#content' width=400 height=800></iframe></td>";
}
}
echo "</tr></tbody></table>";
}

}

}
endif;

… and you may want to compare this to the code of the previous WordPress Blog Course Design Primer Tutorial as shown below. Today’s explanation of a “live run” is to:

  1. Access the rjmprogramming.com.au domain Landing Page
  2. At the tutorial dropdown “motor” down to the tutorial at 20130722 … OOPs (chortle, chortle) … and choose this
  3. Hopefully … voila (as per live run as was the “live run” from tutorial below + a Course name inclusion functionality improvement so that it is like … live run again) … do the same for 20141006 (today’s) and you don’t get the new functionality, but hopefully it doesn’t cause any bugs (as you change code the top priority should be firstly not to break other parts that used to work, and to proceed successfully with new functionality that works)

Hope to see you again next time.


Previous relevant WordPress Blog Course Design Primer Tutorial is shown below.

Wordpress Blog Course Design Primer Tutorial

Wordpress Blog Course Design Primer Tutorial

This WordPress blog could benefit from a directed order of tutorials studied for a particular topic. This may not suit everybody, but it may suit some, and if a system is created that is optional, that can sit on top of what functionality is already there, all the better.

When you want to add PHP (or HTML, for that matter) functionality, with web work, I personally find the get parameters useful, and this is usually fine as long as the data required of this functionality …

  • is not too long
  • is not sensitive (ie. not a password or username)

… otherwise it is better to use post parameters or a database or a file arrangement of some sort.

Step one in our Course Design ideas is to introduce two new ideas with two new get parameters, so that:

  • &pp=[blog id of previous blog post of interest to current one]
  • &pn=[blog id of next blog post of interest to current one]

Here’s a first draft of a PHP snippet of code to use (though over time it may change):


if ( ! function_exists( 'previous_next' ) ) :
/**
* Allow for next and previous via &pn= and &pp= respectively.
*
* @since October 2014 by RJM Programming
*/
function previous_next($both = true) {
if (isset($_GET['pp']) || isset($_GET['pn'])) {
echo "<table style='width:98%; background-color: #F6F5F1;'><tbody><tr>";
if (isset($_GET['pp'])) {
echo "<th><a target=_blank title='Previous' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . "&pn=" . $_GET['p'] . "'>Previous Suggestion</a></th>";
}
if (isset($_GET['pn'])) {
echo "<th><a target=_blank title='Next' href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . "&pp=" . $_GET['p'] . "'>Next Suggestion</a><th>";
}
if ($both) {
echo "</tr><tr>";
if (isset($_GET['pp'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . "#content' width=400 height=800></iframe></td>";
}
if (isset($_GET['pn'])) {
echo "<td><iframe src='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . "#content' width=400 height=800></iframe></td>";
}
}
echo "</tr></tbody></table>";
}
}
endif;

So where does the code above belong in the WordPress source code? Well, for the TwentyOne theme of this blog, the answer is wp-content/themes/twentyten/functions.php off the WordPress Blog’s document root directory (where PHP functions go, generally).

And the plan will be to call it, for the top and bottom of current posting respectively:

  • <?php previous_next(false); ?>
  • <?php previous_next(true); ?>

So where does this code go? Well, for the TwentyOne theme of this blog, the answer is, in WordPress terminology, in The Loop, for the particular scenario, and the scenario here is the display of a single WordPress Blog posting, as typically happens via the Search Engine links or relevant dropdown links within this rjmprogramming.com.au domain … and this pans out to be within wp-content/themes/twentyten/single.php off the WordPress Blog’s document root directory … after these two lines of PHP code respectively …

  • <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  • <?php endwhile; // end of the loop. ?>

… for these two looks respectively …

Try an example of a live run of the use of this new functionality here at this WordPress Blog … but there is more to do … and we will visit these other “things to do” over time … thanks for visiting … bye for now.

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

Python Cowsay API Cartoon Tutorial

Python Cowsay API Cartoon Tutorial

Python Cowsay API Cartoon Tutorial

We’ve long been interested in online web application ideas that end up with a half decent cartoon the user can create, and share, themselves. “Half decent” becomes “fully decent” with a user who has a great imagination. And so, onto yesterday’s Python Cowsay API Primer Tutorial‘s start with interfacing to the great cowsay Python API / Command-line tool we access via the PHP exec method conduit to our AlmaLinux Apache/PHP/MySql Linux web server, today we’ve extended that …

  • “proof of concept” thinking … onto …
  • cartoon creation “smarts” … starting with (also egged on here by mobile platform problems with monospaced fonts, it seems like)
  • allowing a tabular display of our cowsay components … into …
  • table cells horizontally aligned (and so, less vulnerable to monospacing inaccuracies) … also allowing …
  • within any table cell there is a topmost th table cell wording part above a cowsay character td cell lower part …
  • “half decent” looking via static CSS
    <?php echo ”

    <style>
    margin: 0 0 0 0;
    padding: 0 0 0 0;
    tr { vertical-align: top; }
    td { vertical-align: top; }
    th { vertical-align: top; }

    * { font-family:'Courier New',Courier,monospace; }
    .img-hor { // thanks to https://stackoverflow.com/questions/32875695/flip-mirror-an-image-horizontally-vertically-with-css
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    filter: FlipH;
    -ms-filter: 'FlipH';
    }
    .img-ver { // thanks to https://stackoverflow.com/questions/32875695/flip-mirror-an-image-horizontally-vertically-with-css
    -moz-transform: scaleY(-1);
    -o-transform: scaleY(-1);
    -webkit-transform: scaleY(-1);
    transform: scaleY(-1);
    filter: FlipV;
    -ms-filter: 'FlipV';
    }

    .glow {
    -webkit-animation: glow 1s linear infinite alternate;
    -moz-animation: glow 1s linear infinite alternate;
    animation: glow 1s linear infinite alternate;
    }

    /* Thanks to https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_glowing_text */

    @-webkit-keyframes glow {
    from {
    box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
    }

    to {
    box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
    }
    }

    th[id$='0'] {
    background: rgba(224,240,240,0.6); //#e0f0f0;
    }

    th[id$='1'] {
    background: rgba(225,241,241,0.6); //#e1f1f1;
    }

    th[id$='2'] {
    background: rgba(226,242,242,0.6); //#e2f2f2;
    }

    th[id$='3'] {
    background: rgba(227,243,243,0.6); //#e3f3f3;
    }

    th[id$='4'] {
    background: rgba(228,244,244,0.6); //#e4f4f4;
    }

    th[id$='5'] {
    background: rgba(229,245,245,0.6); //#e5f5f5;
    }

    th[id$='6'] {
    background: rgba(230,246,246,0.6); //#e6f6f6;
    }

    th[id$='7'] {
    background: rgba(231,247,247,0.6); //#e7f7f7;
    }

    th[id$='8'] {
    background: rgba(232,248,248,0.6); //#e2f2f2;
    }

    th[id$='9'] {
    background: rgba(233,249,249,0.6); //#e9f9f9;
    }

    td[id$='0'] {
    background: rgba(240,240,240,0.3); //#f0f0f0;
    text-shadow:-1px 1px 1px #ff2d90;
    }

    td[id$='1'] {
    background: rgba(241,241,241,0.3); //#f1f1f1;
    text-shadow:-1px 1px 1px #ff2d91;
    float: bottom;
    }

    td[id$='2'] {
    background: rgba(242,242,242,0.3); //#f2f2f2;
    text-shadow:-1px 1px 1px #ff2d92;
    }

    td[id$='3'] {
    background: rgba(243,243,243,0.3); //#f3f3f3;
    text-shadow:-1px 1px 1px #ff2d93;
    }

    td[id$='4'] {
    background: rgba(244,244,244,0.3); //#f4f4f4;
    text-shadow:-1px 1px 1px #ff2d94;
    }

    td[id$='5'] {
    background: rgba(245,245,245,0.3); //#f5f5f5;
    text-shadow:-1px 1px 1px #ff2d95;
    }

    td[id$='6'] {
    background: rgba(246,246,246,0.3); //#f6f6f6;
    text-shadow:-1px 1px 1px #ff2d96;
    }

    td[id$='7'] {
    background: rgba(247,247,247,0.3); //#f7f7f7;
    text-shadow:-1px 1px 1px #ff2d97;
    }

    td[id$='8'] {
    background: rgba(248,248,248,0.3); //#f8f8f8;
    text-shadow:-1px 1px 1px #ff2d98;
    }

    td[id$='9'] {
    background: rgba(249,249,249,0.3); //#f9f9f9;
    text-shadow:-1px 1px 1px #ff2d99;
    }

    table tbody tr:first-child {
    background: transparent; //#f6f6e6;
    }
    </style>

    “; ?>
    … and then …
  • whenever new cell content happens padding-top adding CSS Javascript DOM nuanced display logic via …
    <?php echo ”

    function paddingtopit() {
    var maxtwo=0, thistwo=0;
    var thhs=[], tdhs=[], it=0;
    var thdids=[];
    //trthtd1
    //trtdtd1
    var tds=document.getElementsByTagName('td');
    for (it=0; it<tds.length; it++) {
    if (('' + tds[it].id).indexOf('trtdtd') != -1) {
    if (('' + tds[it].style.paddingTop).replace(/^null/g,'').replace(/^undefined/g,'').trim() != '') {
    tds[it].style.paddingTop='0px';
    }
    }
    }
    for (it=0; it<tds.length; it++) {
    if (('' + tds[it].id).indexOf('trtdtd') != -1) {
    tdhs.push(eval('' + tds[it].getBoundingClientRect().height));
    thdids.push('' + tds[it].id);
    }
    }
    var ths=document.getElementsByTagName('th');
    for (it=0; it<ths.length; it++) {
    if (('' + ths[it].id).indexOf('trthtd') != -1) {
    thhs.push(eval('' + ths[it].getBoundingClientRect().height));
    thistwo=eval(thhs[it] + tdhs[it]);
    if (thistwo > maxtwo) { maxtwo=thistwo; }
    }
    }
    for (it=0; it<tdhs.length; it++) {
    thistwo=eval(thhs[it] + tdhs[it]);
    if (thistwo < maxtwo) {
    document.getElementById(thdids[it]).style.paddingTop='' + eval(maxtwo - thistwo) + 'px';
    }
    }
    }

    “; ?>
    … so that …
  • cartoons present with “speech bubble” wording aligned to the top in our “cells” (ie. th contenteditable=true editable wording on top of td horizontal flip (double click) and/or vertical flop (right click) editable lower part) with those characters aligned to the bottom

… in our changed “third draft” Cartoon creation and email sharing capable PHP web application you can also try below.


Previous relevant Python Cowsay API Primer Tutorial is shown below.

Python Cowsay API Primer Tutorial

Python Cowsay API Primer Tutorial

We discovered an interesting Open Source Python API / Command-line tool called cowsay which we installed up at our AlmaLinux web server via …


pip install cowsay

… with an integration purpose in mind, so thanks. Before many readers’ time indeed, but some may remember those cute banner printouts that told you who owned the next printout on a spooling “crude graphics” printout in the late 70’s … well cowsay encapsulates those heady days (and who can forget punch cards)?! Before integration, though, we want to test it via a new PHP supervisor on exec method Linux command line interfacings to cowsay.

So we started, with this “first draft” getting places and then this “second draft” with a little more sophistication to leave the day with this interfacer

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

Python Cowsay API Primer Tutorial

Python Cowsay API Primer Tutorial

Python Cowsay API Primer Tutorial

We discovered an interesting Open Source Python API / Command-line tool called cowsay which we installed up at our AlmaLinux web server via …


pip install cowsay

… with an integration purpose in mind, so thanks. Before many readers’ time indeed, but some may remember those cute banner printouts that told you who owned the next printout on a spooling “crude graphics” printout in the late 70’s … well cowsay encapsulates those heady days (and who can forget punch cards)?! Before integration, though, we want to test it via a new PHP supervisor on exec method Linux command line interfacings to cowsay.

So we started, with this “first draft” getting places and then this “second draft” with a little more sophistication to leave the day with this interfacer

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

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

Google Chart Generic Background Image Modes Tutorial

Google Chart Generic Background Image Modes Tutorial

Google Chart Generic Background Image Modes Tutorial

Yesterday’s Google Chart Generic Background Image Outliers Tutorial shored up the relationships among four modes of use we consider relevant to our Google Chart interfacing PHP web applications …

  • mobile app webview mode of use … always also …
  • is mobile (platform) mode of use … the window.prompt overriding results in an HTML form element means of inputting user inputs …
  • is non-mobile (platform) mode of use … the window.prompt overriding still calls on the Javascript native window.prompt means of inputting user inputs …
  • is non-mobile “hybrid” (platform) mode of use … simulates is mobile so that the window.prompt overriding results in an HTML form element means of inputting user inputs

That last mode definitely needed a bit of attention, and it’s talents have come in handy with an extra non-mobile piece of functionality we’ve worked on today. We noticed with the is mobile mode of use if the user shapes to share or collaborate via email or SMS before all the input is entered the PHP web application would sent a communication to allow a recipient to “pick up, midstream” a user inputting sequence, and we thought …

  1. this was cute
  2. we’d like to make this possible for is non-mobile (platform) users … but the modal nature of native window.prompt is a limiting factor here

For this is non-mobile native window.prompt scenario, rather than fight it’s modal talents we set up a user tip


var midwayucon='';
var midwayublurb=' Suffix ? (email) or ?? (SMS) possible at any prompt and ';
var midwayuval='1';
var bibits='';
var firstdefwords='';
var cmy=false;
var duisa='';
var lwo=null;

… and should the user take up this offer midair email or SMS


var colmode=0;
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis != null) {
if (thisansis.replace(/\?\?$/g,'') != thisansis) { // SMS
colmode=2;
if (midwayucon == '') {
midwayucon='?nojwin=Q&OK=OK'
}
if (thisansis.replace(/\?\?$/g,'').trim() != '') { // SMS
midwayucon=midwayucon.replace('&OK=OK', '&val' + midwayuval + '=' + encodeURIComponent(thisansis.replace(/\?\?$/g,'')) + '&OK=OK');
}
var xais=document.createElement('a');
xais.href='sms:&body=' + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '#nojwin=' + dummyencodeURIComponent(dummyencodeURIComponent(midwayucon.split('?nojwin=')[1] + bibits))).replace('bi=%20','bi=+');
xais.innerHTML='';
xais.style.display='none';
xais.id='a' + midwayuval;
xais.target='_top';
if (thisansis.replace(/\?\?$/g,'').trim() == '') { // SMS
if (midwayucon.indexOf('val1=') != -1) {
if (firstdefwords != '' && decodeURIComponent(midwayucon.split('val1=')[1].split('&')[0].split('#')[0]) != firstdefwords) {
xais.onclick=function(event){ lwo=window.open(document.URL.split('?')[0].split('#')[0] + '#nojwin=' + dummyencodeURIComponent(dummyencodeURIComponent(midwayucon.split('?nojwin=')[1] + bibits)).replace('bi=%20','bi=+'), '_blank'); };
}
}
document.body.appendChild(xais);
document.getElementById('a' + midwayuval).click();

colmode=0;
thisansis=originalWindowPrompt(zwords, '');
} else {
thisansis=thisansis.replace(/\?\?$/g,'');
}
} else if (thisansis.replace(/\?$/g,'') != thisansis) { // email
colmode=1;
if (midwayucon == '') {
midwayucon='?nojwin=Q&OK=OK'
}
if (thisansis.replace(/\?$/g,'').trim() != '') { // email
midwayucon=midwayucon.replace('&OK=OK', '&val' + midwayuval + '=' + encodeURIComponent(thisansis.replace(/\?$/g,'')) + '&OK=OK');
}
var zais=document.createElement('a');
zais.href='mailto:?subject=' + encodeURIComponent('Google Chart Entry Progress ...') + '&body=' + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '#nojwin=' + dummyencodeURIComponent(dummyencodeURIComponent(midwayucon.split('?nojwin=')[1] + bibits))).replace('bi=%20','bi=+');
zais.innerHTML='';
zais.style.display='none';
zais.id='a' + midwayuval;
zais.target='_top';
if (thisansis.replace(/\?$/g,'').trim() == '') { // email
if (midwayucon.indexOf('val1=') != -1) {
if (firstdefwords != '' && decodeURIComponent(midwayucon.split('val1=')[1].split('&')[0].split('#')[0]) != firstdefwords) {
zais.onclick=function(event){ lwo=window.open(document.URL.split('?')[0].split('#')[0] + '#nojwin=' + dummyencodeURIComponent(dummyencodeURIComponent(midwayucon.split('?nojwin=')[1] + bibits)).replace('bi=%20','bi=+'), '_blank'); };
}
}
document.body.appendChild(zais);
document.getElementById('a' + midwayuval).click();

colmode=0;
thisansis=originalWindowPrompt(zwords, '');
} else {
thisansis=thisansis.replace(/\?$/g,'');
}
}
}

… squeezes in the communication (possibilities) before the next prompt, and, in true “collaboration style” …

  • a recipient clicking the link of the communication message would see what …
  • the sender’s user window is changed into … an is non-mobile “hybrid” (platform) mode of use window

… allowing ideas to flow, we’re hoping!

Codewise …


Previous relevant Google Chart Generic Background Image Outliers Tutorial is shown below.

Google Chart Generic Background Image Outliers Tutorial

Google Chart Generic Background Image Outliers Tutorial

Further to yesterday’s Google Chart Generic Background Image Mobile Tutorial‘s background image functionality for our inhouse Google Charts interfacing PHP web applications, it’s the non-generic outliers

… we needed to merge in the relevant smarts of the changed generic Javascript into …

As well, before that, into the generic code, we made some styling improvements to hide some unnecessary elements for mobile platform usage, and improved form sizing to reduce the need for scrolling, as well as email and SMS conduit logic improvements. We hope you enjoy trying out some of these PHP web applications with background images of your choosing.


Previous relevant Google Chart Generic Background Image Mobile Tutorial is shown below.

Google Chart Generic Background Image Mobile Tutorial

Google Chart Generic Background Image Mobile Tutorial

We’re almost there amalgamating the new Google Chart interfacing web application background imaging functionality further to the day before yesterday’s Google Chart Generic Background Image Collaboration Tutorial. Today’s part of the puzzle was dealing with …

  • mobile platform window.prompt overridings for non Pie Chart Google Chart participants … to join …
  • non-mobile platform window.prompt overridings for non Pie Chart Google Chart participants

… that we’d been limiting our scope to up until today. On mobile platforms we arrange for an overlaying HTML form to override the window.prompt, meaning webpage calls differ for each question asked of the user. This asks for quite a difference architecture to our coding requirements.

For this work, then it involves changed Javascript


function postlhway() {
var foundu='';
var prefoundu='';
if (bimode == -1) {
if (document.getElementById('bkcol')) {
if (('' + document.getElementById('bkcol').style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.getElementById('bkcol').style.backgroundImage).split('(')[eval(-1 + ('' + document.getElementById('bkcol').style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
}
}
if (bimode == -1) {
if (('' + document.body.style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.body.style.backgroundImage).split('(')[eval(-1 + ('' + document.body.style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.body.innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> #bkcol { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
}
}
}
if (foundu != '') {
if (document.getElementById('remail')) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('bi=')) == -1) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1 && document.getElementById('remail').href.indexOf(encodeURIComponent('&')) != -1) {
if (3 == 3) {
document.getElementById('remail').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu);
}
} else {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
}
} else if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1) {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
} else {
document.getElementById('remail').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
}
}
}
}
}
}

function saveprompt() {
if (document.getElementById('prompt')) {
titlezwords=document.getElementById('prompt').value;
titleywords=document.getElementById(titleid).value;
setTimeout(function(){
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
}
}, 2000);
}
}

function whiletitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(whiletitlethere, 2000);
}
}

function wtitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(wtitlethere, 2000);
}
}

function lhway() {
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='.';
var thisansis='';
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
thisansis=' ' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi= ')[1].split('#')[0].split('&')[0];
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
thisansis='' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi=')[1].split('#')[0].split('&')[0];
}
//alert('thisansis=' + thisansis);
if (thisansis.replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1) {
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd].replace(/\%3F/g,'?').replace(/\%26/g,'&');
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
setTimeout(function(){ document.getElementById('chart_div').style.opacity='0.8'; }, 4000);
} else if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//alert('modespace=#' + modespace + '# and thisansis=#' + thisansis + '# and outofansgoes=#' + outofansgoes + '#' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= '));
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
setInterval(postlhway, 3000);
}

if (document.URL.indexOf('nojwin') == -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}

if (document.URL.indexOf('nojwin') == -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (ztis != -1) {
if (thisansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
thisansis=thisansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (thisansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + thisansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + thisansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}
} else if (document.URL.indexOf('nojwin') != -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {

if (('' + location.search).indexOf('&val1=') != -1) {
console.log('document.URL=' + document.URL);
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('parent.title=' + parent.title);
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.replace('//picsum.photos/600/400/?random=','');
console.log('Parent.title=' + parent.title);
parent.location.href=document.URL.replace(encodeURIComponent(encodeURIComponent('//picsum.photos/600/400/?random=')),'');
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('title=' + title);
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
//title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
title=title.replace('//picsum.photos/600/400/?random=','');
console.log('Title=' + title);
}
} catch(hgrh) { }
}

var prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (document.getElementById('val1')) {
document.getElementById('val1').onblur=function(evt){
//document.getElementById('OK').disable=true;
console.log('at onblur');
ansis='' + evt.target.value;
console.log('at onblur ansis=' + ansis + ' ztis=' + ztis);
oansis=ansis;
console.log('aT onblur ansis=' + ansis + ' ztis=' + ztis);
// Start of new mobile ...
if (ztis != -1 || 1 == 1) {
console.log('AT onblur ansis=' + ansis + ' ztis=' + ztis);
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
console.log('at onBlur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onBLur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
console.log('at onbluR ansis=' + ansis + ' ztis=' + ztis);
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubFor=' + datetosubfor);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfoR=' + datetosubfor);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onblur ansIs=' + ansis + ' datetosubfoR=' + datetosubfor);
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
console.log('at onblur ansIS=' + ansis + ' datetosubfoR=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
console.log('at onblur Ansis=' + ansis + ' Ztis=' + ztis);
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
console.log('at onblur Ansis=' + ansis + ' ZTis=' + ztis + ' outofansgoes=' + outofansgoes);
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
console.log('at onblur again ansis=' + ansis);
ansis=ansis.replace(outofansgoes, '');
console.log('at onblur again after replace ansis=' + ansis);
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
console.log('at onblur again after replace new');
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('Here ' + newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
console.log('at onblur again after replace not new');
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('here ' + outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
console.log('at onblur open');
gxhr.open('post', '/PHP/csv.php', true);
console.log('at onblur send');
gxhr.send(gform);
console.log('at onblur sent');
}
}
if (ansis != oansis) { gansis=ansis; console.log('gansis=' + gansis); evt.target.value=ansis; document.getElementById('hval1').value=encodeURIComponent(ansis); console.log('safariform is ' + document.getElementById('safariform').outerHTML); setTimeout(function(){ document.getElementById('val1').value=gansis; if (1 == 2) { document.getElementById('OK').disable=false; document.getElementById('OK').click(); } }, 5000); return true; }
// End of new mobile ...
return true;
};
}
if (ztis != -1) {
dotis='.';
moneis=zwis;
if (document.URL.indexOf('&') == -1) {
//setTimeout(function() {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
//}, 5000);
}
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}

var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (('' + location.search).indexOf('&val1=') != -1) {
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
} catch(hgrh) { }
}

titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
//if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//setTimeout(wtitlethere, 1000);
//}
if (45 == 67) {
//if (4 == 44) {
//setTimeout(wtitlethere, 1000);
//} else {
if (zwords.toLowerCase().indexOf(' title ') != -999 && titlezwords.replace(' ',' ') == ' ') {
if (titlezwords.replace(' ',' ') == ' ') { setTimeout(whiletitlethere, 1000); }
titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
} else { //if (zwords.toLowerCase().indexOf(' title ') == -1) {
titlezwords=' ';
titleywords='';
}
//}
}
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
//document.title='' + vok;
//ansis=document.getElementById('val' + pnum).value;
//document.title='Ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum <= 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
ansis=ansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
if (zwords.split(String.fromCharCode(10)).length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split(String.fromCharCode(10)).length;
} else if (zwords.split('<br>').length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split('<br>').length;
}
document.getElementById('val' + pnum).focus();
ansis='';
if (document.URL.indexOf('val' + eval(-1 + pnum) + '=') != -1) {
ansis=decodeURIComponent(decodeURIComponent(document.URL.split('val' + eval(-1 + pnum) + '=')[1].split('&')[0]));
}
//document.title='ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum == 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
if (eval('' + datetosubfor) < 20110314) {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
twoway=ansis;
if (document.getElementById('safariform')) {
document.title='no';
} else {
document.title='' + document.getElementById('safariform').innerHTML.length;
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
twoway=ansis;
}
}
}
//document.title='ztIs=' + ztis + ' and ansis=' + ansis;
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
//document.title='ztIS=' + ztis + ' and ansis=' + ansis;
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//oneway=ansis;
ansis=ansis.replace(outofansgoes, '');
twoway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(outofansgoes, '').replace(/^\ /g,'').replace(/^\ /g,'');
if (document.getElementById('val' + pnum))
// document.title+=' zTIS=' + ztis + ' and ansis=' + ansis + ' outofansgoes=' + outofansgoes;
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
var alert = function(zwords){
var defwords='';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('Cancel').style.display='none';
document.getElementById('bCancel').style.display='none';
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}
var confirm = function(zwords){
//alert('val' + pnum + '=? ' + ' pnum=' + pnum + ' xpnum=' + xpnum + ' ' + document.URL);
var defwords='1trueYesOK';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
//alert('vok=' + vok);
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '1trueYesOK';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}

function bicheck() {
if (document.URL.indexOf('nojwin=') != -1) {
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/gctidy.html"></iframe>';
}
if (('' + document.URL + decodeURIComponent('' + location.hash)).indexOf('title=') != -1 || 1 == 1) {
setTimeout(function(){
var prebits='';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
prebits='ammb=y&';
if (document.getElementById('bitsatend')) {
if (!document.getElementById('remail')) {
//document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email 📧</a> <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS 📟</a><br>';
document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email</a><br>'; //' <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS</a><br>';
}
}
}
//document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/PHP/csv.php?' + prebits + 'outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}, 2000);
}
}

setTimeout(ggmuchlater, 7000);

setTimeout(gmuchlater, 1000);
setTimeout(gcinit, 2000);
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
lhway();
bicheck();
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
lhway();
bicheck();
} else {
setTimeout(bicheck, 5000);
setTimeout(lhway, 5000);
}
setInterval(postlhway, 3000);

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
} else {
$opcd=" #chart_div { opacity: 0.8 !important; } ";
}

file_put_contents('xaz.xaz', $dus);
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuteerer, huh?!


Previous relevant Google Chart Generic Background Image Collaboration Tutorial is shown below.

Google Chart Generic Background Image Context Tutorial

Google Chart Generic Background Image Collaboration Tutorial

We’ve fallen into an obsession with “c” words, and we apologize. Today’s “collaboration” came after yesterday’s Google Chart Generic Background Image Context Tutorial‘s “context” and before that “code”. What do we make of it?

Well?!


Thanks for the insights!

We are not robots here at RJM Programming, but believe it or not, having three acrostically identical tutorial titles in a row causes us more consternation than usual (Nala’s practically apoplectic), even beyond those butterflies in Brazil crossing the equator and affected by the Coriolis Effect. Anyway …

We have spent a day on email and SMS (conduit) sharing and collaboration means by which our non-mobile (only, so far) web users of the unaccounted for (after that Google Chart Pie Chart Background Image Tutorial inspiration from some time ago) Google Chart interfacing web applications can communicate. That work wasn’t as hard as we thought it would be, given the relief of location.hash hashtag URL methodologies whereby there is less worry about URL lengths regarding “a” link href “mailto:” and/or “sms:” sharing functionalities, so the mind must have wandered into the realms of …

What can an image “reference” (easily be)?

The usual suspects came to mind …

  • relative URL that ends with the extension of the image file … eg. /PHP/seven.jpg
  • absolute URL that ends with the extension of the image file … eg. https://www.rjmprogramming.com.au/PHP/six.jpg
  • data URI … base64 … eg. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAEX0lEQVQ4jUWUyW6cVRCFv7r3/kO3u912nNgZgESAAgGBCJgFgxhW7FkgxAbxMLwBEmIRITbsQAgxCEUiSIBAYIY4g1EmYjuDp457+Lv7n+4tFjbwAHVOnVPnlLz75ht67OhhZg/M0p6d5tD9C8SNBBs5XBJhI4uNLC4SREA0UI9yJr2c4e6QO+v3WF27w+rmNrv9Pm7hxDyHFg5yYGEOYxytuRY2SYiSCIwgRgBQIxgjEAKuZWg6R9S0SCS4qKLZElY3HC5tp7QPtmlMN7HOETUTXBJjrEGsAfgPFECsQbBIbDGJZUYgGE8ugQyPm+o0STtTuGZMnKZEjRjjLIgAirEOEQEBDQFBEFFEBWLFtVJmpENRl6hUuFanTRAlbTeZarcx0R6YNZagAdD/t5N9+QgCYAw2jrAhpjM3zaSY4OJGTDrVwEYOYw2qioigoviq5MqF31m9fg1V5fCx+zn11CLNVnufRhBrsVFE1Ihpthu4KDYYwz5YQIxFBG7duMZnH31IqHL6wwnGCLFd4pez3/DaG2/x4GNPgBhEZG/GGlxkMVFkiNMYay3Inqxed4eP33uf7Y0uu90xWkGolFAru7sZn5w5w921m3u+su8vinEO02hEWLN/ANnL2rkvv2an2yd4SCKLM0JVBsCgAYZZzrnPP0eDRzXgfaCuPHXwuEYjRgmIBlQVVLl8/hKI4fRzz3L6uWe5+PMvnHz6aa4uX+D4yYe5vXaLH86eoyoLjLF476l9oKo9pi5HWONRX8E+YznOef7Vl1h86QWurlwjbc+QpikPPfoIcZLS39pmMikp8pzae6q6oqgriqrGqS+xeLScoMYSVJlfOMTl5RXW1+5w5fJVnFGWf1/mxEMnWPppiclkTLM5RdJoUBYFZVlQ5DnZMMMV167gixKLoXXsKGqnOHnqOJ/+/CfZ+XUiZ0jTmFv5mAvf/YjEliQ2vPD8Ir6qqEcZkzt38cMRo5WruFvfL9FqpyRxQhj0qLOax5I2S08+Tu/lFiGUGOPormxwuyfMnjrGrJa88uIixeYWl776lmrzNjmw8vcG8sU7ixpHMXFsCUVg9tABjEvRgzP82j7AhbyiX5Qcv2+Bvy7dYGZ1k7efeQB/Y4PBqGBtdYvb3SFzLcfqToZc/OB1zYeBSpUwLBlvjZidmWaSB1yaYOfn6LqI/r0hyU6P+cRSlhXjbEI2zvnt7y79oqQ3qeg4g6vKjCIXehtDmi6m0UnxVnCRkPUHVNt9qkLJxgXOCYNOg34v48raPaamU2o89/KKsQ9sTSpc0JK7NwdcX8s43Ek5cnSOLC/Z2R6Rj0ra0w2W1/t0xyWn51uk2Ri1QtSO6OU5d7OSi72cQeWxKG7p/Dp//JXTy6C1Pcbc6DMpPRtjTxChEznWhwVZUCKrjCrPoPDczHLmnLBdBgZlRRWUEBR3ZKrme5TlrTGlV440Y1IrXM9qQGi6mkG5V6uza7tUIeCDElTZ1L26elX+fcH/ACJBPYTJ4X8tAAAAAElFTkSuQmCC

  • data URI … utf8 … svg+xml … eg. data:image/svg+xml;utf8,<svg xmlns=’http://www.w3.org/2000/svg’ width=’66’ height=’48’ viewport=’0 0 100 100′ style=’border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:17px;’><text y=’80%’>Alt\\01f3d5</text></svg>

… but then, when at the other end of a navigation the receiver is a serverside language like PHP, that webpage can establish via it’s header function an image (Content Type) outputting modus operandi, like …

<?php

header('Content-Type: image/jpeg');

?>

… and output image data via URL calls that do not have to “end with the extension of any image file”. Our WordPress blog’s TwentyTen theme’s 404.php is capable of this with URLs such as …


https://www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=20221116&random=4575657

… and the other one we’ve had fun with in the past is the great random Lorem Picsum image creating resource accessible via URLs such as …


https://picsum.photos/600/400/

As you might imagine, we wanted to get these two ideas into the mix, especially as it was nagging away at us that the user interaction to make any of this work happen is asking a lot of the web user out there, but to involve more (potentially, later, mobile) users to get interested we can now


zwords+=' ... body background image data URIs, delimited by space or , or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum, thanks) ';

For today’s work, though it involves changed Javascript


function postlhway() {
var foundu='';
var prefoundu='';
if (bimode == -1) {
if (document.getElementById('bkcol')) {
if (('' + document.getElementById('bkcol').style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.getElementById('bkcol').style.backgroundImage).split('(')[eval(-1 + ('' + document.getElementById('bkcol').style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
}
}
if (bimode == -1) {
if (('' + document.body.style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.body.style.backgroundImage).split('(')[eval(-1 + ('' + document.body.style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
} else if (document.body.innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
}
}
}
if (foundu != '') {
if (document.getElementById('remail')) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('bi=')) == -1) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1 && document.getElementById('remail').href.indexOf(encodeURIComponent('&')) != -1) {
if (3 == 3) {
document.getElementById('remail').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu);
}
} else {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
}
} else if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1) {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
} else {
document.getElementById('remail').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
}
}
}
}
}
}

function lhway() {
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='.';
var thisansis='';
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
thisansis=' ' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi= ')[1].split('#')[0].split('&')[0];
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
thisansis='' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi=')[1].split('#')[0].split('&')[0];
}
//alert('thisansis=' + thisansis);
if (thisansis.replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd].replace(/\%3F/g,'?').replace(/\%26/g,'&');
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
setTimeout(function(){ document.getElementById('chart_div').style.opacity='0.8'; }, 4000);
} else if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//alert('modespace=#' + modespace + '# and thisansis=#' + thisansis + '# and outofansgoes=#' + outofansgoes + '#' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= '));
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
setInterval(postlhway, 3000);
}

if (document.URL.indexOf('nojwin') == -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum, thanks) ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (ztis != -1) {
if (thisansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + Math.floor(Math.random() * 19896754));
} else {
thisansis=thisansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (thisansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + Math.floor(Math.random() * 19896754));
}
}
}
if ((fauxv + thisansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + thisansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + decodeURIComponent('' + location.hash)).indexOf('title=') != -1 || 1 == 1) {
setTimeout(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (document.getElementById('bitsatend')) {
if (!document.getElementById('remail')) {
//document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email 📧</a> <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS 📟</a><br>';
document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email</a><br>'; //' <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS</a><br>';
}
}
}
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}, 2000);
}
}

if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
lhway();
bicheck();
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
lhway();
bicheck();
} else {
setTimeout(bicheck, 5000);
setTimeout(lhway, 5000);
}

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
} else {
$opcd=" #chart_div { opacity: 0.8 !important; } ";
}

file_put_contents('xaz.xaz', $dus);
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuteer, huh?!


Previous relevant Google Chart Generic Background Image Context Tutorial is shown below.

Google Chart Generic Background Image Context Tutorial

Google Chart Generic Background Image Context Tutorial

Here, today, further to yesterday’s Google Chart Generic Background Image Code Tutorial, we are referring to …

  • context … or …
  • guise

again. Well it could be …

  • like when you buy a particular brand of something and then start seeing it everywhere … or …
  • because we like the word “againagain … or …
  • because whenever you revisit a piece of any code it doesn’t take long to appreciate where it could be improved … and we like this one … so …

… we’ll leave it at that. Actually, that last one makes sense, because we realized testing the workings of that Google Chart Pie Chart Background Image Tutorial inspiration for this current project extension, it had a great feature that hadn’t occurred to us yesterday (and we want to allow for) …

  • today, using the background imagery behind the Google Chart and have it be background-repeat:repeat; … the user makes happen by prefixing their background image information by a space character, whereas …
  • yesterday’s use of the background imagery behind the document body and have it be background-size:cover; is perfectly valid too

… making for a better end result set. But there’s more. We’ll be easing out the previous modus operandi in favour of this recent modus operandi over time, we’re thinking, but not before we have a day? looking into sharing functionality that might allow the user to share that Google Chart and its background image arrangements with an email recipient.

For today’s work, though it involves changed Javascript


const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + location.hash).indexOf('title=') != -1) {
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}
}

setTimeout(bicheck, 5000);

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
}

if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=trim($dus);
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; " . $opcd . " }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; " . $opcd . " }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuter, huh?!

Did you know?

Can an animated GIF set as the background image still be animated?

Yes. But please do not make it too boring. Can we suggest …

?


Previous relevant Google Chart Generic Background Image Code Tutorial is shown below.

Google Chart Generic Background Image Code Tutorial

Google Chart Generic Background Image Code Tutorial

We were interested in a URL we detected being accessed, via our cPanel Apache Status report linking us to Google Chart Pie Chart Background Image Tutorial. Investigating this Google Charts interfacing PHP code means by which to allow for the user specification of background images, in the case of a Pie Chart, we realized some interfacings had been coded for this functionality, but not others.

But don’t we …

  1. have an external Javascript gchartgen.js to turn to …
  2. and a require PHP csv.php we could lean on

? Yes, indeed, and we decided to …

  1. have an external Javascript gchartgen.js to turn to …
  2. and a require PHP csv.php we could lean on
  1. for non-mobile (so far) we could override the window.prompt and check and setup
  2. internal use only recording on user interest in a web server flat file

involving changed Javascript


const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + location.hash).indexOf('title=') != -1) {
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}
}

setTimeout(bicheck, 5000);

and changed PHP

<?php

function ifspacy($dus, $squotethere) {
global $hdrstuff;
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=str_replace('https:','',str_replace('http:','',$dus));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
$filebicont=str_replace(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' parent.document.body.style.backgroundSize=\"cover\"; " . $secidea . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(" . $ify . ")\"; parent.document.body.style.backgroundSize=\"cover\"; " . $secidea . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " ><p> parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL('" . $ify . "')\"; </p></body></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " parent.document.body.style.backgroundSize=\"cover\"; '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(" . $ify . ")\"; parent.document.body.style.backgroundSize=\"cover\"; '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body><p> parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; </p></body></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cute, huh?!


Previous relevant Google Chart Pie Chart Background Image Tutorial is shown below.

Google Chart Pie Chart Background Image Tutorial

Google Chart Pie Chart Background Image Tutorial

We have another potential use for the clipboard, adding onto the recent Google Pie Chart via Clipboard Co-ordinates Tutorial data set usage, today. We allow the user to change the default white background to the Google Chart Pie Chart be tailored to be either …

  • image URL … or …
  • image data URI (most likely entered via the clipboard)

… as a prefixing option when they enter in the Title of their Pie Chart.

In order to achieve this, we were helped enormously by …

  • this very useful link, thanks … the crux of it being to get to put …

    backgroundColor: 'none'

    … into the Pie Chart options … and some previous help we got when we presented …
  • Column Intelligence Primer Tutorial‘s “Did you know?” section reference to incredibly useful link‘s advice on our …

    wish to apply opacity just to background image, but not the corresponding textual data (or other types) that is the primary content of that HTML element

You can see a video of some of the practicalities to usage on an iPad mobile app version in the YouTube video below …

Because data URIs are an option here, too, you will see in the code changes to pie_chart.php the need, now, to cater for the switch of HTML form navigation from …

  • method=GET (the default) … to …
  • method=POST (when the URL becomes too long)

… and that new bit of logic is slated home to the generic external Javascript we have set aside for Google Charts work called gchartgen.js which changed for this work, in this way.

Maybe you can see how to use this feature yourself, and if that is the case you can try this live run link.


Previous relevant Google Pie Chart via Clipboard Co-ordinates Tutorial is shown below.

Google Pie Chart via Clipboard Co-ordinates Tutorial

Google Pie Chart via Clipboard Co-ordinates Tutorial

Yesterday’s Google Map Chart via Clipboard Co-ordinates Tutorial was a good precursor to today’s work interfacing this time to the Google Chart Pie Chart.

With this work, we’ve started refining the clipboard “smarts” by looking for linefeeds … in Javascript thoughts …


String.fromCharCode(10)

… and as the data exits the Javascript prompt window on its way, before navigating back to the PHP itself, we can check for too many fields to the right of the data, and truncate the clipboard data, as necessary. Along the way, we may be able to reject any header records with this same approach. We can check for no numerical fields here. Business specific logic can be applied here too. With a Pie Chart, the original data, or the user, may be tempted to place “%” after the numerical data, and we can take the opportunity to weed these out. Also, with the character data, it may be delimited by a double quote (ie. within “”), and with this knowledge in mind, we may be able to weed out confusing additional commas that could confuse us with the clipboard comma separated value format of the data.

The lesson here, is to “validate early” and it could be good to “validate often” as well. Real data can be strange indeed.


function dlp(thisris) {
if (thisris != null) {
var commacount=thisris.toLowerCase().replace(/\<\/td\>/g,' , ').indexOf(',');
if (thisris.toLowerCase().replace('https:','http:').indexOf('http:') == 0) {
fti=true;
allowed=true;
datac=thisris;
} else if (commacount >= 0) {
var thatris=thisris.replace(/\ \"/g,String.fromCharCode(10) + '"').replace(/\<tr\>/g,'').replace(/\<\/td\>\<td\>/g,',').replace(/\<\/tr\>/g,String.fromCharCode(10)).replace(/\<\/td\>/g,',').replace(/\,\,/g,',').replace(/\,\,/g,',').replace(',' + String.fromCharCode(10),String.fromCharCode(10));
var zisok=true, fldq=thatris.split(',');
var pielines=thatris.split(String.fromCharCode(10));
if ((fldq[0].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[0].replace('"','').trim() + ' ').substring(0,1) > '9') {
if ((fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) > '9') {
zisok=false;
}
}
if (!zisok && pielines.length > 1) {
fldq=pielines[1].split(',');
zisok=true;
if ((fldq[0].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[0].replace('"','').trim() + ' ').substring(0,1) > '9') {
if ((fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) > '9') {
zisok=false;
}
}
}
if (zisok) {
while (thatris.indexOf(String.fromCharCode(10)) != -1) {
var inpies, pied='';
thatris='';
var sthatris='';
for (var ipie=0; ipie<pielines.length; ipie++) {
inpies=pielines[ipie].split(',');
if (inpies.length > 1) {
if ((inpies[0].trim() + " ").substring(0,1) == '"' && (inpies[1].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','') + ',' + inpies[1].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','');
} else if ((inpies[0].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','') + ',' + inpies[1].trim().replace('%','').replace('"','');
} else if ((inpies[1].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().replace('%','') + ',' + inpies[1].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','');
} else {
sthatris=pied + inpies[0].trim().replace('%','') + ',' + inpies[1].trim().replace('%','').replace('"','');
}
inpies=sthatris.replace(pied,'').split(',');
if (((inpies[0].trim() + " ").substring(0,1) >= '0' && (inpies[0].trim() + " ").substring(0,1) <= '9') || ((inpies[1].trim() + " ").substring(0,1) >= '0' && (inpies[1].trim() + " ").substring(0,1) <= '9')) {
thatris+=sthatris;
pied=',';
}
}
}
}
thatris=thatris.replace(/\,\,/g,',');
fti=true;
allowed=true;
datac='http;' + thatris;
thisris='http;' + thatris;
}
}
}
return thisris;
}

Our PHP Google Chart Pie Chart interface is pie_chart.php changed this way for today’s work, that you can try yourself at this live run link.

Our PHP helper csv.php changed this way for today’s work.

If you want to recreate the conditions as shown in today’s tutorial picture

  1. copy the contents below …

  2. and paste into the 4th prompt (window’s text) box of the Google Charts Pie Chart interfacing live run link
  3. click OK button … P.S. On first prompt, appending &onclick=y to what you want as a Pie Chart title will work the Pie Chart’s select event logic we harness with this interfacing
  4. … or, if you are feeling lazy …
    https://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php?title=Country%20Populations&onclick=y&task=Country&desc=Populations&data=,%20[~https;China,1347000000,India,1241000000,United%20States,312000000,Indonesia,238000000,Brazil,197000000,Pakistan,177000000,Nigeria,162000000,Bangladesh,151000000,Russia,143000000,Japan,128000000,Mexico,115000000,Philippines,96000000,Vietnam,88000000,Ethiopia,87000000,Germany,81800000,Egypt,82600000,Iran,78000000,Turkey,74000000,Thailand,69500000,Congo,67800000,France,63300000,United%20Kingdom,62700000,Italy,60800000~,100]

Previous relevant Google Map Chart via Clipboard Co-ordinates Tutorial is shown below.

Google Map Chart via Clipboard Co-ordinates Tutorial

Google Map Chart via Clipboard Co-ordinates Tutorial

Yesterday’s Google Map Chart via URL Co-ordinates Tutorial added functionality directed towards a …

  • secondary data source, that you access … but today we are going to extend that functionality to support a …
  • primary data source that you enter a comma separated values list for the [place,lat,long] data sets (yourself, via the computer keyboard) … as well as a …
  • “subset” of a secondary data source, that you access, more than likely, using you computer device’s clipboard

The invention of the clipboard was a brilliant step. Before it, we were so beholden to programmers to get tailored work done, and though it’s sad that so many of you get on without us (cough, cough) … well … we were being overworked anyway … and there was that project to “make the morning breakfast coffee before you even know you wanted it” to get onto … finally.

Perhaps we all forget now what the clipboard has meant, for so many of us. It is the freedom of “copy and paste”, the individualism tool of content creation.

Yesterday’s functionality idea is a case in point. “Secondary data sources” are, by definition, out of your control, as to what the content of a web page is. Notice how, yesterday, we made some content that was (s)ftp transferred over to the rjmprogramming.com.au domain via … yes, you guessed it …

  1. me copying (off the mapbox.com website, thanks, as part of the contents of a webpage) … then …
  2. pasting that content into a csv text file on the MacBook Pro computer we’re using (locally) … and then …
  3. (s)ftp transferred over to rjmprogramming.com.au domain to represent a …
  4. URL usable within the functionality of our Google Chart Map Chart interface we host here as the PHP map.php‘s live run link

But there you are, an intelligent human, able to determine for yourself the data you are interested in (quite often not the entire contents of a webpage, as yesterday’s work is ideally asking for), so that being the case, the map.php modifications to PHP code we’ve made today, make it possible for (the much simpler) …

  1. me copying (off the mapbox.com website, thanks, as part of the contents of a webpage) … then …
  2. pasting that content within the functionality of our Google Chart Map Chart interface we host here as the PHP map.php‘s live run link

If you have the clipboard as your friend, your time around computers becomes so much more enjoyable, and flexible, and within your control. We, as programmers, need to think, on occasions, or encourage, on occasions, how the user is likely to use the clipboard, in conjunction with our applications. As you might surmise, that can be a pretty unpredictable “artform”.

Our PHP helper csv.php changed this way for today’s work.


Previous relevant Google Map Chart via URL Co-ordinates Tutorial is shown below.

Google Map Chart via URL Co-ordinates Tutorial

Google Map Chart via URL Co-ordinates Tutorial

The last blog posting referring to the Google Chart Map Chart interface we host here was with Emoji Name Search Map Chart Weather Tutorial, but today we are presenting a major functionality addition with implications for other Google Chart interfacing PHP codesets here. We are allowing the user at the second prompt to take the data from a URL data source containing CSV (comma separated values) place,latitude,longitude data or those three fields in an HTML table element contents perhaps.

We’ve added the ability to “map” (tee hee) …


HTTP://www.rjmprogramming.com.au/PHP/Map/map.php?title=Where%20We%20Are&onclick=y&label=['Lat',&value='Lon',%20'Name']&data=,%20[-33.90743410270099,151.17646964910696,~Parent1~]%20,%20[-33.907440603083124,151.1764659419197,~Parent2~]

… from a CSV data URL look with contents …


-33.907434102700991,151.17646964910696,Parent1
-33.907440603083124,151.17646594191973,Parent2

… that if placed at rjmprogramming.com.au’s Document Root and called parent.csv then a URL of …


HTTP://www.rjmprogramming.com.au/PHP/Map/map.php?title=Where%20We%20Are&onclick=y&label=['Lat',&value='Lon',%20'Name']&data=,%20[0.00000001,0.0000000,~HTTP://rjmprogramming.com.au/parent.csv~]

… could be a shortcut to that first URL same look. You can see another example using data from mapbox.com, thanks, show the scenario our tutorial picture illustrates.

The way this “mapping” (tee hee, tee hee) of URLs can happen is that the PHP supervisor map.php (changed this way and which you can try with this live run link) “includes” (ie. calls) …


include "../csv.php";

… a (now bigger, and more functional) csv.php (changed this way) does its best to handle a few looks to the CSV or tabular data, with code to allow for …

  • CSV data ordered place,latitude(decimal),longitude(decimal) or latitude(decimal),longitude(decimal),place or place,longitude(decimal),latitude(decimal) or longitude(decimal),latitude(decimal),place
  • CSV data ordered place,latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs) or latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs),place or place,longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs) or longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs),place
  • HTML tabular data ordered place,latitude(decimal),longitude(decimal) or latitude(decimal),longitude(decimal),place or place,longitude(decimal),latitude(decimal) or longitude(decimal),latitude(decimal),place
  • HTML tabular data ordered place,latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs) or latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs),place or place,longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs) or longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs),place

Previous relevant Emoji Name Search Map Chart Weather Tutorial is shown below.

Emoji Name Search Map Chart Weather Tutorial

Emoji Name Search Map Chart Weather Tutorial

If you’ve been studying the code of our hierarchy for our Emoji Flags of the World web application …

… am sure you’ll have noticed how bottom heavy it is on the “child” as far as functionality goes. What we like to call “the hard working duck syndrome”. Partly, that is because we see the Google Charts Map Chart interface we have as being a very useful “meeting point” with interfacing web applications tending towards the “where” of life.

Today’s job, extending yesterday’s Emoji Name Search Map Chart Tutorial is to add Map Chart interfacing to the great Weather Underground and its great API service for autocomplete name searches for weather (and hurricane) information … thanks.

The changes are again just to that “hard working duck” Map Chart interface “child” web application, as for yesterday’s work. We were very keen to do this, especially because …

  • Weather Underground database works most succinctly with Placename, Country identification pairs, better than for the …
  • Continent/Placename setup of (PHP) Timezones

… and so, while we are going to so much trouble scouring Timezone places for their associated Countries, it is a really good opportunity to slot in some Weather API interfacing to our Emoji World Flags web application, which is starting to be looking better and better as a trip planning aid.


Previous relevant Emoji Name Search Map Chart Tutorial is shown below.

Emoji Name Search Map Chart Tutorial

Emoji Name Search Map Chart Tutorial

We now have a three tier functionality hierarchy for our Emoji Flags of the World web application …

… all made so very possible when web applications sit in the same domain and you utilize the HTML iframe element.

We wanted to enhance its integration by …

  • adding in “locality pins” for all PHP Timezone places in the country of interest
  • involving Emoji flags in the Map Chart title (rather than as a pin) because Emojis, after all, are like textual data, not HTML (but can use HTML Entity representations in both)

To work the latter of these we called on recent experience with the “Fifth Beatle” discussion in Emoji Name Search Primer Tutorial

We got quite excited recently with Rainbow Games PHP Emoji Tutorial when we added a (fourth Beatle) emoji helper, called Emoji Terra, into the mix of tools to gather emoji information. Today, we’ve got a new Emoji Search web application that introduces a new (fifth Beatle(?)) emoji helper tool to add into the “how we see it” mix …

We found that Emoji Terra could be used in our map Chart interfacing PHP to look up the HTML Decimal Entity for a flag of a country via the URL pattern …


HTTP://www.emojiterra.com/flag-for-[CountryNameSpacesMakeMinusSignsLowerCase]

So even though Google Chart Map Charts do not allow HTML in their titles there is nothing stopping you putting in an HTML Entity Emoji coding.

As far as the former goes, we again called on the PHP DateTimeZone class to scrutinize the first Timezone in the Map Chart title, derive its ISO 2 letter Country Code, and look through the array list of (PHP) Timezones to garner latitude and longitude, time now, and GMT offset information necessary to improve the “where” and “when” aspects of our Google Chart Map Chart interfacing.


Previous relevant Emoji Name Search Timezone Tutorial is shown below.

Emoji Name Search Timezone Tutorial

Emoji Name Search Timezone Tutorial

Yesterday’s Emoji Name Search Map Tutorial was a step in the direction of “where” functionality, but because PHP teams up with the supervisory HTML “Emoji World Flags” web application, to make all this happen, there is the opportunity to add interest by adding a “when” aspect to how it works.

As we’ve said many times now, should you have access to PHP, you also have access to its DateTimeZone class where Timezones can be linked to ISO 2 letter Country Codes, useful as an integration point as of recent times when we introduced ISO 2 letter Country Codes to today’s (supervisory) live run‘s world_flags.html HTML and Javascript code.

But it is not HTML code that changes today. It is its PHP partner emoticon_keyboard_shortcuts.php changed in this way, that arranges that its call of Google Charts Map Chart passes across a new URL …


&ccode=[ISO 2 letter Country Code]

… argument that uses a new PHP function as below (arrays shortened for practicality purposes) …


<?php
function inctycodecheck($incd, $sofar) {
$nearname=["Africa/Abidjan","Africa/Accra", ... ]; // array of Timezone names
$retv="";
$retd="";
$otz = new DateTimeZone("UTC");
$jj=0;
$origin_dt = new DateTime("now", $otz);
for ($best1=0; $best1<sizeof($nearname); $best1++) {
try {
$tz = new DateTimeZone($nearname[$best1]);
$cloc = $tz->getLocation();
$ctrycode = $cloc['country_code'];
if (strtoupper($incd) == strtoupper($ctrycode)) {
$remote_dt = new DateTime("now", $tz);
$offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
$newp=$retd . $nearname[$best1] . "/" . $remote_dt->format('Y-m-d_H:i:s') . " (GMT" . $offset . ")";
$huhs=explode(" (GMT" . $offset . ")", $retv);
if (sizeof($huhs) == 2) {
if (explode("/", $newp)[0] != explode("/", explode(",", $huhs[0])[-1 + sizeof(explode(",", $huhs[0]))])[0]) {
$huhs=explode("youwillneverfindthis", $retv);
}
}
if (($sofar + strlen(urlencode(($retv . $newp)))) < 950 && $jj < 10 && sizeof($huhs) == 1) {
$retv.=$newp;
$retd=",";
$jj++;
}
}
} catch (Exception $exc) { }
}
return $retv;
}
?>

… called later in the code with the new block of code as per …


<?php
$urlis=urldecode($_GET['gmc']); // URL to point at template Google Chart Map Chart call for Country of interest
if (strpos($urlis, ',,') !== false) {
$urlis=str_replace(",,", urlencode($latis . "," . $longis . ","), $urlis);
} else {
$urlis=str_replace(urlencode(",,"), urlencode($latis . "," . $longis . ","), $urlis);
}
if (isset($_GET['ccode'])) {
$urlis=str_replace("&onclick=", "%20" . urlencode(inctycodecheck(urldecode($_GET['ccode']), (strlen($urlis) + 3))) . "&onclick=", $urlis); // appends to the title argument
}

if (isset($_SERVER['HTTPS'])) {
if ($_SERVER['HTTPS'] == "on") {
header("Location: https:" . $urlis);
} else {
header("Location: http:" . $urlis);
}
} else {
header("Location: http:" . $urlis);
}
exit;
?>


Previous relevant Emoji Name Search Map Tutorial is shown below.

Emoji Name Search Map Tutorial

Emoji Name Search Map Tutorial

Yesterday’s posted data Emoji Name Search Posting Tutorial functionality opened the door to “where” web application (software) integration, because the wonderful Wikipedia has compiled Latitude,Longitude co-ordinate pairs for those countries, and that is our foot in the door to place an HTML a link under the Emoji flags, that points to our favourite “where” interfacing tool, the Google Charts Map Chart.

Because the Map Chart and Emoji Flag web application share the same domain we can keep this functionality on this same Emoji Flag webpage in an …

  • HTML iframe element name=gcmi id=gcmi initially invisible … “populated by” …
  • HTML a element target=gcmi href=[URL to Map Chart for Country of Interest] onclick=aoc();

    function aoc() {
    document.getElementById('gmci').style.width='450px';
    document.getElementById('gmci').style.height='450px';
    document.getElementById('gmci').style.display='inline-block';
    }

Another way to zoom around the world online!

You can try the Emoji Flags live run (with underlying world_flags.html changed this way) or the other Emoji functionalities that have this live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its software integration capabilities.


Previous relevant Emoji Name Search Posting Tutorial is shown below.

Emoji Name Search Posting Tutorial

Emoji Name Search Posting Tutorial

Yesterday’s Emoji Name Search Tailoring Tutorial was suitable for data sets of that smaller size able to be handled by the web server limit of URL length. But what if there are too many data items in your data set to be handled by PHP’s $_GET[] array URL ? and & delimited URLs? We, having PHP serverside code at our disposal, can turn to $_POST[] (HTML) method=POST form action=[here’sLookingAtYouKid] scenarios, to get around this issue. The unfortunate side effect of this is that the HTML mailto: a link (email client) method of sharing your Emoji web application relies on that $_GET[] approach, that is, unless you wrote a whole “bespoke” web application to help out, like we do today for our new Emoji “World Flags” web application with this live run, with this HTML and Javascript world_flags.html source code.

That new “supervisor” being a guinea pig idea into the $_POST[] thinking, we add some HTML form element input type=text additions to allow for, out of …

  • Emoji look class … and …
  • Wording next to Emoji … and …
  • URL of Wording’s link, be that substituted or appended

mapped values, optionally, off a newly offered HTML form element input type=text for this mapped comma or blank separated word list.

Perhaps, now, you “long data set thinkers” want to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its data set size capabilities.


Previous relevant Emoji Name Search Tailoring Tutorial is shown below.

Emoji Name Search Tailoring Tutorial

Emoji Name Search Tailoring Tutorial

Information Technology is full of “buzz words”, and am sure you wince at some to all of them yourselves. That’s a bit why am using “Tailoring” rather than …

  • sharing
  • personalization

… to give you a slumberrest from having to look under struck throughdeleted wording to look for hidden “buzz words”terminology that makes your harehair sit upstand watchingon Bugs Bunnyend.

We think, perhaps, that emojis can be important for young “would be” programmers to launch into. Personally wonder how many “would be” programmers give the game up far too soon just because they don’t have those graphics skills, well, with emojis, a lot of that hard work, in miniature, has been done for you by some pretty creative people, so why not enjoy the fruits (chortle, in context, chortle) of their labour and start developing your own web applications to use them. Daily, their use is increasing, as are the sharing of access methods.

In today’s extension to the functionality started with yesterday’s Emoji Name Search Primer Tutorial we separate the Emoji Terra aspects to how it works and allow the user to …

  • supply an Emoji Word List of interest
  • perhaps supply a heading and subheading to describe the “concept” of that list
  • supply either a …
    1. URL prefix … or …
    2. URL with the ~ (tilde) character where you want, substituted, your emoji name

    … to be a navigation destination in that similar new window navigation we used to access Emoji Terra

  • presenting all this in an HTML form action=[here’sLookingAtYouKid] method=GET …
  • that method=GET opening the door to be able to offer an email client engine method to “share”email somebody the link to a screen that looks like the one you’re seeing

Of course, we’d like you to find some of your own such Emoji Display Dynamically Created Web Applications yourself, but to encourage, we, in the web application, today, identified two ideas, namely …

  • Fruit and Vegetables via Wikipedia at https://en.wikipedia.org/wiki/ as a prefix … and …
  • Astrology via Cafe Astrology at https://cafeastrology.com/~dailyhoroscope.html via ~ (tilde) character substitution

… each of which (and any you make will also) feature a link to the HTML mailto: a link out through the email client and to your recipient who can click the email link to “share”compare notes.

Perhaps, now, you want to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its functionality, involving a reveal favourite of ours, the use of HTML(5)’s details (and summary) element.

You can also see this play out at WordPress 4.1.1’s Emoji Name Search Tailoring Tutorial.


Previous relevant Emoji Name Search Primer Tutorial is shown below.

Emoji Name Search Primer Tutorial

Emoji Name Search Primer Tutorial

We got quite excited recently with Rainbow Games PHP Emoji Tutorial when we added a (fourth Beatle) emoji helper, called Emoji Terra, into the mix of tools to gather emoji information. Today, we’ve got a new Emoji Search web application that introduces a new (fifth Beatle(?)) emoji helper tool to add into the “how we see it” mix below …

  • Emojipedia is good for looking up Emoji names or concepts in words
  • FileFormat Information is great for HTML Entity determinations for your less complex Emojis
  • Iemoji is great for HTML Entity determinations for Emojis of all complexities
  • Emoji Terra performs similar functionality as Iemoji but has a permalink organization more friendly to an “emoji search via emoji title” query, and that has suited our purposes today, and before, so, thanks a lot
  • Emoji CSS performs similar functionality to Emojipedia, but has a pictorial view of Emoji names as well, right from the word go, thanks

With these emoji tools in mind we wrote a new PHP web application combining those last two to show Emojis pictorially (with their short name) initially and allow the user to search for an Emoji (match) list via their HTML input type=text (textbox) entry, which results in …

  • the Emoji (match) list look (as an Emoji “display”) … and …
  • an HTML a link which is that Emoji’s short name … linking to …
  • an Emoji Terra webpage with more detail, including HTML Entity information if “short name” is unique, or one extra click away, if not

Maybe you need to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php to download, perhaps?


Previous relevant Rainbow Games PHP Emoji Tutorial is shown below.

Rainbow Games PHP Emoji Tutorial

Rainbow Games PHP Emoji Tutorial

In order to take that further genericization step onto the achievements of yesterday’s Rainbow Games Genericization Tutorial to get onto (the mathematics Induction principle inspired) …

  • prove for the first case
  • prove for the second case
  • prove for the nth case

… we had a choice of …

  • continue on (with) the HTML code creation of new “hardcoded” arrays (managed by Javascript eval abstractional approach) … or “bite the bullet” and …
  • try to work out a generic “emoji lookerer upperer” arrangement

Guess you can tell we opted for the latter, huh?! We started the investigation of this by examining our three favourite emoji informational websites, namely …

  1. Emojipedia
  2. FileFormat Information
  3. Iemoji

… and were a bit surprised that we could not quite swing a generic method to glean the information, so don’t know whether our new “player” is “Ringo Starr” or not, but can tell you this, “its beat is much better than its bite” … chortle, chortle

Emoji Terra performs similar functionality as Iemoji but has a permalink organization more friendly to an “emoji search via emoji title” query, and that suits our purposes today, so, thanks a lot. Without this query by “emoji title” possibility we’d have been forced to adopt more of those “hardcoded” arrays, which would have been alright, but this second approach opens the door to “sport” events in “The Rainbow Games” web application using emojis of the future (ie. they haven’t been invented yet).

How to work the interfacing to Emoji Terra?

This new PHP emoji_lookup.php treats the “prove for the nth case” sports as ones to …

  • look up the emoji information for (in the order “PHP Source File as the Database Source” then try file_get_contents of Emoji Terra lookup), and …
  • read the HTML partner source code live run‘s underlying HTML and Javascript and CSS emoji_walk_animation.htm (which changed in this way)
  • amend that HTML source to supplant the “Sprint” default sport for this new nominated sport … trying not to fall over laughing at some of the new sports we present (inspired by a visit to Emoji Terra search)
  • write out that amended HTML code as the web page (the beauty of a serverside language like PHP)

The more detailed specifics of the file_get_contents of Emoji Terra lookup above are …

  • build up a URL starting with HTTP://emojiterra.com/ … then …
  • in emojiland arrangements there are two genders (as our prefixes if you will) … woman- and man-
  • then add on a “middle” sport descriptor (eg. biking)
  • in emojiland emoticonland arrangements there are five descriptors (as our suffixes if you will) … -dark-skin-tone, -medium-dark-skin-tone, -medium-skin-tone, -medium-light-skin-tone, -light-skin-tone
  • for that set of 2x1x5=10 URLs glean what “HTML dec” (HTML Entity) information you can glean via the file_get_contents call of the Emoji Terra URLs described above (eg. Emoji: Woman Biking: Dark Skin Tone) … built into a Javascript array string to “plug into” the previously read HTML partner source code, and amended to output as the web page the user sees

Sports of the future in emojiland? Just ask for the equivalent of biking (above) off the user via a Javascript prompt window (on the proviso you read Conditional Alternative to Javascript Popup Windows in iOS Tutorial first please).


Previous relevant Rainbow Games Genericization Tutorial is shown below.

Rainbow Games Genericization Tutorial

Rainbow Games Genericization Tutorial

What would help genericize the recent Rainbow Games Double Transformation Tutorial “Rainbow Games” web application? How about introducing another sport?

Again, in honour of “onions of the 4th dimension” approaches, we mainly, turn to the power of Javascript’s eval methodology to achieve this abstracted feeling to our web application. Today, with this, we go two thirds of the way along the “Mathematical Induction” approach …

  • prove for the first case
  • prove for the second case
  • prove for the nth case

How does this use of Javascript eval manifest itself in this way?

  • there are two arrays that work with the “content” of our “Rainbow Games” sport(s) (well, at least, the first “sprint running” sport) called emoticons[] and choices[]
  • wherever we find references in the code to either of these two arrays we start to involve the global variable verbsuffix

    var verb='Sprint';
    var verbs=['Sprint','Row'];
    var anotherverb='run';
    var verbsuffix='';

    … in altered ways like …

    function plus(ih,ihep) {
    var outihep=ihep;
    if (eval("emoticons" + verbsuffix + "[" + ih + "]").indexOf('<p>') != -1) {
    outihep += ' (' + eval("emoticons" + verbsuffix + "[" + ih + "]").split('<p>')[1].split('<')[0] + ')';
    }
    return outihep;
    }

    … in that abstracted way … noting that sometimes you don’t need the “eval()” encasings …
  • and so, working through the code this way it just falls to the coder to define new members for all the arrays for all the new sports (ours is “rowing” today), some of those new arrays (like for rowing are emoticonsrowing[] and choicesrowing[]) to involve …
  • looking up emoji definitions from …
    1. Emojipedia
    2. FileFormat Information
    3. Iemoji

    … not forgetting to …

  • make sure the event logics work for multiple sport scenarios … but mostly they do by sticking to the principles above … especially for the …
  • new HTML select (dropdown) element allows the user to pick a sport

Remaining a work in progress, you can try out our live run link that has underlying HTML and Javascript and CSS emoji_walk_animation.htm, and which changed in this way regarding today’s genericization work. We hope it gives you food for thought.


Previous relevant Rainbow Games Double Transformation Tutorial is shown below.

Rainbow Games Double Transformation Tutorial

Rainbow Games Double Transformation Tutorial

We were on the “road to personalization” for the web application game we started with yesterday’s Rainbow Games Primer Tutorial when “an old chestnut” came up again. It’s happened before, the desire to “double transform” in CSS came about from our emoji …

🏃🏾‍♀️

… table cell mirroring styling as per …


<style>
* { overflow-x: visible; }

select { font-size: 36px; }

td.runner { width: 50px; word-wrap: break-word; font-size: 36px;
transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform: scale(-1, 1);
} //

🏃🏾‍♀️

tr { max-height: 40px; }
</style>

… necessary to make our running emojis run from left to right (that, alas, also transformed any accompanying …

🏃🏾‍♀️

Florence

… name), was added to in this double transformational clause to prove what this wonderful web page advice had to say. In other words, a “double transform” CSS styling scenario like the one below …


<style>
* { overflow-x: visible; }

select { font-size: 36px; }

td.runner { width: 50px; word-wrap: break-word; font-size: 36px;
transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform: scale(-1, 1);
}
tr { max-height: 40px; }

p {
display: block;
font-size: 12px;
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
-o-transform: matrix(-1, 0, 0, 1, 0, 0);
transform: matrix(-1, 0, 0, 1, 0, 0);
}
//

🏃🏾‍♀️

Florence

</style>

… works as a “double transform” to first …

  • mirror (image) flip the table cell (td) emoji data … but us appending some “Runner Name” textual data underneath also, annoyingly, got flipped until …
  • within that (same) table cell (td) element and after the emoji data we append an HTML p(aragraph) element to both …
    1. introduce a new HTML element type into the (CSS styling) mix … and to …
    2. introduce a new CSS transformation type, the matrix … perhaps either or both new parts to the problem critical to its success when, believe me, lots of other approaches don’t work

… to personalize the “runners” and “users”, optionally, “into the game”, by allowing the “user” to name their “runners” and allow for a “runner energy” setting be a bit randomized, to add for some other interest “variety” to the game’s workings. So, still a work in progress that you can try out at our live run link that has underlying HTML and Javascript and CSS emoji_walk_animation.html, and which changed in this way regarding today’s work.


Previous relevant Rainbow Games Primer Tutorial is shown below.

Interesting Places Primer Tutorial

Rainbow Games Primer Tutorial

It’s been a while since we’ve written any conventional HTML and Javascript and CSS game. Today’s game uses the “emoticon” section of the Emoji character set, defaulting so far, to the “running woman” emoji featuring in Compound Emoji WordPress Usage Tutorial.

It’s the early days of our “Rainbow Games” web application, and we’re starting with the animation featuring horizontal hashtag navigation techniques for a running race start to our game. Where it finishes? Hard to say! Today, we’ve looked at “splits” and a finish line.

You can try out our burgeoning live run game concept link that has underlying HTML and Javascript and CSS emoji_walk_animation.html.

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.


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 Ajax, eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Google Chart Generic Background Image Outliers Tutorial

Google Chart Generic Background Image Outliers Tutorial

Google Chart Generic Background Image Outliers Tutorial

Further to yesterday’s Google Chart Generic Background Image Mobile Tutorial‘s background image functionality for our inhouse Google Charts interfacing PHP web applications, it’s the non-generic outliers

… we needed to merge in the relevant smarts of the changed generic Javascript into …

As well, before that, into the generic code, we made some styling improvements to hide some unnecessary elements for mobile platform usage, and improved form sizing to reduce the need for scrolling, as well as email and SMS conduit logic improvements. We hope you enjoy trying out some of these PHP web applications with background images of your choosing.


Previous relevant Google Chart Generic Background Image Mobile Tutorial is shown below.

Google Chart Generic Background Image Mobile Tutorial

Google Chart Generic Background Image Mobile Tutorial

We’re almost there amalgamating the new Google Chart interfacing web application background imaging functionality further to the day before yesterday’s Google Chart Generic Background Image Collaboration Tutorial. Today’s part of the puzzle was dealing with …

  • mobile platform window.prompt overridings for non Pie Chart Google Chart participants … to join …
  • non-mobile platform window.prompt overridings for non Pie Chart Google Chart participants

… that we’d been limiting our scope to up until today. On mobile platforms we arrange for an overlaying HTML form to override the window.prompt, meaning webpage calls differ for each question asked of the user. This asks for quite a difference architecture to our coding requirements.

For this work, then it involves changed Javascript


function postlhway() {
var foundu='';
var prefoundu='';
if (bimode == -1) {
if (document.getElementById('bkcol')) {
if (('' + document.getElementById('bkcol').style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.getElementById('bkcol').style.backgroundImage).split('(')[eval(-1 + ('' + document.getElementById('bkcol').style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
}
}
if (bimode == -1) {
if (('' + document.body.style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.body.style.backgroundImage).split('(')[eval(-1 + ('' + document.body.style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.body.innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> #bkcol { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
}
}
}
if (foundu != '') {
if (document.getElementById('remail')) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('bi=')) == -1) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1 && document.getElementById('remail').href.indexOf(encodeURIComponent('&')) != -1) {
if (3 == 3) {
document.getElementById('remail').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu);
}
} else {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
}
} else if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1) {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
} else {
document.getElementById('remail').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
}
}
}
}
}
}

function saveprompt() {
if (document.getElementById('prompt')) {
titlezwords=document.getElementById('prompt').value;
titleywords=document.getElementById(titleid).value;
setTimeout(function(){
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
}
}, 2000);
}
}

function whiletitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(whiletitlethere, 2000);
}
}

function wtitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(wtitlethere, 2000);
}
}

function lhway() {
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='.';
var thisansis='';
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
thisansis=' ' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi= ')[1].split('#')[0].split('&')[0];
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
thisansis='' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi=')[1].split('#')[0].split('&')[0];
}
//alert('thisansis=' + thisansis);
if (thisansis.replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1) {
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd].replace(/\%3F/g,'?').replace(/\%26/g,'&');
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
setTimeout(function(){ document.getElementById('chart_div').style.opacity='0.8'; }, 4000);
} else if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//alert('modespace=#' + modespace + '# and thisansis=#' + thisansis + '# and outofansgoes=#' + outofansgoes + '#' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= '));
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
setInterval(postlhway, 3000);
}

if (document.URL.indexOf('nojwin') == -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}

if (document.URL.indexOf('nojwin') == -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (ztis != -1) {
if (thisansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
thisansis=thisansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (thisansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + thisansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + thisansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}
} else if (document.URL.indexOf('nojwin') != -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {

if (('' + location.search).indexOf('&val1=') != -1) {
console.log('document.URL=' + document.URL);
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('parent.title=' + parent.title);
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.replace('//picsum.photos/600/400/?random=','');
console.log('Parent.title=' + parent.title);
parent.location.href=document.URL.replace(encodeURIComponent(encodeURIComponent('//picsum.photos/600/400/?random=')),'');
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('title=' + title);
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
//title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
title=title.replace('//picsum.photos/600/400/?random=','');
console.log('Title=' + title);
}
} catch(hgrh) { }
}

var prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (document.getElementById('val1')) {
document.getElementById('val1').onblur=function(evt){
//document.getElementById('OK').disable=true;
console.log('at onblur');
ansis='' + evt.target.value;
console.log('at onblur ansis=' + ansis + ' ztis=' + ztis);
oansis=ansis;
console.log('aT onblur ansis=' + ansis + ' ztis=' + ztis);
// Start of new mobile ...
if (ztis != -1 || 1 == 1) {
console.log('AT onblur ansis=' + ansis + ' ztis=' + ztis);
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
console.log('at onBlur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onBLur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
console.log('at onbluR ansis=' + ansis + ' ztis=' + ztis);
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubFor=' + datetosubfor);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfoR=' + datetosubfor);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onblur ansIs=' + ansis + ' datetosubfoR=' + datetosubfor);
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
console.log('at onblur ansIS=' + ansis + ' datetosubfoR=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
console.log('at onblur Ansis=' + ansis + ' Ztis=' + ztis);
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
console.log('at onblur Ansis=' + ansis + ' ZTis=' + ztis + ' outofansgoes=' + outofansgoes);
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
console.log('at onblur again ansis=' + ansis);
ansis=ansis.replace(outofansgoes, '');
console.log('at onblur again after replace ansis=' + ansis);
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
console.log('at onblur again after replace new');
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('Here ' + newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
console.log('at onblur again after replace not new');
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('here ' + outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
console.log('at onblur open');
gxhr.open('post', '/PHP/csv.php', true);
console.log('at onblur send');
gxhr.send(gform);
console.log('at onblur sent');
}
}
if (ansis != oansis) { gansis=ansis; console.log('gansis=' + gansis); evt.target.value=ansis; document.getElementById('hval1').value=encodeURIComponent(ansis); console.log('safariform is ' + document.getElementById('safariform').outerHTML); setTimeout(function(){ document.getElementById('val1').value=gansis; if (1 == 2) { document.getElementById('OK').disable=false; document.getElementById('OK').click(); } }, 5000); return true; }
// End of new mobile ...
return true;
};
}
if (ztis != -1) {
dotis='.';
moneis=zwis;
if (document.URL.indexOf('&') == -1) {
//setTimeout(function() {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
//}, 5000);
}
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}

var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (('' + location.search).indexOf('&val1=') != -1) {
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
} catch(hgrh) { }
}

titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
//if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//setTimeout(wtitlethere, 1000);
//}
if (45 == 67) {
//if (4 == 44) {
//setTimeout(wtitlethere, 1000);
//} else {
if (zwords.toLowerCase().indexOf(' title ') != -999 && titlezwords.replace(' ',' ') == ' ') {
if (titlezwords.replace(' ',' ') == ' ') { setTimeout(whiletitlethere, 1000); }
titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
} else { //if (zwords.toLowerCase().indexOf(' title ') == -1) {
titlezwords=' ';
titleywords='';
}
//}
}
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
//document.title='' + vok;
//ansis=document.getElementById('val' + pnum).value;
//document.title='Ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum <= 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
ansis=ansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
if (zwords.split(String.fromCharCode(10)).length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split(String.fromCharCode(10)).length;
} else if (zwords.split('<br>').length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split('<br>').length;
}
document.getElementById('val' + pnum).focus();
ansis='';
if (document.URL.indexOf('val' + eval(-1 + pnum) + '=') != -1) {
ansis=decodeURIComponent(decodeURIComponent(document.URL.split('val' + eval(-1 + pnum) + '=')[1].split('&')[0]));
}
//document.title='ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum == 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
if (eval('' + datetosubfor) < 20110314) {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
twoway=ansis;
if (document.getElementById('safariform')) {
document.title='no';
} else {
document.title='' + document.getElementById('safariform').innerHTML.length;
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
twoway=ansis;
}
}
}
//document.title='ztIs=' + ztis + ' and ansis=' + ansis;
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
//document.title='ztIS=' + ztis + ' and ansis=' + ansis;
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//oneway=ansis;
ansis=ansis.replace(outofansgoes, '');
twoway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(outofansgoes, '').replace(/^\ /g,'').replace(/^\ /g,'');
if (document.getElementById('val' + pnum))
// document.title+=' zTIS=' + ztis + ' and ansis=' + ansis + ' outofansgoes=' + outofansgoes;
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
var alert = function(zwords){
var defwords='';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('Cancel').style.display='none';
document.getElementById('bCancel').style.display='none';
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}
var confirm = function(zwords){
//alert('val' + pnum + '=? ' + ' pnum=' + pnum + ' xpnum=' + xpnum + ' ' + document.URL);
var defwords='1trueYesOK';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
//alert('vok=' + vok);
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '1trueYesOK';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}

function bicheck() {
if (document.URL.indexOf('nojwin=') != -1) {
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/gctidy.html"></iframe>';
}
if (('' + document.URL + decodeURIComponent('' + location.hash)).indexOf('title=') != -1 || 1 == 1) {
setTimeout(function(){
var prebits='';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
prebits='ammb=y&';
if (document.getElementById('bitsatend')) {
if (!document.getElementById('remail')) {
//document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email 📧</a> <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS 📟</a><br>';
document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email</a><br>'; //' <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS</a><br>';
}
}
}
//document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/PHP/csv.php?' + prebits + 'outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}, 2000);
}
}

setTimeout(ggmuchlater, 7000);

setTimeout(gmuchlater, 1000);
setTimeout(gcinit, 2000);
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
lhway();
bicheck();
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
lhway();
bicheck();
} else {
setTimeout(bicheck, 5000);
setTimeout(lhway, 5000);
}
setInterval(postlhway, 3000);

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
} else {
$opcd=" #chart_div { opacity: 0.8 !important; } ";
}

file_put_contents('xaz.xaz', $dus);
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuteerer, huh?!


Previous relevant Google Chart Generic Background Image Collaboration Tutorial is shown below.

Google Chart Generic Background Image Context Tutorial

Google Chart Generic Background Image Collaboration Tutorial

We’ve fallen into an obsession with “c” words, and we apologize. Today’s “collaboration” came after yesterday’s Google Chart Generic Background Image Context Tutorial‘s “context” and before that “code”. What do we make of it?

Well?!


Thanks for the insights!

We are not robots here at RJM Programming, but believe it or not, having three acrostically identical tutorial titles in a row causes us more consternation than usual (Nala’s practically apoplectic), even beyond those butterflies in Brazil crossing the equator and affected by the Coriolis Effect. Anyway …

We have spent a day on email and SMS (conduit) sharing and collaboration means by which our non-mobile (only, so far) web users of the unaccounted for (after that Google Chart Pie Chart Background Image Tutorial inspiration from some time ago) Google Chart interfacing web applications can communicate. That work wasn’t as hard as we thought it would be, given the relief of location.hash hashtag URL methodologies whereby there is less worry about URL lengths regarding “a” link href “mailto:” and/or “sms:” sharing functionalities, so the mind must have wandered into the realms of …

What can an image “reference” (easily be)?

The usual suspects came to mind …

  • relative URL that ends with the extension of the image file … eg. /PHP/seven.jpg
  • absolute URL that ends with the extension of the image file … eg. https://www.rjmprogramming.com.au/PHP/six.jpg
  • data URI … base64 … eg. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAEX0lEQVQ4jUWUyW6cVRCFv7r3/kO3u912nNgZgESAAgGBCJgFgxhW7FkgxAbxMLwBEmIRITbsQAgxCEUiSIBAYIY4g1EmYjuDp457+Lv7n+4tFjbwAHVOnVPnlLz75ht67OhhZg/M0p6d5tD9C8SNBBs5XBJhI4uNLC4SREA0UI9yJr2c4e6QO+v3WF27w+rmNrv9Pm7hxDyHFg5yYGEOYxytuRY2SYiSCIwgRgBQIxgjEAKuZWg6R9S0SCS4qKLZElY3HC5tp7QPtmlMN7HOETUTXBJjrEGsAfgPFECsQbBIbDGJZUYgGE8ugQyPm+o0STtTuGZMnKZEjRjjLIgAirEOEQEBDQFBEFFEBWLFtVJmpENRl6hUuFanTRAlbTeZarcx0R6YNZagAdD/t5N9+QgCYAw2jrAhpjM3zaSY4OJGTDrVwEYOYw2qioigoviq5MqF31m9fg1V5fCx+zn11CLNVnufRhBrsVFE1Ihpthu4KDYYwz5YQIxFBG7duMZnH31IqHL6wwnGCLFd4pez3/DaG2/x4GNPgBhEZG/GGlxkMVFkiNMYay3Inqxed4eP33uf7Y0uu90xWkGolFAru7sZn5w5w921m3u+su8vinEO02hEWLN/ANnL2rkvv2an2yd4SCKLM0JVBsCgAYZZzrnPP0eDRzXgfaCuPHXwuEYjRgmIBlQVVLl8/hKI4fRzz3L6uWe5+PMvnHz6aa4uX+D4yYe5vXaLH86eoyoLjLF476l9oKo9pi5HWONRX8E+YznOef7Vl1h86QWurlwjbc+QpikPPfoIcZLS39pmMikp8pzae6q6oqgriqrGqS+xeLScoMYSVJlfOMTl5RXW1+5w5fJVnFGWf1/mxEMnWPppiclkTLM5RdJoUBYFZVlQ5DnZMMMV167gixKLoXXsKGqnOHnqOJ/+/CfZ+XUiZ0jTmFv5mAvf/YjEliQ2vPD8Ir6qqEcZkzt38cMRo5WruFvfL9FqpyRxQhj0qLOax5I2S08+Tu/lFiGUGOPormxwuyfMnjrGrJa88uIixeYWl776lmrzNjmw8vcG8sU7ixpHMXFsCUVg9tABjEvRgzP82j7AhbyiX5Qcv2+Bvy7dYGZ1k7efeQB/Y4PBqGBtdYvb3SFzLcfqToZc/OB1zYeBSpUwLBlvjZidmWaSB1yaYOfn6LqI/r0hyU6P+cRSlhXjbEI2zvnt7y79oqQ3qeg4g6vKjCIXehtDmi6m0UnxVnCRkPUHVNt9qkLJxgXOCYNOg34v48raPaamU2o89/KKsQ9sTSpc0JK7NwdcX8s43Ek5cnSOLC/Z2R6Rj0ra0w2W1/t0xyWn51uk2Ri1QtSO6OU5d7OSi72cQeWxKG7p/Dp//JXTy6C1Pcbc6DMpPRtjTxChEznWhwVZUCKrjCrPoPDczHLmnLBdBgZlRRWUEBR3ZKrme5TlrTGlV440Y1IrXM9qQGi6mkG5V6uza7tUIeCDElTZ1L26elX+fcH/ACJBPYTJ4X8tAAAAAElFTkSuQmCC

  • data URI … utf8 … svg+xml … eg. data:image/svg+xml;utf8,<svg xmlns=’http://www.w3.org/2000/svg’ width=’66’ height=’48’ viewport=’0 0 100 100′ style=’border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:17px;’><text y=’80%’>Alt\\01f3d5</text></svg>

… but then, when at the other end of a navigation the receiver is a serverside language like PHP, that webpage can establish via it’s header function an image (Content Type) outputting modus operandi, like …

<?php

header('Content-Type: image/jpeg');

?>

… and output image data via URL calls that do not have to “end with the extension of any image file”. Our WordPress blog’s TwentyTen theme’s 404.php is capable of this with URLs such as …


https://www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=20221116&random=4575657

… and the other one we’ve had fun with in the past is the great random Lorem Picsum image creating resource accessible via URLs such as …


https://picsum.photos/600/400/

As you might imagine, we wanted to get these two ideas into the mix, especially as it was nagging away at us that the user interaction to make any of this work happen is asking a lot of the web user out there, but to involve more (potentially, later, mobile) users to get interested we can now


zwords+=' ... body background image data URIs, delimited by space or , or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum, thanks) ';

For today’s work, though it involves changed Javascript


function postlhway() {
var foundu='';
var prefoundu='';
if (bimode == -1) {
if (document.getElementById('bkcol')) {
if (('' + document.getElementById('bkcol').style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.getElementById('bkcol').style.backgroundImage).split('(')[eval(-1 + ('' + document.getElementById('bkcol').style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
}
}
if (bimode == -1) {
if (('' + document.body.style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.body.style.backgroundImage).split('(')[eval(-1 + ('' + document.body.style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
} else if (document.body.innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
}
}
}
if (foundu != '') {
if (document.getElementById('remail')) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('bi=')) == -1) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1 && document.getElementById('remail').href.indexOf(encodeURIComponent('&')) != -1) {
if (3 == 3) {
document.getElementById('remail').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu);
}
} else {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
}
} else if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1) {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
} else {
document.getElementById('remail').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
}
}
}
}
}
}

function lhway() {
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='.';
var thisansis='';
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
thisansis=' ' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi= ')[1].split('#')[0].split('&')[0];
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
thisansis='' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi=')[1].split('#')[0].split('&')[0];
}
//alert('thisansis=' + thisansis);
if (thisansis.replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd].replace(/\%3F/g,'?').replace(/\%26/g,'&');
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
setTimeout(function(){ document.getElementById('chart_div').style.opacity='0.8'; }, 4000);
} else if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//alert('modespace=#' + modespace + '# and thisansis=#' + thisansis + '# and outofansgoes=#' + outofansgoes + '#' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= '));
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
setInterval(postlhway, 3000);
}

if (document.URL.indexOf('nojwin') == -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum, thanks) ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (ztis != -1) {
if (thisansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + Math.floor(Math.random() * 19896754));
} else {
thisansis=thisansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (thisansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + Math.floor(Math.random() * 19896754));
}
}
}
if ((fauxv + thisansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + thisansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + decodeURIComponent('' + location.hash)).indexOf('title=') != -1 || 1 == 1) {
setTimeout(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (document.getElementById('bitsatend')) {
if (!document.getElementById('remail')) {
//document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email 📧</a> <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS 📟</a><br>';
document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email</a><br>'; //' <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS</a><br>';
}
}
}
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}, 2000);
}
}

if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
lhway();
bicheck();
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
lhway();
bicheck();
} else {
setTimeout(bicheck, 5000);
setTimeout(lhway, 5000);
}

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
} else {
$opcd=" #chart_div { opacity: 0.8 !important; } ";
}

file_put_contents('xaz.xaz', $dus);
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuteer, huh?!


Previous relevant Google Chart Generic Background Image Context Tutorial is shown below.

Google Chart Generic Background Image Context Tutorial

Google Chart Generic Background Image Context Tutorial

Here, today, further to yesterday’s Google Chart Generic Background Image Code Tutorial, we are referring to …

  • context … or …
  • guise

again. Well it could be …

  • like when you buy a particular brand of something and then start seeing it everywhere … or …
  • because we like the word “againagain … or …
  • because whenever you revisit a piece of any code it doesn’t take long to appreciate where it could be improved … and we like this one … so …

… we’ll leave it at that. Actually, that last one makes sense, because we realized testing the workings of that Google Chart Pie Chart Background Image Tutorial inspiration for this current project extension, it had a great feature that hadn’t occurred to us yesterday (and we want to allow for) …

  • today, using the background imagery behind the Google Chart and have it be background-repeat:repeat; … the user makes happen by prefixing their background image information by a space character, whereas …
  • yesterday’s use of the background imagery behind the document body and have it be background-size:cover; is perfectly valid too

… making for a better end result set. But there’s more. We’ll be easing out the previous modus operandi in favour of this recent modus operandi over time, we’re thinking, but not before we have a day? looking into sharing functionality that might allow the user to share that Google Chart and its background image arrangements with an email recipient.

For today’s work, though it involves changed Javascript


const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + location.hash).indexOf('title=') != -1) {
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}
}

setTimeout(bicheck, 5000);

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
}

if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=trim($dus);
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; " . $opcd . " }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; " . $opcd . " }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuter, huh?!

Did you know?

Can an animated GIF set as the background image still be animated?

Yes. But please do not make it too boring. Can we suggest …

?


Previous relevant Google Chart Generic Background Image Code Tutorial is shown below.

Google Chart Generic Background Image Code Tutorial

Google Chart Generic Background Image Code Tutorial

We were interested in a URL we detected being accessed, via our cPanel Apache Status report linking us to Google Chart Pie Chart Background Image Tutorial. Investigating this Google Charts interfacing PHP code means by which to allow for the user specification of background images, in the case of a Pie Chart, we realized some interfacings had been coded for this functionality, but not others.

But don’t we …

  1. have an external Javascript gchartgen.js to turn to …
  2. and a require PHP csv.php we could lean on

? Yes, indeed, and we decided to …

  1. have an external Javascript gchartgen.js to turn to …
  2. and a require PHP csv.php we could lean on
  1. for non-mobile (so far) we could override the window.prompt and check and setup
  2. internal use only recording on user interest in a web server flat file

involving changed Javascript


const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + location.hash).indexOf('title=') != -1) {
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}
}

setTimeout(bicheck, 5000);

and changed PHP

<?php

function ifspacy($dus, $squotethere) {
global $hdrstuff;
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=str_replace('https:','',str_replace('http:','',$dus));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
$filebicont=str_replace(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' parent.document.body.style.backgroundSize=\"cover\"; " . $secidea . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(" . $ify . ")\"; parent.document.body.style.backgroundSize=\"cover\"; " . $secidea . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " ><p> parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL('" . $ify . "')\"; </p></body></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " parent.document.body.style.backgroundSize=\"cover\"; '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(" . $ify . ")\"; parent.document.body.style.backgroundSize=\"cover\"; '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body><p> parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; </p></body></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cute, huh?!


Previous relevant Google Chart Pie Chart Background Image Tutorial is shown below.

Google Chart Pie Chart Background Image Tutorial

Google Chart Pie Chart Background Image Tutorial

We have another potential use for the clipboard, adding onto the recent Google Pie Chart via Clipboard Co-ordinates Tutorial data set usage, today. We allow the user to change the default white background to the Google Chart Pie Chart be tailored to be either …

  • image URL … or …
  • image data URI (most likely entered via the clipboard)

… as a prefixing option when they enter in the Title of their Pie Chart.

In order to achieve this, we were helped enormously by …

  • this very useful link, thanks … the crux of it being to get to put …

    backgroundColor: 'none'

    … into the Pie Chart options … and some previous help we got when we presented …
  • Column Intelligence Primer Tutorial‘s “Did you know?” section reference to incredibly useful link‘s advice on our …

    wish to apply opacity just to background image, but not the corresponding textual data (or other types) that is the primary content of that HTML element

You can see a video of some of the practicalities to usage on an iPad mobile app version in the YouTube video below …

Because data URIs are an option here, too, you will see in the code changes to pie_chart.php the need, now, to cater for the switch of HTML form navigation from …

  • method=GET (the default) … to …
  • method=POST (when the URL becomes too long)

… and that new bit of logic is slated home to the generic external Javascript we have set aside for Google Charts work called gchartgen.js which changed for this work, in this way.

Maybe you can see how to use this feature yourself, and if that is the case you can try this live run link.


Previous relevant Google Pie Chart via Clipboard Co-ordinates Tutorial is shown below.

Google Pie Chart via Clipboard Co-ordinates Tutorial

Google Pie Chart via Clipboard Co-ordinates Tutorial

Yesterday’s Google Map Chart via Clipboard Co-ordinates Tutorial was a good precursor to today’s work interfacing this time to the Google Chart Pie Chart.

With this work, we’ve started refining the clipboard “smarts” by looking for linefeeds … in Javascript thoughts …


String.fromCharCode(10)

… and as the data exits the Javascript prompt window on its way, before navigating back to the PHP itself, we can check for too many fields to the right of the data, and truncate the clipboard data, as necessary. Along the way, we may be able to reject any header records with this same approach. We can check for no numerical fields here. Business specific logic can be applied here too. With a Pie Chart, the original data, or the user, may be tempted to place “%” after the numerical data, and we can take the opportunity to weed these out. Also, with the character data, it may be delimited by a double quote (ie. within “”), and with this knowledge in mind, we may be able to weed out confusing additional commas that could confuse us with the clipboard comma separated value format of the data.

The lesson here, is to “validate early” and it could be good to “validate often” as well. Real data can be strange indeed.


function dlp(thisris) {
if (thisris != null) {
var commacount=thisris.toLowerCase().replace(/\<\/td\>/g,' , ').indexOf(',');
if (thisris.toLowerCase().replace('https:','http:').indexOf('http:') == 0) {
fti=true;
allowed=true;
datac=thisris;
} else if (commacount >= 0) {
var thatris=thisris.replace(/\ \"/g,String.fromCharCode(10) + '"').replace(/\<tr\>/g,'').replace(/\<\/td\>\<td\>/g,',').replace(/\<\/tr\>/g,String.fromCharCode(10)).replace(/\<\/td\>/g,',').replace(/\,\,/g,',').replace(/\,\,/g,',').replace(',' + String.fromCharCode(10),String.fromCharCode(10));
var zisok=true, fldq=thatris.split(',');
var pielines=thatris.split(String.fromCharCode(10));
if ((fldq[0].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[0].replace('"','').trim() + ' ').substring(0,1) > '9') {
if ((fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) > '9') {
zisok=false;
}
}
if (!zisok && pielines.length > 1) {
fldq=pielines[1].split(',');
zisok=true;
if ((fldq[0].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[0].replace('"','').trim() + ' ').substring(0,1) > '9') {
if ((fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) > '9') {
zisok=false;
}
}
}
if (zisok) {
while (thatris.indexOf(String.fromCharCode(10)) != -1) {
var inpies, pied='';
thatris='';
var sthatris='';
for (var ipie=0; ipie<pielines.length; ipie++) {
inpies=pielines[ipie].split(',');
if (inpies.length > 1) {
if ((inpies[0].trim() + " ").substring(0,1) == '"' && (inpies[1].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','') + ',' + inpies[1].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','');
} else if ((inpies[0].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','') + ',' + inpies[1].trim().replace('%','').replace('"','');
} else if ((inpies[1].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().replace('%','') + ',' + inpies[1].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','');
} else {
sthatris=pied + inpies[0].trim().replace('%','') + ',' + inpies[1].trim().replace('%','').replace('"','');
}
inpies=sthatris.replace(pied,'').split(',');
if (((inpies[0].trim() + " ").substring(0,1) >= '0' && (inpies[0].trim() + " ").substring(0,1) <= '9') || ((inpies[1].trim() + " ").substring(0,1) >= '0' && (inpies[1].trim() + " ").substring(0,1) <= '9')) {
thatris+=sthatris;
pied=',';
}
}
}
}
thatris=thatris.replace(/\,\,/g,',');
fti=true;
allowed=true;
datac='http;' + thatris;
thisris='http;' + thatris;
}
}
}
return thisris;
}

Our PHP Google Chart Pie Chart interface is pie_chart.php changed this way for today’s work, that you can try yourself at this live run link.

Our PHP helper csv.php changed this way for today’s work.

If you want to recreate the conditions as shown in today’s tutorial picture

  1. copy the contents below …

  2. and paste into the 4th prompt (window’s text) box of the Google Charts Pie Chart interfacing live run link
  3. click OK button … P.S. On first prompt, appending &onclick=y to what you want as a Pie Chart title will work the Pie Chart’s select event logic we harness with this interfacing
  4. … or, if you are feeling lazy …
    https://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php?title=Country%20Populations&onclick=y&task=Country&desc=Populations&data=,%20[~https;China,1347000000,India,1241000000,United%20States,312000000,Indonesia,238000000,Brazil,197000000,Pakistan,177000000,Nigeria,162000000,Bangladesh,151000000,Russia,143000000,Japan,128000000,Mexico,115000000,Philippines,96000000,Vietnam,88000000,Ethiopia,87000000,Germany,81800000,Egypt,82600000,Iran,78000000,Turkey,74000000,Thailand,69500000,Congo,67800000,France,63300000,United%20Kingdom,62700000,Italy,60800000~,100]

Previous relevant Google Map Chart via Clipboard Co-ordinates Tutorial is shown below.

Google Map Chart via Clipboard Co-ordinates Tutorial

Google Map Chart via Clipboard Co-ordinates Tutorial

Yesterday’s Google Map Chart via URL Co-ordinates Tutorial added functionality directed towards a …

  • secondary data source, that you access … but today we are going to extend that functionality to support a …
  • primary data source that you enter a comma separated values list for the [place,lat,long] data sets (yourself, via the computer keyboard) … as well as a …
  • “subset” of a secondary data source, that you access, more than likely, using you computer device’s clipboard

The invention of the clipboard was a brilliant step. Before it, we were so beholden to programmers to get tailored work done, and though it’s sad that so many of you get on without us (cough, cough) … well … we were being overworked anyway … and there was that project to “make the morning breakfast coffee before you even know you wanted it” to get onto … finally.

Perhaps we all forget now what the clipboard has meant, for so many of us. It is the freedom of “copy and paste”, the individualism tool of content creation.

Yesterday’s functionality idea is a case in point. “Secondary data sources” are, by definition, out of your control, as to what the content of a web page is. Notice how, yesterday, we made some content that was (s)ftp transferred over to the rjmprogramming.com.au domain via … yes, you guessed it …

  1. me copying (off the mapbox.com website, thanks, as part of the contents of a webpage) … then …
  2. pasting that content into a csv text file on the MacBook Pro computer we’re using (locally) … and then …
  3. (s)ftp transferred over to rjmprogramming.com.au domain to represent a …
  4. URL usable within the functionality of our Google Chart Map Chart interface we host here as the PHP map.php‘s live run link

But there you are, an intelligent human, able to determine for yourself the data you are interested in (quite often not the entire contents of a webpage, as yesterday’s work is ideally asking for), so that being the case, the map.php modifications to PHP code we’ve made today, make it possible for (the much simpler) …

  1. me copying (off the mapbox.com website, thanks, as part of the contents of a webpage) … then …
  2. pasting that content within the functionality of our Google Chart Map Chart interface we host here as the PHP map.php‘s live run link

If you have the clipboard as your friend, your time around computers becomes so much more enjoyable, and flexible, and within your control. We, as programmers, need to think, on occasions, or encourage, on occasions, how the user is likely to use the clipboard, in conjunction with our applications. As you might surmise, that can be a pretty unpredictable “artform”.

Our PHP helper csv.php changed this way for today’s work.


Previous relevant Google Map Chart via URL Co-ordinates Tutorial is shown below.

Google Map Chart via URL Co-ordinates Tutorial

Google Map Chart via URL Co-ordinates Tutorial

The last blog posting referring to the Google Chart Map Chart interface we host here was with Emoji Name Search Map Chart Weather Tutorial, but today we are presenting a major functionality addition with implications for other Google Chart interfacing PHP codesets here. We are allowing the user at the second prompt to take the data from a URL data source containing CSV (comma separated values) place,latitude,longitude data or those three fields in an HTML table element contents perhaps.

We’ve added the ability to “map” (tee hee) …


HTTP://www.rjmprogramming.com.au/PHP/Map/map.php?title=Where%20We%20Are&onclick=y&label=['Lat',&value='Lon',%20'Name']&data=,%20[-33.90743410270099,151.17646964910696,~Parent1~]%20,%20[-33.907440603083124,151.1764659419197,~Parent2~]

… from a CSV data URL look with contents …


-33.907434102700991,151.17646964910696,Parent1
-33.907440603083124,151.17646594191973,Parent2

… that if placed at rjmprogramming.com.au’s Document Root and called parent.csv then a URL of …


HTTP://www.rjmprogramming.com.au/PHP/Map/map.php?title=Where%20We%20Are&onclick=y&label=['Lat',&value='Lon',%20'Name']&data=,%20[0.00000001,0.0000000,~HTTP://rjmprogramming.com.au/parent.csv~]

… could be a shortcut to that first URL same look. You can see another example using data from mapbox.com, thanks, show the scenario our tutorial picture illustrates.

The way this “mapping” (tee hee, tee hee) of URLs can happen is that the PHP supervisor map.php (changed this way and which you can try with this live run link) “includes” (ie. calls) …


include "../csv.php";

… a (now bigger, and more functional) csv.php (changed this way) does its best to handle a few looks to the CSV or tabular data, with code to allow for …

  • CSV data ordered place,latitude(decimal),longitude(decimal) or latitude(decimal),longitude(decimal),place or place,longitude(decimal),latitude(decimal) or longitude(decimal),latitude(decimal),place
  • CSV data ordered place,latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs) or latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs),place or place,longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs) or longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs),place
  • HTML tabular data ordered place,latitude(decimal),longitude(decimal) or latitude(decimal),longitude(decimal),place or place,longitude(decimal),latitude(decimal) or longitude(decimal),latitude(decimal),place
  • HTML tabular data ordered place,latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs) or latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs),place or place,longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs) or longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs),place

Previous relevant Emoji Name Search Map Chart Weather Tutorial is shown below.

Emoji Name Search Map Chart Weather Tutorial

Emoji Name Search Map Chart Weather Tutorial

If you’ve been studying the code of our hierarchy for our Emoji Flags of the World web application …

… am sure you’ll have noticed how bottom heavy it is on the “child” as far as functionality goes. What we like to call “the hard working duck syndrome”. Partly, that is because we see the Google Charts Map Chart interface we have as being a very useful “meeting point” with interfacing web applications tending towards the “where” of life.

Today’s job, extending yesterday’s Emoji Name Search Map Chart Tutorial is to add Map Chart interfacing to the great Weather Underground and its great API service for autocomplete name searches for weather (and hurricane) information … thanks.

The changes are again just to that “hard working duck” Map Chart interface “child” web application, as for yesterday’s work. We were very keen to do this, especially because …

  • Weather Underground database works most succinctly with Placename, Country identification pairs, better than for the …
  • Continent/Placename setup of (PHP) Timezones

… and so, while we are going to so much trouble scouring Timezone places for their associated Countries, it is a really good opportunity to slot in some Weather API interfacing to our Emoji World Flags web application, which is starting to be looking better and better as a trip planning aid.


Previous relevant Emoji Name Search Map Chart Tutorial is shown below.

Emoji Name Search Map Chart Tutorial

Emoji Name Search Map Chart Tutorial

We now have a three tier functionality hierarchy for our Emoji Flags of the World web application …

… all made so very possible when web applications sit in the same domain and you utilize the HTML iframe element.

We wanted to enhance its integration by …

  • adding in “locality pins” for all PHP Timezone places in the country of interest
  • involving Emoji flags in the Map Chart title (rather than as a pin) because Emojis, after all, are like textual data, not HTML (but can use HTML Entity representations in both)

To work the latter of these we called on recent experience with the “Fifth Beatle” discussion in Emoji Name Search Primer Tutorial

We got quite excited recently with Rainbow Games PHP Emoji Tutorial when we added a (fourth Beatle) emoji helper, called Emoji Terra, into the mix of tools to gather emoji information. Today, we’ve got a new Emoji Search web application that introduces a new (fifth Beatle(?)) emoji helper tool to add into the “how we see it” mix …

We found that Emoji Terra could be used in our map Chart interfacing PHP to look up the HTML Decimal Entity for a flag of a country via the URL pattern …


HTTP://www.emojiterra.com/flag-for-[CountryNameSpacesMakeMinusSignsLowerCase]

So even though Google Chart Map Charts do not allow HTML in their titles there is nothing stopping you putting in an HTML Entity Emoji coding.

As far as the former goes, we again called on the PHP DateTimeZone class to scrutinize the first Timezone in the Map Chart title, derive its ISO 2 letter Country Code, and look through the array list of (PHP) Timezones to garner latitude and longitude, time now, and GMT offset information necessary to improve the “where” and “when” aspects of our Google Chart Map Chart interfacing.


Previous relevant Emoji Name Search Timezone Tutorial is shown below.

Emoji Name Search Timezone Tutorial

Emoji Name Search Timezone Tutorial

Yesterday’s Emoji Name Search Map Tutorial was a step in the direction of “where” functionality, but because PHP teams up with the supervisory HTML “Emoji World Flags” web application, to make all this happen, there is the opportunity to add interest by adding a “when” aspect to how it works.

As we’ve said many times now, should you have access to PHP, you also have access to its DateTimeZone class where Timezones can be linked to ISO 2 letter Country Codes, useful as an integration point as of recent times when we introduced ISO 2 letter Country Codes to today’s (supervisory) live run‘s world_flags.html HTML and Javascript code.

But it is not HTML code that changes today. It is its PHP partner emoticon_keyboard_shortcuts.php changed in this way, that arranges that its call of Google Charts Map Chart passes across a new URL …


&ccode=[ISO 2 letter Country Code]

… argument that uses a new PHP function as below (arrays shortened for practicality purposes) …


<?php
function inctycodecheck($incd, $sofar) {
$nearname=["Africa/Abidjan","Africa/Accra", ... ]; // array of Timezone names
$retv="";
$retd="";
$otz = new DateTimeZone("UTC");
$jj=0;
$origin_dt = new DateTime("now", $otz);
for ($best1=0; $best1<sizeof($nearname); $best1++) {
try {
$tz = new DateTimeZone($nearname[$best1]);
$cloc = $tz->getLocation();
$ctrycode = $cloc['country_code'];
if (strtoupper($incd) == strtoupper($ctrycode)) {
$remote_dt = new DateTime("now", $tz);
$offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
$newp=$retd . $nearname[$best1] . "/" . $remote_dt->format('Y-m-d_H:i:s') . " (GMT" . $offset . ")";
$huhs=explode(" (GMT" . $offset . ")", $retv);
if (sizeof($huhs) == 2) {
if (explode("/", $newp)[0] != explode("/", explode(",", $huhs[0])[-1 + sizeof(explode(",", $huhs[0]))])[0]) {
$huhs=explode("youwillneverfindthis", $retv);
}
}
if (($sofar + strlen(urlencode(($retv . $newp)))) < 950 && $jj < 10 && sizeof($huhs) == 1) {
$retv.=$newp;
$retd=",";
$jj++;
}
}
} catch (Exception $exc) { }
}
return $retv;
}
?>

… called later in the code with the new block of code as per …


<?php
$urlis=urldecode($_GET['gmc']); // URL to point at template Google Chart Map Chart call for Country of interest
if (strpos($urlis, ',,') !== false) {
$urlis=str_replace(",,", urlencode($latis . "," . $longis . ","), $urlis);
} else {
$urlis=str_replace(urlencode(",,"), urlencode($latis . "," . $longis . ","), $urlis);
}
if (isset($_GET['ccode'])) {
$urlis=str_replace("&onclick=", "%20" . urlencode(inctycodecheck(urldecode($_GET['ccode']), (strlen($urlis) + 3))) . "&onclick=", $urlis); // appends to the title argument
}

if (isset($_SERVER['HTTPS'])) {
if ($_SERVER['HTTPS'] == "on") {
header("Location: https:" . $urlis);
} else {
header("Location: http:" . $urlis);
}
} else {
header("Location: http:" . $urlis);
}
exit;
?>


Previous relevant Emoji Name Search Map Tutorial is shown below.

Emoji Name Search Map Tutorial

Emoji Name Search Map Tutorial

Yesterday’s posted data Emoji Name Search Posting Tutorial functionality opened the door to “where” web application (software) integration, because the wonderful Wikipedia has compiled Latitude,Longitude co-ordinate pairs for those countries, and that is our foot in the door to place an HTML a link under the Emoji flags, that points to our favourite “where” interfacing tool, the Google Charts Map Chart.

Because the Map Chart and Emoji Flag web application share the same domain we can keep this functionality on this same Emoji Flag webpage in an …

  • HTML iframe element name=gcmi id=gcmi initially invisible … “populated by” …
  • HTML a element target=gcmi href=[URL to Map Chart for Country of Interest] onclick=aoc();

    function aoc() {
    document.getElementById('gmci').style.width='450px';
    document.getElementById('gmci').style.height='450px';
    document.getElementById('gmci').style.display='inline-block';
    }

Another way to zoom around the world online!

You can try the Emoji Flags live run (with underlying world_flags.html changed this way) or the other Emoji functionalities that have this live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its software integration capabilities.


Previous relevant Emoji Name Search Posting Tutorial is shown below.

Emoji Name Search Posting Tutorial

Emoji Name Search Posting Tutorial

Yesterday’s Emoji Name Search Tailoring Tutorial was suitable for data sets of that smaller size able to be handled by the web server limit of URL length. But what if there are too many data items in your data set to be handled by PHP’s $_GET[] array URL ? and & delimited URLs? We, having PHP serverside code at our disposal, can turn to $_POST[] (HTML) method=POST form action=[here’sLookingAtYouKid] scenarios, to get around this issue. The unfortunate side effect of this is that the HTML mailto: a link (email client) method of sharing your Emoji web application relies on that $_GET[] approach, that is, unless you wrote a whole “bespoke” web application to help out, like we do today for our new Emoji “World Flags” web application with this live run, with this HTML and Javascript world_flags.html source code.

That new “supervisor” being a guinea pig idea into the $_POST[] thinking, we add some HTML form element input type=text additions to allow for, out of …

  • Emoji look class … and …
  • Wording next to Emoji … and …
  • URL of Wording’s link, be that substituted or appended

mapped values, optionally, off a newly offered HTML form element input type=text for this mapped comma or blank separated word list.

Perhaps, now, you “long data set thinkers” want to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its data set size capabilities.


Previous relevant Emoji Name Search Tailoring Tutorial is shown below.

Emoji Name Search Tailoring Tutorial

Emoji Name Search Tailoring Tutorial

Information Technology is full of “buzz words”, and am sure you wince at some to all of them yourselves. That’s a bit why am using “Tailoring” rather than …

  • sharing
  • personalization

… to give you a slumberrest from having to look under struck throughdeleted wording to look for hidden “buzz words”terminology that makes your harehair sit upstand watchingon Bugs Bunnyend.

We think, perhaps, that emojis can be important for young “would be” programmers to launch into. Personally wonder how many “would be” programmers give the game up far too soon just because they don’t have those graphics skills, well, with emojis, a lot of that hard work, in miniature, has been done for you by some pretty creative people, so why not enjoy the fruits (chortle, in context, chortle) of their labour and start developing your own web applications to use them. Daily, their use is increasing, as are the sharing of access methods.

In today’s extension to the functionality started with yesterday’s Emoji Name Search Primer Tutorial we separate the Emoji Terra aspects to how it works and allow the user to …

  • supply an Emoji Word List of interest
  • perhaps supply a heading and subheading to describe the “concept” of that list
  • supply either a …
    1. URL prefix … or …
    2. URL with the ~ (tilde) character where you want, substituted, your emoji name

    … to be a navigation destination in that similar new window navigation we used to access Emoji Terra

  • presenting all this in an HTML form action=[here’sLookingAtYouKid] method=GET …
  • that method=GET opening the door to be able to offer an email client engine method to “share”email somebody the link to a screen that looks like the one you’re seeing

Of course, we’d like you to find some of your own such Emoji Display Dynamically Created Web Applications yourself, but to encourage, we, in the web application, today, identified two ideas, namely …

  • Fruit and Vegetables via Wikipedia at https://en.wikipedia.org/wiki/ as a prefix … and …
  • Astrology via Cafe Astrology at https://cafeastrology.com/~dailyhoroscope.html via ~ (tilde) character substitution

… each of which (and any you make will also) feature a link to the HTML mailto: a link out through the email client and to your recipient who can click the email link to “share”compare notes.

Perhaps, now, you want to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its functionality, involving a reveal favourite of ours, the use of HTML(5)’s details (and summary) element.

You can also see this play out at WordPress 4.1.1’s Emoji Name Search Tailoring Tutorial.


Previous relevant Emoji Name Search Primer Tutorial is shown below.

Emoji Name Search Primer Tutorial

Emoji Name Search Primer Tutorial

We got quite excited recently with Rainbow Games PHP Emoji Tutorial when we added a (fourth Beatle) emoji helper, called Emoji Terra, into the mix of tools to gather emoji information. Today, we’ve got a new Emoji Search web application that introduces a new (fifth Beatle(?)) emoji helper tool to add into the “how we see it” mix below …

  • Emojipedia is good for looking up Emoji names or concepts in words
  • FileFormat Information is great for HTML Entity determinations for your less complex Emojis
  • Iemoji is great for HTML Entity determinations for Emojis of all complexities
  • Emoji Terra performs similar functionality as Iemoji but has a permalink organization more friendly to an “emoji search via emoji title” query, and that has suited our purposes today, and before, so, thanks a lot
  • Emoji CSS performs similar functionality to Emojipedia, but has a pictorial view of Emoji names as well, right from the word go, thanks

With these emoji tools in mind we wrote a new PHP web application combining those last two to show Emojis pictorially (with their short name) initially and allow the user to search for an Emoji (match) list via their HTML input type=text (textbox) entry, which results in …

  • the Emoji (match) list look (as an Emoji “display”) … and …
  • an HTML a link which is that Emoji’s short name … linking to …
  • an Emoji Terra webpage with more detail, including HTML Entity information if “short name” is unique, or one extra click away, if not

Maybe you need to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php to download, perhaps?


Previous relevant Rainbow Games PHP Emoji Tutorial is shown below.

Rainbow Games PHP Emoji Tutorial

Rainbow Games PHP Emoji Tutorial

In order to take that further genericization step onto the achievements of yesterday’s Rainbow Games Genericization Tutorial to get onto (the mathematics Induction principle inspired) …

  • prove for the first case
  • prove for the second case
  • prove for the nth case

… we had a choice of …

  • continue on (with) the HTML code creation of new “hardcoded” arrays (managed by Javascript eval abstractional approach) … or “bite the bullet” and …
  • try to work out a generic “emoji lookerer upperer” arrangement

Guess you can tell we opted for the latter, huh?! We started the investigation of this by examining our three favourite emoji informational websites, namely …

  1. Emojipedia
  2. FileFormat Information
  3. Iemoji

… and were a bit surprised that we could not quite swing a generic method to glean the information, so don’t know whether our new “player” is “Ringo Starr” or not, but can tell you this, “its beat is much better than its bite” … chortle, chortle

Emoji Terra performs similar functionality as Iemoji but has a permalink organization more friendly to an “emoji search via emoji title” query, and that suits our purposes today, so, thanks a lot. Without this query by “emoji title” possibility we’d have been forced to adopt more of those “hardcoded” arrays, which would have been alright, but this second approach opens the door to “sport” events in “The Rainbow Games” web application using emojis of the future (ie. they haven’t been invented yet).

How to work the interfacing to Emoji Terra?

This new PHP emoji_lookup.php treats the “prove for the nth case” sports as ones to …

  • look up the emoji information for (in the order “PHP Source File as the Database Source” then try file_get_contents of Emoji Terra lookup), and …
  • read the HTML partner source code live run‘s underlying HTML and Javascript and CSS emoji_walk_animation.htm (which changed in this way)
  • amend that HTML source to supplant the “Sprint” default sport for this new nominated sport … trying not to fall over laughing at some of the new sports we present (inspired by a visit to Emoji Terra search)
  • write out that amended HTML code as the web page (the beauty of a serverside language like PHP)

The more detailed specifics of the file_get_contents of Emoji Terra lookup above are …

  • build up a URL starting with HTTP://emojiterra.com/ … then …
  • in emojiland arrangements there are two genders (as our prefixes if you will) … woman- and man-
  • then add on a “middle” sport descriptor (eg. biking)
  • in emojiland emoticonland arrangements there are five descriptors (as our suffixes if you will) … -dark-skin-tone, -medium-dark-skin-tone, -medium-skin-tone, -medium-light-skin-tone, -light-skin-tone
  • for that set of 2x1x5=10 URLs glean what “HTML dec” (HTML Entity) information you can glean via the file_get_contents call of the Emoji Terra URLs described above (eg. Emoji: Woman Biking: Dark Skin Tone) … built into a Javascript array string to “plug into” the previously read HTML partner source code, and amended to output as the web page the user sees

Sports of the future in emojiland? Just ask for the equivalent of biking (above) off the user via a Javascript prompt window (on the proviso you read Conditional Alternative to Javascript Popup Windows in iOS Tutorial first please).


Previous relevant Rainbow Games Genericization Tutorial is shown below.

Rainbow Games Genericization Tutorial

Rainbow Games Genericization Tutorial

What would help genericize the recent Rainbow Games Double Transformation Tutorial “Rainbow Games” web application? How about introducing another sport?

Again, in honour of “onions of the 4th dimension” approaches, we mainly, turn to the power of Javascript’s eval methodology to achieve this abstracted feeling to our web application. Today, with this, we go two thirds of the way along the “Mathematical Induction” approach …

  • prove for the first case
  • prove for the second case
  • prove for the nth case

How does this use of Javascript eval manifest itself in this way?

  • there are two arrays that work with the “content” of our “Rainbow Games” sport(s) (well, at least, the first “sprint running” sport) called emoticons[] and choices[]
  • wherever we find references in the code to either of these two arrays we start to involve the global variable verbsuffix

    var verb='Sprint';
    var verbs=['Sprint','Row'];
    var anotherverb='run';
    var verbsuffix='';

    … in altered ways like …

    function plus(ih,ihep) {
    var outihep=ihep;
    if (eval("emoticons" + verbsuffix + "[" + ih + "]").indexOf('<p>') != -1) {
    outihep += ' (' + eval("emoticons" + verbsuffix + "[" + ih + "]").split('<p>')[1].split('<')[0] + ')';
    }
    return outihep;
    }

    … in that abstracted way … noting that sometimes you don’t need the “eval()” encasings …
  • and so, working through the code this way it just falls to the coder to define new members for all the arrays for all the new sports (ours is “rowing” today), some of those new arrays (like for rowing are emoticonsrowing[] and choicesrowing[]) to involve …
  • looking up emoji definitions from …
    1. Emojipedia
    2. FileFormat Information
    3. Iemoji

    … not forgetting to …

  • make sure the event logics work for multiple sport scenarios … but mostly they do by sticking to the principles above … especially for the …
  • new HTML select (dropdown) element allows the user to pick a sport

Remaining a work in progress, you can try out our live run link that has underlying HTML and Javascript and CSS emoji_walk_animation.htm, and which changed in this way regarding today’s genericization work. We hope it gives you food for thought.


Previous relevant Rainbow Games Double Transformation Tutorial is shown below.

Rainbow Games Double Transformation Tutorial

Rainbow Games Double Transformation Tutorial

We were on the “road to personalization” for the web application game we started with yesterday’s Rainbow Games Primer Tutorial when “an old chestnut” came up again. It’s happened before, the desire to “double transform” in CSS came about from our emoji …

🏃🏾‍♀️

… table cell mirroring styling as per …


<style>
* { overflow-x: visible; }

select { font-size: 36px; }

td.runner { width: 50px; word-wrap: break-word; font-size: 36px;
transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform: scale(-1, 1);
} //

🏃🏾‍♀️

tr { max-height: 40px; }
</style>

… necessary to make our running emojis run from left to right (that, alas, also transformed any accompanying …

🏃🏾‍♀️

Florence

… name), was added to in this double transformational clause to prove what this wonderful web page advice had to say. In other words, a “double transform” CSS styling scenario like the one below …


<style>
* { overflow-x: visible; }

select { font-size: 36px; }

td.runner { width: 50px; word-wrap: break-word; font-size: 36px;
transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform: scale(-1, 1);
}
tr { max-height: 40px; }

p {
display: block;
font-size: 12px;
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
-o-transform: matrix(-1, 0, 0, 1, 0, 0);
transform: matrix(-1, 0, 0, 1, 0, 0);
}
//

🏃🏾‍♀️

Florence

</style>

… works as a “double transform” to first …

  • mirror (image) flip the table cell (td) emoji data … but us appending some “Runner Name” textual data underneath also, annoyingly, got flipped until …
  • within that (same) table cell (td) element and after the emoji data we append an HTML p(aragraph) element to both …
    1. introduce a new HTML element type into the (CSS styling) mix … and to …
    2. introduce a new CSS transformation type, the matrix … perhaps either or both new parts to the problem critical to its success when, believe me, lots of other approaches don’t work

… to personalize the “runners” and “users”, optionally, “into the game”, by allowing the “user” to name their “runners” and allow for a “runner energy” setting be a bit randomized, to add for some other interest “variety” to the game’s workings. So, still a work in progress that you can try out at our live run link that has underlying HTML and Javascript and CSS emoji_walk_animation.html, and which changed in this way regarding today’s work.


Previous relevant Rainbow Games Primer Tutorial is shown below.

Interesting Places Primer Tutorial

Rainbow Games Primer Tutorial

It’s been a while since we’ve written any conventional HTML and Javascript and CSS game. Today’s game uses the “emoticon” section of the Emoji character set, defaulting so far, to the “running woman” emoji featuring in Compound Emoji WordPress Usage Tutorial.

It’s the early days of our “Rainbow Games” web application, and we’re starting with the animation featuring horizontal hashtag navigation techniques for a running race start to our game. Where it finishes? Hard to say! Today, we’ve looked at “splits” and a finish line.

You can try out our burgeoning live run game concept link that has underlying HTML and Javascript and CSS emoji_walk_animation.html.

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.


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 Ajax, eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Google Chart Generic Background Image Mobile Tutorial

Google Chart Generic Background Image Mobile Tutorial

Google Chart Generic Background Image Mobile Tutorial

We’re almost there amalgamating the new Google Chart interfacing web application background imaging functionality further to the day before yesterday’s Google Chart Generic Background Image Collaboration Tutorial. Today’s part of the puzzle was dealing with …

  • mobile platform window.prompt overridings for non Pie Chart Google Chart participants … to join …
  • non-mobile platform window.prompt overridings for non Pie Chart Google Chart participants

… that we’d been limiting our scope to up until today. On mobile platforms we arrange for an overlaying HTML form to override the window.prompt, meaning webpage calls differ for each question asked of the user. This asks for quite a difference architecture to our coding requirements.

For this work, then it involves changed Javascript


function postlhway() {
var foundu='';
var prefoundu='';
if (bimode == -1) {
if (document.getElementById('bkcol')) {
if (('' + document.getElementById('bkcol').style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.getElementById('bkcol').style.backgroundImage).split('(')[eval(-1 + ('' + document.getElementById('bkcol').style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
}
}
if (bimode == -1) {
if (('' + document.body.style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.body.style.backgroundImage).split('(')[eval(-1 + ('' + document.body.style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.body.innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> #bkcol { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
}
}
}
if (foundu != '') {
if (document.getElementById('remail')) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('bi=')) == -1) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1 && document.getElementById('remail').href.indexOf(encodeURIComponent('&')) != -1) {
if (3 == 3) {
document.getElementById('remail').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu);
}
} else {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
}
} else if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1) {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
} else {
document.getElementById('remail').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
}
}
}
}
}
}

function saveprompt() {
if (document.getElementById('prompt')) {
titlezwords=document.getElementById('prompt').value;
titleywords=document.getElementById(titleid).value;
setTimeout(function(){
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
}
}, 2000);
}
}

function whiletitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(whiletitlethere, 2000);
}
}

function wtitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(wtitlethere, 2000);
}
}

function lhway() {
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='.';
var thisansis='';
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
thisansis=' ' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi= ')[1].split('#')[0].split('&')[0];
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
thisansis='' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi=')[1].split('#')[0].split('&')[0];
}
//alert('thisansis=' + thisansis);
if (thisansis.replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1) {
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd].replace(/\%3F/g,'?').replace(/\%26/g,'&');
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
setTimeout(function(){ document.getElementById('chart_div').style.opacity='0.8'; }, 4000);
} else if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//alert('modespace=#' + modespace + '# and thisansis=#' + thisansis + '# and outofansgoes=#' + outofansgoes + '#' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= '));
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
setInterval(postlhway, 3000);
}

if (document.URL.indexOf('nojwin') == -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}

if (document.URL.indexOf('nojwin') == -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (ztis != -1) {
if (thisansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
thisansis=thisansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (thisansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + thisansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + thisansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}
} else if (document.URL.indexOf('nojwin') != -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {

if (('' + location.search).indexOf('&val1=') != -1) {
console.log('document.URL=' + document.URL);
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('parent.title=' + parent.title);
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.replace('//picsum.photos/600/400/?random=','');
console.log('Parent.title=' + parent.title);
parent.location.href=document.URL.replace(encodeURIComponent(encodeURIComponent('//picsum.photos/600/400/?random=')),'');
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('title=' + title);
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
//title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
title=title.replace('//picsum.photos/600/400/?random=','');
console.log('Title=' + title);
}
} catch(hgrh) { }
}

var prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (document.getElementById('val1')) {
document.getElementById('val1').onblur=function(evt){
//document.getElementById('OK').disable=true;
console.log('at onblur');
ansis='' + evt.target.value;
console.log('at onblur ansis=' + ansis + ' ztis=' + ztis);
oansis=ansis;
console.log('aT onblur ansis=' + ansis + ' ztis=' + ztis);
// Start of new mobile ...
if (ztis != -1 || 1 == 1) {
console.log('AT onblur ansis=' + ansis + ' ztis=' + ztis);
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
console.log('at onBlur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onBLur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
console.log('at onbluR ansis=' + ansis + ' ztis=' + ztis);
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubFor=' + datetosubfor);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfoR=' + datetosubfor);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onblur ansIs=' + ansis + ' datetosubfoR=' + datetosubfor);
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
console.log('at onblur ansIS=' + ansis + ' datetosubfoR=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
console.log('at onblur Ansis=' + ansis + ' Ztis=' + ztis);
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
console.log('at onblur Ansis=' + ansis + ' ZTis=' + ztis + ' outofansgoes=' + outofansgoes);
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
console.log('at onblur again ansis=' + ansis);
ansis=ansis.replace(outofansgoes, '');
console.log('at onblur again after replace ansis=' + ansis);
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
console.log('at onblur again after replace new');
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('Here ' + newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
console.log('at onblur again after replace not new');
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('here ' + outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
console.log('at onblur open');
gxhr.open('post', '/PHP/csv.php', true);
console.log('at onblur send');
gxhr.send(gform);
console.log('at onblur sent');
}
}
if (ansis != oansis) { gansis=ansis; console.log('gansis=' + gansis); evt.target.value=ansis; document.getElementById('hval1').value=encodeURIComponent(ansis); console.log('safariform is ' + document.getElementById('safariform').outerHTML); setTimeout(function(){ document.getElementById('val1').value=gansis; if (1 == 2) { document.getElementById('OK').disable=false; document.getElementById('OK').click(); } }, 5000); return true; }
// End of new mobile ...
return true;
};
}
if (ztis != -1) {
dotis='.';
moneis=zwis;
if (document.URL.indexOf('&') == -1) {
//setTimeout(function() {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
//}, 5000);
}
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}

var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (('' + location.search).indexOf('&val1=') != -1) {
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
} catch(hgrh) { }
}

titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
//if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//setTimeout(wtitlethere, 1000);
//}
if (45 == 67) {
//if (4 == 44) {
//setTimeout(wtitlethere, 1000);
//} else {
if (zwords.toLowerCase().indexOf(' title ') != -999 && titlezwords.replace(' ',' ') == ' ') {
if (titlezwords.replace(' ',' ') == ' ') { setTimeout(whiletitlethere, 1000); }
titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
} else { //if (zwords.toLowerCase().indexOf(' title ') == -1) {
titlezwords=' ';
titleywords='';
}
//}
}
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
//document.title='' + vok;
//ansis=document.getElementById('val' + pnum).value;
//document.title='Ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum <= 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
ansis=ansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
if (zwords.split(String.fromCharCode(10)).length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split(String.fromCharCode(10)).length;
} else if (zwords.split('<br>').length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split('<br>').length;
}
document.getElementById('val' + pnum).focus();
ansis='';
if (document.URL.indexOf('val' + eval(-1 + pnum) + '=') != -1) {
ansis=decodeURIComponent(decodeURIComponent(document.URL.split('val' + eval(-1 + pnum) + '=')[1].split('&')[0]));
}
//document.title='ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum == 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
if (eval('' + datetosubfor) < 20110314) {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
twoway=ansis;
if (document.getElementById('safariform')) {
document.title='no';
} else {
document.title='' + document.getElementById('safariform').innerHTML.length;
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
twoway=ansis;
}
}
}
//document.title='ztIs=' + ztis + ' and ansis=' + ansis;
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
//document.title='ztIS=' + ztis + ' and ansis=' + ansis;
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//oneway=ansis;
ansis=ansis.replace(outofansgoes, '');
twoway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(outofansgoes, '').replace(/^\ /g,'').replace(/^\ /g,'');
if (document.getElementById('val' + pnum))
// document.title+=' zTIS=' + ztis + ' and ansis=' + ansis + ' outofansgoes=' + outofansgoes;
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
var alert = function(zwords){
var defwords='';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('Cancel').style.display='none';
document.getElementById('bCancel').style.display='none';
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}
var confirm = function(zwords){
//alert('val' + pnum + '=? ' + ' pnum=' + pnum + ' xpnum=' + xpnum + ' ' + document.URL);
var defwords='1trueYesOK';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
//alert('vok=' + vok);
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '1trueYesOK';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}

function bicheck() {
if (document.URL.indexOf('nojwin=') != -1) {
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/gctidy.html"></iframe>';
}
if (('' + document.URL + decodeURIComponent('' + location.hash)).indexOf('title=') != -1 || 1 == 1) {
setTimeout(function(){
var prebits='';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
prebits='ammb=y&';
if (document.getElementById('bitsatend')) {
if (!document.getElementById('remail')) {
//document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email 📧</a> <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS 📟</a><br>';
document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email</a><br>'; //' <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS</a><br>';
}
}
}
//document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/PHP/csv.php?' + prebits + 'outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}, 2000);
}
}

setTimeout(ggmuchlater, 7000);

setTimeout(gmuchlater, 1000);
setTimeout(gcinit, 2000);
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
lhway();
bicheck();
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
lhway();
bicheck();
} else {
setTimeout(bicheck, 5000);
setTimeout(lhway, 5000);
}
setInterval(postlhway, 3000);

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
} else {
$opcd=" #chart_div { opacity: 0.8 !important; } ";
}

file_put_contents('xaz.xaz', $dus);
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuteerer, huh?!


Previous relevant Google Chart Generic Background Image Collaboration Tutorial is shown below.

Google Chart Generic Background Image Context Tutorial

Google Chart Generic Background Image Collaboration Tutorial

We’ve fallen into an obsession with “c” words, and we apologize. Today’s “collaboration” came after yesterday’s Google Chart Generic Background Image Context Tutorial‘s “context” and before that “code”. What do we make of it?

Well?!


Thanks for the insights!

We are not robots here at RJM Programming, but believe it or not, having three acrostically identical tutorial titles in a row causes us more consternation than usual (Nala’s practically apoplectic), even beyond those butterflies in Brazil crossing the equator and affected by the Coriolis Effect. Anyway …

We have spent a day on email and SMS (conduit) sharing and collaboration means by which our non-mobile (only, so far) web users of the unaccounted for (after that Google Chart Pie Chart Background Image Tutorial inspiration from some time ago) Google Chart interfacing web applications can communicate. That work wasn’t as hard as we thought it would be, given the relief of location.hash hashtag URL methodologies whereby there is less worry about URL lengths regarding “a” link href “mailto:” and/or “sms:” sharing functionalities, so the mind must have wandered into the realms of …

What can an image “reference” (easily be)?

The usual suspects came to mind …

  • relative URL that ends with the extension of the image file … eg. /PHP/seven.jpg
  • absolute URL that ends with the extension of the image file … eg. https://www.rjmprogramming.com.au/PHP/six.jpg
  • data URI … base64 … eg. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAEX0lEQVQ4jUWUyW6cVRCFv7r3/kO3u912nNgZgESAAgGBCJgFgxhW7FkgxAbxMLwBEmIRITbsQAgxCEUiSIBAYIY4g1EmYjuDp457+Lv7n+4tFjbwAHVOnVPnlLz75ht67OhhZg/M0p6d5tD9C8SNBBs5XBJhI4uNLC4SREA0UI9yJr2c4e6QO+v3WF27w+rmNrv9Pm7hxDyHFg5yYGEOYxytuRY2SYiSCIwgRgBQIxgjEAKuZWg6R9S0SCS4qKLZElY3HC5tp7QPtmlMN7HOETUTXBJjrEGsAfgPFECsQbBIbDGJZUYgGE8ugQyPm+o0STtTuGZMnKZEjRjjLIgAirEOEQEBDQFBEFFEBWLFtVJmpENRl6hUuFanTRAlbTeZarcx0R6YNZagAdD/t5N9+QgCYAw2jrAhpjM3zaSY4OJGTDrVwEYOYw2qioigoviq5MqF31m9fg1V5fCx+zn11CLNVnufRhBrsVFE1Ihpthu4KDYYwz5YQIxFBG7duMZnH31IqHL6wwnGCLFd4pez3/DaG2/x4GNPgBhEZG/GGlxkMVFkiNMYay3Inqxed4eP33uf7Y0uu90xWkGolFAru7sZn5w5w921m3u+su8vinEO02hEWLN/ANnL2rkvv2an2yd4SCKLM0JVBsCgAYZZzrnPP0eDRzXgfaCuPHXwuEYjRgmIBlQVVLl8/hKI4fRzz3L6uWe5+PMvnHz6aa4uX+D4yYe5vXaLH86eoyoLjLF476l9oKo9pi5HWONRX8E+YznOef7Vl1h86QWurlwjbc+QpikPPfoIcZLS39pmMikp8pzae6q6oqgriqrGqS+xeLScoMYSVJlfOMTl5RXW1+5w5fJVnFGWf1/mxEMnWPppiclkTLM5RdJoUBYFZVlQ5DnZMMMV167gixKLoXXsKGqnOHnqOJ/+/CfZ+XUiZ0jTmFv5mAvf/YjEliQ2vPD8Ir6qqEcZkzt38cMRo5WruFvfL9FqpyRxQhj0qLOax5I2S08+Tu/lFiGUGOPormxwuyfMnjrGrJa88uIixeYWl776lmrzNjmw8vcG8sU7ixpHMXFsCUVg9tABjEvRgzP82j7AhbyiX5Qcv2+Bvy7dYGZ1k7efeQB/Y4PBqGBtdYvb3SFzLcfqToZc/OB1zYeBSpUwLBlvjZidmWaSB1yaYOfn6LqI/r0hyU6P+cRSlhXjbEI2zvnt7y79oqQ3qeg4g6vKjCIXehtDmi6m0UnxVnCRkPUHVNt9qkLJxgXOCYNOg34v48raPaamU2o89/KKsQ9sTSpc0JK7NwdcX8s43Ek5cnSOLC/Z2R6Rj0ra0w2W1/t0xyWn51uk2Ri1QtSO6OU5d7OSi72cQeWxKG7p/Dp//JXTy6C1Pcbc6DMpPRtjTxChEznWhwVZUCKrjCrPoPDczHLmnLBdBgZlRRWUEBR3ZKrme5TlrTGlV440Y1IrXM9qQGi6mkG5V6uza7tUIeCDElTZ1L26elX+fcH/ACJBPYTJ4X8tAAAAAElFTkSuQmCC

  • data URI … utf8 … svg+xml … eg. data:image/svg+xml;utf8,<svg xmlns=’http://www.w3.org/2000/svg’ width=’66’ height=’48’ viewport=’0 0 100 100′ style=’border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:17px;’><text y=’80%’>Alt\\01f3d5</text></svg>

… but then, when at the other end of a navigation the receiver is a serverside language like PHP, that webpage can establish via it’s header function an image (Content Type) outputting modus operandi, like …

<?php

header('Content-Type: image/jpeg');

?>

… and output image data via URL calls that do not have to “end with the extension of any image file”. Our WordPress blog’s TwentyTen theme’s 404.php is capable of this with URLs such as …


https://www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=20221116&random=4575657

… and the other one we’ve had fun with in the past is the great random Lorem Picsum image creating resource accessible via URLs such as …


https://picsum.photos/600/400/

As you might imagine, we wanted to get these two ideas into the mix, especially as it was nagging away at us that the user interaction to make any of this work happen is asking a lot of the web user out there, but to involve more (potentially, later, mobile) users to get interested we can now


zwords+=' ... body background image data URIs, delimited by space or , or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum, thanks) ';

For today’s work, though it involves changed Javascript


function postlhway() {
var foundu='';
var prefoundu='';
if (bimode == -1) {
if (document.getElementById('bkcol')) {
if (('' + document.getElementById('bkcol').style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.getElementById('bkcol').style.backgroundImage).split('(')[eval(-1 + ('' + document.getElementById('bkcol').style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
}
}
if (bimode == -1) {
if (('' + document.body.style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.body.style.backgroundImage).split('(')[eval(-1 + ('' + document.body.style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
} else if (document.body.innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
}
}
}
if (foundu != '') {
if (document.getElementById('remail')) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('bi=')) == -1) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1 && document.getElementById('remail').href.indexOf(encodeURIComponent('&')) != -1) {
if (3 == 3) {
document.getElementById('remail').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu);
}
} else {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
}
} else if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1) {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
} else {
document.getElementById('remail').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
}
}
}
}
}
}

function lhway() {
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='.';
var thisansis='';
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
thisansis=' ' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi= ')[1].split('#')[0].split('&')[0];
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
thisansis='' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi=')[1].split('#')[0].split('&')[0];
}
//alert('thisansis=' + thisansis);
if (thisansis.replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd].replace(/\%3F/g,'?').replace(/\%26/g,'&');
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
setTimeout(function(){ document.getElementById('chart_div').style.opacity='0.8'; }, 4000);
} else if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//alert('modespace=#' + modespace + '# and thisansis=#' + thisansis + '# and outofansgoes=#' + outofansgoes + '#' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= '));
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
setInterval(postlhway, 3000);
}

if (document.URL.indexOf('nojwin') == -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum, thanks) ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (ztis != -1) {
if (thisansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + Math.floor(Math.random() * 19896754));
} else {
thisansis=thisansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (thisansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + Math.floor(Math.random() * 19896754));
}
}
}
if ((fauxv + thisansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + thisansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + decodeURIComponent('' + location.hash)).indexOf('title=') != -1 || 1 == 1) {
setTimeout(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (document.getElementById('bitsatend')) {
if (!document.getElementById('remail')) {
//document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email 📧</a> <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS 📟</a><br>';
document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email</a><br>'; //' <a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS</a><br>';
}
}
}
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}, 2000);
}
}

if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
lhway();
bicheck();
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
lhway();
bicheck();
} else {
setTimeout(bicheck, 5000);
setTimeout(lhway, 5000);
}

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
} else {
$opcd=" #chart_div { opacity: 0.8 !important; } ";
}

file_put_contents('xaz.xaz', $dus);
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",trim($newdus)) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } " . $opcd . " </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuteer, huh?!


Previous relevant Google Chart Generic Background Image Context Tutorial is shown below.

Google Chart Generic Background Image Context Tutorial

Google Chart Generic Background Image Context Tutorial

Here, today, further to yesterday’s Google Chart Generic Background Image Code Tutorial, we are referring to …

  • context … or …
  • guise

again. Well it could be …

  • like when you buy a particular brand of something and then start seeing it everywhere … or …
  • because we like the word “againagain … or …
  • because whenever you revisit a piece of any code it doesn’t take long to appreciate where it could be improved … and we like this one … so …

… we’ll leave it at that. Actually, that last one makes sense, because we realized testing the workings of that Google Chart Pie Chart Background Image Tutorial inspiration for this current project extension, it had a great feature that hadn’t occurred to us yesterday (and we want to allow for) …

  • today, using the background imagery behind the Google Chart and have it be background-repeat:repeat; … the user makes happen by prefixing their background image information by a space character, whereas …
  • yesterday’s use of the background imagery behind the document body and have it be background-size:cover; is perfectly valid too

… making for a better end result set. But there’s more. We’ll be easing out the previous modus operandi in favour of this recent modus operandi over time, we’re thinking, but not before we have a day? looking into sharing functionality that might allow the user to share that Google Chart and its background image arrangements with an email recipient.

For today’s work, though it involves changed Javascript


const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + location.hash).indexOf('title=') != -1) {
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}
}

setTimeout(bicheck, 5000);

and changed PHP

<?php

function ifspacy($dus, $squotethere, $iflenabovezerorepeat) {
global $hdrstuff, $shortbody, $longbody, $rearrangejs, $rearrangestp, $rearrangests, $rearrangesize, $rearrangecover;
$shortbody="body";
$longbody="document.body";
$rearrangejs="";
$rearrangestp="";
$rearrangests="";
$rearrangesize="Size";
$rearrangecover="cover";
$opcd="";
if (strlen($iflenabovezerorepeat) > 0) {
$rearrangejs=" setTimeout(function(){ var ohis=parent.document.getElementById('chart_div').outerHTML; if (!parent.document.getElementById('bkcol')) { parent.document.body.innerHTML=parent.document.body.innerHTML.replace(ohis, '<div id=bkcol>' + ohis + '</div>'); } }, 2000); ";
$shortbody="#bkcol";
$longbody='document.getElementById("bkcol")';
$opcd=" #chart_div { opacity: 0.8; } ";
$rearrangestp=' setTimeout(function(){ if (!parent.document.getElementById("bkcol")) { var xohis=parent.document.getElementById("chart_div").outerHTML; parent.document.body.innerHTML=parent.document.body.innerHTML.replace(xohis, "<div id=bkcol>" + xohis.replace(" style=" + String.fromCharCode(34)," style=" + String.fromCharCode(34) + "opacity:0.8 !important;") + "</div>"); } ';
$rearrangests=' }, 3000); ';
$rearrangesize="Repeat";
$rearrangecover="repeat";
}

if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=trim(str_replace('https:','',str_replace('http:','',$dus)));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=trim($dus);
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xza.xza', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> " . $shortbody . " { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; " . $opcd . " } </style>\"; }, 4000); </scr" . "ipt></head>";
file_put_contents('xzza.xzza', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; " . $opcd . " }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; " . $rearrangejs . " setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; " . $opcd . " }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$prefixisin='';
if (isset($_POST['inmode'])) {
if (strlen($_POST['inmode']) > 0) {
$prefixisin=' ';
}
}
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', $prefixisin . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$prefixis='';
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
if (strpos($filebicont, ' ' . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n") !== false) {
$prefixis=' ';
}
$filebicont=str_replace($prefixis . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $secidea . " " . $rearrangests . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " " . $rearrangests . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . $ify . "')\"; " . $rearrangests . " '></body><p> yes </p></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false, $prefixis);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL(" . $ify . ")\"; parent." . $longbody . ".style.background" . $rearrangesize . "=\"" . $rearrangecover . "\"; " . $rearrangests . " '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $rearrangestp . " " . $secidea . " parent." . $longbody . ".style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; " . $rearrangests . " '></body><p> yes again</p></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cuter, huh?!

Did you know?

Can an animated GIF set as the background image still be animated?

Yes. But please do not make it too boring. Can we suggest …

?


Previous relevant Google Chart Generic Background Image Code Tutorial is shown below.

Google Chart Generic Background Image Code Tutorial

Google Chart Generic Background Image Code Tutorial

We were interested in a URL we detected being accessed, via our cPanel Apache Status report linking us to Google Chart Pie Chart Background Image Tutorial. Investigating this Google Charts interfacing PHP code means by which to allow for the user specification of background images, in the case of a Pie Chart, we realized some interfacings had been coded for this functionality, but not others.

But don’t we …

  1. have an external Javascript gchartgen.js to turn to …
  2. and a require PHP csv.php we could lean on

? Yes, indeed, and we decided to …

  1. have an external Javascript gchartgen.js to turn to …
  2. and a require PHP csv.php we could lean on
  1. for non-mobile (so far) we could override the window.prompt and check and setup
  2. internal use only recording on user interest in a web server flat file

involving changed Javascript


const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.toLowerCase().indexOf(' data ur') == -1) {
zwords+=' ... background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}

function bicheck() {
if (('' + document.URL + location.hash).indexOf('title=') != -1) {
document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}
}

setTimeout(bicheck, 5000);

and changed PHP

<?php

function ifspacy($dus, $squotethere) {
global $hdrstuff;
if (strpos(str_replace('~http','~data',str_replace('~//','~data',('~' . $dus))), '~data') !== false) {
if (strpos(('~' . $dus), '~http') !== false) {
$newdus=str_replace('https:','',str_replace('http:','',$dus));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos(('~' . $dus), '~//') !== false) {
$newdus=$dus;
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
} else if (strpos($dus, base64_encode(';utf8,')) !== false || strpos(('~' . $dus), '~data:') === false) {
$newdus='data' . base64_decode(substr($dus,4));
if (strpos($newdus, ' ') !== false) {
if (!$squotethere) {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xz.xz', $hdrstuff);
return ''; //'"'" . str_replace('"', "\\" . '"', $newdus) . "'";
} else {
$hdrstuff="<head><scr" . "ipt type=text/javascript> var newdus='" . str_replace("'", "' + String.fromCharCode(39) + '",$newdus) . "'; setTimeout(function(){ parent.document.body.innerHTML+=\"<style> body { background-image: linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(\" + String.fromCharCode(39) + newdus + String.fromCharCode(39) + \") !important; } </style>\"; }, 4000); </scr" . "ipt></head>";
//file_put_contents('xzz.xzz', $hdrstuff);
return ''; //'"" . str_replace('"', "\\" . '"', $newdus) . "";
}
} else {
$dus=$newdus;
}
}
} else if (strpos($dus, ' ') !== false) {
if (!$squotethere) {
return "'" . $dus . "'";
}
}
return $dus;
}

if (isset($_POST['inwrite'])) {
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['inurl'])) {
$exidea=str_replace('+', ' ', urldecode($_POST['inurl']));
}
if (file_exists('./bicollection.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection.txt') . csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
} else {
file_put_contents('./bicollection.txt', csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $_POST['inwrite'] . "\n");
}
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection_backup.txt', file_get_contents('./bicollection.txt'));
}
echo "<html><body></body></html>";
exit;
}

if (isset($_GET['outread']) && isset($_GET['cleanup'])) {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
exit;
} else if (isset($_POST['outread']) || isset($_GET['outread'])) {
$exidea=explode('#', explode('?', $_SERVER['REQUEST_URI'])[0])[0];
if (isset($_POST['outread'])) {
if (strlen($_POST['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_POST['outread']));
}
} else if (isset($_GET['outread'])) {
if (strlen($_GET['outread']) > 1) {
$exidea=str_replace('+', ' ', urldecode($_GET['outread']));
}
}
$secidea='';
if (file_exists('./bicollection.txt')) {
$filebicont=file_get_contents('./bicollection.txt');
$origf=$filebicont;
if (strpos($filebicont, csv_server_remote_addr() . ' --- ' . $exidea . ' ... ') !== false) {
$relbi=explode("\n", explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont)[-1 + sizeof(explode(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ', $filebicont))])[0];
$filebicont=str_replace(csv_server_remote_addr() . ' --- ' . $exidea . ' ... ' . $relbi . "\n","",$filebicont);
if ($origf != $filebicont) {
file_put_contents('./bicollection_backup.txt', $filebicont);
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 10000); ";
} else if (file_exists('./bicollection_backup.txt')) {
$secidea=" setTimeout(function(){ location.href=\"/PHP/csv.php?outread=y&cleanup=y\"; }, 9999); ";
}
if (strpos(('~' . $relbi), '~data') !== false) {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), false);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' parent.document.body.style.backgroundSize=\"cover\"; " . $secidea . " '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(" . $ify . ")\"; parent.document.body.style.backgroundSize=\"cover\"; " . $secidea . " '></body></html>";
}
} else {
$ify=ifspacy(str_replace(' ','+',urldecode($relbi)), true);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " '><p> done </p></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " ><p> parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL('" . $ify . "')\"; </p></body></html>";
}
}
} else {
if (isset($_GET['outread'])) {
$ify=ifspacy(str_replace('+',' ',urldecode($relbi)), false);
if ($ify == '') {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " parent.document.body.style.backgroundSize=\"cover\"; '></body></html>";
} else {
echo "<html>" . $hdrstuff . "<body onload=' " . $secidea . " parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL(" . $ify . ")\"; parent.document.body.style.backgroundSize=\"cover\"; '></body></html>";
}
} else {
echo "<html>" . $hdrstuff . "<body><p> parent.document.body.style.backgroundImage=\"linear-gradient(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),URL('" . str_replace('+',' ',urldecode($relbi)) . "')\"; </p></body></html>";
}
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
} else {
if (file_exists('./bicollection_backup.txt')) {
sleep(3);
if (file_exists('./bicollection_backup.txt')) {
file_put_contents('./bicollection.txt', file_get_contents('./bicollection_backup.txt'));
unlink('./bicollection_backup.txt');
}
}
echo "<html><body></body></html>";
}
exit;
}

?>

Cute, huh?!


Previous relevant Google Chart Pie Chart Background Image Tutorial is shown below.

Google Chart Pie Chart Background Image Tutorial

Google Chart Pie Chart Background Image Tutorial

We have another potential use for the clipboard, adding onto the recent Google Pie Chart via Clipboard Co-ordinates Tutorial data set usage, today. We allow the user to change the default white background to the Google Chart Pie Chart be tailored to be either …

  • image URL … or …
  • image data URI (most likely entered via the clipboard)

… as a prefixing option when they enter in the Title of their Pie Chart.

In order to achieve this, we were helped enormously by …

  • this very useful link, thanks … the crux of it being to get to put …

    backgroundColor: 'none'

    … into the Pie Chart options … and some previous help we got when we presented …
  • Column Intelligence Primer Tutorial‘s “Did you know?” section reference to incredibly useful link‘s advice on our …

    wish to apply opacity just to background image, but not the corresponding textual data (or other types) that is the primary content of that HTML element

You can see a video of some of the practicalities to usage on an iPad mobile app version in the YouTube video below …

Because data URIs are an option here, too, you will see in the code changes to pie_chart.php the need, now, to cater for the switch of HTML form navigation from …

  • method=GET (the default) … to …
  • method=POST (when the URL becomes too long)

… and that new bit of logic is slated home to the generic external Javascript we have set aside for Google Charts work called gchartgen.js which changed for this work, in this way.

Maybe you can see how to use this feature yourself, and if that is the case you can try this live run link.


Previous relevant Google Pie Chart via Clipboard Co-ordinates Tutorial is shown below.

Google Pie Chart via Clipboard Co-ordinates Tutorial

Google Pie Chart via Clipboard Co-ordinates Tutorial

Yesterday’s Google Map Chart via Clipboard Co-ordinates Tutorial was a good precursor to today’s work interfacing this time to the Google Chart Pie Chart.

With this work, we’ve started refining the clipboard “smarts” by looking for linefeeds … in Javascript thoughts …


String.fromCharCode(10)

… and as the data exits the Javascript prompt window on its way, before navigating back to the PHP itself, we can check for too many fields to the right of the data, and truncate the clipboard data, as necessary. Along the way, we may be able to reject any header records with this same approach. We can check for no numerical fields here. Business specific logic can be applied here too. With a Pie Chart, the original data, or the user, may be tempted to place “%” after the numerical data, and we can take the opportunity to weed these out. Also, with the character data, it may be delimited by a double quote (ie. within “”), and with this knowledge in mind, we may be able to weed out confusing additional commas that could confuse us with the clipboard comma separated value format of the data.

The lesson here, is to “validate early” and it could be good to “validate often” as well. Real data can be strange indeed.


function dlp(thisris) {
if (thisris != null) {
var commacount=thisris.toLowerCase().replace(/\<\/td\>/g,' , ').indexOf(',');
if (thisris.toLowerCase().replace('https:','http:').indexOf('http:') == 0) {
fti=true;
allowed=true;
datac=thisris;
} else if (commacount >= 0) {
var thatris=thisris.replace(/\ \"/g,String.fromCharCode(10) + '"').replace(/\<tr\>/g,'').replace(/\<\/td\>\<td\>/g,',').replace(/\<\/tr\>/g,String.fromCharCode(10)).replace(/\<\/td\>/g,',').replace(/\,\,/g,',').replace(/\,\,/g,',').replace(',' + String.fromCharCode(10),String.fromCharCode(10));
var zisok=true, fldq=thatris.split(',');
var pielines=thatris.split(String.fromCharCode(10));
if ((fldq[0].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[0].replace('"','').trim() + ' ').substring(0,1) > '9') {
if ((fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) > '9') {
zisok=false;
}
}
if (!zisok && pielines.length > 1) {
fldq=pielines[1].split(',');
zisok=true;
if ((fldq[0].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[0].replace('"','').trim() + ' ').substring(0,1) > '9') {
if ((fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) < '0' || (fldq[eval(-1 + fldq.length)].replace('"','').trim() + ' ').substring(0,1) > '9') {
zisok=false;
}
}
}
if (zisok) {
while (thatris.indexOf(String.fromCharCode(10)) != -1) {
var inpies, pied='';
thatris='';
var sthatris='';
for (var ipie=0; ipie<pielines.length; ipie++) {
inpies=pielines[ipie].split(',');
if (inpies.length > 1) {
if ((inpies[0].trim() + " ").substring(0,1) == '"' && (inpies[1].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','') + ',' + inpies[1].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','');
} else if ((inpies[0].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','') + ',' + inpies[1].trim().replace('%','').replace('"','');
} else if ((inpies[1].trim() + " ").substring(0,1) == '"') {
sthatris=pied + inpies[0].trim().replace('%','') + ',' + inpies[1].trim().substring(1).split('"')[0].trim().replace('%','').replace(',','').replace(',','');
} else {
sthatris=pied + inpies[0].trim().replace('%','') + ',' + inpies[1].trim().replace('%','').replace('"','');
}
inpies=sthatris.replace(pied,'').split(',');
if (((inpies[0].trim() + " ").substring(0,1) >= '0' && (inpies[0].trim() + " ").substring(0,1) <= '9') || ((inpies[1].trim() + " ").substring(0,1) >= '0' && (inpies[1].trim() + " ").substring(0,1) <= '9')) {
thatris+=sthatris;
pied=',';
}
}
}
}
thatris=thatris.replace(/\,\,/g,',');
fti=true;
allowed=true;
datac='http;' + thatris;
thisris='http;' + thatris;
}
}
}
return thisris;
}

Our PHP Google Chart Pie Chart interface is pie_chart.php changed this way for today’s work, that you can try yourself at this live run link.

Our PHP helper csv.php changed this way for today’s work.

If you want to recreate the conditions as shown in today’s tutorial picture

  1. copy the contents below …

  2. and paste into the 4th prompt (window’s text) box of the Google Charts Pie Chart interfacing live run link
  3. click OK button … P.S. On first prompt, appending &onclick=y to what you want as a Pie Chart title will work the Pie Chart’s select event logic we harness with this interfacing
  4. … or, if you are feeling lazy …
    https://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php?title=Country%20Populations&onclick=y&task=Country&desc=Populations&data=,%20[~https;China,1347000000,India,1241000000,United%20States,312000000,Indonesia,238000000,Brazil,197000000,Pakistan,177000000,Nigeria,162000000,Bangladesh,151000000,Russia,143000000,Japan,128000000,Mexico,115000000,Philippines,96000000,Vietnam,88000000,Ethiopia,87000000,Germany,81800000,Egypt,82600000,Iran,78000000,Turkey,74000000,Thailand,69500000,Congo,67800000,France,63300000,United%20Kingdom,62700000,Italy,60800000~,100]

Previous relevant Google Map Chart via Clipboard Co-ordinates Tutorial is shown below.

Google Map Chart via Clipboard Co-ordinates Tutorial

Google Map Chart via Clipboard Co-ordinates Tutorial

Yesterday’s Google Map Chart via URL Co-ordinates Tutorial added functionality directed towards a …

  • secondary data source, that you access … but today we are going to extend that functionality to support a …
  • primary data source that you enter a comma separated values list for the [place,lat,long] data sets (yourself, via the computer keyboard) … as well as a …
  • “subset” of a secondary data source, that you access, more than likely, using you computer device’s clipboard

The invention of the clipboard was a brilliant step. Before it, we were so beholden to programmers to get tailored work done, and though it’s sad that so many of you get on without us (cough, cough) … well … we were being overworked anyway … and there was that project to “make the morning breakfast coffee before you even know you wanted it” to get onto … finally.

Perhaps we all forget now what the clipboard has meant, for so many of us. It is the freedom of “copy and paste”, the individualism tool of content creation.

Yesterday’s functionality idea is a case in point. “Secondary data sources” are, by definition, out of your control, as to what the content of a web page is. Notice how, yesterday, we made some content that was (s)ftp transferred over to the rjmprogramming.com.au domain via … yes, you guessed it …

  1. me copying (off the mapbox.com website, thanks, as part of the contents of a webpage) … then …
  2. pasting that content into a csv text file on the MacBook Pro computer we’re using (locally) … and then …
  3. (s)ftp transferred over to rjmprogramming.com.au domain to represent a …
  4. URL usable within the functionality of our Google Chart Map Chart interface we host here as the PHP map.php‘s live run link

But there you are, an intelligent human, able to determine for yourself the data you are interested in (quite often not the entire contents of a webpage, as yesterday’s work is ideally asking for), so that being the case, the map.php modifications to PHP code we’ve made today, make it possible for (the much simpler) …

  1. me copying (off the mapbox.com website, thanks, as part of the contents of a webpage) … then …
  2. pasting that content within the functionality of our Google Chart Map Chart interface we host here as the PHP map.php‘s live run link

If you have the clipboard as your friend, your time around computers becomes so much more enjoyable, and flexible, and within your control. We, as programmers, need to think, on occasions, or encourage, on occasions, how the user is likely to use the clipboard, in conjunction with our applications. As you might surmise, that can be a pretty unpredictable “artform”.

Our PHP helper csv.php changed this way for today’s work.


Previous relevant Google Map Chart via URL Co-ordinates Tutorial is shown below.

Google Map Chart via URL Co-ordinates Tutorial

Google Map Chart via URL Co-ordinates Tutorial

The last blog posting referring to the Google Chart Map Chart interface we host here was with Emoji Name Search Map Chart Weather Tutorial, but today we are presenting a major functionality addition with implications for other Google Chart interfacing PHP codesets here. We are allowing the user at the second prompt to take the data from a URL data source containing CSV (comma separated values) place,latitude,longitude data or those three fields in an HTML table element contents perhaps.

We’ve added the ability to “map” (tee hee) …


HTTP://www.rjmprogramming.com.au/PHP/Map/map.php?title=Where%20We%20Are&onclick=y&label=['Lat',&value='Lon',%20'Name']&data=,%20[-33.90743410270099,151.17646964910696,~Parent1~]%20,%20[-33.907440603083124,151.1764659419197,~Parent2~]

… from a CSV data URL look with contents …


-33.907434102700991,151.17646964910696,Parent1
-33.907440603083124,151.17646594191973,Parent2

… that if placed at rjmprogramming.com.au’s Document Root and called parent.csv then a URL of …


HTTP://www.rjmprogramming.com.au/PHP/Map/map.php?title=Where%20We%20Are&onclick=y&label=['Lat',&value='Lon',%20'Name']&data=,%20[0.00000001,0.0000000,~HTTP://rjmprogramming.com.au/parent.csv~]

… could be a shortcut to that first URL same look. You can see another example using data from mapbox.com, thanks, show the scenario our tutorial picture illustrates.

The way this “mapping” (tee hee, tee hee) of URLs can happen is that the PHP supervisor map.php (changed this way and which you can try with this live run link) “includes” (ie. calls) …


include "../csv.php";

… a (now bigger, and more functional) csv.php (changed this way) does its best to handle a few looks to the CSV or tabular data, with code to allow for …

  • CSV data ordered place,latitude(decimal),longitude(decimal) or latitude(decimal),longitude(decimal),place or place,longitude(decimal),latitude(decimal) or longitude(decimal),latitude(decimal),place
  • CSV data ordered place,latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs) or latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs),place or place,longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs) or longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs),place
  • HTML tabular data ordered place,latitude(decimal),longitude(decimal) or latitude(decimal),longitude(decimal),place or place,longitude(decimal),latitude(decimal) or longitude(decimal),latitude(decimal),place
  • HTML tabular data ordered place,latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs) or latitude(W/S/E/N_deg_min_secs),longitude(W/S/E/N_deg_min_secs),place or place,longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs) or longitude(W/S/E/N_deg_min_secs),latitude(W/S/E/N_deg_min_secs),place

Previous relevant Emoji Name Search Map Chart Weather Tutorial is shown below.

Emoji Name Search Map Chart Weather Tutorial

Emoji Name Search Map Chart Weather Tutorial

If you’ve been studying the code of our hierarchy for our Emoji Flags of the World web application …

… am sure you’ll have noticed how bottom heavy it is on the “child” as far as functionality goes. What we like to call “the hard working duck syndrome”. Partly, that is because we see the Google Charts Map Chart interface we have as being a very useful “meeting point” with interfacing web applications tending towards the “where” of life.

Today’s job, extending yesterday’s Emoji Name Search Map Chart Tutorial is to add Map Chart interfacing to the great Weather Underground and its great API service for autocomplete name searches for weather (and hurricane) information … thanks.

The changes are again just to that “hard working duck” Map Chart interface “child” web application, as for yesterday’s work. We were very keen to do this, especially because …

  • Weather Underground database works most succinctly with Placename, Country identification pairs, better than for the …
  • Continent/Placename setup of (PHP) Timezones

… and so, while we are going to so much trouble scouring Timezone places for their associated Countries, it is a really good opportunity to slot in some Weather API interfacing to our Emoji World Flags web application, which is starting to be looking better and better as a trip planning aid.


Previous relevant Emoji Name Search Map Chart Tutorial is shown below.

Emoji Name Search Map Chart Tutorial

Emoji Name Search Map Chart Tutorial

We now have a three tier functionality hierarchy for our Emoji Flags of the World web application …

… all made so very possible when web applications sit in the same domain and you utilize the HTML iframe element.

We wanted to enhance its integration by …

  • adding in “locality pins” for all PHP Timezone places in the country of interest
  • involving Emoji flags in the Map Chart title (rather than as a pin) because Emojis, after all, are like textual data, not HTML (but can use HTML Entity representations in both)

To work the latter of these we called on recent experience with the “Fifth Beatle” discussion in Emoji Name Search Primer Tutorial

We got quite excited recently with Rainbow Games PHP Emoji Tutorial when we added a (fourth Beatle) emoji helper, called Emoji Terra, into the mix of tools to gather emoji information. Today, we’ve got a new Emoji Search web application that introduces a new (fifth Beatle(?)) emoji helper tool to add into the “how we see it” mix …

We found that Emoji Terra could be used in our map Chart interfacing PHP to look up the HTML Decimal Entity for a flag of a country via the URL pattern …


HTTP://www.emojiterra.com/flag-for-[CountryNameSpacesMakeMinusSignsLowerCase]

So even though Google Chart Map Charts do not allow HTML in their titles there is nothing stopping you putting in an HTML Entity Emoji coding.

As far as the former goes, we again called on the PHP DateTimeZone class to scrutinize the first Timezone in the Map Chart title, derive its ISO 2 letter Country Code, and look through the array list of (PHP) Timezones to garner latitude and longitude, time now, and GMT offset information necessary to improve the “where” and “when” aspects of our Google Chart Map Chart interfacing.


Previous relevant Emoji Name Search Timezone Tutorial is shown below.

Emoji Name Search Timezone Tutorial

Emoji Name Search Timezone Tutorial

Yesterday’s Emoji Name Search Map Tutorial was a step in the direction of “where” functionality, but because PHP teams up with the supervisory HTML “Emoji World Flags” web application, to make all this happen, there is the opportunity to add interest by adding a “when” aspect to how it works.

As we’ve said many times now, should you have access to PHP, you also have access to its DateTimeZone class where Timezones can be linked to ISO 2 letter Country Codes, useful as an integration point as of recent times when we introduced ISO 2 letter Country Codes to today’s (supervisory) live run‘s world_flags.html HTML and Javascript code.

But it is not HTML code that changes today. It is its PHP partner emoticon_keyboard_shortcuts.php changed in this way, that arranges that its call of Google Charts Map Chart passes across a new URL …


&ccode=[ISO 2 letter Country Code]

… argument that uses a new PHP function as below (arrays shortened for practicality purposes) …


<?php
function inctycodecheck($incd, $sofar) {
$nearname=["Africa/Abidjan","Africa/Accra", ... ]; // array of Timezone names
$retv="";
$retd="";
$otz = new DateTimeZone("UTC");
$jj=0;
$origin_dt = new DateTime("now", $otz);
for ($best1=0; $best1<sizeof($nearname); $best1++) {
try {
$tz = new DateTimeZone($nearname[$best1]);
$cloc = $tz->getLocation();
$ctrycode = $cloc['country_code'];
if (strtoupper($incd) == strtoupper($ctrycode)) {
$remote_dt = new DateTime("now", $tz);
$offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
$newp=$retd . $nearname[$best1] . "/" . $remote_dt->format('Y-m-d_H:i:s') . " (GMT" . $offset . ")";
$huhs=explode(" (GMT" . $offset . ")", $retv);
if (sizeof($huhs) == 2) {
if (explode("/", $newp)[0] != explode("/", explode(",", $huhs[0])[-1 + sizeof(explode(",", $huhs[0]))])[0]) {
$huhs=explode("youwillneverfindthis", $retv);
}
}
if (($sofar + strlen(urlencode(($retv . $newp)))) < 950 && $jj < 10 && sizeof($huhs) == 1) {
$retv.=$newp;
$retd=",";
$jj++;
}
}
} catch (Exception $exc) { }
}
return $retv;
}
?>

… called later in the code with the new block of code as per …


<?php
$urlis=urldecode($_GET['gmc']); // URL to point at template Google Chart Map Chart call for Country of interest
if (strpos($urlis, ',,') !== false) {
$urlis=str_replace(",,", urlencode($latis . "," . $longis . ","), $urlis);
} else {
$urlis=str_replace(urlencode(",,"), urlencode($latis . "," . $longis . ","), $urlis);
}
if (isset($_GET['ccode'])) {
$urlis=str_replace("&onclick=", "%20" . urlencode(inctycodecheck(urldecode($_GET['ccode']), (strlen($urlis) + 3))) . "&onclick=", $urlis); // appends to the title argument
}

if (isset($_SERVER['HTTPS'])) {
if ($_SERVER['HTTPS'] == "on") {
header("Location: https:" . $urlis);
} else {
header("Location: http:" . $urlis);
}
} else {
header("Location: http:" . $urlis);
}
exit;
?>


Previous relevant Emoji Name Search Map Tutorial is shown below.

Emoji Name Search Map Tutorial

Emoji Name Search Map Tutorial

Yesterday’s posted data Emoji Name Search Posting Tutorial functionality opened the door to “where” web application (software) integration, because the wonderful Wikipedia has compiled Latitude,Longitude co-ordinate pairs for those countries, and that is our foot in the door to place an HTML a link under the Emoji flags, that points to our favourite “where” interfacing tool, the Google Charts Map Chart.

Because the Map Chart and Emoji Flag web application share the same domain we can keep this functionality on this same Emoji Flag webpage in an …

  • HTML iframe element name=gcmi id=gcmi initially invisible … “populated by” …
  • HTML a element target=gcmi href=[URL to Map Chart for Country of Interest] onclick=aoc();

    function aoc() {
    document.getElementById('gmci').style.width='450px';
    document.getElementById('gmci').style.height='450px';
    document.getElementById('gmci').style.display='inline-block';
    }

Another way to zoom around the world online!

You can try the Emoji Flags live run (with underlying world_flags.html changed this way) or the other Emoji functionalities that have this live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its software integration capabilities.


Previous relevant Emoji Name Search Posting Tutorial is shown below.

Emoji Name Search Posting Tutorial

Emoji Name Search Posting Tutorial

Yesterday’s Emoji Name Search Tailoring Tutorial was suitable for data sets of that smaller size able to be handled by the web server limit of URL length. But what if there are too many data items in your data set to be handled by PHP’s $_GET[] array URL ? and & delimited URLs? We, having PHP serverside code at our disposal, can turn to $_POST[] (HTML) method=POST form action=[here’sLookingAtYouKid] scenarios, to get around this issue. The unfortunate side effect of this is that the HTML mailto: a link (email client) method of sharing your Emoji web application relies on that $_GET[] approach, that is, unless you wrote a whole “bespoke” web application to help out, like we do today for our new Emoji “World Flags” web application with this live run, with this HTML and Javascript world_flags.html source code.

That new “supervisor” being a guinea pig idea into the $_POST[] thinking, we add some HTML form element input type=text additions to allow for, out of …

  • Emoji look class … and …
  • Wording next to Emoji … and …
  • URL of Wording’s link, be that substituted or appended

mapped values, optionally, off a newly offered HTML form element input type=text for this mapped comma or blank separated word list.

Perhaps, now, you “long data set thinkers” want to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its data set size capabilities.


Previous relevant Emoji Name Search Tailoring Tutorial is shown below.

Emoji Name Search Tailoring Tutorial

Emoji Name Search Tailoring Tutorial

Information Technology is full of “buzz words”, and am sure you wince at some to all of them yourselves. That’s a bit why am using “Tailoring” rather than …

  • sharing
  • personalization

… to give you a slumberrest from having to look under struck throughdeleted wording to look for hidden “buzz words”terminology that makes your harehair sit upstand watchingon Bugs Bunnyend.

We think, perhaps, that emojis can be important for young “would be” programmers to launch into. Personally wonder how many “would be” programmers give the game up far too soon just because they don’t have those graphics skills, well, with emojis, a lot of that hard work, in miniature, has been done for you by some pretty creative people, so why not enjoy the fruits (chortle, in context, chortle) of their labour and start developing your own web applications to use them. Daily, their use is increasing, as are the sharing of access methods.

In today’s extension to the functionality started with yesterday’s Emoji Name Search Primer Tutorial we separate the Emoji Terra aspects to how it works and allow the user to …

  • supply an Emoji Word List of interest
  • perhaps supply a heading and subheading to describe the “concept” of that list
  • supply either a …
    1. URL prefix … or …
    2. URL with the ~ (tilde) character where you want, substituted, your emoji name

    … to be a navigation destination in that similar new window navigation we used to access Emoji Terra

  • presenting all this in an HTML form action=[here’sLookingAtYouKid] method=GET …
  • that method=GET opening the door to be able to offer an email client engine method to “share”email somebody the link to a screen that looks like the one you’re seeing

Of course, we’d like you to find some of your own such Emoji Display Dynamically Created Web Applications yourself, but to encourage, we, in the web application, today, identified two ideas, namely …

  • Fruit and Vegetables via Wikipedia at https://en.wikipedia.org/wiki/ as a prefix … and …
  • Astrology via Cafe Astrology at https://cafeastrology.com/~dailyhoroscope.html via ~ (tilde) character substitution

… each of which (and any you make will also) feature a link to the HTML mailto: a link out through the email client and to your recipient who can click the email link to “share”compare notes.

Perhaps, now, you want to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php changed in this way to extend its functionality, involving a reveal favourite of ours, the use of HTML(5)’s details (and summary) element.

You can also see this play out at WordPress 4.1.1’s Emoji Name Search Tailoring Tutorial.


Previous relevant Emoji Name Search Primer Tutorial is shown below.

Emoji Name Search Primer Tutorial

Emoji Name Search Primer Tutorial

We got quite excited recently with Rainbow Games PHP Emoji Tutorial when we added a (fourth Beatle) emoji helper, called Emoji Terra, into the mix of tools to gather emoji information. Today, we’ve got a new Emoji Search web application that introduces a new (fifth Beatle(?)) emoji helper tool to add into the “how we see it” mix below …

  • Emojipedia is good for looking up Emoji names or concepts in words
  • FileFormat Information is great for HTML Entity determinations for your less complex Emojis
  • Iemoji is great for HTML Entity determinations for Emojis of all complexities
  • Emoji Terra performs similar functionality as Iemoji but has a permalink organization more friendly to an “emoji search via emoji title” query, and that has suited our purposes today, and before, so, thanks a lot
  • Emoji CSS performs similar functionality to Emojipedia, but has a pictorial view of Emoji names as well, right from the word go, thanks

With these emoji tools in mind we wrote a new PHP web application combining those last two to show Emojis pictorially (with their short name) initially and allow the user to search for an Emoji (match) list via their HTML input type=text (textbox) entry, which results in …

  • the Emoji (match) list look (as an Emoji “display”) … and …
  • an HTML a link which is that Emoji’s short name … linking to …
  • an Emoji Terra webpage with more detail, including HTML Entity information if “short name” is unique, or one extra click away, if not

Maybe you need to try the live run and/or its PHP source code emoticon_keyboard_shortcuts.php to download, perhaps?


Previous relevant Rainbow Games PHP Emoji Tutorial is shown below.

Rainbow Games PHP Emoji Tutorial

Rainbow Games PHP Emoji Tutorial

In order to take that further genericization step onto the achievements of yesterday’s Rainbow Games Genericization Tutorial to get onto (the mathematics Induction principle inspired) …

  • prove for the first case
  • prove for the second case
  • prove for the nth case

… we had a choice of …

  • continue on (with) the HTML code creation of new “hardcoded” arrays (managed by Javascript eval abstractional approach) … or “bite the bullet” and …
  • try to work out a generic “emoji lookerer upperer” arrangement

Guess you can tell we opted for the latter, huh?! We started the investigation of this by examining our three favourite emoji informational websites, namely …

  1. Emojipedia
  2. FileFormat Information
  3. Iemoji

… and were a bit surprised that we could not quite swing a generic method to glean the information, so don’t know whether our new “player” is “Ringo Starr” or not, but can tell you this, “its beat is much better than its bite” … chortle, chortle

Emoji Terra performs similar functionality as Iemoji but has a permalink organization more friendly to an “emoji search via emoji title” query, and that suits our purposes today, so, thanks a lot. Without this query by “emoji title” possibility we’d have been forced to adopt more of those “hardcoded” arrays, which would have been alright, but this second approach opens the door to “sport” events in “The Rainbow Games” web application using emojis of the future (ie. they haven’t been invented yet).

How to work the interfacing to Emoji Terra?

This new PHP emoji_lookup.php treats the “prove for the nth case” sports as ones to …

  • look up the emoji information for (in the order “PHP Source File as the Database Source” then try file_get_contents of Emoji Terra lookup), and …
  • read the HTML partner source code live run‘s underlying HTML and Javascript and CSS emoji_walk_animation.htm (which changed in this way)
  • amend that HTML source to supplant the “Sprint” default sport for this new nominated sport … trying not to fall over laughing at some of the new sports we present (inspired by a visit to Emoji Terra search)
  • write out that amended HTML code as the web page (the beauty of a serverside language like PHP)

The more detailed specifics of the file_get_contents of Emoji Terra lookup above are …

  • build up a URL starting with HTTP://emojiterra.com/ … then …
  • in emojiland arrangements there are two genders (as our prefixes if you will) … woman- and man-
  • then add on a “middle” sport descriptor (eg. biking)
  • in emojiland emoticonland arrangements there are five descriptors (as our suffixes if you will) … -dark-skin-tone, -medium-dark-skin-tone, -medium-skin-tone, -medium-light-skin-tone, -light-skin-tone
  • for that set of 2x1x5=10 URLs glean what “HTML dec” (HTML Entity) information you can glean via the file_get_contents call of the Emoji Terra URLs described above (eg. Emoji: Woman Biking: Dark Skin Tone) … built into a Javascript array string to “plug into” the previously read HTML partner source code, and amended to output as the web page the user sees

Sports of the future in emojiland? Just ask for the equivalent of biking (above) off the user via a Javascript prompt window (on the proviso you read Conditional Alternative to Javascript Popup Windows in iOS Tutorial first please).


Previous relevant Rainbow Games Genericization Tutorial is shown below.

Rainbow Games Genericization Tutorial

Rainbow Games Genericization Tutorial

What would help genericize the recent Rainbow Games Double Transformation Tutorial “Rainbow Games” web application? How about introducing another sport?

Again, in honour of “onions of the 4th dimension” approaches, we mainly, turn to the power of Javascript’s eval methodology to achieve this abstracted feeling to our web application. Today, with this, we go two thirds of the way along the “Mathematical Induction” approach …

  • prove for the first case
  • prove for the second case
  • prove for the nth case

How does this use of Javascript eval manifest itself in this way?

  • there are two arrays that work with the “content” of our “Rainbow Games” sport(s) (well, at least, the first “sprint running” sport) called emoticons[] and choices[]
  • wherever we find references in the code to either of these two arrays we start to involve the global variable verbsuffix

    var verb='Sprint';
    var verbs=['Sprint','Row'];
    var anotherverb='run';
    var verbsuffix='';

    … in altered ways like …

    function plus(ih,ihep) {
    var outihep=ihep;
    if (eval("emoticons" + verbsuffix + "[" + ih + "]").indexOf('<p>') != -1) {
    outihep += ' (' + eval("emoticons" + verbsuffix + "[" + ih + "]").split('<p>')[1].split('<')[0] + ')';
    }
    return outihep;
    }

    … in that abstracted way … noting that sometimes you don’t need the “eval()” encasings …
  • and so, working through the code this way it just falls to the coder to define new members for all the arrays for all the new sports (ours is “rowing” today), some of those new arrays (like for rowing are emoticonsrowing[] and choicesrowing[]) to involve …
  • looking up emoji definitions from …
    1. Emojipedia
    2. FileFormat Information
    3. Iemoji

    … not forgetting to …

  • make sure the event logics work for multiple sport scenarios … but mostly they do by sticking to the principles above … especially for the …
  • new HTML select (dropdown) element allows the user to pick a sport

Remaining a work in progress, you can try out our live run link that has underlying HTML and Javascript and CSS emoji_walk_animation.htm, and which changed in this way regarding today’s genericization work. We hope it gives you food for thought.


Previous relevant Rainbow Games Double Transformation Tutorial is shown below.

Rainbow Games Double Transformation Tutorial

Rainbow Games Double Transformation Tutorial

We were on the “road to personalization” for the web application game we started with yesterday’s Rainbow Games Primer Tutorial when “an old chestnut” came up again. It’s happened before, the desire to “double transform” in CSS came about from our emoji …

🏃🏾‍♀️

… table cell mirroring styling as per …


<style>
* { overflow-x: visible; }

select { font-size: 36px; }

td.runner { width: 50px; word-wrap: break-word; font-size: 36px;
transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform: scale(-1, 1);
} //

🏃🏾‍♀️

tr { max-height: 40px; }
</style>

… necessary to make our running emojis run from left to right (that, alas, also transformed any accompanying …

🏃🏾‍♀️

Florence

… name), was added to in this double transformational clause to prove what this wonderful web page advice had to say. In other words, a “double transform” CSS styling scenario like the one below …


<style>
* { overflow-x: visible; }

select { font-size: 36px; }

td.runner { width: 50px; word-wrap: break-word; font-size: 36px;
transform: scale(-1, 1); -o-transform: scale(-1, 1); -moz-transform: scale(-1, 1); -ms-transform: scale(-1, 1); -webkit-transform: scale(-1, 1);
}
tr { max-height: 40px; }

p {
display: block;
font-size: 12px;
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
-o-transform: matrix(-1, 0, 0, 1, 0, 0);
transform: matrix(-1, 0, 0, 1, 0, 0);
}
//

🏃🏾‍♀️

Florence

</style>

… works as a “double transform” to first …

  • mirror (image) flip the table cell (td) emoji data … but us appending some “Runner Name” textual data underneath also, annoyingly, got flipped until …
  • within that (same) table cell (td) element and after the emoji data we append an HTML p(aragraph) element to both …
    1. introduce a new HTML element type into the (CSS styling) mix … and to …
    2. introduce a new CSS transformation type, the matrix … perhaps either or both new parts to the problem critical to its success when, believe me, lots of other approaches don’t work

… to personalize the “runners” and “users”, optionally, “into the game”, by allowing the “user” to name their “runners” and allow for a “runner energy” setting be a bit randomized, to add for some other interest “variety” to the game’s workings. So, still a work in progress that you can try out at our live run link that has underlying HTML and Javascript and CSS emoji_walk_animation.html, and which changed in this way regarding today’s work.


Previous relevant Rainbow Games Primer Tutorial is shown below.

Interesting Places Primer Tutorial

Rainbow Games Primer Tutorial

It’s been a while since we’ve written any conventional HTML and Javascript and CSS game. Today’s game uses the “emoticon” section of the Emoji character set, defaulting so far, to the “running woman” emoji featuring in Compound Emoji WordPress Usage Tutorial.

It’s the early days of our “Rainbow Games” web application, and we’re starting with the animation featuring horizontal hashtag navigation techniques for a running race start to our game. Where it finishes? Hard to say! Today, we’ve looked at “splits” and a finish line.

You can try out our burgeoning live run game concept link that has underlying HTML and Javascript and CSS emoji_walk_animation.html.

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.


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 Ajax, eLearning, Event-Driven Programming, iOS, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment