WordPress Blog Course Navigation Emojis Tutorial

WordPress Blog Course Navigation Emojis Tutorial

WordPress Blog Course Navigation Emojis Tutorial

There are three areas of improvement onto yesterday’s WordPress Blog Course Dropdown From Landing Page Dropdown Tutorial we’d like to talk about today regarding the WordPress Blog you are reading now …

  • an “internationalization improvement” where English “Previous” and “Next” hardcodings are turned into emojis ⬅ (⬅) and ➡ (➡) respectively via a changed function may_be_obsolete (in functions.php) now …
    <?php

    function may_be_obsolete($proposed, $seca, $poti, $idlist) {
    global $prehrefnext, $prehrefprev, $stopsuff;
    $asubone='y*o%uwillneverfindthis';
    $asubtwo='y*o%uwillneverfindthis';
    $subone='y*o%uwillneverfindthis';
    $subtwo='y%o*uwillneverfindthis';
    $subthree='y%o*uwillneverfindthis';
    $subfour='y*o%uwillneverfindthis';
    if (str_replace("#content","",$seca) == "") {
    if (strpos($proposed, ">Previous") !== false) {
    if (strpos(($proposed . "&"), "&pp=&") !== false) {
    $bitsare = explode(">", $proposed);
    $nums = explode("=", str_replace("&", "=", str_replace("&pp=", "", str_replace("&pn", "", str_replace("?p=", "", $proposed)))));
    if ($nums[0] == $nums[1]) {
    if ($poti != "") {
    $against=may_be_obsolete($proposed, " ", $poti, $idlist);
    $ags=explode($poti, $against);
    $postag=">" . explode(" ", $poti)[0] . " ";
    $goodv="";
    $goodu="";
    if (sizeof($ags) > 1) {
    $goodv=$ags[0];
    }
    if ($goodv != "") {
    $goodvs=explode($postag, $goodv);
    if (sizeof($goodvs) == 1) {
    $goodv="";
    } else {
    $goodv=substr($postag,1) . explode("<", $goodvs[-1 + sizeof($goodvs)])[0];
    $goodu="<option " . explode("<option ", $goodvs[-2 + sizeof($goodvs)])[-1 + sizeof(explode("<option ", $goodvs[-2 + sizeof($goodvs)]))];
    $prehrefprev=" href='" . str_replace('&amp;','&',explode("'", explode(" value='", $goodu)[1])[0]) . "' data-";
    $subone=explode('&', explode('p=', $proposed)[1])[0];
    $subtwo=explode('&', explode('p=', $goodu)[1])[0];
    $subthree=explode('&', explode('title=', $proposed)[1])[0];
    $subthree=str_replace(' ','_',explode(' (',$poti)[0]);
    $subfour=str_replace(' ','_',explode(' (',$goodv)[0]);
    }
    }
    }
    $proposed = str_replace($subthree,$subfour,str_replace($subone,$subtwo,str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed)));
    }
    }
    } else if (strpos($proposed, ">Next") !== false) {
    if (strpos(($proposed . "&"), "&pn=&") !== false) {
    $bitsare = explode(">", $proposed);
    $nums = explode("=", str_replace("&", "=", str_replace("&pn=", "", str_replace("&pp", "", str_replace("?p=", "", $proposed)))));
    if ($nums[0] == $nums[1]) {
    if ($poti != "") {
    $against=may_be_obsolete($proposed, " ", $poti, $idlist);
    $ags=explode($poti, $against);
    $postag=">" . explode(" ", $poti)[0] . " ";
    $goodv="";
    $goodu="";
    if (sizeof($ags) > 1) {
    $goodv=$ags[1];
    }
    if ($goodv != "") {
    $goodvs=explode($postag, $goodv);
    if (sizeof($goodvs) == 1) {
    $goodv="";
    } else {
    $goodv=substr($postag,1) . explode("<", $goodvs[1])[0];
    $goodu="<option " . explode("<option ", $goodvs[0])[-1 + sizeof(explode("<option ", $goodvs[0]))];
    $prehrefnext=" href='" . str_replace('&amp;','&',explode("'", explode(" value='", $goodu)[1])[0]) . "' data-";
    $subone=explode('&', explode('p=', $proposed)[1])[0];
    $subtwo=explode('&', explode('p=', $goodu)[1])[0];
    $subthree=explode('&', explode('title=', $proposed)[1])[0];
    $subthree=str_replace(' ','_',explode(' (',$poti)[0]);
    $subfour=str_replace(' ','_',explode(' (',$goodv)[0]);
    }
    }
    }
    $proposed = str_replace($subthree,$subfour,str_replace($subone,$subtwo,str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed)));
    }
    }
    }
    } else if (strpos($proposed, ">Next") !== false && $poti != "") {
    if ($idlist == "") { $idlist=file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/index.html"); }
    $ibitsx=explode(">" . $poti, $idlist);
    if (sizeof($ibitsx) > 1) {
    if (strpos($ibitsx[0], ">" . explode(" ", $poti)[0] . " ") !== false) {
    $jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[0]);
    if (sizeof($jbitsx) > 1) {
    $newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
    $newu=str_replace("&amp;", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
    //file_put_contents("xzc.xzc66", $proposed . "\n" . $newt . "\n" . $newu);
    if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
    $allselect="<sel" . "ect " . str_replace("windowopen", "window.open", explode("<sel" . "ect ", $ibitsx[0])[-1 + sizeof(explode("<sel" . "ect ", $ibitsx[0]))]) . ">" . $poti . " " . str_replace("windowopen", "window.open", explode("</sel" . "ect>", $ibitsx[1])[0]) . "</sel" . "ect>";
    $presel=str_replace("90%;", "200px;display:inline-block;", str_replace("ChangeTutNow(this)", "location.href=this.value;", "</a> <" . explode(">", substr($allselect,1))[0] . " onclick='event.stopPropagation();'><option value='#'>Suggestion</option>"));
    $postsel="</sel" . "ect><a href=#>";
    $jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $allselect);
    for ($jii=1; $jii<sizeof($jbitsx); $jii++) {
    $presel.=str_replace("/wordpress/", "/ITblog/", str_replace(" onclick=", " data-onclick=", "<opt" . "ion " . explode("<opt" . "ion ", $jbitsx[-1 + $jii])[-1 + sizeof(explode("<opt" . "ion ", $jbitsx[-1 + $jii]))] . ">" . explode(" ", $poti)[0] . " " . explode("</opt" . "ion>", $jbitsx[$jii])[0] . "</opt" . "ion>"));
    }
    $potiwords=explode(" ", $poti);
    $onez=0;
    if ($poti != '') {
    $asubone="<option value='#'>Suggestion</option>";
    $asubtwo="";
    $optsa=explode('<option ', $presel);
    for ($inm=1; $inm<sizeof($optsa); $inm++) {
    if (strpos($optsa[$inm], ">" . $poti) !== false) {
    if ($inm < (-1 + sizeof($optsa))) {
    $asubtwo.='<OPTION title=Previous onmouseover="if (this.title.length == 8) { this.title+=String.fromCharCode(32) + String.fromCodePoint(11013); }" id=optprev onclick="location.href=this.value;" ' . str_replace('#content','#content ',explode('</option>', $optsa[1 + $inm])[0]) . ' &#11013;</option>';
    }
    $asubtwo.='<OPTION title=This ' . str_replace(' value=',' value="#ahomeis" data-value=',str_replace('#content','#content ',explode('</option>', $optsa[0 + $inm])[0])) . '</option>';
    if ($inm > 1) {
    $asubtwo.='<OPTION title=Next onmouseover="if (this.title.length == 4) { this.title+=String.fromCharCode(32) + String.fromCodePoint(10145); }" id=optnext onclick="location.href=this.value;" ' . str_replace('#content','#content ',explode('</option>', $optsa[-1 + $inm])[0]) . ' &#10145;</option>';
    }
    }
    }
    }
    $asubtwo.="<option value='#'>Suggestion</option>";
    $presel=str_replace($asubone, $asubtwo, $presel);
    $stopsuff=str_replace(' title=', ' title="First up to 3 options are Previous, This, Next suggestions" data-title=', str_replace('200px;','300px;font-size:9px;',str_replace(' onchange=',' size=4 onclick="this.size=1; this.style.fontSize=' . "'24px'" . ';" onchange="if (this.value.replace(/\#/g,' . "''" . ').trim().length != 0) { location.href=this.value.trim(); } else { this.size=1; this.style.fontSize=' . "'24px'" . '; }" data-onchange=',str_replace(">Suggestion<"," selected>" . explode(" ",$poti)[0] . " Suggestion ...<",$presel)))) . "</sel" . "ect>";
    $optsa=explode('<option ', $stopsuff);
    for ($inm=1; $inm<sizeof($optsa); $inm++) {
    $onez=0;
    $compto="";
    $dem=">";
    for ($iinm=0; $iinm<(-1 + sizeof($potiwords)); $iinm++) {
    $compto.=$dem . $potiwords[$iinm];
    $dem=' ';
    if (strpos($optsa[$inm], $compto) !== false) { $onez++; }
    }
    $thist=explode(' (', explode('>', explode('</option>',$optsa[$inm])[0])[-1 + sizeof(explode('>', explode('</option>',$optsa[$inm])[0]))])[0];
    if ($onez > 0) {
    if (strpos($optsa[$inm], '>&') === false && strpos($optsa[$inm], ' Suggestion ...<') === false) {
    $stopsuff=str_replace('>' . $thist . '','>&#' . (9842 + $onez) . '; ' . $thist . '',$stopsuff);
    }
    }
    }
    $presel.=$postsel;
    return str_replace($asubone, $asubtwo, str_replace(" Suggestion", $presel, explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1]));
    //return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
    }
    }
    }
    }
    } else if (strpos($proposed, ">Previous") !== false && $poti != "") {
    if ($idlist == "") { $idlist=file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/index.html"); }
    $ibitsx=explode(">" . $poti, $idlist);
    if (sizeof($ibitsx) > 1) {
    if (strpos($ibitsx[1], ">" . explode(" ", $poti)[0] . " ") !== false) {
    $jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[1]);
    if (sizeof($jbitsx) > 1) {
    $newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
    $newu=str_replace("&amp;", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
    //file_put_contents("xzc.xzc666", $proposed . "\n" . $newt . "\n" . $newu);
    if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
    return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
    }
    }
    }
    }
    }
    return $proposed;
    }

    ?>
  • inefficient space is lessened via header.php onload event setTimeout(last_email_check, 15000); …
    <?php

    function last_email_check() {
    if (document.getElementById('linkhints') && document.URL.indexOf('&pn') != -1) {
    document.getElementById('linkhints').style.marginTop='-70px';
    }

    // rest of last_email_check function follows
    }

    ?>
  • another “internationalization improvement” to Google Translate translations of this blog and img element URL amendments via header.php onload event setTimeout(last_email_check, 15000); …
    <?php

    function last_email_check() {
    var imsare=document.getElementsByTagName('img');
    for (var jimsare=0; jimsare<imsare.length; jimsare++) {
    if (('' + imsare[jimsare].src).indexOf('&u=') != -1) {
    imsare[jimsare].src=imsare[jimsare].src.split('&u=')[1];
    }
    }

    // rest of last_email_check function follows
    }

    ?>


Previous relevant WordPress Blog Course Dropdown From Landing Page Dropdown Tutorial is shown below.

WordPress Blog Course Dropdown From Landing Page Dropdown Tutorial

WordPress Blog Course Dropdown From Landing Page Dropdown Tutorial

Today’s focus, added to yesterday’s WordPress Blog Navigation From Landing Page Dropdown Tutorial‘s theme, and you might be surprised at our interest with … dropdowns … huh?! Yes, we like to call the HTML select element a dropdown, and today we are interested in two ideas with them …

  • the use of a non-unitary size attribute, that for non-mobile platforms, shows that number of option (first) elements in front of the user’s eyes
  • emoji usage in option element innerHTML contents to effect the dropdown look, helping out with a (albeit tenuous) “relevance measure”

Using an initial size attribute of four we show the user, as a first view …

  1. Previous relevant blog posting
  2. This relevant blog posting
  3. Next relevant blog posting
  4. Instructional option

… that if clicked on that fourth option, reverts to (default) size attribute of one (and increase font size, ready for full dropdown option view), and if on the second, hashtag navigate to top, or respectively “backtrack on course” or “proceed with course”.

Our “relevance measure” is a count of tutorial blog posting words, in order, in common with the current blog posting. We stumbled on an “emoji set” to use for this at HTML Unicode UTF-8‘s “RECYCLING SYMBOL FOR TYPE-? PLASTICS” (from 1 to 7) … ♳ ♴ ♵ ♶ ♷ ♸ ♹ … function may_be_obsolete (in functions.php) now …

<?php

function may_be_obsolete($proposed, $seca, $poti, $idlist) {
global $prehrefnext, $prehrefprev, $stopsuff;
$asubone='y*o%uwillneverfindthis';
$asubtwo='y*o%uwillneverfindthis';
$subone='y*o%uwillneverfindthis';
$subtwo='y%o*uwillneverfindthis';
$subthree='y%o*uwillneverfindthis';
$subfour='y*o%uwillneverfindthis';
if (str_replace("#content","",$seca) == "") {
if (strpos($proposed, ">Previous") !== false) {
if (strpos(($proposed . "&"), "&pp=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pp=", "", str_replace("&pn", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
if ($poti != "") {
$against=may_be_obsolete($proposed, " ", $poti, $idlist);
$ags=explode($poti, $against);
$postag=">" . explode(" ", $poti)[0] . " ";
$goodv="";
$goodu="";
if (sizeof($ags) > 1) {
$goodv=$ags[0];
}
if ($goodv != "") {
$goodvs=explode($postag, $goodv);
if (sizeof($goodvs) == 1) {
$goodv="";
} else {
$goodv=substr($postag,1) . explode("<", $goodvs[-1 + sizeof($goodvs)])[0];
$goodu="<option " . explode("<option ", $goodvs[-2 + sizeof($goodvs)])[-1 + sizeof(explode("<option ", $goodvs[-2 + sizeof($goodvs)]))];
$prehrefprev=" href='" . str_replace('&amp;','&',explode("'", explode(" value='", $goodu)[1])[0]) . "' data-";
$subone=explode('&', explode('p=', $proposed)[1])[0];
$subtwo=explode('&', explode('p=', $goodu)[1])[0];
$subthree=explode('&', explode('title=', $proposed)[1])[0];
$subthree=str_replace(' ','_',explode(' (',$poti)[0]);
$subfour=str_replace(' ','_',explode(' (',$goodv)[0]);
}
}
}
$proposed = str_replace($subthree,$subfour,str_replace($subone,$subtwo,str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed)));
}
}
} else if (strpos($proposed, ">Next") !== false) {
if (strpos(($proposed . "&"), "&pn=&") !== false) {
$bitsare = explode(">", $proposed);
$nums = explode("=", str_replace("&", "=", str_replace("&pn=", "", str_replace("&pp", "", str_replace("?p=", "", $proposed)))));
if ($nums[0] == $nums[1]) {
if ($poti != "") {
$against=may_be_obsolete($proposed, " ", $poti, $idlist);
$ags=explode($poti, $against);
$postag=">" . explode(" ", $poti)[0] . " ";
$goodv="";
$goodu="";
if (sizeof($ags) > 1) {
$goodv=$ags[1];
}
if ($goodv != "") {
$goodvs=explode($postag, $goodv);
if (sizeof($goodvs) == 1) {
$goodv="";
} else {
$goodv=substr($postag,1) . explode("<", $goodvs[1])[0];
$goodu="<option " . explode("<option ", $goodvs[0])[-1 + sizeof(explode("<option ", $goodvs[0]))];
$prehrefnext=" href='" . str_replace('&amp;','&',explode("'", explode(" value='", $goodu)[1])[0]) . "' data-";
$subone=explode('&', explode('p=', $proposed)[1])[0];
$subtwo=explode('&', explode('p=', $goodu)[1])[0];
$subthree=explode('&', explode('title=', $proposed)[1])[0];
$subthree=str_replace(' ','_',explode(' (',$poti)[0]);
$subfour=str_replace(' ','_',explode(' (',$goodv)[0]);
}
}
}
$proposed = str_replace($subthree,$subfour,str_replace($subone,$subtwo,str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed)));
}
}
}
} else if (strpos($proposed, ">Next") !== false && $poti != "") {
if ($idlist == "") { $idlist=file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/index.html"); }
$ibitsx=explode(">" . $poti, $idlist);
if (sizeof($ibitsx) > 1) {
if (strpos($ibitsx[0], ">" . explode(" ", $poti)[0] . " ") !== false) {
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[0]);
if (sizeof($jbitsx) > 1) {
$newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
$newu=str_replace("&amp;", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
$allselect="<sel" . "ect " . str_replace("windowopen", "window.open", explode("<sel" . "ect ", $ibitsx[0])[-1 + sizeof(explode("<sel" . "ect ", $ibitsx[0]))]) . ">" . $poti . " " . str_replace("windowopen", "window.open", explode("</sel" . "ect>", $ibitsx[1])[0]) . "</sel" . "ect>";
$presel=str_replace("90%;", "200px;display:inline-block;", str_replace("ChangeTutNow(this)", "location.href=this.value;", "</a> <" . explode(">", substr($allselect,1))[0] . " onclick='event.stopPropagation();'><option value='#'>Suggestion</option>"));
$postsel="</sel" . "ect><a href=#>";
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $allselect);
for ($jii=1; $jii<sizeof($jbitsx); $jii++) {
$presel.=str_replace("/wordpress/", "/ITblog/", str_replace(" onclick=", " data-onclick=", "<opt" . "ion " . explode("<opt" . "ion ", $jbitsx[-1 + $jii])[-1 + sizeof(explode("<opt" . "ion ", $jbitsx[-1 + $jii]))] . ">" . explode(" ", $poti)[0] . " " . explode("</opt" . "ion>", $jbitsx[$jii])[0] . "</opt" . "ion>"));
}
$potiwords=explode(" ", $poti);
$onez=0;
if ($poti != '') {
$asubone="<option value='#'>Suggestion</option>";
$asubtwo="";
$optsa=explode('<option ', $presel);
for ($inm=1; $inm<sizeof($optsa); $inm++) {
if (strpos($optsa[$inm], ">" . $poti) !== false) {
if ($inm < (-1 + sizeof($optsa))) {
$asubtwo.='<OPTION ' . str_replace('#content','#content ',explode('</option>', $optsa[1 + $inm])[0]) . '</option>';
}
$asubtwo.='<OPTION ' . str_replace(' value=',' value="#ahomeis" data-value=',str_replace('#content','#content ',explode('</option>', $optsa[0 + $inm])[0])) . '</option>';
if ($inm > 1) {
$asubtwo.='<OPTION ' . str_replace('#content','#content ',explode('</option>', $optsa[-1 + $inm])[0]) . '</option>';
}
}
}
}
$asubtwo.="<option value='#'>Suggestion</option>";
$presel=str_replace($asubone, $asubtwo, $presel);
$stopsuff=str_replace(' title=', ' title="First up to 3 options are Previous, This, Next suggestions" data-title=', str_replace('200px;','300px;font-size:9px;',str_replace(' onchange=',' size=4 onclick="this.size=1; this.style.fontSize=' . "'24px'" . ';" onchange="if (this.value.replace(/\#/g,' . "''" . ').trim().length != 0) { location.href=this.value.trim(); } else { this.size=1; this.style.fontSize=' . "'24px'" . '; }" data-onchange=',str_replace(">Suggestion<"," selected>" . explode(" ",$poti)[0] . " Suggestion ...<",$presel)))) . "</sel" . "ect>";
$optsa=explode('<option ', $stopsuff);
for ($inm=1; $inm<sizeof($optsa); $inm++) {
$onez=0;
$compto="";
$dem=">";
for ($iinm=0; $iinm<(-1 + sizeof($potiwords)); $iinm++) {
$compto.=$dem . $potiwords[$iinm];
$dem=' ';
if (strpos($optsa[$inm], $compto) !== false) { $onez++; }
}
$thist=explode('>', explode('</option>',$optsa[$inm])[0])[-1 + sizeof(explode('>', explode('</option>',$optsa[$inm])[0]))];
if ($onez > 0) {
if (strpos($optsa[$inm], '>&') === false && strpos($optsa[$inm], ' Suggestion ...<') === false) {
$stopsuff=str_replace('>' . $thist . '</option>','>&#' . (9842 + $onez) . '; ' . $thist . '</option>',$stopsuff);
}
}
}
$presel.=$postsel;
return str_replace($asubone, $asubtwo, str_replace(" Suggestion", $presel, explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1]));
}
}
}
}
} else if (strpos($proposed, ">Previous") !== false && $poti != "") {
if ($idlist == "") { $idlist=file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/index.html"); }
$ibitsx=explode(">" . $poti, $idlist);
if (sizeof($ibitsx) > 1) {
if (strpos($ibitsx[1], ">" . explode(" ", $poti)[0] . " ") !== false) {
$jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[1]);
if (sizeof($jbitsx) > 1) {
$newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
$newu=str_replace("&amp;", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
//file_put_contents("xzc.xzc666", $proposed . "\n" . $newt . "\n" . $newu);
if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
}
}
}
}
}
return $proposed;
}

?>


Previous relevant WordPress Blog Navigation From Landing Page Dropdown Tutorial is shown below.

WordPress Blog Navigation From Landing Page Dropdown Tutorial

WordPress Blog Navigation From Landing Page Dropdown Tutorial

We started a “course helpful” relationship between …

  • Landing Page‘s dropdown … and …
  • WordPress Blog Postings in chronological context

… based on the blog posting first word when we presented WordPress Blog Mini Makeover Tutorial.

Today, we’re reworking and revisiting this functionality, the motivation being blog postings with unique first words not really suiting the “dual iframe” look. We now scroll to the top of the webpage in this scenario.

Part of the rework is to “id” those “course dual iframe elements” and if their “src” attribute is the same, this matches the criteria for the concern in the previous paragraph.

  • navigation from Landing Page to “Course Interest” view of the blog posting chosen needed improved hashtag navigation …
    functions.php code … new global variables …

    $prehrefnext="";
    $prehrefprev="";
    $stopsuff="";
    functions.php code … function may_be_obsolete now …

    function may_be_obsolete($proposed, $seca, $poti, $idlist) {
    global $prehrefnext, $prehrefprev, $stopsuff;
    $subone='y*o%uwillneverfindthis';
    $subtwo='y%o*uwillneverfindthis';
    $subthree='y%o*uwillneverfindthis';
    $subfour='y*o%uwillneverfindthis';
    if (str_replace("#content","",$seca) == "") {
    if (strpos($proposed, ">Previous") !== false) {
    if (strpos(($proposed . "&"), "&pp=&") !== false) {
    $bitsare = explode(">", $proposed);
    $nums = explode("=",
    str_replace("&", "=",
    str_replace("&pp=", "",
    str_replace("&pn", "", str_replace("?p=", "", $proposed)))));
    if ($nums[0] == $nums[1]) {
    if ($poti != "") {
    $against=may_be_obsolete($proposed, " ", $poti, $idlist);
    $ags=explode($poti, $against);
    $postag=">" . explode(" ", $poti)[0] . " ";
    $goodv="";
    $goodu="";
    if (sizeof($ags) > 1) {
    $goodv=$ags[0];
    }
    if ($goodv != "") {
    $goodvs=explode($postag, $goodv);
    if (sizeof($goodvs) == 1) {
    $goodv="";
    } else {
    $goodv=substr($postag,1);
    $goodv.=explode("<", $goodvs[-1 + sizeof($goodvs)])[0];
    $goodu="<option ";
    $goodu.=explode("<option ",
    $goodvs[-2 + sizeof($goodvs)])[-1 + sizeof(explode("<option ", $goodvs[-2 + sizeof($goodvs)]))];
    //
    //
    //
    //
    $prehrefprev=" href='";
    $prehrefprev.=str_replace('&amp;','&',explode("'", explode(" value='", $goodu)[1])[0]);
    $prehrefprev.="' data-";
    $subone=explode('&', explode('p=', $proposed)[1])[0];
    $subtwo=explode('&', explode('p=', $goodu)[1])[0];
    $subthree=explode('&', explode('title=', $proposed)[1])[0];
    $subthree=str_replace(' ','_',explode(' (',$poti)[0]);
    $subfour=str_replace(' ','_',explode(' (',$goodv)[0]);
    }
    }
    }
    $proposed = str_replace($subthree,$subfour,
    str_replace($subone,$subtwo,
    str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed)));
    }
    }
    } else if (strpos($proposed, ">Next") !== false) {
    if (strpos(($proposed . "&"), "&pn=&") !== false) {
    $bitsare = explode(">", $proposed);
    $nums = explode("=",
    str_replace("&", "=",
    str_replace("&pn=", "",
    str_replace("&pp", "",
    str_replace("?p=", "", $proposed)))));
    if ($nums[0] == $nums[1]) {
    if ($poti != "") {
    $against=may_be_obsolete($proposed, " ", $poti, $idlist);
    $ags=explode($poti, $against);
    $postag=">" . explode(" ", $poti)[0] . " ";
    $goodv="";
    $goodu="";
    if (sizeof($ags) > 1) {
    $goodv=$ags[1];
    }
    if ($goodv != "") {
    $goodvs=explode($postag, $goodv);
    if (sizeof($goodvs) == 1) {
    $goodv="";
    } else {
    $goodv=substr($postag,1);
    $goodv.=explode("<", $goodvs[1])[0];
    $goodu="<option ";
    $goodu.=explode("<option ", $goodvs[0])[-1 + sizeof(explode("<option ", $goodvs[0]))];
    $prehrefnext=" href='";
    $prehrefnext.=str_replace('&amp;','&',explode("'", explode(" value='", $goodu)[1])[0]);
    $prehrefnext.="' data-";
    $subone=explode('&', explode('p=', $proposed)[1])[0];
    $subtwo=explode('&', explode('p=', $goodu)[1])[0];
    $subthree=explode('&', explode('title=', $proposed)[1])[0];
    $subthree=str_replace(' ','_',explode(' (',$poti)[0]);
    $subfour=str_replace(' ','_',explode(' (',$goodv)[0]);
    }
    }
    }
    $proposed = str_replace($subthree,$subfour,
    str_replace($subone,$subtwo,
    str_replace($bitsare[sizeof($bitsare) - 1], "", $proposed)));
    }
    }
    }
    } else if (strpos($proposed, ">Next") !== false && $poti != "") {
    //if ($idlist == "") { $idlist=file_get_contents(dirname(__FILE__) . "/../../../../index.html"); }
    if ($idlist == "") { $idlist=file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/index.html"); }

    $ibitsx=explode(">" . $poti, $idlist);
    if (sizeof($ibitsx) > 1) {
    //file_put_contents('apotii.pot', "no >" . explode(" ", $poti)[0] . " ");
    if (strpos($ibitsx[0], ">" . explode(" ", $poti)[0] . " ") !== false) {
    //file_put_contents('apotii.pot', " yes >" . explode(" ", $poti)[0] . " ");
    $jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[0]);
    //file_put_contents('apotiii.pot', "no >" . explode(" ", $poti)[0] . " *in*" . $ibitsx[0]);
    if (sizeof($jbitsx) > 1) {
    //file_put_contents('apotiii.pot', "yes >" . explode(" ", $poti)[0] . " *in*" . $ibitsx[0]);
    $newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
    $newu=str_replace("&amp;", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
    //file_put_contents('apotjjj.pot', "no " . $newt . ' ' . $newu);
    //file_put_contents("xzc.xzc66", $proposed . "\n" . $newt . "\n" . $newu);
    if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
    //file_put_contents('apotjjj.pot', "yes " . $newt . ' ' . $newu);
    $allselect="<sel" . "ect " . str_replace("windowopen", "window.open", explode("<sel" . "ect ", $ibitsx[0])[-1 + sizeof(explode("<sel" . "ect ", $ibitsx[0]))]) . ">" . $poti . " " . str_replace("windowopen", "window.open", explode("</sel" . "ect>", $ibitsx[1])[0]) . "</sel" . "ect>";
    $presel=str_replace("90%;", "200px;display:inline-block;", str_replace("ChangeTutNow(this)", "location.href=this.value;", "</a> <" . explode(">", substr($allselect,1))[0] . " onclick='event.stopPropagation();'><option value='#'>Suggestion</option>"));
    $postsel="</sel" . "ect><a href=#>";
    $jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $allselect);
    for ($jii=1; $jii<sizeof($jbitsx); $jii++) {
    $presel.=str_replace("/wordpress/", "/ITblog/", str_replace(" onclick=", " data-onclick=", "<opt" . "ion " . explode("<opt" . "ion ", $jbitsx[-1 + $jii])[-1 + sizeof(explode("<opt" . "ion ", $jbitsx[-1 + $jii]))] . ">" . explode(" ", $poti)[0] . " " . explode("</opt" . "ion>", $jbitsx[$jii])[0] . "</opt" . "ion>"));
    }
    $stopsuff=str_replace(' onchange=',' onchange="if (this.value.length != 0) { location.href=this.value; }" data-onchange=',str_replace(">Suggestion<",">" . explode(" ",$poti)[0] . " Suggestion ...<",$presel)) . "</sel" . "ect>";
    $presel.=$postsel;
    return str_replace(" Suggestion", $presel, explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1]);
    //return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
    }
    }
    }
    }
    //file_put_contents("xzc.xzc44", $poti . "\n" . $idlist);
    } else if (strpos($proposed, ">Previous") !== false && $poti != "") {
    //if ($idlist == "") { $idlist=file_get_contents(dirname(__FILE__) . "/../../../../index.html"); }
    if ($idlist == "") { $idlist=file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/index.html"); }
    // <option id='MyNew-20200317' onclick='windowopen("//www.rjmprogramming.com.au/ITblog/?p=48271&amp;pp=&amp;pn=&amp;title=Javascript_Convex_Polygon_Analyze_Tutorial","_blank"); ' value='//www.rjmprogramming.com.au/ITblog/?p=48271&amp;pp=&amp;pn=&amp;title=Javascript_Convex_Polygon_Analyze_Tutorial'>Javascript Convex Polygon Analyze Tutorial (20200317)</option>
    //file_put_contents('apoti.pot', "idlist Length=" . strlen($idlist) . " finding >" . $poti);

    $ibitsx=explode(">" . $poti, $idlist);
    if (sizeof($ibitsx) > 1) {
    if (strpos($ibitsx[1], ">" . explode(" ", $poti)[0] . " ") !== false) {
    $jbitsx=explode(">" . explode(" ", $poti)[0] . " ", $ibitsx[1]);
    if (sizeof($jbitsx) > 1) {
    $newt=explode(" ", $poti)[0] . " " . explode(" (", explode("</option>", $jbitsx[1])[0])[0];
    $newu=str_replace("&amp;", "&", explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0])))[-1 + sizeof(explode(" value=", str_replace("'", "", str_replace('"', '', $jbitsx[0]))))]);
    //file_put_contents("xzc.xzc666", $proposed . "\n" . $newt . "\n" . $newu);
    if (strpos($proposed, "'>") !== false && strpos($newu, "?p=") !== false) {
    return explode("?p=", $newu)[1] . "'>" . explode("'>", $proposed)[1];
    }
    }
    }
    }
    //file_put_contents("xzc.xzc44", $poti . "\n" . $idlist);
    }
    return $proposed;
    }
    functions.php code … function previous_next now …

    function previous_next($both = true) {
    global $prehrefnext, $prehrefprev, $stopsuff;
    $no="";
    if (isset($_GET['pp']) || isset($_GET['pn'])) {
    $getp="";
    if (!isset($_GET['p'])) {
    $getp=get_the_ID(); //$post->ID;
    } else {
    $getp=$_GET['p'];
    }
    $prefix = " id='atop";
    if ($both) $prefix = " id='abottom";
    $topic = "";
    $topsuff = "";
    $tget = "";
    $isuff = "#content";
    $jsuff = "#content";
    $isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad');
    if ($isiPad === false) {
    $isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPhone');
    }
    if ($isiPad === false) {
    $isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'Android');
    }
    if ($isiPad) $isuff = "&content=y";
    if (isset($_GET['title'])) {
    $tget = "&title=" . $_GET['title'];
    $topic = str_replace("~", " ", get_tutorial_topic(str_replace("_", " ", $_GET['title'])));
    if ($both) {
    $topsuff = "<span>  <a href='#content' title='Back to " . str_replace("~", " ", $_GET['title']) . "'>^</a>  </span>";
    }
    } else {
    $topic = str_replace("~", " ", get_tutorial_topic($post->title));
    }
    if (strpos(($_SERVER['QUERY_STRING'] . "&"), "&pp=&pn=&") !== false) {
    $prefix = $prefix;
    } else {
    if ("$both" != "") {
    echo "<table id=if" . $no . "table style='width:150%; background-color: #F6F5F1;'><tbody><tr>";
    } else {
    echo "<table style='width:150%; background-color: #F6F5F1;'><tbody><tr>";
    }
    $cbackto = "";
    if (isset($_GET['backto'])) $isuff = "&content=y";
    if (isset($_GET['backto'])) $cbackto = "&backto=" . urldecode($_GET['backto']);
    $pnv="";
    $ppv="";
    if (isset($_GET['pp'])) {
    $ppv=may_be_obsolete(get_other_one($_GET['pp'], "&pp=", $getp, "<hr" . " />") . "&pn=" . $getp . $tget . $cbackto . "'>Previous" . $topic . " Suggestion", "","","");
    $ppvs=explode("#", $ppv);
    if (sizeof($ppvs) >= 2) {
    $isuff="#" . explode("&", $ppvs[1])[0];
    //file_put_contents("xzc.xzc0", $isuff . " ... " . str_replace("#" . $ppvs[1], "", $ppv));
    $ppv=str_replace("#" . $ppvs[1], "", $ppv);
    }
    }
    if (isset($_GET['pn'])) {
    $pnv=may_be_obsolete(get_other_one($_GET['pn'], "&pn=", $getp, "") . "&pp=" . $getp . $tget . $cbackto . "'>Next" . $topic . " Suggestion", "","","");
    $pnvs=explode("#", $pnv);
    if (sizeof($pnvs) >= 2) {
    $jsuff="#" . explode("&", $pnvs[1])[0];
    $pnv=str_replace("#" . $pnvs[1], "", $pnv);
    }
    }
    $atopsuff=$topsuff;
    if (str_replace("#content","",($isuff . $jsuff)) != "") {
    $topsuff="";
    } else {
    $atopsuff="";
    }
    if (isset($_GET['pp'])) {
    echo "<th><a" . $prefix . "p' target=_blank title='Previous' " . $prehrefnext . "href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . may_be_obsolete(get_other_one($_GET['pp'], "&pp=", $getp, $pnv) . "&pn=" . $getp . $tget . $cbackto . "'>Previous" . $topic . " Suggestion",($isuff . $jsuff),get_the_title( get_the_ID() ),"") . "</a>" . $topsuff . $stopsuff . "</th>";
    if ($stopsuff != "") { $stopsuff = ""; }
    if ($topsuff != "") { $topsuff = ""; }
    }
    if (isset($_GET['pn'])) {
    echo "<th>" . $atopsuff . "<a" . $prefix . "n' style=display:inline-block; target=_blank title='Next' " . $prehrefprev . "href='" . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . may_be_obsolete(get_other_one($_GET['pn'], "&pn=", $getp, $ppv) . "&pp=" . $getp . $tget . $cbackto . "'>Next" . $topic . " Suggestion",($isuff . $jsuff),get_the_title( get_the_ID() ),"") . "</a>" . $topsuff . $stopsuff . "<th>";
    }
    $topsuff = "";
    $stopsuff = "";
    if (isset($_GET['backto'])) {
    echo "<th><a target=_top href='" . urldecode($_GET['backto']) . "' title='Back to Learning Programming'>Learning Programming</a></th>";
    }
    if ($both) {
    echo "</tr><tr>";
    if (isset($_GET['pp'])) {
    $turlis=str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pp'] . $isuff;
    if (strpos($turlis, "#") !== false && strpos($turlis, "&") !== false) {
    if (strpos($turlis, "#") < strpos($turlis, "&")) {
    $atendis="#" . explode("&", explode("#", $turlis)[1])[0];
    //file_put_contents("xzc.xzc7", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
    if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
    if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
    $turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    } else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
    $turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    } else {
    $turlis=str_replace(explode("/ITblog/", $turlis)[1], substr($atendis,1) . "#content", $turlis);
    }
    } else if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
    $turlis=str_replace("'>", $atendis . "'>", str_replace($atendis, "", $turlis));
    } else {
    $turlis=str_replace($atendis, "", $turlis) . $atendis;
    }
    }
    } else if (strpos($turlis, "#") !== false && strpos($isuff, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
    $atendis="" . $isuff;
    //file_put_contents("xzc.xzc70", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
    if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
    if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
    $turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    } else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
    $turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    } else {
    $turlis=str_replace(explode("/ITblog/", $turlis)[1], substr($atendis,1) . "#content", $turlis);
    }
    }
    }
    echo "<td style='vertical-align:top;'><iframe id=ifabottomp style=width:100%;height:800px; " . str_replace("&p","&w",str_replace("' data-","#content' data-",str_replace('href=','onload="document.getElementById(' . "'abottomp'" . ').innerHTML=' . "'Previous'" . '; document.getElementById(' . "'atopp'" . ').innerHTML=' . "'Previous'" . ';" src=',$prehrefnext))) . "src='" . $turlis . "'></iframe></td>";
    }
    if (isset($_GET['pn'])) {
    $turlis=str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']) . "?p=" . $_GET['pn'] . $jsuff;
    if (strpos($turlis, "#") !== false && strpos($turlis, "&") !== false) {
    if (strpos($turlis, "#") < strpos($turlis, "&")) {
    $atendis="#" . explode("&", explode("#", $turlis)[1])[0];
    //file_put_contents("xzc.xzc8", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
    if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
    if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
    $turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    } else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
    $turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    }
    } else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
    $turlis=str_replace('">', $atendis . '">', str_replace($atendis, "", $turlis));
    } else {
    $turlis=str_replace($atendis, "", $turlis) . $atendis;
    }
    }
    } else if (strpos($turlis, "#") !== false && strpos($jsuff, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
    $atendis="#" . $jsuff;
    //file_put_contents("xzc.xzc80", $atendis . " ... " . str_replace($atendis, "", $turlis) . $atendis);
    if (strpos($atendis, "-") !== false && strpos($turlis, "/ITblog/") !== false) {
    if (strpos(str_replace($atendis, "", $turlis), "'>") !== false) {
    $turlis=str_replace( explode("'>", explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    } else if (strpos(str_replace($atendis, "", $turlis), '">') !== false) {
    $turlis=str_replace( explode('">', explode("/ITblog/", $turlis)[1])[0] , substr($atendis,1) . "#content", $turlis);
    }
    }
    }
    echo "<td style='vertical-align:top;'><iframe id=ifabottomn style=width:100%;height:800px; " . str_replace("&p","&w",str_replace("' data-","#content' data-",str_replace('href=','onload="document.getElementById(' . "'abottomn'" . ').innerHTML=' . "'Next'" . '; document.getElementById(' . "'atopn'" . ').innerHTML=' . "'Next'" . ';" src=',$prehrefprev))) . "src='" . $turlis . "'></iframe></td>";
    }
    }
    echo "</tr></tbody></table>";
    }
    }
    $prehrefnext="";
    $prehrefprev="";
    }
    header.php code … new document.body.onload newlpcheck function …


    function postnewlpcheck() {
    window.scrollTo(0,0); //location.href='#ahomeis';
    }

    function newlpcheck() {
    if (document.getElementById('ifabottomp')) {
    if (document.getElementById('ifabottomn')) {
    if (('' + document.getElementById('ifabottomp').src).trim() != '' && ('' + document.getElementById('ifabottomp').src) == ('' + document.getElementById('ifabottomn').src)) {
    //document.getElementById('abottomp').href+='#upthetop';
    setTimeout(postnewlpcheck, 5000);
    }
    } else {
    setTimeout(newlpcheck, 3000);
    }
    } else {
    setTimeout(newlpcheck, 3000);
    }
    }

… calling a changed hashtag_and_a_bit.js external Javascript.


Previous relevant WordPress Blog Mini Makeover Tutorial is shown below.

WordPress Blog Mini Makeover Tutorial

WordPress Blog Mini Makeover Tutorial

“Mini makeover WordPress Blog time” beckons today (or at least a few days ago). This “mini makeover” addressed issues as per …

  • mobile platform tutorial picture sizes could be larger
  • mobile navigation needed improved hashtag navigation
  • navigation from Landing Page to “Course Interest” view of the blog posting chosen needed improved hashtag navigation

… and as far as that goes let’s go into more detail with these changes to our WordPress Blog’s Twenty Ten theme’s header.php and functions.php …

  • mobile platform tutorial picture sizes could be larger …
    Remedies taken from MacBook Pro point of view Symptoms and Steps to Fixes for iPad and iPhone

    … needed new CSS within header.php PHP as per

    <style>

    /* Portrait and Landscape ... thanks to https://css-tricks.com/snippets/css/media-queries-for-standard-devices/ */
    @media only screen
    and (min-device-width: 768px)
    and (max-device-width: 1024px)
    and (-webkit-min-device-pixel-ratio: 1) {
    .alignnone { width: 98% !important; }
    .alignnone > img { width: 98% !important; }
    }

    /* Portrait and Landscape iPhone */
    @media only screen
    and (min-device-width: 320px)
    and (max-device-width: 765px) {
    div.entry-content > div.wp-caption.alignnone { width: 98% !important; }
    div.entry-content > div.wp-caption.alignnone > a > img { width: 98% !important; }
    }

    </style>

  • mobile navigation needed improved hashtag navigation …
    header.php code used to be

    echo "\n if (1 == 1) { if (document.URL.indexOf('?') != -1 || (document.URL.indexOf('/ITblog/') != -1 && (document.URL + '*').indexOf('/ITblog/*') == -1)) { location.href='#main'; window.scrollBy(36,220); } else { window.scrollBy(36,0); } \n";
    … and becomes

    $mainhash="#main";
    if (isset($post->ID)) {
    $mainhash="#post-" . $post->ID;
    }

    echo "\n if (1 == 1) { if (document.URL.indexOf('?') != -1 || (document.URL.indexOf('/ITblog/') != -1 && (document.URL + '*').indexOf('/ITblog/*') == -1)) { location.href='" . $mainhash . "'; if (1 == 1) { window.scrollBy(28,0); } } else if (1 == 1) { window.scrollBy(28,0); } \n";
  • navigation from Landing Page to “Course Interest” view of the blog posting chosen needed improved hashtag navigation …
    functions.php code used to be and then becomes

    function previous_next($both = true) {
    // lots of code
    if ("$both" != "") {
    echo "<table id=iftable style='width:150%; background-color: #F6F5F1;'><tbody><tr>";
    } else {

    echo "<table style='width:150%; background-color: #F6F5F1;'><tbody><tr>";
    }
    // lots of code
    }
    header.php code used to be and then becomes to make use of new id=iftable above …
    … and becomes

    <body onload=" pp_ref(('' + document.URL), ('' + document.referrer)); if (1 == 1) { lookforbincode(); } lookforhighlight(); postcalendar(); changeasfordownload(); if (cafd == cafd) { cafd=0; } else { cafd=true; } checkonl(); setTimeout(initpostedoncc, 3000); widgetcon(); precc(); courseCookies(); cookie_fonts(); is_mentioned_by(); calendar_pass(); prejustshow(); details_summary(0); pre_last_email_check(); setTimeout(last_email_check,15000); " <?php body_class(); ?>>

    … calls …

    function post_pp_ref() {
    if (document.getElementById('iftable')) {
    location.href='#iftable';
    }
    }

    function pp_ref(inuone, inutwo) {
    if ((inuone + inutwo).indexOf('pp=&pn=&title=') != -1 || (inuone + inutwo).indexOf('pp&pn&title=') != -1) {
    setTimeout(post_pp_ref, 8000);
    }
    }

… which you can see in action via a visit to the RJM Programming Landing Page and select a blog posting from the right hand midpage dropdown.

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, 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>