WordPress Blog Posting Thread Book Primer Tutorial

WordPress Blog Posting Thread Book Primer Tutorial

WordPress Blog Posting Thread Book Primer Tutorial

What’s with the word “book” in today’s blog posting title?

Glad you asked?! The idea of a “thread of blog postings” is a concept we keep up in our blog posting content managed by the posting authors. On a lot of tutorials it is the history before that we string together in this contents, as for a …

  • blog posting tutorial feed that presents from newest (up the top) to oldest (down the bottom) … which is good for “non-bingeing” awaiting “hot off the press content” readers … but what about people who want to “start from scratch”, later, with a big picture view (helped out by seeing the topic, or group of related concepts, progressively)? … so today we present an emoji button 🔀 …


    <a id="oeimage-pair-fitting-into-a-given-dimension-sources-tutorial" title="Change order of blog posts (now newest to oldest) to oldest through to newest (like a book)" target="_blank" style="text-decoration:none;cursor:pointer;" onclick="hrrearrange(this);">&#128256;</a>

    … added via PHP …
    <?php echo ”

    cps[jiicp].innerHTML+=' <a id="oe' + h1cps[iicp].innerHTML.split(' id="d')[1].split('"')[0] + '" title="Change order of blog posts (now newest to oldest) to oldest through to newest (like a book)" target=_blank style="text-decoration:none;cursor:pointer;" onclick="hrrearrange(this);">&#128256;</a<';

    “; ?>

    … press means by which …

  • blog postings can be reworked into an oldest (up the top) to newest (down the bottom) “book” compilation of the content up to the time of the blog posting you enter in examining

This “book” presentation is always chronological, and so for context here, we add a select (dropdown) element with option element members of the form …


[Blog Posting Title] (YYYYMMDD)

… the click of which hashtag navigates to that part of the “book” (like a chapter, if you will).

Code changes for this all appear in our WordPress blog’s TwentyTen theme’s (good ol’) header.php that work with a new …

<?php

<div style='display:none' id='drefresh'></div>

?>

… as per …

<?php echo ”

var divcih='', antidivcih='', hrsa=[], hroh='', twobits='', cdivid='con' + 't' + 'ent', onlok=true;

function hrrearrange(ahrro) {
var aid='' + ahrro.id;
var honetoif='';
var firsttitle='';
var lasttitle='';
var selindex='&nbsp;<select class=ptpico style="display:inline-block;vertical-align:top;" size=1 title="Posting thread posts in chronological order" onchange="location.href=' + "'" + '#' + "'" + ' + this.value + ' + "'" + '#andabit=-70' + "'" + '; var tsels=docgetclass(' + "'" + 'ptpico' + "'" + ', ' + "'" + 'select' + "'" + '); for (var iij=0; iij<tsels.length; iij++) { tsels[iij].value=this.value; }"><option class=copt value=detrefresh></option></select>';
var appendixnum=0;
if (navigator.userAgent.match(/iPad/i)) {
//alert('here at hrrearrange');
}
if (hrsa.length == 0) {
lasttitle=document.getElementsByTagName('h1')[0].innerHTML.split(' <')[0];
if (navigator.userAgent.match(/iPad/i)) {
//alert('lasttitle=' + lasttitle + ' ... ' + document.getElementsByTagName('h1').length);
}
//alert(lasttitle);
var psdfs=document.getElementById('content').innerHTML.split('<div id="post-');
if (psdfs.length > 1 && cdivid == 'cont' + 'ent') { cdivid='post-' + psdfs[1].split('"')[0]; }
if (navigator.userAgent.match(/iPad/i)) {
//alert(cdivid);
}
hroh='<hr title=" ... welcome to the long hover functionality that shows Blog Post regarding Horizontal Rules">';
hrsa=document.getElementById(cdivid).innerHTML.split(hroh);
if (navigator.userAgent.match(/iPad/i)) {
//alert(hroh + ' ... ' + hrsa.length);
}
if (hrsa.length == 1) { hroh='<hr />'; hrsa=document.getElementById(cdivid).innerHTML.split(hroh); }
if (navigator.userAgent.match(/iPad/i)) {
//alert(hroh + ' ... ' + hrsa.length);
}
if (hrsa.length == 1) { hroh='<hr>'; hrsa=document.getElementById(cdivid).innerHTML.split(hroh); }
if (navigator.userAgent.match(/iPad/i)) {
//alert(hroh + ' ... ' + hrsa.length);
}
if (hrsa.length == 1) { hroh='<p id='; hrsa=document.getElementById(cdivid).innerHTML.split(hroh); }
if (navigator.userAgent.match(/iPad/i)) {
//alert(hroh + ' ... ' + hrsa.length);
}
}
if (hrsa.length <= 1) {
if (navigator.userAgent.match(/iPad/i)) {
//alert('no hr found ' + document.getElementById(cdivid).innerHTML.split('<p id=').length);
if (document.getElementById(cdivid).innerHTML.indexOf('Previous relevant ') != -1) {
//alert(document.getElementById(cdivid).innerHTML.split('Previous relevant ')[0].slice(-300));
}
}
}
if (hrsa.length > 1) {
var ftit='Change order of blog posts (now newest to oldest) to oldest through to newest (like a book)';
var ntit='Change order of blog posts (now oldest to newest like a book) to newest through to oldest (like a feed)';
if (divcih == '') { divcih=document.getElementById(cdivid).innerHTML; }
console.log('divcih=' + divcih);
if (navigator.userAgent.match(/iPad/i)) {
//alert('divcih=' + divcih);
}
if (ahrro.title == ftit) { // change to oldest to newest
//alert(0);
if (antidivcih != '') {
document.getElementById('drefresh').style.display='inline-block';
if (navigator.userAgent.match(/iPad/i)) {
//alert('Antidivcih=' + antidivcih);
}
document.getElementById('drefresh').innerHTML=antidivcih;
} else {
//if (document.getElementById('btutsm')) {
if (document.getElementById('stutsm')) {
document.getElementById('istutsm').src='//www.rjmprogramming.com.au/ITblog/bytheby.php?populate=stutsm&extraget=y';
setTimeout(pdgeistutsm, 5000); //alert(document.getElementById('stutsm').innerHTML);
}
//}
for (var ihj=eval(-1 + hrsa.length); ihj>=0; ihj--) {
if (hrsa[ihj].indexOf('<p>If this was interesting you may be interested in ') >= 0 && hrsa[ihj].indexOf('<p>If this was interesting you may be interested in ') < 9) {
appendixnum++;
}
}
if (navigator.userAgent.match(/iPad/i)) {
//alert('appendixnum=' + appendixnum);
}
var newcc='';
var newp='';
//twobits=hrsa[0].split('<div id="post')[0];
//if (twobits.trim() != '') { hrsa[0]=hrsa[0].replace(twobits, ''); newp=''; }
var jih=0;
for (jih=eval(-1 + eval(eval('' + hrsa.length)) / 1); jih>=0; jih--) {
//alert(hroh + ' ' + hrsa.length);
//alert(eval(eval(eval('' + hrsa.length) - appendixnum) - jih - 1));
if (hrsa[jih].indexOf('<p>If this was interesting you may be interested in ') >= 0 && hrsa[jih].indexOf('<p>If this was interesting you may be interested in ') < 9) {
newcc=newcc;
} else {
//alert('hrsa[' + eval(eval(eval('' + hrsa.length) - appendixnum) - jih - 1) + ']');
if (firsttitle == '' && hrsa[jih].indexOf(' relevant ') != -1 && hrsa[jih].indexOf(' is shown ') != -1 && hrsa[jih].indexOf('<a ') != -1) {
firsttitle=hrsa[jih].split(' relevant ')[1].split('>')[1].split('>')[0];
if (navigator.userAgent.match(/iPad/i)) {
//alert('firsttitle=' + firsttitle + ' ... ' + document.getElementsByTagName('h1').length);
}
selindex=selindex.replace('></option>', '>' + firsttitle + '</option>');
}
if (hrsa[jih].indexOf('<h1') != -1 && hrsa[jih].indexOf('<iframe') != -1) {
honetoif='<h1' + hrsa[jih].split('<h1')[1].split('<iframe')[0];
if (navigator.userAgent.match(/iPad/i)) {
//alert('honetoif=' + honetoif + ' ... ' + document.getElementsByTagName('h1').length);
}
newcc+=newp + hrsa[jih].replace(honetoif, '<p>Next relevant <a target=_blank title="' + lasttitle + '" href="' + document.URL + '">' + lasttitle + '</a> is shown below.</p>').replace('</frame>', '<iframe><h1>');
honetoif+='</h1>';
if (navigator.userAgent.match(/iPad/i)) {
//alert('newcc=' + newcc + ' ... ' + document.getElementsByTagName('h1').length);
}
} else {
if (hrsa[jih].indexOf('<p id="') != -1) {
if (hrsa[jih].split('<p id="')[1].indexOf('<a ') != -1) {
if (selindex.indexOf('>' + hrsa[jih].split('<p id="')[1].split('<a ')[1].split('>')[1].split('<')[0] + '<') == -1) {
selindex=selindex.replace('</select>', '<option class=copt value="dettop' + hrsa[jih].split('<p id="')[1].split('"')[0] + '">' + hrsa[jih].split('<p id="')[1].split('<a ')[1].split('>')[1].split('<')[0] + '</option></select>');
selindex=selindex.replace(' size=' + eval(-2 + eval('' + selindex.split('</option>').length)), ' size=' + eval(-1 + eval('' + selindex.split('</option>').length)));
newcc+=newp + hrsa[jih].replace('<p id="', '<p id="dettop');
} else {
newcc+=newp + hrsa[jih];
}
} else {
newcc+=newp + hrsa[jih];
}
} else {
newcc+=newp + hrsa[jih];
}
}
}
//alert('appendixnum=' + appendixnum + ' hrsa.length=' + hrsa.length + ' Newcc=' + newcc);
newp=hroh;
//if (jih == eval(-1 + eval(eval('' + hrsa.length) - appendixnum) / 1)) {
// for (var jjih=eval(eval(eval('' + hrsa.length) - appendixnum) / 1); jjih<hrsa.length; jjih++) {
// newcc+=newp + hrsa[jjih];
// newp=hroh;
// }
//}
}
<br>
for (jih=0; jih<eval(eval(eval('' + hrsa.length) - appendixnum) / 1); jih++) {
//alert(hroh + ' ' + hrsa.length);
//alert(eval(eval(eval('' + hrsa.length) - appendixnum) - jih - 1));
if (hrsa[jih].indexOf('<p>If this was interesting you may be interested in ') >= 0 && hrsa[jih].indexOf('<p>If this was interesting you may be interested in ') < 9) {
//alert('hrsa[' + eval(eval(eval('' + hrsa.length) - appendixnum) - jih - 1) + ']');
newcc+=newp + hrsa[jih];
} else {
newcc=newcc;
}
//alert('appendixnum=' + appendixnum + ' hrsa.length=' + hrsa.length + ' Newcc=' + newcc);
newp=hroh;
//if (jih == eval(-1 + eval(eval('' + hrsa.length) - appendixnum) / 1)) {
// for (var jjih=eval(eval(eval('' + hrsa.length) - appendixnum) / 1); jjih<hrsa.length; jjih++) {
// newcc+=newp + hrsa[jjih];
// newp=hroh;
// }
//}
}
//alert('twobits=' + twobits);
//alert('newcc=' + newcc);
if (1 == 11) {
var wwo=window.open('', '_blank', 'top=100,left=100,width=800,height=900');
wwo.document.write('<body>' + document.body.innerHTML.replace(divcih, twobits.replace(/\ onload\=/g, ' data-onload=') + newcc.replace(/\ onload\=/g, ' data-onload=')) + '</body>');
//document.body.innerHTML=document.body.innerHTML.replace(divcih, twobits.replace(/\ onload\=/g, ' data-onload=') + newcc.replace(/\ onload\=/g, ' data-onload='));
} else {
onlok=false;
//alert('ready?');
//document.getElementById('drefresh').innerHTML=twobits.replace(/\ onload\=/g, ' data-onload=') + newcc.replace(/\ onload\=/g, ' data-onload=');
document.getElementById('drefresh').style.display='inline-block';
document.getElementById('drefresh').style.backgroundColor='white';
var firstpoh='<p' + newcc.split('<p')[1].split('>')[0] + '>';
antidivcih=document.getElementById(aid).outerHTML.replace(aid, 'draid').replace(ftit, ntit).replace('hrr', 'setTimeout(lhcontentlater, 2000); hrr') + honetoif.replace(lasttitle, firsttitle) + twobits + newcc.replace('</p>', '').replace(firstpoh + 'Previous relevant ', '<details id=detrefresh open><summary>First of thread (reading like a chronological posting thread) relevant ').replace(/Previous\ relevant\ /g, 'Next relevant ').replace(/\ is\ shown\ below\./g, '</summary> is shown below. ' + document.getElementById(aid).outerHTML.replace(aid, 'ddraid').replace(ftit, ntit).replace('hrr', 'setTimeout(lhcontentlater, 2000); hrr') + selindex) + '</details><br><hr title="Chronological book above and newest to oldest feed below" style="color:rgba(255,0,0,0.8);height:40px;"></hr><br>';
console.log('antidivcih=' + antidivcih);
if (navigator.userAgent.match(/iPad/i)) {
//alert('antidivcih=' + antidivcih);
}
<br>
//alert('here');
if (!document.getElementById('drefresh')) { alert('why'); }
if (navigator.userAgent.match(/iPad/i)) {
//alert('AntiDivcih=' + antidivcih);
}
onlok=false; // new
<br>
//alert('prethere ' + document.URL.split('#')[0] + '?lastdrefresh=y');
document.getElementById('drefresh').innerHTML=antidivcih;
//alert('there');
//alert(newcc.replace(firstpoh + 'Previous relevant ', '<p>First of thread relevant ').replace(/Previous\ relevant\ /g, 'Next relevant '));
//document.getElementById('drefresh').innerHTML=document.getElementById(aid).outerHTML.replace(aid, 'draid').replace(ftit, ntit) + honetoif.replace(lasttitle, firsttitle) + twobits + newcc.replace(firstpoh + 'Previous relevant ', '<p>First of thread relevant ').replace(/Previous\ relevant\ /g, 'Next relevant ');
//alert('read now');
}
}
//alert('XHere');
document.getElementById(aid).title=ntit;
var jform = new FormData();
var jxhr = new XMLHttpRequest();
jform.append('lastdrefresh', antidivcih);
jxhr.open('post', document.URL.split('/ITblog')[0] + '/ITblog/toggle_download.php', false);
jxhr.send(jform);
<br>
wodivc=window.open(document.URL.split('#')[0] + '','_blank','top=0,left=' + eval(-100 + eval('' + screen.width)) + ',width=1,height=1');
//alert('XXheRe');
setTimeout(lhdrefreshlater, 2000);
//alert('herE');
} else {
//alert('huh?');
//document.getElementById('drefresh').innerHTML='';
document.getElementById('drefresh').style.display='none';
document.getElementById(cdivid).innerHTML=twobits + divcih;
document.getElementById(aid).title=ftit;
setTimeout(lhcontentlater, 2000); //location.href='#content#andabit=-70'; //document.getElementById('content').scrollIntoView();
}
//alert('work in progress ' + hrsa.length + ' via appendixnum=' + appendixnum);
}
}


function lhdrefreshlater() {
location.href='#drefresh#andabit=-70'; //document.getElementById('content').scrollIntoView()
}


function lhcontentlater() {
location.href='#content#andabit=-70'; //document.getElementById('content').scrollIntoView()
}

“; ?>

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

This entry was posted in eLearning, Event-Driven Programming, Tutorials and tagged , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>