function mla7websitecite($style, $medium, $contributors, $articletitleinput, $websitetitleinput, $publishersponsorinput, $urlwebsiteinput, $electronicpublishday, $electronicpublishmonth, $electronicpublishyear, $webaccessdateday, $webaccessdatemonth, $webaccessdateyear) { //Add the contributors $html = mlaauthorformat($contributors); //Add the article title (if provided) if ($articletitleinput) { //Uppercase all words in article title, lowercase all art., prep., & conj., append a period, and encapsulate in double quotes $articletitle = uppercasewords($articletitleinput); $articletitle = forcearticlelower($articletitle); $articletitle = articleperiod($articletitle); $html .= '"' . $articletitle . '" '; } //Add the web site title (if provided) if ($websitetitleinput) { $html .= '<i>' . uppercasewords($websitetitleinput) . '</i>' . '. '; } //Add the web site publisher/sponsor (if provided) if ($publishersponsorinput) { $html .= uppercasewords($publishersponsorinput) . ', '; } else { $html .= 'N.p., '; } //Add the electronically published date (if provided) $html .= mlanewspublishdate($electronicpublishday, $electronicpublishmonth, $electronicpublishyear); //Add a period $html .= '. '; //Add the medium $html .= 'Web. '; //Add the access date (if provided) if ($webaccessdateday || $webaccessdatemonth || $webaccessdateyear) { $html .= mlaaccessdate($webaccessdateday, $webaccessdatemonth, $webaccessdateyear) . '. '; } //Add the URL (if provided) if ($urlwebsiteinput) { $html .= '<'; $html .= checkurlprepend($urlwebsiteinput); $html .= '>'; $html .= '. '; } echo $html; }
function apa6scholarjournalcite($style, $medium, $contributors, $yearpublishedinput, $articletitleinput, $journaltitleinput, $volume, $issue, $pagesstartinput, $pagesendinput, $pagesnonconsecutiveinput, $pagesnonconsecutivepagenumsinput, $urlwebsiteinput, $doiwebsiteinput, $webaccessdateday, $webaccessdatemonth, $webaccessdateyear, $databaseinput, $dbaccessdateday, $dbaccessdatemonth, $dbaccessdateyear, $urldbinput, $doidbinput) { //Add the contributors $html = apaauthorformat($contributors); //Add the publishing date (if provided) if ($yearpublishedinput) { $html .= ' (' . $yearpublishedinput . '). '; } //Add the article title (if provided) if ($articletitleinput) { $html .= articletitleapaformat($articletitleinput) . ' '; } //Add the journal title (if provided) if ($journaltitleinput) { $journaltitleholder = uppercasewords($journaltitleinput); $html .= '<i>' . forcearticlelower($journaltitleholder) . '</i>'; } //Add the volume and issue numbers (if provided) if ($volume || $issue) { //Add a comma after the journal title (if provided) if ($journaltitleinput) { $html .= ', '; } $html .= '<i>' . $volume . '</i>'; if ($issue) { //Add the issue number (if provided) $html .= '(' . $issue . ')'; } } //Add the page numbers (if provided) $pageholder = apascholarjournalpages($pagesstartinput, $pagesendinput, $pagesnonconsecutiveinput, $pagesnonconsecutivepagenumsinput); if ($pageholder) { //There are page numbers if ($volume || $issue) { //There is a volume & issue number preceeding $html .= ', ' . $pageholder; } else { //There is no volume & issue number preceeding if ($journaltitleinput) { //There is a magazine title preceeding $html .= ', ' . $pageholder; } else { //There is no journal title preceeding $html .= $pageholder; } } } //Add a period $html .= '. '; //on a website if ($medium == "website") { //Add the URL (if provided) if ($urlwebsiteinput) { $html .= 'Retrieved from ' . checkurlprepend($urlwebsiteinput); } elseif ($doiwebsiteinput) { //Add the DOI (if provided) $html .= 'doi:' . $doiwebsiteinput; } } //in a database if ($medium == "db") { //Add the URL (if provided) if ($urldbinput) { $html .= 'Retrieved from ' . checkurlprepend($urldbinput); } elseif ($doidbinput) { //Add the DOI (if provided) $html .= 'doi:' . $doidbinput; } } echo $html; }