{"id":31970,"date":"2017-08-06T03:01:36","date_gmt":"2017-08-05T17:01:36","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=31970"},"modified":"2017-08-05T14:58:54","modified_gmt":"2017-08-05T04:58:54","slug":"landing-page-cut-to-the-chase-interactivity-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-cut-to-the-chase-interactivity-tutorial\/","title":{"rendered":"Landing Page Cut to the Chase Interactivity Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/slideshow.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Landing Page Cut to the Chase Interactivity Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/new_cut_to_the_chase.jpg\" title=\"Landing Page Cut to the Chase Interactivity Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Landing Page Cut to the Chase Interactivity Tutorial<\/p><\/div>\n<p>We want to refine our &#8220;Cut to the Chase&#8221; functionality here at RJM Programming, working from the &#8220;building blocks&#8221; out to the end aim of our endeavours, to show you tomorrow.  We, here, like to integrate, and if possible, have the &#8220;supervisory&#8221; web application get the &#8220;smarts&#8221; emanating from the change, yet, perhaps, allowing for the &#8220;building block&#8221; to be given an obvious user interactive way in as well, though, if truth be told, we more often just want this for the supervisory web application (if existant, that is).<\/p>\n<p>Currently, our &#8220;Cut to the Chase&#8221; has the thinking we talked about in the previous <a title='Landing Page Cut to the Chase Primer Tutorial' href='#lpccpt'>Landing Page Cut to the Chase Primer Tutorial<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-cut-to-the-chase-primer-tutorial\/'>\n<p>A lot of people learning programming are trying to get information quickly, and &#8220;move on&#8221;, shall we say.  While this is all well and good, it might be a &#8220;fob job&#8221; to think that many of us will really learn something well enough for the challenging bits adopting this approach, but there&#8217;s no doubt there are pressures these days to learn more and more, and perhaps come back to things in detail at a later, quieter, date.  Anyway, &#8220;to cut to the chase&#8221; &#8230; chortle, chortle &#8230; this is what today&#8217;s blog post is about!<\/p>\n<p>Let me explain it this way.  Our tutorial blog postings here at RJM Programming always involve a bit of, but not too much, we hope &#8230;<\/p>\n<ol>\n<li>the background to an issue &#8230; that is always preceded by &#8230;<\/li>\n<li>an image or slideshow or web application or game etcetera that is &#8220;the cut to the chase&#8221; part of the blog posting clickable off an image up the top of it (for all but the earliest postings we ever did) &#8230; and for those who get it through a feed (that can summarize the blog posting with words only, perhaps) &#8230;<\/li>\n<li>if we can remember we also always have a link within the blurb of 1 that links to &#8220;the cut to the chase&#8221; that is 2<\/li>\n<\/ol>\n<\/blockquote>\n<p> &#8230; integrated, only, into our <a target=_blank title='Landing Page at RJM Programming' href='http:\/\/www.rjmprogramming.com.au\/'>Landing Page<\/a> as an entirely separate <i>modus operandi<\/i> should we say.  That &#8220;Cut to the Chase&#8221; can be called on by a link in that Landing Page, and you further &#8220;drill down&#8221; via an HTML select &#8220;dropdown&#8221; element choice to hone in on a tutorial of interest.  But what if you know something about the title, for example, of a tutorial of interest, ahead of time, and want to drill straight into that applicability of that tutorial&#8217;s content, directly?  To make this &#8220;dream&#8221; come true, we&#8217;re breaking this <i>mini project<\/i> into two &#8230;<\/p>\n<ol>\n<li>fix the &#8220;building block&#8221; today<\/li>\n<li>fix the &#8220;supervisory integration&#8221; tomorrow<\/li>\n<\/ol>\n<p>So what&#8217;s the &#8220;building block&#8221; of this?  It involves the amendment of the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/slideshow.html\" title='Click picture'>Cut to the Chase<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/slideshow.html-GETME\">slideshow.html<\/a> HTML and Javascript DOM to add one &#8220;overlayed&#8221; HTML <i>a<\/i> link (the ol&#8217; no &#8220;href&#8221; type, we&#8217;re getting fonder and fonder of) &#8230; &#8220;Find?&#8221; &#8230; that when clicked\/touched asks of the user (via good ol&#8217; Javascript <a target=_blank title='Javascript prompt window information from w3schools' href='https:\/\/www.w3schools.com\/Jsref\/met_win_prompt.asp'>prompt<\/a> window) if they have words they can enter to try to find the Blog Tutorial of interest, most likely via a string that uniquely identifies its title, then send it off, to, if successful, slap on top of the current &#8220;Cut to the Chase&#8221; webpage, rather, the relevant apt &#8220;Cut to the Chase Tutorial Slideshow\/Image\/Web Application\/Video&#8221; &#8230; whatevvvvvvvvverrrrr.<\/p>\n<p>You can see step 1 (of 2) changes for our &#8220;dream&#8221;, happening <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/slideshow.html-GETME\">this way<\/a>.<\/p>\n<p>You can also see this play out at WordPress 4.1.1&#8217;s <a target=_blank  href='https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-cut-to-the-chase-interactivity-tutorial\/'>Landing Page Cut to the Chase Interactivity Tutorial<\/a>.<\/p>\n<hr>\n<p id='lpccpt'>Previous relevant <a target=_blank title='Landing Page Cut to the Chase Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-cut-to-the-chase-primer-tutorial\/'>Landing Page Cut to the Chase Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/slideshow.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Landing Page Cut to the Chase Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cut_to_the_chase.jpg\" title=\"Landing Page Cut to the Chase Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Landing Page Cut to the Chase Primer Tutorial<\/p><\/div>\n<p>A lot of people learning programming are trying to get information quickly, and &#8220;move on&#8221;, shall we say.  While this is all well and good, it might be a &#8220;fob job&#8221; to think that many of us will really learn something well enough for the challenging bits adopting this approach, but there&#8217;s no doubt there are pressures these days to learn more and more, and perhaps come back to things in detail at a later, quieter, date.  Anyway, &#8220;to cut to the chase&#8221; &#8230; chortle, chortle &#8230; this is what today&#8217;s blog post is about!<\/p>\n<p>Let me explain it this way.  Our tutorial blog postings here at RJM Programming always involve a bit of, but not too much, we hope &#8230;<\/p>\n<ol>\n<li>the background to an issue &#8230; that is always preceded by &#8230;<\/li>\n<li>an image or slideshow or web application or game etcetera that is &#8220;the cut to the chase&#8221; part of the blog posting clickable off an image up the top of it (for all but the earliest postings we ever did) &#8230; and for those who get it through a feed (that can summarize the blog posting with words only, perhaps) &#8230;<\/li>\n<li>if we can remember we also always have a link within the blurb of 1 that links to &#8220;the cut to the chase&#8221; that is 2<\/li>\n<\/ol>\n<p> &#8230; and so what you end up with, if you want to objectify it into a &#8220;tutorial-posting&#8221; <a target=_blank title='OOP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Object-oriented_programming'><i>object<\/i><\/a> perhaps, is two data members, of relevance, that are URLs, that being &#8230;<\/p>\n<ol>\n<li>the URL to the WordPress blog posting tutorial &#8230; and &#8230;<\/li>\n<li>the URL to &#8220;the cut to the chase&#8221; intention of the WordPress blog posting tutorial<\/li>\n<\/ol>\n<p> &#8230; and what we&#8217;re proposing today, is that a lot of users can easily forgo the &#8220;blurb&#8221; and &#8220;cut to the chase&#8221;, perhaps going back to the blurb for a further read should they want to delve further after a &#8220;cut to the chase&#8221; session.<\/p>\n<p>We wanted a way to present this idea on our RJM Programming <a target=_blank title='RJM Programming landing page' href='http:\/\/www.rjmprogramming.com.au'>landing page<\/a>.  There must be a way to add another HTML <a target=_blank href='http:\/\/www.w3schools.com\/tags\/tag_select.asp' title='HTML select tag information from w3schools'>select<\/a> &#8220;dropdown&#8221; element to facilitate this?  Well, yes, that could be done, but we thought it would be better to dedicate another RJM Programming Landing Page &#8220;clone&#8221; webpage that has a &#8220;cut to the chase&#8221; HTML select &#8220;dropdown&#8221; element substituted for its &#8220;listed and clickable&#8221; existing HTML select &#8220;dropdown&#8221; element, and then set it up that either web page can get you to the other &#8220;clone&#8221; web page, and to the user all they &#8220;feel&#8221; is the toggling of the &#8220;dropdown&#8221; data content.<\/p>\n<p>So we just used the term &#8220;data content&#8221;, and that means you need to delve into where the &#8220;data&#8221; is from.  With a WordPress blog, the &#8220;data&#8221; is from a MySql database, and to do anything about any changes here will revolve around involving a server side language like PHP &#8230; no way around that.  So what we do is &#8230;<\/p>\n<ul>\n<li>take existant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/tutorial_options.php-------GETME' title='RJM Programming tutorial information extractor called by curl and crontab usually'>tutorial_options.php<\/a> (you can read about, last, with <a target=_blank title='Landing Page Mobile Phone Crontab Curl Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-mobile-phone-crontab-curl-tutorial\/'>Landing Page Mobile Phone<\/a> <a target=_blank title='Linux or unix crontab information from computerhope' href='http:\/\/www.computerhope.com\/unix\/ucrontab.htm'>Crontab<\/a> <a target=_blank title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm'>Curl<\/a> Tutorial and changed for today&#8217;s work in <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tutorial_options.php-------GETME' title='tutorial_options.php'>this way<\/a>) and tweak its <i>curl<\/i> usage as a new entry in our RJM Programming web server&#8217;s <i>crontab<\/i> (once a day for today&#8217;s task) background processing task list, but with a $_GET[&#8216;index&#8217;] = &#8216;slideshow&#8217; parameter &#8230; to create and update a &#8230;<\/li>\n<li><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/slideshow.html' title='RJM Programming cut to the chase tutorials'>slideshow.html<\/a> with the latest tutorial &#8220;data content&#8221; gleaned via a change to the MySql queries used by tutorial_options.php &#8230; so that, in simplified terms &#8230; without the <i>?index=slideshow<\/i> parameterization &#8230; ie. the original way &#8230; the MySql query looks like &#8230;<br \/>\n<code><br \/>\nSELECT  ID, post_date, <b>post_title, guid,<\/b> DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt, 'zzz' as bpost_title FROM wps_post WHERE post_status='publish'<b><i><\/i><\/b> and (substr(IfNull(post_excerpt, ''),1,1) &lt; '0' or substr(IfNull(post_excerpt, ''),1,1) &gt; '9') ORDER BY bpost_title, post_date DESC<br \/>\n<\/code><br \/>\n&#8230; and becomes, with the inclusion of <i>?index=slideshow<\/i> parameterization &#8230; to become a <i>crontab<\/i> entry featuring the command<br \/>\n<code><br \/>\ncurl http:\/\/www.rjmprogramming.com.au\/PHP\/tutorial_options.php?index=slideshow<br \/>\n<\/code><br \/>\n &#8230; ie. the new way &#8230;<br \/>\n<code><br \/>\nSELECT  ID, post_date, <b>concat(post_title, ' (Slideshow or Web Application or Game or Image)'), substring(post_content, instr(post_content, 'http'), (instr(post_content, '\"&gt;&lt;img style=') - instr(post_content, 'http'))),<\/b> DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt, 'zzz' as bpost_title FROM wps_post WHERE post_status='publish'<b><i> and post_content like '%\"&gt;&lt;img style=\"%' and (instr(post_content, '\"&gt;&lt;img style=') - instr(post_content, 'http')) &lt; 100<\/i><\/b> and (substr(IfNull(post_excerpt, ''),1,1) &lt; '0' or substr(IfNull(post_excerpt, ''),1,1) &gt; '9') ORDER BY bpost_title, post_date DESC<br \/>\n<\/code><br \/>\n&#8230; where the PHP variables <b>$ptg<\/b> and  <b><i>$and<\/i><\/b> are populated according to <i>$_GET[&#8216;index&#8217;]<\/i> usage, or not\n<\/ul>\n<p> &#8230; so PHP is used by <i>curl<\/i> and <i>crontab<\/i> to read MySql &#8220;data content&#8221; and rewrite HTML called <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/slideshow.html' title='RJM Programming cut to the chase tutorials'>slideshow.html<\/a> (for &#8220;cut to the chase&#8221; tutorial information) and <a target=_blank title='RJM Programming landing page' href='http:\/\/www.rjmprogramming.com.au\/' title='RJM Programming landing page with tutorial links'>index.html<\/a> (for &#8220;the full blurb&#8221; contextualizing the &#8220;cut to the chase&#8221; with the &#8220;background context&#8221; as a tutorial).<\/p>\n<p>Hopefully, any of the links above suffice to get you to anything you want, should it be of interest in the first place, of course?!  Now that&#8217;s another story!<\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>Our RJM Programming CentOS web server&#8217;s linux environment&#8217;s &#8230;<\/p>\n<p><code><br \/>\ncrontab -e<br \/>\n<\/code><\/p>\n<p> &#8230; edit of its crontab setting records uses the very simple text editor <a target=_blank title='Linux or unix pico information from computerhope' href='http:\/\/www.computerhope.com\/unix\/upico.htm'><i>pico<\/i><\/a> to perform changes.  Coming off any <a target=_blank title='Linux or unix vi information from computerhope' href='http:\/\/www.computerhope.com\/unix\/uvi.htm'><i>vi<\/i><\/a> you&#8217;ve been doing, you&#8217;ll find <i>pico<\/i> as a lot easier, and like driving a manual car you&#8217;ll wonder what to do with the &#8220;clutch&#8221; foot.  You can see a cut down bit of what <i>pico<\/i> looks like at the bottom of today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cut_to_the_chase.jpg\">tutorial picture<\/a>.<\/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='#d22727' onclick='var dv=document.getElementById(\"d22727\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/curl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d22727' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d31970' onclick='var dv=document.getElementById(\"d31970\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/interactive\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d31970' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We want to refine our &#8220;Cut to the Chase&#8221; functionality here at RJM Programming, working from the &#8220;building blocks&#8221; out to the end aim of our endeavours, to show you tomorrow. We, here, like to integrate, and if possible, have &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-cut-to-the-chase-interactivity-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,14,37],"tags":[354,576,614,617,652,894,997,1761,1000,1151,1168,1319,1402],"class_list":["post-31970","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-dom","tag-html","tag-integration","tag-interactive","tag-javascript","tag-overlay","tag-programming","tag-prompt","tag-prompt-popup-box","tag-slideshow","tag-software-integration","tag-tutorial","tag-web-application"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/31970"}],"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=31970"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/31970\/revisions"}],"predecessor-version":[{"id":31975,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/31970\/revisions\/31975"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=31970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=31970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=31970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}