{"id":28777,"date":"2017-03-11T03:01:27","date_gmt":"2017-03-10T17:01:27","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=28777"},"modified":"2022-04-11T17:53:00","modified_gmt":"2022-04-11T07:53:00","slug":"wordpress-code-download-table-interface-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-code-download-table-interface-primer-tutorial\/","title":{"rendered":"WordPress Code Download Table Interface Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/wp_cd.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"WordPress Code Download Table Interface Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/wp_cd.jpg\" title=\"WordPress Code Download Table Interface Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">WordPress Code Download Table Interface Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve got three basic concepts floating around the way we present software and share it around, at this blog, those being &#8230;<\/p>\n<ol>\n<li>the idea of a live run link pointing at an executable piece of software, at least as far as our web server is concerned<\/li>\n<li>a link to downloadable source code of the version of software code pertinent to the version of interest to the current blog posting<\/li>\n<li>a differences link that compares the software code above to a version more &#8220;junior&#8221; (or older &#8230; huh?) to it<\/li>\n<\/ol>\n<p>We want to add an Emoji driven &#8220;drilling down&#8221; functionality to this for those users who want more information, or more context, or both.<\/p>\n<p>So we&#8217;ve added these Emojis below, respectively, for those purposes &#8230;<\/p>\n<ol>\n<li><span title=\" + Cut to the Chase ... see the blog post list related to live runs and slideshows ... ie. the main point of the blog posting\">&#9986;<\/span><\/li>\n<li><span title=\" + Code Download Table\">&#9899;<\/span><\/li>\n<li><span title=\" + Code Download Table\">&#9898;<\/span><\/li>\n<\/ol>\n<p>And where (on the blog posting web page) do we add it?  At the first occurrence in the relevant link&#8217;s <i>innerHTML<\/i> (ie. the writing you see for the link) of &#8220;.&#8221; and\/or &#8221; &#8220;.<\/p>\n<p>We&#8217;d already written something quite close to being apt (please read <a target=_blank title='WordPress Is Mentioned By Posting Thread Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-is-mentioned-by-posting-thread-tutorial\/'>WordPress Is Mentioned By Posting Thread Tutorial<\/a> for more here), and so we&#8217;ve based Javascript code on its PHP workings, working that code into a previously written Javascript apt function of code (<i>function changeasfordownload()<\/i>), from <a target=_blank title='WordPress Blog Download Mode Toggler Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-download-mode-toggler-primer-tutorial\/'>WordPress Blog Download Mode Toggler Primer Tutorial<\/a>.<\/p>\n<p>And so we <b>have<\/b> (where <i><b>var cafd=false;<\/b><\/i> starts scripting and body onload code snippet starts <i>&lt;body onload=&#8221;  <b>changeasfordownload(); cafd=true; <\/b> &#8230;<\/i> &#8230;<\/p>\n<p><code><br \/>\nfunction changeasfordownload() {<br \/>\n  var <b>outs,extis,postprexp,prexp,xp,aorig, <\/b>idmjk=0, newaspare='', big='----------------------GETME', stuffs;<br \/>\n  var admjk = document.getElementsByTagName('a');<br \/>\n  for (idmjk=0; idmjk&lt;admjk.length; idmjk++) {<br \/>\n    if (admjk[idmjk].href.indexOf('GETME') != -1 && admjk[idmjk].href.indexOf('diff.php') == -1) {<br \/>\n      <b>if (!cafd) {<br \/>\n      xp=admjk[idmjk].href.split(\"GETME\");<br \/>\n      prexp=xp[0].split(\"\/\");<br \/>\n      postprexp=prexp[-1 + prexp.length].split(\".\");<br \/>\n      extis = postprexp[-1 + postprexp.length].replace(\/_\/g,\"\").replace(\/-\/g,\"\").replace(\/GETME\/g,\"\");<br \/>\n      outs=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&tsp=\" + (Math.floor(Math.random() * 1999900) + 100) + \"#\" + postprexp[0] + \".\" + postprexp[-1 + postprexp.length].replace(extis,\"\").replace(extis,\"\").replace(extis,\"\") + \"GETME\" + extis;<br \/>\n      aorig=admjk[idmjk].innerHTML;<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\".\",\"&lt;span title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#9899;&lt;\/span&gt;\");<br \/>\n      if (aorig == admjk[idmjk].innerHTML && admjk[idmjk].innerHTML.indexOf('er posts') == -1) {  admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#9898;&lt;\/span&gt;\");<br \/>\n      } else {<\/b><br \/>\n      newaspare = admjk[idmjk].href.replace('_-GETME', '').replace('__GETME', '').replace('_GETME', '').replace(big, '');<br \/>\n      while (big.indexOf('-') != -1) {<br \/>\n        big = big.replace('-', '');<br \/>\n        newaspare = newaspare.replace(big, '');<br \/>\n      }<br \/>\n      big = '----------------------GETME';<br \/>\n      stuffs = newaspare.split('\/');<br \/>\n      admjk[idmjk].download = stuffs[stuffs.length - 1];<br \/>\n      admjk[idmjk].title = \"(Really download) \" + admjk[idmjk].title +  ' ... welcome to the long hover functionality that shows allows for a Download Mode for the blog that can be toggled';<br \/>\n      admjk[idmjk].onmouseover = \" getDownloadMode(); \";<br \/>\n      admjk[idmjk].onmouseout = \" yehBut(); \";<br \/>\n      admjk[idmjk].ontouchstart = \" getDownloadMode(); \";<br \/>\n      admjk[idmjk].ontouchend = \" yehBut(); \";<br \/>\n      <b>}<br \/>\n    } else if (admjk[idmjk].href.indexOf('GETME') != -1 && !cafd) {<br \/>\n      xp=admjk[idmjk].href.split(\"GETME\");<br \/>\n      prexp=xp[0].split(\"\/\");<br \/>\n      postprexp=prexp[-1 + prexp.length].split(\".\");<br \/>\n      extis = postprexp[-1 + postprexp.length].replace(\/_\/g,\"\").replace(\/-\/g,\"\").replace(\/GETME\/g,\"\");<br \/>\n      outs=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&tsp=\" + (Math.floor(Math.random() * 1999900) + 100) + \"#\" + postprexp[0] + \".\" + postprexp[-1 + postprexp.length].replace(extis,\"\").replace(extis,\"\").replace(extis,\"\") + \"GETME\" + extis;<br \/>\n      aorig=admjk[idmjk].innerHTML;<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\".\",\"&lt;span title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#9899;&lt;\/span&gt;\");<br \/>\n      if (aorig == admjk[idmjk].innerHTML && admjk[idmjk].innerHTML.indexOf('er posts') == -1) admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#9898;&lt;\/span&gt;\");<br \/>\n    } else if (admjk[idmjk].innerHTML.indexOf('live run') != -1 && !cafd) {<br \/>\n      outs=\"http:\/\/www.rjmprogramming.com.au\/slideshow.html#tuts\";<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span title=\\\" + Cut to the Chase ... see the blog post list related to live runs and slideshows ... ie. the main point of the blog posting\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=650,height=100');\\\"&gt;&amp;#9986;&lt;\/span&gt;\");<br \/>\n    <\/b>}<br \/>\n  }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; for today&#8217;s good ol&#8217; <i>header.php<\/i> changes to our WordPress blog PHP coding.<\/p>\n<p>Respectively, you are taken to Javascript <i>window.open<\/i> popups to &#8230;<\/p>\n<ol>\n<li><a target=_blank title='Cut to the Chase' href='http:\/\/www.rjmprogramming.com.au\/slideshow.html#tuts'>http:\/\/www.rjmprogramming.com.au\/slideshow.html#tuts<\/a> &#8230; ie. <i>Cut to the Chase<\/i><\/li>\n<li><a target=_blank title='Code Download Table positioning' href='http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml'>http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml<\/a> (example of Code Download Table positioning to imb_poc.html_GETME)<\/li>\n<li><a target=_blank title='Code Download Table positioning' href='http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml'>http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml<\/a> (example of Code Download Table positioning to imb_poc.html_GETME)<\/li>\n<\/ol>\n<p> &#8230; but we feel some more changes coming on about this soon.  Must be <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=CBoC12ryaBs'>&#8220;A sly wind from the North&#8221;<\/a> blowing?!<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d28777' onclick='var dv=document.getElementById(\"d28777\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/wordpress\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d28777' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve got three basic concepts floating around the way we present software and share it around, at this blog, those being &#8230; the idea of a live run link pointing at an executable piece of software, at least as far &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-code-download-table-interface-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[151,218,360,385,652,932,972,997,1238,1319,1456],"class_list":["post-28777","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-blog","tag-code","tag-download","tag-emoji","tag-javascript","tag-php","tag-posting","tag-programming","tag-table","tag-tutorial","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/28777"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=28777"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/28777\/revisions"}],"predecessor-version":[{"id":55374,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/28777\/revisions\/55374"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=28777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=28777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=28777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}