Wiki logos: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 214: | Line 214: | ||
If you have a wiki and want to implement this, here is the code: | If you have a wiki and want to implement this, here is the code: | ||
<syntaxhighlight lang="php" style="width:fit-content;">$day = new DateTime("now", new DateTimeZone('America/New_York')); | <syntaxhighlight lang="php" style="width:fit-content;">$day = new DateTime("now", new DateTimeZone('America/New_York')); | ||
if ($day->format("m-d") == "01-01") { | if ($day->format("m-d") == "01-01") { $wgLogo = "/images/logo/Wiki_logo_New_Years_Day.png";} #New Years Day | ||
elseif ($day->format("m-d") == "02-02") { | elseif ($day->format("m-d") == "02-02") { $wgLogo = "/images/logo/Wiki_logo_Groundhog_Day.png";} #Groundhog Day | ||
elseif ($day->format("m-d") == "02-14") { | elseif ($day->format("m-d") == "02-14") { $wgLogo = "/images/logo/Wiki_logo_Valentines_Day.png";} #Valentine's Day | ||
elseif ($day->format("m-d") == "02-29") { | elseif ($day->format("m-d") == "02-29") { $wgLogo = "/images/logo/Wiki_logo_Leap_Day.png";} #Leap Day | ||
elseif ($day->format("m-d") == "03-17") { | elseif ($day->format("m-d") == "03-17") { $wgLogo = "/images/logo/Wiki_logo_Saint_Patricks_Day.png";} #Saint Patrick's Day | ||
elseif ($day->format("m-d") == "04-01") { | elseif ($day->format("m-d") == "04-01") { $wgLogo = "/images/logo/Wiki_logo_April_Fools_Day.png";} #April Fool's Day | ||
elseif ($day->format("m-d") == "05-05") { | elseif ($day->format("m-d") == "05-05") { $wgLogo = "/images/logo/Wiki_logo_Cinco_de_Mayo.png";} #Cinco de Mayo | ||
elseif ($day->format("m-d") == "07-04") { | elseif ($day->format("m-d") == "07-04") { $wgLogo = "/images/logo/Wiki_logo_Independence_Day.png";} #Independence Day | ||
elseif ($day->format("m-d") == "10-31") { | elseif ($day->format("m-d") == "10-31") { $wgLogo = "/images/logo/Wiki_logo_Halloween.png";} #Halloween | ||
elseif ($day->format("m-d") == "10-31") { | elseif ($day->format("m-d") == "10-31") { $wgLogo = "/images/logo/Wiki_logo_Veterans_Day.png";} #Veterans Day | ||
elseif ($day->format("m-d") == "11-05") { | elseif ($day->format("m-d") == "11-05") { $wgLogo = "/images/logo/Wiki_logo_Guy_Fawkes_Night.png";} #Guy Fawkes Night | ||
elseif ($day->format("m-d") == "12-25") { | elseif ($day->format("m-d") == "12-25") { $wgLogo = "/images/logo/Wiki_logo_Christmas_Eve.png";} #Christmas Eve | ||
elseif ($day->format("m-d") == "12-25") { | elseif ($day->format("m-d") == "12-25") { $wgLogo = "/images/logo/Wiki_logo_Christmas.png";} #Christmas | ||
elseif ($day->format("m-d") == "12-26") { | elseif ($day->format("m-d") == "12-26") { $wgLogo = "/images/logo/Wiki_logo_Boxing_Day.png";} #Boxing Day | ||
elseif ($day->format("m-d") == "12-31") { | elseif ($day->format("m-d") == "12-31") { $wgLogo = "/images/logo/Wiki_logo_New_Years_Eve.png";} #New Years Eve | ||
elseif ($day->format('m-d') == date("m-d", strtotime("first sunday of february"))) { $wgLogo = "/images/logo/Wiki_logo_SuperbOwl.png";} #Super Bowl | elseif ($day->format('m-d') == date("m-d", strtotime("first sunday of february"))) { $wgLogo = "/images/logo/Wiki_logo_SuperbOwl.png";} #Super Bowl | ||
elseif ($day->format('m-d') == date("m-d", strtotime("third monday of february"))) { $wgLogo = "/images/logo/Wiki_logo_Presidents_Day.png";} #President's Day | elseif ($day->format('m-d') == date("m-d", strtotime("third monday of february"))) { $wgLogo = "/images/logo/Wiki_logo_Presidents_Day.png";} #President's Day | ||