Tag Archives: CMS

Out and About WordPress Blog Content Tweaks Just with iPhone Tutorial

Today, we’re calling on the “out and about away from the MacBook Air for some day(s)” themes presented in … Bluetooth iPad Keyboard and Case Document Editing Tutorial … and combining them with yesterday’s … Command Line History By Date Tutorial … themes, and this time, involving an iPhone, rather than an iPad, maintaining this WordPress.org blog content without the sftp of the MacBook Air environment. You see, down the bottom of any of these blog posts there is this “if you like this, try this” section we occasionally forget to modify for each individual blog post, as the way the Landing Page clicks/taps get you to the appropriate new content via that Post ID we change in that section (then WordPress permalinks come into play helping users not need to know this Post ID number). If we’ve forgotten, and we tweak to this into the day, here, no crontab/curl arrangement saves the day after adjusting the Post ID business. We have this long command line set of commands in the Terminal section of our cPanel part to our AlmaLinux Apache/PHP/MySql hosting WHM software (effectively doing what the crontab/curl scheduled automation would do early into an AEST day), and that is easy on the MacBook Air, but … Can we manage it out and about just with an iPhone and accomodation WiFi? Keep your hair on … we can! Yayyyyyyy! But we had to learn some new Linux related ideas that revolve around the “history” command … again! The thing is, the greatest pain, potentially, tweaking the WordPress content just with an iPhone, at least for us, is the thought of ever having to “keyboard type” in any passwords, and below, combinations of Face Recognition and “saved username/passwords” helps … otherwise we may have let it go, performing … on the iPhone go to Settings -> WiFi to connect to accomodation WiFi … log in to this WordPress blog as the “admin” user … case in point … adjust content regarding those Post ID references down the bottom of the content … bit onerous, but not too bad … tap Save button … easy peasy … ready if happy now for next day’s crontab/curl to put things right regarding Landing Page clicking/tapping … but if needing everything now, we … logged into our WHM cPanel environment … tapped Terminal link … taking us to the RJM Programming domain’s web server

Posted in eLearning, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

CMS Without the Follow Through Downloads Tutorial

Yesterday’s CMS Without the Follow Through Primer Tutorial‘s “clientside only” functionality today adds … Content Management System (ie. CMS) … and … HTML textarea element … and … Text Editing system using the Downloads folder as a “home base” … and with the Google Chrome web browser, for example, we can go one step better here and use the showOpenFilePicker API’s “startIn” option set to “downloads” so that … regarding the textarea content a “Download” button press can use a … <a download=”[baseFile.name]” href=”data:x-application/text,[escape([textareaContent])]”><button style=”background-color:yellow;”>Downloads …</button></a> … to download to the Downloads folder … and the … showOpenFilePicker API “Open Text” button can help a user be in that Downloads folder to start when browsing for their local text files to populate the textarea element … involving … “third draft” latest version of cms_no_follow_through.html “so far just clientside” reduced CMS web application the changed client_browsing.htm client side local file browsing HTML and Javascript inhouse helper our changed file_open_picker.html Open File Picker Interfacing web application Previous relevant CMS Without the Follow Through Primer Tutorial is shown below. It strikes us, we should add to any “Fred and Ginger” list … Content Management System (ie. CMS) … and … HTML textarea element … though it may not be apparent to an “end user” of a CMS product. The textarea talents, as talked about with yesterday’s Textarea Background Transparency Overlay Editable Linking Tutorial and the day before yesterday’s HTML Element InnerText Property Primer Tutorial are, regarding CMS work, in particular … code display code editing line feed data Now supposing “Fred and Ginger” were to involve themselves in a ménage à trois then, surely, the third party for the pairing above would be, to our minds, “PHP”? Why? Well, PHP can be the recipient of any form involving that CMS textarea hosting form element (or use an Ajax FormData object arrangement) and be able to take concrete measures regarding that user driven, textarea driven, data and write it to a web server file or database. Other server languages like Python or Perl or ASP.Net can do this too. There’s the ideal CMS arrangement, perhaps. But, as we intimated in the blog posting title, “CMS Without the Follow Through Primer Tutorial” … where and write it to a web server file or database = the Follow Through of course?! … so in our new “CMS Without the Follow Through” project we might explore some

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

CMS Without the Follow Through Primer Tutorial

It strikes us, we should add to any “Fred and Ginger” list … Content Management System (ie. CMS) … and … HTML textarea element … though it may not be apparent to an “end user” of a CMS product. The textarea talents, as talked about with yesterday’s Textarea Background Transparency Overlay Editable Linking Tutorial and the day before yesterday’s HTML Element InnerText Property Primer Tutorial are, regarding CMS work, in particular … code display code editing line feed data Now supposing “Fred and Ginger” were to involve themselves in a ménage à trois then, surely, the third party for the pairing above would be, to our minds, “PHP”? Why? Well, PHP can be the recipient of any form involving that CMS textarea hosting form element (or use an Ajax FormData object arrangement) and be able to take concrete measures regarding that user driven, textarea driven, data and write it to a web server file or database. Other server languages like Python or Perl or ASP.Net can do this too. There’s the ideal CMS arrangement, perhaps. But, as we intimated in the blog posting title, “CMS Without the Follow Through Primer Tutorial” … where and write it to a web server file or database = the Follow Through of course?! … so in our new “CMS Without the Follow Through” project we might explore some clientside only thoughts too. Let’s start that “clientside only” CMSy way in a first draft, that if you try, you can feel a bit like a CMS administrator (because every CMS product we have ever seen has a separated “logging in” administration section), allowing a user to … browse or populate a textarea for “text based” data (that is forced never to be PHP code, we feel we need to say here … though probably not possible anyway, even if tried, this is a big security “no no”) … display that in an HTML textarea element … be able to change that “text based data” … simulate writing by display of the results of user edits in a popup window = shank to the right … met-a-foooooouuuuuurrrrr!2 … but who’s counting?! … in a “second draft” latest version of cms_no_follow_through.html “so far just clientside” reduced CMS web application. Did you know? Or “Did you Guess?” there would be nesting issues regarding textarea initial innerHTML (at document.body load timing) … … shove as many < or >

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , | Leave a comment

WordPress Akismet Antispam Plugin Primer Tutorial

As we alluded to when we presented WordPress Upgrade Primer Tutorial, we use a great WordPress plugin called Akismet to … identify comment spam … place the detected spam into a Spam “folder” … and, as of recently, we’re going to see how we go, checking the Akismet plugin checkbox that reads … Silently discard the worst and most pervasive spam so I never see it … to, hopefully, lessen the “moderation load” at our end with the WordPress blog you are currently reading. We’ll see?! If this was interesting you may be interested in this too.

Posted in eLearning, Tutorials | Tagged , , , , , , , , , , , , | Leave a comment

WordPress Blog Comments URL Right Click Popup Check Prevent Default Tutorial

We’re coming back to the previous WordPress administrator Comment moderation section URL Popup Window Checker functionality last talked about with WordPress Blog Comments URL Right Click Popup Check Tutorial. We were finding before this Javascript code fix … <?php setTimeout(function(){ if (document.body.innerHTML.indexOf(‘Comments</h1>’) != -1) { var als=document.getElementsByTagName(‘a’); for (var ials=0; ials<als.length; ials++) { if ((” + als[ials].href).indexOf(‘http’) == 0 && (” + als[ials].href).replace(‘wordpress.org’,’rjmprogramming.com.au’).indexOf(‘rjmprogramming.com.au’) == -1) { als[ials].oncontextmenu=function(evt){ evt.stopPropagation(); evt.preventDefault(); if (woowoo) { if (!woowoo.closed) { !woowoo.close(); woowoo=null; } } woowoo=window.open(evt.target.href, ‘_blank’, ‘left=’ + eval(-480 + eval(” + screen.width)) + ‘,top=0,width=500,height=200’); setTimeout(function(){ woowoo.focus(); }, 500); }; als[ials].ontouchend=function(evt){ evt.stopPropagation(); evt.preventDefault(); if (woowoo) { if (!woowoo.closed) { !woowoo.close(); woowoo=null; } } woowoo=window.open(evt.target.href, ‘_blank’, ‘left=’ + eval(-480 + eval(” + screen.width)) + ‘,top=0,width=500,height=200′); setTimeout(function(){ woowoo.focus(); }, 500); }; } } } }, 6000); ?> … in admin-header.php that popup windows were being created but immediately falling behind the main WordPress blog “admin” section Comments section webpage window, annoyingly. Our investigations tracked it down to the right click “default behaviour” forcing the popup window out of view. The remedy being? Anyone, anyone? ….No takers … how about a hint? … It starts with ….p… … no takers … then with ….r… … no takers … then with ….e… … no takers … then with ….v… … no takers … then with ….e…. … finally, yes Nicola … are you saying “Preve Fountain” … …Alas, no … and it’s not Spanish Steps or Pantheon or Colosseum or Trevi Fountain or Piazza Venezia or Saint Peter’s Square either, if that helps … Anyone else? …. … yes, Audrey? . . … you’re saying “The Mouth of Truth”?. . … no, sorry, no doubt it was on the tip of your collective tongues, when we say it’s … event.preventDefault(); Aaaahhhh … thank you, Sage … preventing that right click menu from appearing, and so not compromising window focus web browser rendering. We do very little WordPress administration on mobile, but just in case, we added an ontouchend event (usually happening at the finish of a gesture) mimicking of the non-mobile right click logic, for good measure. Previous relevant WordPress Blog Comments URL Right Click Popup Check Tutorial is shown below. In the past we have only mildly changed the administration section of our TwentyTen themed WordPress.org blog (you are currently reading) here at RJM Programming, and some of that involved new WordPress plugins, as you can read a

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

WordPress Blog HTML Iframe Mixed Content Issue Tutorial

Our recent observation of … using this WordPress.org blog coming across some HTML iframe coded elements not showing always having src attributes starting with http: … which we wait for clientside means to fix for … mixed content errors that can occur … these HTML iframe element contents would often not show for the readers of the blog, and it is our theory that web browsers, within the last while, changed rules to the effect “one strike and you are out” and for us waiting for clientside means to change that “http:” to nothing (ie. get your protocol off the address bar protocol) was too late to help (avoid Mixed Content errors), and so we’re now fixing CMS WordPress blog content at the “server PHP side” in good ol’ header.php to improve the situation here at this blog … <?php if (isset($post->post_content)) { // iframe issue $ifrs=explode(‘</’ . ‘ifr’ . ‘ame’ . ‘>’, $post->post_content); $worryb=false; if (strpos($post->post_content, “</” . “ifr” . “ame>”) !== false) { $worryb=true; } for ($ichb=(-2 + sizeof($ifrs)); $ichb>=0; $ichb–) { $worryb=false; if (strpos($ifrs[$ichb], ‘<‘ . ‘ifr’ . ‘ame’ . ‘ ‘) !== false) { $bcontent=explode(‘<‘ . ‘ifr’ . ‘ame’ . ‘ ‘, $ifrs[$ichb])[-1 + sizeof(explode(‘<‘ . ‘ifr’ . ‘ame’ . ‘ ‘, $ifrs[$ichb]))]; $crlflines=explode(“src=’http:”, $bcontent); if (sizeof($crlflines) > 1) { $worryb=true; } else { $crlflines=explode(‘src=”http:’, $bcontent); if (sizeof($crlflines) > 1) { $worryb=true; } } if ($worryb && strpos($bcontent, ‘http://localhost’) === false) { $post->post_content=str_replace(‘<‘ . ‘ifr’ . ‘ame’ . ‘ ‘ . $bcontent, ‘<‘ . ‘ifr’ . ‘ame’ . ‘ ‘ . str_replace(‘http:’,”,$bcontent), $post->post_content); $ifrs=explode(‘</’ . ‘ifr’ . ‘ame’ . ‘>’, $post->post_content); } } } } ?> … to fix HTML iframe mixed content potential errors before they get presented and called, in any way, on a WordPress blog webpage. Stop Press Here we are at 12/11/2025 and realizing there is another PHP code change needed in header.php to fix this issue for more HTML iframe elements, that being … <?php if (strpos((isset($post->post_content) ? $post->post_content : ”), ‘<iframe src=”http’) !== false) { $post->post_content=str_replace(‘<iframe src=”http://www.rjmprogramming.com.au’, ‘<iframe src=”//www.rjmprogramming.com.au’, str_replace(‘<iframe src=”https://www.rjmprogramming.com.au’, ‘<iframe src=”//www.rjmprogramming.com.au’, $post->post_content)); } if (strpos((isset($post->post_content) ? $post->post_content : ”), “<hr”) !== false) { $xbitskw=explode(“>”, substr((isset($post->post_content) ? $post->post_content : ”),0,strpos((isset($post->post_content) ? $post->post_content : ”), “<hr”))); } else { $xbitskw=explode(“>”, (isset($post->post_content) ? $post->post_content : ”)); } // more of if follows } ?> … placed before in the PHP. If this was interesting you may be interested in this too.

Posted in eLearning, Tutorials | Tagged , , , , , , , , , , , , , | Leave a comment

WordPress Recent Posts Image Relative URL Issue Tutorial

Further to the daily crontab/curl (and PHP based) WordPress “Recent Posts” daily functionality that happens here at RJM Programming, as talked about with the recent WordPress Recent Posts Korn Shell Tutorial, the last couple of days we had a problem with non-rendering WordPress Blog tutorial thumbnails, to which our reaction involved … one day of denial … where we did the necessary copy of image file on the web server so that the zero length crontab/curl image version could be sidestepped … second day … It happened again! Ugh!! … let’s investigate … PHP folder error_log … tail -2 error_log [09-Jun-2025 05:05:34 Australia/Perth] PHP Warning: file_get_contents(/image_flipping_or_flopping_at_speed_more.gif): Failed to open stream: No such file or directory in /home/rjmprogr/public_html/PHP/recent-posts-2.php on line 131 [09-Jun-2025 05:05:39 Australia/Perth] PHP Warning: file_get_contents(/image_flipping_or_flopping_at_speed_share.gif): Failed to open stream: No such file or directory in /home/rjmprogr/public_html/PHP/recent-posts-2.php on line 131 … got us, luckily, stumbling upon a “controllable environment”. In thinking on this, it is an advantage of PHP that it leaves clues in Apache error_log log files, so, thanks. What did we see on arriving at erroneous line 131 of recent-posts-2.php editing in macOS TextWrangler? 126 if (substr($thisimg,0,2) == ‘//’) $thisimg=’http:’ . $thisimg; // new SSL specific line 4/5/2017 127 //echo “\n” . $thisimg . “\n”; 128 if (strpos($thisimg, ‘rjmprogramming.com.au/’) !== false) { 129 copy(‘/home/rjmprogr/public_html/’ . explode(‘rjmprogramming.com.au/’, $thisimg)[1], dirname(__FILE__) . “/” . $narray[$thisij] . “.jpg”); 130 } else { 131 $icont = file_get_contents(str_replace(‘https:’,’http:’,$thisimg)); 132 file_put_contents(dirname(__FILE__) . “/” . $narray[$thisij] . “.jpg”, $icont); 133 } 134 if (file_exists(dirname(__FILE__) . “/” . $narray[$thisij] . “.jpeg”)) { 135 unlink(dirname(__FILE__) . “/” . $narray[$thisij] . “.jpeg”); 136 } And it was really line 126 that reminded us what we’d done a couple of days ago. We were getting no peace on our primary IP address to RJM Programming domain web server, but found peace back at the old one. What about we write the blog postings on the old web server WordPress blog “admin” section place, and then transfer what we end up with over to the newer IP address when conditions are better, and we don’t have to pfaff around quite so much that way? Good idea, except that the tutorial image may not show if it contains an absolute image URL back to the “hounded upon” IP address version, so being that said images exist in both IP address places, let’s make the blog posting tutorial image a “relative one” starting

Posted in eLearning, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

WordPress Blog Comments URL Right Click Popup Check Tutorial

In the past we have only mildly changed the administration section of our TwentyTen themed WordPress.org blog (you are currently reading) here at RJM Programming, and some of that involved new WordPress plugins, as you can read a bit about with WordPress Blog Data URI in Post Plugin Tutorial. We maintain that blog within an “admin” part of the WordPress blog, and any changes we’d put in a “dessert island wish list” usually just absorb and move on, but we thought we’d improve on … WordPress comment moderation … by allowing myself (well, thanks awfully, I don’t really know what to say) the chance to … on any comments webpage … right click on “a” links whose domain is neither wordpress.org nor rjmprogramming.com.au and … in so doing … be able to see a small popup window to the top right of the screen … because, even if we wanted to argue with the great Akismet (we use and are very happy with around here) calling it spam, one of the steps we’d want to investigate would be to rule out a potential “broken link”, and this is a way to check for that. Now, what we discovered marrying “a wish” with “an action plan” was that … in parallel to the TwentyTen non-admin parts being manageable largely via changes to good ol’ header.php … we found … the easy approach to changes in the admin parts could be achieved by changes to good new admin-header.php … with our action plan moving to “deployment” via PHP (writes Javascript) admin-header.php modified code … <?php <script type=”text/javascript”> document.body.className = document.body.className.replace(‘no-js’,’js’); setTimeout(function(){ if (document.body.innerHTML.indexOf(‘Comments</h1>’) != -1) { var als=document.getElementsByTagName(‘a’); for (var ials=0; ials<als.length; ials++) { if ((” + als[ials].href).indexOf(‘http’) == 0 && (” + als[ials].href).replace(‘wordpress.org’,’rjmprogramming.com.au’).indexOf(‘rjmprogramming.com.au’) == -1) { als[ials].oncontextmenu=function(evt){ window.open(evt.target.href, ‘_blank’, ‘left=’ + eval(-500 + eval(” + screen.width)) + ‘,top=0,width=500,height=200′); }; } } } }, 6000); </script> ?> Pretty straightforward really, and perhaps of interest to some WordPress.org comment moderators out there! Previous relevant WordPress Blog Data URI in Post Plugin Tutorial is shown below. Today, we’ve got another WordPress plugin to suit the TwentyTen themed blog you are reading, adding onto those described at WordPress Blog Collaborative Annotated Email FormData Post Tutorial. This plugin suits the Content Editor creating the posts in the administration end of the WordPress TwentyTen themed blog, when they desire to add a data URI, rather than an

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment