CentOS Web Server cPanel Apache Status Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

WordPress Landing Page Custom Fields Inhouse Media Tutorial

CentOS Web Server cPanel Apache Status Tutorial

Our RJM Programming Linux CentOS Web Server cPanel Apache web serverโ€™s suite of software has a very useful report called Apache Status. We use it a bit like another Linux user without this report might use โ€ฆ



ps -ef

โ€ฆ or โ€ฆ



top

โ€ฆ to monitor processes on the web server.

We noticed a particular URL call to (and โ€ฆ Spoiler Alert โ€ฆ now it is safe for us to offer it) โ€ฆ



https://www.rjmprogramming.com.au/ITblog/gmail-webmail-email-attachment-on-ipad-signature-reply-tutorial/

โ€ฆ appeared to be โ€œvery popularโ€?! Hogwash! It panned out to be a โ€œhanging around URLโ€ issue! Huh?! Yes, before todayโ€™s fix, this WordPress Blog (you are reading) posting would cause a blank webpage. Now, in our experience with WordPress, this is highly unusual. Especially, the way, also, this webpage would โ€œhang aroundโ€ with enough bad intention that even if logged into WordPress we could not reach the โ€œAdd Postโ€ webpage to have a look at it. So, what is the alternative? Well, as we alluded to in WordPress Blog Post Frontend Error Tutorial, we used cPanelโ€™s โ€œphpMyAdminโ€ option to then (adding that after selecting correct WordPress database you need to use SQL to find the offending blog posting via SQL like

SELECT * FROM wps_posts WHERE post_name=โ€™gmail-webmail-email-attachment-on-ipad-signature-reply-tutorialโ€™;

) โ€ฆ

  • select the relevant WordPress database
  • pick the wps_posts table
  • click โ€œBrowseโ€ button
  • check โ€œEditโ€ button checkbox
  • click โ€œEditโ€ button
  • modify the post_content field to fix the problem
  • click โ€œGoโ€ button at the bottom

โ€ฆ and we used the content of the post_content field copied to the copy buffer to then construct a local disk HTML file and test with our MAMP local web server in an HTML Online Validator fashion ( via web browser address bar URL like HTTP://localhost:888/test.html here with macOS). What do you think happened?

 
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
 

Nothing bad, just appropriate content. So saaaadddddd. What to do next? Well, we saved (ie. hived) that content away, but cleared it away from the blog post in that phpMyAdmin form to see whether we could access the โ€œAdd Postโ€ webpage doing that. We could, giving us a chance to look at Custom Fields, perhaps, as the more likely source of problems out of Tags and Categories and them. Back at WordPress Landing Page Custom Fields Inhouse Media Tutorial we discussed this with some โ€œlinksofuseโ€ logic to create those lightbulb ( ๐Ÿ’ก 💡 ) emoji dropdowns you sometimes see, which present relevant links for further reading. Lo and behold, the Adobe second link weโ€™d offered looked a bit dodgy?!

Long story short โ€ฆ

  • an initial fix of hiving off those links, but wiping โ€œlinksofuseโ€ on this blog posting stopped the โ€œhanging aroundโ€ symptoms โ€ฆ
  • adding back in the blog posting content, via that WordPress โ€œAdd Pageโ€ webpage continued the improvement, with no โ€œhanging aroundโ€ symptoms โ€ฆ
  • modifying the โ€œlinksofuseโ€ Custom Field to just the first non-contentious link continued the improvement, with no โ€œhanging aroundโ€ symptoms

โ€ฆ and weโ€™d have been happy to leave it at that, except a nagging thought about other blog postings, perhaps, having the same issues, persisted in our cranium โ€ฆ so โ€ฆ we looked into WordPress TwentyTen themeโ€™s single.php (mainly โ€œcodexโ€) code for clues. We narrowed the issue down to the relationship between an Adobe URL and the use of PHP file_get_contents, and improved the situation via โ€ฆ

<?php


$ch = curl_init(); // thanks to https://www.php.net/manual/en/ref.curl.php

$timeout = 5;

curl_setopt($ch, CURLOPT_URL, "//" . explode("//", $encs[$iqs])[1]);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);

$encc = curl_exec($ch);

curl_close($ch);

$enccont="";

if ($encc) {


try {

$enccont=@file_get_contents("//" . explode("//", $encs[$iqs])[1]);

} catch (Exception $eqgf) {

}

}


?>

โ€ฆ allowing us to add back in that dodgy looking link, catered for! Aaaaaaah!

By the way, what is wrong with not worrying about this? Well, our hosting has a limit on MySql connection counts. Fill it with โ€œhanging aroundโ€ ones, and the web server will eventually get quite unwell!



Previous relevant WordPress Landing Page Custom Fields Inhouse Media Tutorial is shown below.

WordPress Landing Page Custom Fields Inhouse Media Tutorial

WordPress Landing Page Custom Fields Inhouse Media Tutorial

The recent WordPress Landing Page Custom Fields Tutorial used window.open calls to access WordPress Blog Custom Field URLs, but some web browsers block these calls, and so, as of today, weโ€™ve made the reasoning more complex to allow for the possibility of โ€ฆ

  • displaying โ€œinhouse mediaโ€ ( ie. on domain rjmprogramming.com.au ) in this same webpage up above the dropdown in an HTML iframe that is invisible to the user unless needed โ€ฆ as per โ€ฆ
    1. on domain rjmprogramming.com.au
    2. URL ends with .m* is opened in an HTML video element
    3. URL ends with .a* is opened in an HTML audio element
    4. URL ends with .* is opened in an HTML img element

    โ€ฆ else โ€ฆ

  • open URL in window.open([derivedURL],โ€™_blankโ€™); // call

These changes involve changes to three TwentyTen themed PHP files as per โ€ฆ

  • header.php โ€ฆ


    <<?php echo $heading_tag; ?> id="site-title">

    <span id=hdgspan>

    <a itemprop="name" id="ahomeis" href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a><iframe style="width:600px;height:600px;display:none;" name=hdgiframe id=hdgiframe srcdoc=''></iframe>

    </span>

    </<?php echo $heading_tag; ?>>

  • single.php โ€ฆ


    if ($encsuffix == "") { $encsuffix="<select id='linkhints' class='linkhints' TITLE='Our link hints for this blog posting' style='margin-right:20px;float:right;display:inline-block;width:60px;' onchange=\"if (this.value.length > 0) { if (this.value.toLowerCase().indexOf('rjmprogramming.com.au') != -1 && this.value.toLowerCase().indexOf('.htm') == -1 && this.value.toLowerCase().indexOf('.php') == -1 && this.value.toLowerCase().indexOf('.pdf') == -1 && this.value.toLowerCase().replace('.au','').slice(-5).indexOf('.') != -1 && document.getElementById('hdgiframe')) { document.getElementById('hdgiframe').style.display='block'; document.getElementById('hdgiframe').className='linkhints'; document.getElementById('hdgiframe').style.marginTop='20px'; document.getElementById('hdgiframe').style.marginBottom='20px'; document.getElementById('hdgiframe').onclick=function() { location.href='#linkhints'; }; location.href='#hdgiframe'; if (this.value.toLowerCase().indexOf('.m') != -1) { document.getElementById('hdgiframe').srcdoc='<html><body><video controls><source SRC=' + this.value + '></source></video></body></html>'; } else if (this.value.toLowerCase().replace('com.au','').indexOf('.a') != -1) { document.getElementById('hdgiframe').srcdoc='<html><body><audio controls><source SRC=' + this.value + '></source></audio></body></html>'; } else if (this.value.toLowerCase().replace('.pdf','').replace('com.au','').slice(-5).indexOf('.') != -1) { document.getElementById('hdgiframe').srcdoc='<html><body><style> html { background: url(' + this.value + ') no-repeat center fixed; background-size: contain; } </style><br></body></html>'; } else { document.getElementById('hdgiframe').src = this.value; } } else { window.open(this.value,'_blank'); } }\"><option value=''>&#128161;</option></select>"; }

  • loop.php โ€ฆ


    if ($encsuffix == "") { $encsuffix="<select id='linkhints' class='linkhints' TITLE='Our link hints for this blog posting' style='margin-right:20px;float:right;display:inline-block;width:60px;' onchange=\"if (this.value.length > 0) { if (this.value.toLowerCase().indexOf('rjmprogramming.com.au') != -1 && this.value.toLowerCase().indexOf('.htm') == -1 && this.value.toLowerCase().indexOf('.php') == -1 && this.value.toLowerCase().indexOf('.pdf') == -1 && this.value.toLowerCase().replace('.au','').slice(-5).indexOf('.') != -1 && document.getElementById('hdgiframe')) { document.getElementById('hdgiframe').style.display='block'; document.getElementById('hdgiframe').className='linkhints'; document.getElementById('hdgiframe').style.marginTop='20px'; document.getElementById('hdgiframe').style.marginBottom='20px'; document.getElementById('hdgiframe').onclick=function() { location.href='#linkhints'; }; location.href='#hdgiframe'; if (this.value.toLowerCase().indexOf('.m') != -1) { document.getElementById('hdgiframe').srcdoc='<html><body><video controls><source SRC=' + this.value + '></source></video></body></html>'; } else if (this.value.toLowerCase().replace('com.au','').indexOf('.a') != -1) { document.getElementById('hdgiframe').srcdoc='<html><body><audio controls><source SRC=' + this.value + '></source></audio></body></html>'; } else if (this.value.toLowerCase().replace('.pdf','').replace('com.au','').slice(-5).indexOf('.') != -1) { document.getElementById('hdgiframe').srcdoc='<html><body><style> html { background: url(' + this.value + ') no-repeat center fixed; background-size: contain; } </style><br></body></html>'; } else { document.getElementById('hdgiframe').src = this.value; } } else { window.open(this.value,'_blank'); } }\"><option value=''>&#128161;</option></select>"; }

Stop Press

In a future blog posting (that will be accessible via this WordPress Recent Post Bug Fix Tutorial link in days to come) you will read how our work here interfered a little with the WordPress โ€œRecent Postsโ€ widget inhouse enhancements we last talked about at WordPress Recent Post Semi-Transparent Background Tutorial. Where we have blue code snippets above you can see us getting this work to live in its environment better with some uppercase and spacing changes.

23/10/2019

Did you know?

Did you wonder about (the code snippet comparison) โ€ฆ



<style> html { background: url(' + this.value + ') no-repeat center fixed; background-size: contain; } </style>

โ€ฆ rather, than, say โ€ฆ



<img src=' + this.value + '></img>

โ€ฆ above? Well, itโ€™s to do with the situation where you set aside a set width and height of space (600px X 600px for us) in an HTML iframe and want to โ€œhostโ€ an image media source. The question you need to ask is โ€ฆ โ€œIs it more important to show an image in its original dimensions, or would a proportional view (ie. keep the same aspect ratio) of the image be okay?โ€ If the latter is the case, then that style tag approach way above (that can be placed into the webpageโ€™s head or body sections) that we started using when we presented the recent Full Sized Fixed Background Image Primer Tutorial (except on that occasion cover was used rather than todayโ€™s contain usage) allows for a full view of the imageโ€™s content.


Previous relevant WordPress Landing Page Custom Fields Tutorial is shown below.

WordPress Landing Page Custom Fields Tutorial

WordPress Landing Page Custom Fields Tutorial

WordPress blog PHP logic, such as used behind the scenes of WordPress Custom Fields Primer Tutorial, as far as its โ€œloopโ€ arrangements go, separates into two modes, those being โ€ฆ

  • single blog posting mode of access that suited yesterdayโ€™s changes to the WordPress TwentyTen themed blogโ€™s โ€œsingle.phpโ€ modifications (for URLs like https://www.rjmprogramming.com.au/ITblog/?p=[postID] or https://www.rjmprogramming.com.au/ITblog/[post-slug-permalink]) which distinguish themselves that during the โ€œloopโ€ logic of โ€œsingle.phpโ€ the PHP $post object exists (and so the $post->ID of โ€œ$enclosurev = get_post_meta($post->ID, โ€˜linksofuseโ€™, true);โ€ below makes sense) โ€ฆ whereas, today โ€ฆ
  • multiple blog posting non-search, non-tag, non-category mode of access suits, instead, (just before) the last reference to โ€œ<?php the_content(โ€ within its โ€œ<?php while ( have_posts() ) : the_post(); ?gt; โ€ฆ innards โ€ฆ <?php endwhile; // end of the loop. ?>โ€ code snippet of WordPress TwentyTen themed blogโ€™s โ€œloop.phpโ€ (we found out, again, via โ€œ<?php echo โ€˜yoo hoo!โ€™; ?>โ€ experiments) modifications (for URL like https://www.rjmprogramming.com.au/ITblog/) which replace the โ€œ$enclosurev = get_post_meta($post->ID, โ€˜linksofuseโ€™, true);โ€ with โ€œ$enclosurev = get_metadata(โ€˜postโ€™, get_the_ID(), โ€˜linksofuseโ€™, true);โ€ (because in โ€œloop.phpโ€ (last incarnation of โ€œ<?php the_content(โ€œ) the $post object does not exist)

In summary, the intervention code directly before โ€œloop.phpโ€โ€˜s โ€œ<?php while ( have_posts() ) : the_post(); ?> โ€ฆ innards โ€ฆ <?php endwhile; // end of the loop. ?>โ€โ€˜s last incarnation of โ€œ<?php the_content(โ€ goes, for us โ€ฆ



<?php

$encsuffix='';

$enclosurev = get_metadata('post', get_the_ID(), 'linksofuse', true);




if ($enclosurev) {

if (strpos($enclosurev, "-") !== false || strpos($enclosurev, ",") !== false || strpos($enclosurev, "//") !== false) {

$encs=explode(",", $enclosurev);

for ($iqs=0; $iqs<sizeof($encs); $iqs++) {

if ($encsuffix == "") { $encsuffix="<select id='linkhints' class='linkhints' title='Our link hints for this blog posting' style='margin-top:-30px;margin-right:20px;float:right;display:inline-block;width:60px;' onchange=\"if (this.value.length > 0) { window.open(this.value,'_blank'); }\"><option value=''>&#128161;</option></select>"; }

if (strpos($encs[$iqs], "//") !== false) {

$enctitle="URL " . $encs[$iqs];

$enccont=@file_get_contents("//" . explode("//", $encs[$iqs])[1]);

if (strpos($enccont, "</title>") !== false) {

$enctitle=explode(">", explode("</title>", $enccont)[0])[-1 + sizeof(explode(">", explode("</title>", $enccont)[0]))];

}

$encsuffix=str_replace("</select>", "<option value='" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "-") !== false) {

$encsm=explode("-", $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='//www.rjmprogramming.com.au/ITblog/" . $encs[$iqs] . "'></option></select>", $encsuffix);

$enctitle=strtoupper(substr($encsm[0],0,1)) . strtolower(substr($encsm[0],1));

for ($jqs=1; $jqs<sizeof($encsm); $jqs++) {

$enctitle.=" " . strtoupper(substr($encsm[$jqs],0,1)) . strtolower(substr($encsm[$jqs],1));

}

$encsuffix=str_replace("></option></select>", ">" . $enctitle . "</option></select>", $encsuffix);

} else {

if (substr($encs[$iqs],0,1) >= '0' && substr($encs[$iqs],0,1) <= '9') {

$enctitle="Blog Posting " . $encs[$iqs];

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog/?p=" . $encs[$iqs]);

if (strpos($enccont, "</title>") !== false) {

$enctitle=explode(">", explode("</title>", $enccont)[0])[-1 + sizeof(explode(">", explode("</title>", $enccont)[0]))];

}

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog/?p=" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "/tag/") !== false) {

$enctitle="Blog Tag " . str_replace("-"," ",str_replace("/tag/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "/category/") !== false) {

$enctitle="Blog Category " . str_replace("-"," ",str_replace("/category/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "tag/") !== false) {

$enctitle="Blog Tag " . str_replace("-"," ",str_replace("tag/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog/" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog/" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "category/") !== false) {

$enctitle="Blog Category " . str_replace("-"," ",str_replace("category/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog/" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog/" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

}

}

}

}

}

echo $encsuffix;

?>

And so, again, we say โ€ฆ

I spy with my little eye something beginning with โ€ฆ ๐Ÿ’ก
Yes, ๐Ÿ’ก
Up above, ๐Ÿ’ก

โ€ฆ and which a click on the blog image today gets you to, a webpage of allโœ‚this blogโ€™s recent posts.


Previous relevant WordPress Custom Fields Primer Tutorial is shown below.

WordPress Custom Fields Primer Tutorial

WordPress Custom Fields Primer Tutorial

I spy with my little eye something beginning with โ€ฆ ๐Ÿ’ก
Yes, ๐Ÿ’ก
Up above, ๐Ÿ’ก



Aw ... what a bright idea?! How come I click on the light bulb (๐Ÿ’ก) and it has dropdown options unique to this blog post?

Glad you asked. And all because โ€ฆ

Letโ€™s talk about WordPress blog Custom Fields, and an associated great link we stumbled upon. We followed its advice to change Theme code โ€ฆ yay!!!! Except this time, it wasnโ€™t (good olโ€™) header.php that changed for our Custom Field foray (weโ€™ve codenamed โ€œOperation 4Aโ€ โ€ฆ tee hee).

Working to a plan like this, often the first question is (especially with event-driven programming code) โ€œWhere is the intervention point?โ€.

You will need to enter your custom fields code inside the WordPress loop.
Look for the line that looks like this:

<?php while ( have_posts() ) : the_post(); ?>
You want to make sure that you add your code before the following line:

<?php endwhile; // end of the loop. ?>

โ€ฆ good advice, and looking in the themes โ€œtwentytenโ€ folder several PHP files had these two. But trial and error (just placing <?php echo โ€˜yoo hoo!โ€™; ?>) we found that โ€œsingle.phpโ€ could be tweaked to change the WordPress blog webpage here, and intervene. Place the intervention near โ€œendwhileโ€ and it goes down the bottom of the postโ€™s content, and near โ€œwhile ( have_posts() ) : the_post();โ€ you get it up near the top of the postโ€™s content (the placement we opted for).

Working to a plan like this, often the next question is โ€œWhat do you want to do now that you know where to intervene?โ€ and here we decided we wanted a dropdown way to navigate to links that are related to the content in one of 5 ways โ€ฆ

  • a number corresponds to a posting number webpage at the WordPress (TwentyTen themed) blog here
  • a โ€œ-โ€ (no spaces) delimited single โ€œslugโ€ word corresponds to this WordPress blog permalink
  • โ€œtag/[tag-words]โ€ corresponds to this WordPress [tag-words] tag lookup
  • โ€œcategory/[category-words]โ€ corresponds to this WordPress [category-words] category lookup
  • absolute URL will add to dropdown and try to navigate there

โ€ฆ to allow the user to โ€œread upโ€ on the posting to follow, perhaps.

And so โ€ฆ โ€œHow come I click on the light bulb and it has dropdown options unique to this blog post?โ€

The intervention code in โ€œsingle.phpโ€ directly under โ€œ<?php while ( have_posts() ) : the_post(); ?>โ€ โ€ฆ



<?php

$encsuffix='';

$enclosurev = get_post_meta($post->ID, 'linksofuse', true);



if ($enclosurev) {

if (strpos($enclosurev, "-") !== false || strpos($enclosurev, ",") !== false || strpos($enclosurev, "//") !== false) {

$encs=explode(",", $enclosurev);

for ($iqs=0; $iqs<sizeof($encs); $iqs++) {

if ($encsuffix == "") { $encsuffix="<select id='linkhints' class='linkhints' title='Our link hints for this blog posting' style='margin-right:20px;float:right;display:inline-block;width:60px;' onchange=\"if (this.value.length > 0) { window.open(this.value,'_blank'); }\"><option value=''>&#128161;</option></select>"; }

if (strpos($encs[$iqs], "//") !== false) {

$enctitle="URL " . $encs[$iqs];

$enccont=@file_get_contents("//" . explode("//", $encs[$iqs])[1]);

if (strpos($enccont, "</title>") !== false) {

$enctitle=explode(">", explode("</title>", $enccont)[0])[-1 + sizeof(explode(">", explode("</title>", $enccont)[0]))];

}

$encsuffix=str_replace("</select>", "<option value='" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "-") !== false) {

$encsm=explode("-", $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='//www.rjmprogramming.com.au/ITblog/" . $encs[$iqs] . "'></option></select>", $encsuffix);

$enctitle=strtoupper(substr($encsm[0],0,1)) . strtolower(substr($encsm[0],1));

for ($jqs=1; $jqs<sizeof($encsm); $jqs++) {

$enctitle.=" " . strtoupper(substr($encsm[$jqs],0,1)) . strtolower(substr($encsm[$jqs],1));

}

$encsuffix=str_replace("></option></select>", ">" . $enctitle . "</option></select>", $encsuffix);

} else {

if (substr($encs[$iqs],0,1) >= '0' && substr($encs[$iqs],0,1) <= '9') {

$enctitle="Blog Posting " . $encs[$iqs];

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog/?p=" . $encs[$iqs]);

if (strpos($enccont, "</title>") !== false) {

$enctitle=explode(">", explode("</title>", $enccont)[0])[-1 + sizeof(explode(">", explode("</title>", $enccont)[0]))];

}

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog/?p=" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "/tag/") !== false) {

$enctitle="Blog Tag " . str_replace("-"," ",str_replace("/tag/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "/category/") !== false) {

$enctitle="Blog Category " . str_replace("-"," ",str_replace("/category/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "tag/") !== false) {

$enctitle="Blog Tag " . str_replace("-"," ",str_replace("tag/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog/" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog/" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

} else if (strpos($encs[$iqs], "category/") !== false) {

$enctitle="Blog Category " . str_replace("-"," ",str_replace("category/","",$encs[$iqs]));

$enccont=@file_get_contents("https://www.rjmprogramming.com.au/ITblog/" . $encs[$iqs]);

$encsuffix=str_replace("</select>", "<option value='" . "//www.rjmprogramming.com.au/ITblog/" . $encs[$iqs] . "'>" . $enctitle . "</option></select>", $encsuffix);

}

}

}

}

}

?>

โ€ฆ looks for an optionally filled in blog posting Custom Field called โ€œlinksofuseโ€ for a comma separated list of links as per the 5 types of definitions above, and shows these as dropdown option values under that light bulb (๐Ÿ’ก) under the blog posting title before the blog posting content (that includes the blog posting image we always have).

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 Database, eLearning, Operating System, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

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