yesterday’s “standalone” incarnation of our now potentially dual purpose “browsing and pasting” inhouse client browsing web application … to, today …
“called upon” incarnation of our inhouse client browsing web application
… and, as we suspected, today’s first look was pretty salutary in proving “no one paradigm size fits all” with the number of scenarios a “called upon” incarnation of our inhouse client browsing web application can throw up.
Where we think the inhouse client browsing web application for this new “paste” functionality can flourish can be via what we like to call “client pre-emptive iframe” Javascript logic back at the caller, where we extend the code for that HTML iframe’s onload event …
var twaconto=null, twacontoiurl=null, twacontojurl=null;
today, our inhouse client browsing web application, in standalone mode … and then …
tomorrow and on, our inhouse client browsing web application, being called upon
… so that, as far as Image data goes, this inhouse client browsing web application is dual purpose, the user able to …
click a button to go file browsing for that (Image) file … or, for example …
mobile device
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse client browsing (and, now, image copy pasting) web application … with one new HTML span contenteditable=true onpaste and onblur savvy …
<span title=""Image copy paste here." onclick="csclick=0; setTimeout(csc,20000); event.stopPropagation();" onblur="youruplit(this,1);" onpaste="youruplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span>
… element …
click on that new span element …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='', dlm='"', copyspans='', gij=0;
var zcontent=[], zfilename='', zoptions=null, csclick=-1;
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse canvas annotation helper web application … with two new HTML span contenteditable=true onpaste and onblur savvy …
<span title="Image copy Paste here to populate canvas fitting in." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span> <span title="Image copy Paste here to populate canvas resizing." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopychecken" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 📈</span>
… elements …
click on the one of interest regarding image sizing …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='';
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
Yes, if an iPhone is connected to a MacBook Air—or even just nearby—the copy buffer (clipboard) of the iPhone can be transferred to the copy buffer of the MacBook Air. Apple calls this feature Universal Clipboard.
It allows you to copy text, images, photos, and videos on your iPhone and instantly paste them onto your Mac (or vice versa).
Cute, huh?! If on the same network, and close, the iPhone and MacBook Air do not even need an Apple White Lead connection, necessarily, though we noticed it sped up the process!
Given the “smarts” at this end, today, we turned to …
… as a solution to massive image png copy buffers coming off the camera being fed into an HTML5 canvas and out as a reduced size jpeg image to allow PHP $_POST methodologies used for the uploading process not be overwhelmed, as per the adjusted Ajax code …
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
yesterday’s “standalone” incarnation of our now potentially dual purpose “browsing and pasting” inhouse client browsing web application … to, today …
“called upon” incarnation of our inhouse client browsing web application
… and, as we suspected, today’s first look was pretty salutary in proving “no one paradigm size fits all” with the number of scenarios a “called upon” incarnation of our inhouse client browsing web application can throw up.
Where we think the inhouse client browsing web application for this new “paste” functionality can flourish can be via what we like to call “client pre-emptive iframe” Javascript logic back at the caller, where we extend the code for that HTML iframe’s onload event …
today, our inhouse client browsing web application, in standalone mode … and then …
tomorrow and on, our inhouse client browsing web application, being called upon
… so that, as far as Image data goes, this inhouse client browsing web application is dual purpose, the user able to …
click a button to go file browsing for that (Image) file … or, for example …
mobile device
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse client browsing (and, now, image copy pasting) web application … with one new HTML span contenteditable=true onpaste and onblur savvy …
<span title=""Image copy paste here." onclick="csclick=0; setTimeout(csc,20000); event.stopPropagation();" onblur="youruplit(this,1);" onpaste="youruplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span>
… element …
click on that new span element …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='', dlm='"', copyspans='', gij=0;
var zcontent=[], zfilename='', zoptions=null, csclick=-1;
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse canvas annotation helper web application … with two new HTML span contenteditable=true onpaste and onblur savvy …
<span title="Image copy Paste here to populate canvas fitting in." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span> <span title="Image copy Paste here to populate canvas resizing." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopychecken" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 📈</span>
… elements …
click on the one of interest regarding image sizing …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='';
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
Yes, if an iPhone is connected to a MacBook Air—or even just nearby—the copy buffer (clipboard) of the iPhone can be transferred to the copy buffer of the MacBook Air. Apple calls this feature Universal Clipboard.
It allows you to copy text, images, photos, and videos on your iPhone and instantly paste them onto your Mac (or vice versa).
Cute, huh?! If on the same network, and close, the iPhone and MacBook Air do not even need an Apple White Lead connection, necessarily, though we noticed it sped up the process!
Given the “smarts” at this end, today, we turned to …
… as a solution to massive image png copy buffers coming off the camera being fed into an HTML5 canvas and out as a reduced size jpeg image to allow PHP $_POST methodologies used for the uploading process not be overwhelmed, as per the adjusted Ajax code …
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
today, our inhouse client browsing web application, in standalone mode … and then …
tomorrow and on, our inhouse client browsing web application, being called upon
… so that, as far as Image data goes, this inhouse client browsing web application is dual purpose, the user able to …
click a button to go file browsing for that (Image) file … or, for example …
mobile device
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse client browsing (and, now, image copy pasting) web application … with one new HTML span contenteditable=true onpaste and onblur savvy …
<span title=""Image copy paste here." onclick="csclick=0; setTimeout(csc,20000); event.stopPropagation();" onblur="youruplit(this,1);" onpaste="youruplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span>
… element …
click on that new span element …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='', dlm='"', copyspans='', gij=0;
var zcontent=[], zfilename='', zoptions=null, csclick=-1;
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse canvas annotation helper web application … with two new HTML span contenteditable=true onpaste and onblur savvy …
<span title="Image copy Paste here to populate canvas fitting in." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span> <span title="Image copy Paste here to populate canvas resizing." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopychecken" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 📈</span>
… elements …
click on the one of interest regarding image sizing …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='';
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
Yes, if an iPhone is connected to a MacBook Air—or even just nearby—the copy buffer (clipboard) of the iPhone can be transferred to the copy buffer of the MacBook Air. Apple calls this feature Universal Clipboard.
It allows you to copy text, images, photos, and videos on your iPhone and instantly paste them onto your Mac (or vice versa).
Cute, huh?! If on the same network, and close, the iPhone and MacBook Air do not even need an Apple White Lead connection, necessarily, though we noticed it sped up the process!
Given the “smarts” at this end, today, we turned to …
… as a solution to massive image png copy buffers coming off the camera being fed into an HTML5 canvas and out as a reduced size jpeg image to allow PHP $_POST methodologies used for the uploading process not be overwhelmed, as per the adjusted Ajax code …
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse canvas annotation helper web application … with two new HTML span contenteditable=true onpaste and onblur savvy …
<span title="Image copy Paste here to populate canvas fitting in." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span> <span title="Image copy Paste here to populate canvas resizing." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopychecken" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 📈</span>
… elements …
click on the one of interest regarding image sizing …
Edit->Paste (or control-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='';
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
Yes, if an iPhone is connected to a MacBook Air—or even just nearby—the copy buffer (clipboard) of the iPhone can be transferred to the copy buffer of the MacBook Air. Apple calls this feature Universal Clipboard.
It allows you to copy text, images, photos, and videos on your iPhone and instantly paste them onto your Mac (or vice versa).
Cute, huh?! If on the same network, and close, the iPhone and MacBook Air do not even need an Apple White Lead connection, necessarily, though we noticed it sped up the process!
Given the “smarts” at this end, today, we turned to …
… as a solution to massive image png copy buffers coming off the camera being fed into an HTML5 canvas and out as a reduced size jpeg image to allow PHP $_POST methodologies used for the uploading process not be overwhelmed, as per the adjusted Ajax code …
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
One Image Website Guinea Pig Follow Through Tutorial
Do you believe in …
The power of the Guinea Pig
? Or is it the case that …
… is not proof enough that Guinea Pigs can form part of the solution, to the point where we found it the case that though, personally, we know of manys a “scratch Guinea Pig on the golf course” where they are all too shy to film themselves on YouTube … or perhaps too modest … and so we cannot present the achingly beautiful follow through of some of these creatures for you today, alas?! Still …
Which brings us to today’s work, following up on yesterday’s One Image Website Onpaste Uploading Device Copying Tutorial, feeling daunted by the difficulty of the idea of individualized editing sessions to try to encapsulate what we’ve learnt over the last three days regarding “One Image Website” more dynamic (via Copy buffer) photograph uploading functionality, and applying the thinking to the three categories of affected source codes here …
index.php … we learnt in doing this, may not exist, in which case we create one … as the software means of uploading to create a new used image member of the “One Image Website” project involved
index.html or index.htm … first responders … which need that new Asynchronous and Ajax code and the means by which either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
… can be catered for as uploading conduits
subsequent webpages interested in the image list … as well as not changing …
the rest of any HTML and/or PHP are unaffected by any uploading thinking
… of the “wish we could be the Guinea Pig” gang among our other “One Image Website” project crew …
Yes, if an iPhone is connected to a MacBook Air—or even just nearby—the copy buffer (clipboard) of the iPhone can be transferred to the copy buffer of the MacBook Air. Apple calls this feature Universal Clipboard.
It allows you to copy text, images, photos, and videos on your iPhone and instantly paste them onto your Mac (or vice versa).
Cute, huh?! If on the same network, and close, the iPhone and MacBook Air do not even need an Apple White Lead connection, necessarily, though we noticed it sped up the process!
Given the “smarts” at this end, today, we turned to …
… as a solution to massive image png copy buffers coming off the camera being fed into an HTML5 canvas and out as a reduced size jpeg image to allow PHP $_POST methodologies used for the uploading process not be overwhelmed, as per the adjusted Ajax code …
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
Yes, if an iPhone is connected to a MacBook Air—or even just nearby—the copy buffer (clipboard) of the iPhone can be transferred to the copy buffer of the MacBook Air. Apple calls this feature Universal Clipboard.
It allows you to copy text, images, photos, and videos on your iPhone and instantly paste them onto your Mac (or vice versa).
Cute, huh?! If on the same network, and close, the iPhone and MacBook Air do not even need an Apple White Lead connection, necessarily, though we noticed it sped up the process!
Given the “smarts” at this end, today, we turned to …
… as a solution to massive image png copy buffers coming off the camera being fed into an HTML5 canvas and out as a reduced size jpeg image to allow PHP $_POST methodologies used for the uploading process not be overwhelmed, as per the adjusted Ajax code …
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.