{"id":18511,"date":"2015-11-26T05:01:20","date_gmt":"2015-11-25T19:01:20","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=18511"},"modified":"2015-11-25T20:55:34","modified_gmt":"2015-11-25T10:55:34","slug":"moderation-by-file-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/moderation-by-file-primer-tutorial\/","title":{"rendered":"Moderation by File Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation.php?admin=y\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Moderation by File Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation_viafile.jpg\" title=\"Moderation by File Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Moderation by File Primer Tutorial<\/p><\/div>\n<p>We continue on with &#8220;moderation&#8221; ideas today.  You will recall from yesterday&#8217;s <a target=_blank title='Moderation by Email Primer Tutorial' href='#mbept'>Moderation by Email Primer Tutorial<\/a> as shown below, that &#8220;moderation&#8221; is associated with blogs and <a target=_blank title='CMS information by Wikipedia' href='https:\/\/en.wikipedia.org\/wiki\/Content_management_system'>Content Management Systems<\/a> and social media as a means by which uploaded content can be vetted, or not, during a &#8220;moderation phase&#8221; for a posting of some sort.<\/p>\n<p>This can involve, in our eyes, quite a few options, none of which would not involve a server-side solution of some sort &#8230;<\/p>\n<ul>\n<li>no moderation &#8230; even this needs a server side language, in our eyes, because you will be changing a server side webpage for all users<\/li>\n<li>email (or sms or voicemail or any direct communication method) moderation &#8230; ask for an admin user of the website to change things after having emailed them &#8230; this is the one we showed yesterday &#8230; and please feel free to try your own entries<\/li>\n<li>moderate via a (web server) database with posting statuses such as &#8220;Awaiting Moderation&#8221;, &#8220;Published&#8221;, &#8220;To Be Deleted&#8221;<\/li>\n<li>moderate via a system of (web server) files with posting statuses such as &#8220;Awaiting Moderation&#8221;, &#8220;Published&#8221;, &#8220;To Be Deleted&#8221; &#8230; this is the one we show today &#8230; and, again, please feel free to try your own entries<\/li>\n<li>only moderate to either of the four above after having gone through a <a target=_blank title='CAPTCHA information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/CAPTCHA'>CAPTCHA<\/a> test that the user is not a robot<\/li>\n<\/ul>\n<p>So today we continue to pose the idea that the &#8220;Things That We Have in Common&#8221; far outweigh the things that divide us, and present some ideas here.  We offer, and encourage you to email us your ideas on the topic or use the file moderation method, and we&#8217;ll moderate them within 24 hours.  With today&#8217;s file moderation method you are given the opportunity to login and &#8220;moderate&#8221; your own work but as you will recall from yesterday with &#8230;<\/p>\n<p>This brings up the topic of web user roles.  In this scenario, where we don&#8217;t ask anything of you, except an email address, presumably, you can be thought of as a &#8230;<\/p>\n<blockquote>\n<ul>\n<li>&#8220;guest&#8221; user &#8230; though in strict terms the word &#8220;guest&#8221; usually implies that there is a user registration involved &#8230; which we do not do here today &#8230; but to read a bit about this you could read <a target=_blank title='PHP Membership Website Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-membership-website-primer-tutorial\/'>PHP Membership Website Primer Tutorial<\/a> &#8230; as distinct from &#8230;<\/li>\n<li>the emailee of the &#8220;guest&#8221; user will be an &#8220;admin&#8221; user &#8230; one who can offer the means to moderate the uploaded data, and, as approved, write that data to a place where it will be picked up and included in the contents of the webpage(s) involved &#8230; hence the term &#8220;Content Management System&#8221;<\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; you, as a &#8220;guest&#8221; user will not succeed with this &#8220;admin&#8221; user login to &#8220;moderate&#8221;, but the mechanism is there for real &#8220;admin&#8221; users, as is a &#8220;get&#8221; parameter method like our &#8220;?admin=y&#8221; idea, with most blogs and CMS websites.<\/p>\n<p>The reason we didn&#8217;t need these <a target=_blank title='PHP Membership Website Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-membership-website-primer-tutorial\/'>PHP Membership Website Primer Tutorial<\/a> ideas yesterday was that no web server files had to be written at that stage, but today they do, and we can&#8217;t let any &#8220;guest&#8221; user do it, so we find that MySql database work via the wonderful and enormously stupendous phpMyAdmin comes into play, and we&#8217;ll talk more about this tomorrow, when databases are used for all aspects of our final &#8220;moderation&#8221; via database discussion.<\/p>\n<p>Here is the downloadable PHP code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation.php-GETME\">moderation.php<\/a> with its <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation.php\">live run<\/a> and changed from yesterday&#8217;s work <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation.php-GETME\">this way<\/a>.<\/p>\n<p>Here is the login PHP code for the admin section you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/login.php-GETME\">login.php<\/a> with its admin user useful <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/login.php\">live run<\/a>.<\/p>\n<p>Here is the PHP code login(.php) uses to connect to the MySql database you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/db_connect.php_GETME\">db_connect.php<\/a><\/p>\n<p>Here is the member PHP code that follows the login(.php) page you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/member.php-GETME\">member.php<\/a> that handles, so far, the &#8220;business logic&#8221; for file moderation and the admin user follow up to reading the email and approving the email moderation, of yesterday.<\/p>\n<hr>\n<p id='mbept'>Previous relevant <a target=_blank title='Moderation by Email Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/moderation-by-email-primer-tutorial\/'>Moderation by Email Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation.php\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Moderation by Email Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/moderation.jpg\" title=\"Moderation by Email Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Moderation by Email Primer Tutorial<\/p><\/div>\n<p>The term &#8220;moderation&#8221; is associated with blogs and <a target=_blank title='CMS information by Wikipedia' href='https:\/\/en.wikipedia.org\/wiki\/Content_management_system'>Content Management Systems<\/a> and social media as a means by which uploaded content can be vetted, or not, during a &#8220;moderation phase&#8221; for a posting of some sort.<\/p>\n<p>This can involve, in our eyes, quite a few options, none of which would not involve a server-side solution of some sort.  We&#8217;ll think on this further (maybe Ajax?!), but some of the ideas for moderation would be &#8230;<\/p>\n<ul>\n<li>no moderation &#8230; even this needs a server side language, in our eyes, because you will be changing a server side webpage for all users<\/li>\n<li>email (or sms or voicemail or any direct communication method) moderation &#8230; ask for an admin user of the website to change things after having emailed them &#8230; this is the one we show today &#8230; and please feel free to try your own entries<\/li>\n<li>moderate via a (web server) database with posting statuses such as &#8220;Awaiting Moderation&#8221;, &#8220;Published&#8221;, &#8220;To Be Deleted&#8221;<\/li>\n<li>moderate via a system of (web server) files with posting statuses such as &#8220;Awaiting Moderation&#8221;, &#8220;Published&#8221;, &#8220;To Be Deleted&#8221;<\/li>\n<li>only moderate to either of the four above after having gone through a <a target=_blank title='CAPTCHA information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/CAPTCHA'>CAPTCHA<\/a> test that the user is not a robot<\/li>\n<\/ul>\n<p>So today we pose the idea that the &#8220;Things That We Have in Common&#8221; far outweigh the things that divide us, and present some ideas here.  We offer, and encourage you to email us your ideas on the topic, and we&#8217;ll moderate them within 24 hours.  The mechanism, today, is via you, the user, sending us here, at RJM Programming, an email.<\/p>\n<p>This brings up the topic of web user roles.  In this scenario, where we don&#8217;t ask anything of you, except an email address, presumably, you can be thought of as a &#8230;<\/p>\n<ul>\n<li>&#8220;guest&#8221; user &#8230; though in strict terms the word &#8220;guest&#8221; usually implies that there is a user registration involved &#8230; which we do not do here today &#8230; but to read a bit about this you could read <a target=_blank title='PHP Membership Website Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-membership-website-primer-tutorial\/'>PHP Membership Website Primer Tutorial<\/a> &#8230; as distinct from &#8230;<\/li>\n<li>the emailee of the &#8220;guest&#8221; user will be an &#8220;admin&#8221; user &#8230; one who can offer the means to moderate the uploaded data, and, as approved, write that data to a place where it will be picked up and included in the contents of the webpage(s) involved &#8230; hence the term &#8220;Content Management System&#8221;<\/li>\n<\/ul>\n<p> &#8230; and so, in the scenario of &#8220;no moderation&#8221; &#8220;guest&#8221; users circumvent the moderation part of the &#8220;admin&#8221; user role and, in some automated (programming) way, with a language like PHP and a database like MySql, be able to get their uploaded content straight onto the webpage(s) of interest.  So, sometimes you see &#8220;no moderation&#8221; but a CAPTCHA (robot) check, as the scenario of use.<\/p>\n<p>Of interest, too, is the nature of the uploaded data.  Is it &#8220;just text&#8221; or &#8220;can it contain images&#8221; or &#8220;can it contain videos&#8221; etcetera.  Today, we are just allowing text.<\/p>\n<p>Here is the downloadable PHP code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation.php_GETME\">moderation.php<\/a> with its <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Moderation\/moderation.php\">live run<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d18494' onclick='var dv=document.getElementById(\"d18494\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/cms\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d18494' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d18511' onclick='var dv=document.getElementById(\"d18511\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/membership\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d18511' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We continue on with &#8220;moderation&#8221; ideas today. You will recall from yesterday&#8217;s Moderation by Email Primer Tutorial as shown below, that &#8220;moderation&#8221; is associated with blogs and Content Management Systems and social media as a means by which uploaded content &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/moderation-by-file-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12,37],"tags":[151,213,216,299,418,827,932,938,997,1319,1411],"class_list":["post-18511","post","type-post","status-publish","format-standard","hentry","category-database","category-elearning","category-tutorials","tag-blog","tag-clientserver","tag-cms","tag-database-2","tag-file","tag-mysql","tag-php","tag-phpmyadmin","tag-programming","tag-tutorial","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18511"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=18511"}],"version-history":[{"count":3,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18511\/revisions"}],"predecessor-version":[{"id":18518,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18511\/revisions\/18518"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=18511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=18511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=18511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}