WordPress Blog Administration Cut to the Chase Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

WordPress Blog Administration Cut to the Chase Tutorial

WordPress Blog Administration Cut to the Chase Tutorial

The recent WordPress Blog Cut to the Chase Integration Tutorial had us allowing the users of the blog the chance to dive into the โ€œessenceโ€ of a blog posting via a โ€œcomplex emoji buttonโ€. Blogs and CMS have two sides to their makeup, that being โ€ฆ

  • normal user (role) facing look โ€ฆ and an โ€ฆ
  • administrator user maintenance look

โ€ฆ and it is with this latter area that we apply some โ€œCut to the Chaseโ€ thinking, allowing the editor of blog postings a โ€œsanity checkโ€ way to answer that age old (and very philosophical) question โ€œDo you see what I see?โ€ โ€ฆ as far as putting the โ€œadministratorโ€ into the shoes of the normal user clicking the blog posting top image. In so doing we assume too very โ€œinhouseโ€ habits, and am sorry if this blog posting today is too individualistic for you โ€ฆ

  • your WordPress blog is using the TwentyTen theme, and at that, two separate arrangements for that TwentyTen theme under versions โ€ฆ
    1. 3.0.3 where wp-includes/general-template.php is added to as below โ€ฆ


      if (strpos($the_editor_content, ' href="') !== false) {

      $urlcttc=explode('"',explode(' href="', $the_editor_content)[1])[0];

      printf( '<br><a target="_blank" style="cursor:pointer;display:inline-block;text-decoration:none; font-size:12px;" href="' . $urlcttc . '" title="Cut to the Chase">&#127939;&#127998;&#8205;&#9792;&#65039;</a><br>' . $the_editor, $the_editor_content );

      } else {

      printf($the_editor, $the_editor_content);

      }

    2. 4.1.1 where wp-includes/class-wp-editor.php is added to as below โ€ฆ


      if (strpos($content, ' href="') !== false) {

      $urlcttc=explode('"',explode(' href="', $content)[1])[0];

      printf( '<br><a target="_blank" style="cursor:pointer;display:inline-block;text-decoration:none; font-size:12px;" href="' . $urlcttc . '" title="Cut to the Chase">&#127939;&#127998;&#8205;&#9792;&#65039;</a><br>' . $the_editor, $content );

      } else {

      printf( $the_editor, $content );

      }

  • the first HTML element href property found in the blog posting title will be what is โ€œCut to the Chaseโ€ navigated to

The end result shows you that you can make changes to how your WordPress blog is administered, to tailor for your own habits and desires, if you wish. Todayโ€™s tutorialโœ‚picture shows this at play on our WordPress 4.1.1 blog administratorโ€™s Edit Post webpage.



Previous relevant WordPress Blog Cut to the Chase Integration Tutorial is shown below.

WordPress Blog Cut to the Chase Integration Tutorial

WordPress Blog Cut to the Chase Integration Tutorial

You may recall some time back we set up into our WordPress Blog modified โ€œRecent Postsโ€ logic to improve on the existing WordPress widget for this. When we wrote WordPress Recent Post Image Follow Up Tutorial we first introduced a Javascript function rptwo which did a lot of the modified look to the WordPress TwentyTen themeโ€™s โ€œRecent Postsโ€ logic within (our usual suspect) header.php PHP code (ie. PHP writes out Javascript).

Following up on โ€œreminiscencesโ€ above, can you remember back to yesterdayโ€™s Landing Page Cut to the Chase Interactivity Tutorial, as shown below, and how we tackled part 1 of 2 of โ€ฆ

  1. fix the โ€œbuilding blockโ€ today
  2. fix the โ€œsupervisory integrationโ€ tomorrow

โ€ฆ and so, with โ€œtomorrowโ€ being โ€œtodayโ€ we find ourselves at โ€ฆ fix the โ€œsupervisory integrationโ€ โ€ฆ that integration being with our WordPress Blog TwentyTen themeโ€™s โ€œRecent Postsโ€ widget, allowing for the emoji endowed HTML li unordered list elements be able to be clicked or touched to โ€œCut to the Chaseโ€ straight to the adjacent tutorialโ€™s pertinent โ€œCut to the Chase Tutorial Slideshow/Image/Web Application/Videoโ€ โ€ฆ whatevvvvvvvvverrrrr. This allows for the skipping out of our tutorial blurb โ€ฆ how could you?! โ€ฆ straight to the โ€œsynopsisโ€ of that tutorial, if you will โ€ฆ hence โ€ฆ โ€œCut to the Chaseโ€.

The bold PHP writes out Javascript code of the WordPress Blog TwentyTen themeโ€™s header.php that is of relevance here is shown below โ€ฆ



var nothanks=false, findthing="";

function rplater() {

if (findthing != "") {

window.open("//www.rjmprogramming.com.au/slideshow.html?title=" + encodeURIComponent(findthing), "_blank");

findthing="";

}

nothanks=false;

}


function rptwo() {

var tworp=document.getElementById('recent-posts-2');

if (tworp != null) {

if (tworp.innerHTML.indexOf('<u' + 'l>') != -1) {

var ihs=tworp.innerHTML.split("</a>");

tworp.innerHTML = tworp.innerHTML.replace('<u' + 'l>', '<u' + 'l class="iconlist">').replace(/a href/g,'a title="Go to the tutorial" onclick="if (1 == 2) { findthing=' + "''" + '; } nothanks=true;" href');

var eight=new Array("one", "two", "three", "four", "five", "six", "seven", "eight");

var ieight;

tworp.innerHTML = tworp.innerHTML.replace(/<\/a>/g, "</a><img class='iiconlist' src='//www.rjmprogramming.com.au/wordpress/transparent.png' style='z-index:3;margin-left:0px;margin-top:0px;opacity:0.2;width:140px;height:100px;box-shadow:rgba(0,0,255,0.2) 2px 2px 2px 2px inset;' onmouseover='getRpnow();' onmouseout='yehBut();' ontouchstart='getRpnow();' ontouchend='yehBut();' title=' ... welcome to the long hover functionality that shows Blog Post regarding Recent Post images'>");

for (ieight=0; ieight<eight.length; ieight++) {

if (ihs.length > eval(0 + ieight)) {

tworp.innerHTML = tworp.innerHTML.replace("<li>", "<li title='Cut to the Chase' onclick=' findthing=\"" + ihs[eval(0 + ieight)].split(">")[eval(-1 + ihs[eval(0 + ieight)].split(">").length)] + "\"; setTimeout(rplater,1000); nothanks=false; ' class='" + eight[ieight] + "'>");

} else {


tworp.innerHTML = tworp.innerHTML.replace("<li>", "<li class='" + eight[ieight] + "'>");

}

tworp.innerHTML = tworp.innerHTML.replace("<img class=", "<img onclick=\"if (1 == 2) { findthing=''; } nothanks=true; clickaid('a" + eight[ieight] + "');\" class=").replace("<img title=\" ", "<img onclick=\"clickaid('a" + eight[ieight] + "');\" title=\"");

}

}

}

}

We have for you, today, an illustration of how this works, in that if you click or touch thisโœ‚link (or todayโ€™s tutorial picture, above) you should get the tutorial picture above displayed in a new window, via the auspices of the RJM Programming โ€œCut to the Chaseโ€ webpage being called in a particular $_GET[] address bar ? and & arguments way, and it responding to this, appropriately, which was โ€œreadiedโ€ in yesterdayโ€™s work.

We hope you get to use this new chance to streamline your learning here at this WordPress TwentyTen themed Blog.


Previous relevant Landing Page Cut to the Chase Interactivity Tutorial is shown below.

Landing Page Cut to the Chase Interactivity Tutorial

Landing Page Cut to the Chase Interactivity Tutorial

We want to refine our โ€œCut to the Chaseโ€ functionality here at RJM Programming, working from the โ€œbuilding blocksโ€ out to the end aim of our endeavours, to show you tomorrow. We, here, like to integrate, and if possible, have the โ€œsupervisoryโ€ web application get the โ€œsmartsโ€ emanating from the change, yet, perhaps, allowing for the โ€œbuilding blockโ€ 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).

Currently, our โ€œCut to the Chaseโ€ has the thinking we talked about in the previous Landing Page Cut to the Chase Primer Tutorial โ€ฆ

A lot of people learning programming are trying to get information quickly, and โ€œmove onโ€, shall we say. While this is all well and good, it might be a โ€œfob jobโ€ to think that many of us will really learn something well enough for the challenging bits adopting this approach, but thereโ€™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, โ€œto cut to the chaseโ€ โ€ฆ chortle, chortle โ€ฆ this is what todayโ€™s blog post is about!

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 โ€ฆ

  1. the background to an issue โ€ฆ that is always preceded by โ€ฆ
  2. an image or slideshow or web application or game etcetera that is โ€œthe cut to the chaseโ€ part of the blog posting clickable off an image up the top of it (for all but the earliest postings we ever did) โ€ฆ and for those who get it through a feed (that can summarize the blog posting with words only, perhaps) โ€ฆ
  3. if we can remember we also always have a link within the blurb of 1 that links to โ€œthe cut to the chaseโ€ that is 2

โ€ฆ integrated, only, into our Landing Page as an entirely separate modus operandi should we say. That โ€œCut to the Chaseโ€ can be called on by a link in that Landing Page, and you further โ€œdrill downโ€ via an HTML select โ€œdropdownโ€ 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โ€™s content, directly? To make this โ€œdreamโ€ come true, weโ€™re breaking this mini project into two โ€ฆ

  1. fix the โ€œbuilding blockโ€ today
  2. fix the โ€œsupervisory integrationโ€ tomorrow

So whatโ€™s the โ€œbuilding blockโ€ of this? It involves the amendment of the Cutโœ‚to the Chase slideshowโšซhtml HTML and Javascript DOM to add one โ€œoverlayedโ€ HTML a link (the olโ€™ no โ€œhrefโ€ type, weโ€™re getting fonder and fonder of) โ€ฆ โ€œFind?โ€ โ€ฆ that when clicked/touched asks of the user (via good olโ€™ Javascript prompt 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 โ€œCut to the Chaseโ€ webpage, rather, the relevant apt โ€œCut to the Chase Tutorial Slideshow/Image/Web Application/Videoโ€ โ€ฆ whatevvvvvvvvverrrrr.

You can see step 1 (of 2) changes for our โ€œdreamโ€, happening thisway.

You can also see this play out at WordPress 4.1.1โ€™s Landing Page Cut to the Chase Interactivity Tutorial.


Previous relevant Landing Page Cut to the Chase Primer Tutorial is shown below.

Landing Page Cut to the Chase Primer Tutorial

Landing Page Cut to the Chase Primer Tutorial

A lot of people learning programming are trying to get information quickly, and โ€œmove onโ€, shall we say. While this is all well and good, it might be a โ€œfob jobโ€ to think that many of us will really learn something well enough for the challenging bits adopting this approach, but thereโ€™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, โ€œto cut to the chaseโ€ โ€ฆ chortle, chortle โ€ฆ this is what todayโ€™s blog post is about!

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 โ€ฆ

  1. the background to an issue โ€ฆ that is always preceded by โ€ฆ
  2. an image or slideshow or web application or game etcetera that is โ€œthe cut to the chaseโ€ part of the blog posting clickable off an image up the top of it (for all but the earliest postings we ever did) โ€ฆ and for those who get it through a feed (that can summarize the blog posting with words only, perhaps) โ€ฆ
  3. if we can remember we also always have a link within the blurb of 1 that links to โ€œthe cut to the chaseโ€ that is 2

โ€ฆ and so what you end up with, if you want to objectify it into a โ€œtutorial-postingโ€ object perhaps, is two data members, of relevance, that are URLs, that being โ€ฆ

  1. the URL to the WordPress blog posting tutorial โ€ฆ and โ€ฆ
  2. the URL to โ€œthe cut to the chaseโ€ intention of the WordPress blog posting tutorial

โ€ฆ and what weโ€™re proposing today, is that a lot of users can easily forgo the โ€œblurbโ€ and โ€œcut to the chaseโ€, perhaps going back to the blurb for a further read should they want to delve further after a โ€œcut to the chaseโ€ session.

We wanted a way to present this idea on our RJM Programming landing page. There must be a way to add another HTML select โ€œdropdownโ€ element to facilitate this? Well, yes, that could be done, but we thought it would be better to dedicate another RJM Programming Landing Page โ€œcloneโ€ webpage that has a โ€œcut to the chaseโ€ HTML select โ€œdropdownโ€ element substituted for its โ€œlisted and clickableโ€ existing HTML select โ€œdropdownโ€ element, and then set it up that either web page can get you to the other โ€œcloneโ€ web page, and to the user all they โ€œfeelโ€ is the toggling of the โ€œdropdownโ€ data content.

So we just used the term โ€œdata contentโ€, and that means you need to delve into where the โ€œdataโ€ is from. With a WordPress blog, the โ€œdataโ€ is from a MySql database, and to do anything about any changes here will revolve around involving a server side language like PHP โ€ฆ no way around that. So what we do is โ€ฆ

โ€ฆ so PHP is used by curl and crontab to read MySql โ€œdata contentโ€ and rewrite HTML called slideshow.html (for โ€œcut to the chaseโ€ tutorial information) and index.html (for โ€œthe full blurbโ€ contextualizing the โ€œcut to the chaseโ€ with the โ€œbackground contextโ€ as a tutorial).

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โ€™s another story!

Did you know?

Our RJM Programming CentOS web serverโ€™s linux environmentโ€™s โ€ฆ



crontab -e

โ€ฆ edit of its crontab setting records uses the very simple text editor pico to perform changes. Coming off any vi youโ€™ve been doing, youโ€™ll find pico as a lot easier, and like driving a manual car youโ€™ll wonder what to do with the โ€œclutchโ€ foot. You can see a cut down bit of what pico looks like at the bottom of todayโ€™s tutorial picture.

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


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


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


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

This entry was posted in eLearning, Tutorials and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *