Registration has been disabled and the moderation extension has been turned off.

Contact an admin on Discord or EDF if you want an account. Also fuck bots.

Encyclopedia Dramatica:XOTN/Queue: Difference between revisions

From Encyclopedia Dramatica
Jump to navigation Jump to search
No edit summary
No edit summary
Line 341: Line 341:
4. **Copy the generated wiki markup** to your archive pages
4. **Copy the generated wiki markup** to your archive pages


=== Updated JavaScript Code ===
=== Updated JavaScript Code with Month Override ===


<pre>
<syntaxhighlight lang="html">
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'
             "http://www.w3.org/TR/html4/loose.dtd">
             'http://www.w3.org/TR/html4/loose.dtd'>
<html>
<html>
<head>
<head>
<meta http-equiv='Pragma' content='no-cache'>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv='expires' content='0'>
<meta http-equiv="expires" content="0">
<meta content='text/html; charset=utf-8' http-equiv='content-type'>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>XOTN Archive Generator</title>
<title>XOTN Archive Generator</title>
<style>
<style>
body {  
body {
     font-family: monospace;  
     font-family: monospace;
     margin: 20px;  
     margin: 20px;
     background: #f8f8f8;
     background: #f8f8f8;
}
}
h1 {  
h1 {
     color: #333;  
     color: #333;
     border-bottom: 3px solid #666;  
     border-bottom: 3px solid #666;
     padding-bottom: 10px;
     padding-bottom: 10px;
}
}
h2 {  
h2 {
     color: #666;  
     color: #666;
     border-bottom: 1px solid #ccc;  
     border-bottom: 1px solid #ccc;
}
}
.output {  
.output {
     background: #fff;  
     background: #fff;
     padding: 15px;  
     padding: 15px;
     margin: 15px 0;  
     margin: 15px 0;
     border: 1px solid #ddd;  
     border: 1px solid #ddd;
     border-radius: 5px;
     border-radius: 5px;
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
}
.controls {  
.controls {
     background: #e8f4f8;  
     background: #e8f4f8;
     padding: 20px;  
     padding: 20px;
     margin: 15px 0;  
     margin: 15px 0;
     border: 1px solid #b0d4da;  
     border: 1px solid #b0d4da;
     border-radius: 5px;
     border-radius: 5px;
}
}
button {  
button {
     padding: 10px 20px;  
     padding: 10px 20px;
     margin: 8px;  
     margin: 8px;
     font-size: 14px;  
     font-size: 14px;
     background: #4CAF50;
     background: #4CAF50;
     color: white;
     color: white;
Line 396: Line 395:
     background: #45a049;
     background: #45a049;
}
}
select, input {  
select, input {
     padding: 8px;  
     padding: 8px;
     margin: 8px;  
     margin: 8px;
     font-size: 14px;  
     font-size: 14px;
     border: 1px solid #ccc;
     border: 1px solid #ccc;
     border-radius: 3px;
     border-radius: 3px;
Line 425: Line 424:


<div class="info">
<div class="info">
<strong>Instructions:</strong> This tool generates monthly archive page templates for Encyclopedia Dramatica's "X of the Now" content.  
<strong>Instructions:</strong> This tool generates monthly archive page templates for Encyclopedia Dramatica's "X of the Now" content.
Select your options below and click "Generate" to create wiki markup for your archive pages.
Select your options below and click "Generate" to create wiki markup for your archive pages.
</div>
</div>
Line 431: Line 430:
<div class="controls">
<div class="controls">
<h3>Generate Monthly Archive Templates</h3>
<h3>Generate Monthly Archive Templates</h3>
<label>Month Offset:  
 
<label>Month Offset:
<select id="monthOffset">
<select id="monthOffset">
<option value="0">Current Month</option>
  <option value="">Auto</option>
<option value="1" selected>Next Month</option>
  <option value="0">Current Month</option>
<option value="2">Two Months Ahead</option>
  <option value="1">Next Month</option>
<option value="3">Three Months Ahead</option>
  <option value="2">Two Months Ahead</option>
<option value="-1">Previous Month</option>
  <option value="3">Three Months Ahead</option>
<option value="-2">Two Months Ago</option>
  <option value="-1">Previous Month</option>
  <option value="-2">Two Months Ago</option>
</select>
</label>
 
<br/>
 
<label>Month Override:
<select id="monthOverride">
  <option value="">(No override)</option>
  <option value="1">January</option>
  <option value="2">February</option>
  <option value="3">March</option>
  <option value="4">April</option>
  <option value="5">May</option>
  <option value="6">June</option>
  <option value="7">July</option>
  <option value="8">August</option>
  <option value="9">September</option>
  <option value="10">October</option>
  <option value="11">November</option>
  <option value="12">December</option>
</select>
</select>
</label>
</label>
<br/>
<br/>
<label>Year Override: <input type="number" id="yearOverride" placeholder="Leave blank for auto-detect" min="2011" max="2030" /></label>
 
<label>Year Override:
<input type="number" id="yearOverride" placeholder="Leave blank for auto-detect" min="2011" max="2030" />
</label>
 
<br/>
<br/>
<button onclick="generateArchives()">Generate Archive Templates</button>
<button onclick="generateArchives()">Generate Archive Templates</button>
<button onclick="clearOutput()">Clear Output</button>
<button onclick="clearOutput()">Clear Output</button>
Line 451: Line 478:
<div id="output"></div>
<div id="output"></div>


<script type='text/javascript'>
<script type="text/javascript">
var months = ["", "January","February","March","April","May","June","July","August","September","October","November","December"];
var months = ["", "January","February","March","April","May","June","July","August","September","October","November","December"];


Line 457: Line 484:
     var date = new Date();
     var date = new Date();
     var year = parseInt(document.getElementById('yearOverride').value) || date.getFullYear();
     var year = parseInt(document.getElementById('yearOverride').value) || date.getFullYear();
    var monthOverride = parseInt(document.getElementById('monthOverride').value);
     var monthOffset = parseInt(document.getElementById('monthOffset').value);
     var monthOffset = parseInt(document.getElementById('monthOffset').value);
     var month = date.getMonth() + 1 + monthOffset;
     var month;
      
 
    // Handle year wraparound
    if (!isNaN(monthOverride)) {
        month = monthOverride;
    } else {
        month = date.getMonth() + 1 + (isNaN(monthOffset) ? 0 : monthOffset);
     }
 
     while (month > 12) {
     while (month > 12) {
         month -= 12;
         month -= 12;
Line 469: Line 502:
         year -= 1;
         year -= 1;
     }
     }
   
 
     var days = new Date(year, month, 0).getDate();
     var days = new Date(year, month, 0).getDate();
     var monthName = months[month];
     var monthName = months[month];
   
 
     var votn = "";
     var votn = "";
     var potn = "";
     var potn = "";
     var aotn = "";
     var aotn = "";
     var qotn = "";
     var qotn = "";
   
 
    // Generate in descending order (latest first)
     for (day = days; day > 0; day--) {
     for (day = days; day > 0; day--) {
         votn += "*[[Encyclopedia Dramatica:Video of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + " - ]]\n";
         votn += "*[[Encyclopedia Dramatica:Video of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + " - ]]\n";
Line 485: Line 517:
         qotn += "*[[Encyclopedia Dramatica:Quote of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + " - ]]\n";
         qotn += "*[[Encyclopedia Dramatica:Quote of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + " - ]]\n";
     }
     }
   
 
     var output = document.getElementById('output');
     var output = document.getElementById('output');
     output.innerHTML = "";
     output.innerHTML = "";
   
 
     var aotSection = "== " + monthName + " " + year + " ==\n\n" + aotn;
     var aotSection = "== " + monthName + " " + year + " ==\n\n" + aotn;
     var qotSection = "== " + monthName + " " + year + " ==\n\n" + qotn;
     var qotSection = "== " + monthName + " " + year + " ==\n\n" + qotn;
     var votSection = "== " + monthName + " " + year + " ==\n\n" + votn;
     var votSection = "== " + monthName + " " + year + " ==\n\n" + votn;
     var potSection = "== " + monthName + " " + year + " ==\n\n" + potn;
     var potSection = "== " + monthName + " " + year + " ==\n\n" + potn;
   
 
     output.innerHTML += "<div class='output'><h2>Article of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(aotSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(aotSection).replace(/'/g, "\\'") + "')\">Copy AOTN</button></div>";
     output.innerHTML += "<div class='output'><h2>Article of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(aotSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(aotSection).replace(/'/g, "\\'") + "')\">Copy AOTN</button></div>";
   
 
     output.innerHTML += "<div class='output'><h2>Quote of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(qotSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(qotSection).replace(/'/g, "\\'") + "')\">Copy QOTN</button></div>";
     output.innerHTML += "<div class='output'><h2>Quote of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(qotSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(qotSection).replace(/'/g, "\\'") + "')\">Copy QOTN</button></div>";
   
 
     output.innerHTML += "<div class='output'><h2>Video of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(votSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(votSection).replace(/'/g, "\\'") + "')\">Copy VOTN</button></div>";
     output.innerHTML += "<div class='output'><h2>Video of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(votSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(votSection).replace(/'/g, "\\'") + "')\">Copy VOTN</button></div>";
   
 
     output.innerHTML += "<div class='output'><h2>Picture of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(potSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(potSection).replace(/'/g, "\\'") + "')\">Copy POTN</button></div>";
     output.innerHTML += "<div class='output'><h2>Picture of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(potSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(potSection).replace(/'/g, "\\'") + "')\">Copy POTN</button></div>";
   
 
     output.innerHTML += "<div class='output info'><h2>Generation Summary</h2>" +
     output.innerHTML += "<div class='output info'><h2>Generation Summary</h2>" +
         "<p><strong>Generated:</strong> " + monthName + " " + year + " (" + days + " days)</p>" +
         "<p><strong>Generated:</strong> " + monthName + " " + year + " (" + days + " days)</p>" +
Line 522: Line 554:


function copyToClipboard(text) {
function copyToClipboard(text) {
    // Create a temporary textarea element
     var textarea = document.createElement('textarea');
     var textarea = document.createElement('textarea');
     textarea.value = text.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
     textarea.value = text.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
Line 529: Line 560:
     document.execCommand('copy');
     document.execCommand('copy');
     document.body.removeChild(textarea);
     document.body.removeChild(textarea);
   
    // Show feedback
     alert('Copied to clipboard!');
     alert('Copied to clipboard!');
}
}
Line 542: Line 571:
         }
         }
     }
     }
   
     var textarea = document.createElement('textarea');
     var textarea = document.createElement('textarea');
     textarea.value = allText;
     textarea.value = allText;
Line 549: Line 577:
     document.execCommand('copy');
     document.execCommand('copy');
     document.body.removeChild(textarea);
     document.body.removeChild(textarea);
   
     alert('All sections copied to clipboard!');
     alert('All sections copied to clipboard!');
}
}
Line 557: Line 584:
}
}


// Auto-generate on page load
window.onload = function() {
window.onload = function() {
     generateArchives();
     generateArchives();
Line 565: Line 591:
</body>
</body>
</html>
</html>
 
</syntaxhighlight>
</pre>


=== JavaScript Improvements Made ===
=== JavaScript Improvements Made ===

Revision as of 06:40, 17 August 2025

This page is for submitting and managing XOTN (X of the Now) content. Only Editors and Sysops can approve submissions.

For Editors: To approve a submission, copy the content to the appropriate current page and move the submission to the archive section.


Instructions

For Users

To suggest content for featuring on the main page:

  1. Add your suggestion to the appropriate section below
  2. Use the provided templates
  3. Include all required information
  4. Sign your submission with ~~~~

For Editors

To approve and activate a submission:

  1. Review the submission for quality and appropriateness
  2. Copy the template code to the appropriate current page:
  3. Update the dates and add your username as editor
  4. Move the submission to the "Recently Approved" section
  5. Set featured=true when copying to current page

Article of the Now Submissions

Pending Approval

Sample Submission:

{{XOTN/AOTN
|title=Your Article Title
|image=Filename.jpg
|summary=Brief description of the article (keep under 150 words)
|link=Your Article Title
|date=YYYY-MM-DD
|expires=YYYY-MM-DD  
|editor=[[User:YourUsername]]
|featured=false
}}

Submitted by: User:Example on August 17, 2025


Recently Approved

Quote of the Now Submissions

Pending Approval

Sample Submission:

{{XOTN/QOTN
|quote=Your quote text here
|author=Who said it
|source=Where it's from
|context=Additional context if needed
|date=YYYY-MM-DD
|expires=YYYY-MM-DD
|editor=[[User:YourUsername]]
|featured=false
}}

Submitted by: User:Example on August 17, 2025


Recently Approved

Video of the Now Submissions

Pending Approval

Sample Submission:

{{XOTN/VOTN
|title=Video Title
|video={{#ev:youtube|VIDEO_ID|300}}
|caption=Short caption
|description=Brief description
|date=YYYY-MM-DD
|expires=YYYY-MM-DD
|editor=[[User:YourUsername]]
|featured=false
}}

Submitted by: User:Example on August 17, 2025

Video Guidelines:

  • Use
    for YouTube videos
  • Use
    EmbedVideo received the bad id "VIDEO_ID" for the service "vimeo".
    for Vimeo videos
  • Keep videos appropriate and relevant to ED culture
  • Avoid copyrighted content


Recently Approved

Picture of the Now Submissions

Pending Approval

Sample Submission:

{{XOTN/POTN
|image=Filename.jpg
|caption=Picture caption
|description=Brief description
|width=250
|date=YYYY-MM-DD
|expires=YYYY-MM-DD
|editor=[[User:YourUsername]]
|featured=false
}}

Submitted by: User:Example on August 17, 2025

Image Guidelines:

  • Upload images to the wiki first
  • Use appropriate file names
  • Ensure images are ED-relevant
  • Maximum recommended width: 300px


Recently Approved

Scheduling

Upcoming Schedule

Date AOTN QOTN VOTN POTN Editor
August 18, 2025 Pedophilia "In lulz we trust" Killer AI Dramatic Hamster User:AdminExample
August 19, 2025 Available Available Available Available --
August 20, 2025 Available Available Available Available --

Content Guidelines

General Rules:

  • Content must be relevant to Encyclopedia Dramatica's mission
  • No personal attacks or doxxing
  • Follow wiki policies and guidelines
  • Maintain ED's satirical and humorous tone

Article of the Now:

  • Article must exist and be substantial (500+ words recommended)
  • Summary should be 100-150 words
  • Include compelling reasons why it should be featured

Quote of the Now:

  • Must be properly attributed
  • Should be relevant to internet culture, ED, or current events
  • Include context when necessary

Video of the Now:

  • Must be accessible and working
  • Should be entertaining or educational
  • Keep duration reasonable (under 10 minutes preferred)

Picture of the Now:

  • Must be uploaded to the wiki
  • Should be high quality and clear
  • Include proper attribution if needed

Archive

August 2025:

  • August 16-17: AOTN: Party Van, QOTN: "Party Van meme", VOTN: FBI Surveillance, POTN: Van image
  • August 14-15: AOTN: Vladislav Roslyakov, QOTN: School shooting quote, VOTN: News report, POTN: Portrait
  • August 12-13: AOTN: Josef Mengele, QOTN: Nazi experimentation, VOTN: Documentary, POTN: Historical photo

Archive Management

When to Archive Content

Archive current XOTN content when:

  • Setting new featured content (before updating current pages)
  • Content has been featured for 2+ days
  • Monthly maintenance and cleanup

Archive Workflow for Editors

Step 1: Create Individual Archive Pages Before updating current content, create date-specific archive pages:

For AOTN:

<!-- Copy content from current AOTN page -->
{{XOTN/AOTN
|title=Article Title
|image=Image.jpg
|summary=Article summary
|link=Article Title
|date=YYYY-MM-DD
|expires=YYYY-MM-DD
|editor=[[User:EditorName]]
|featured=true
}}

{{timeline|[[Encyclopedia Dramatica:Article of the Now/PREVIOUS_DATE|Previous]]|[[Encyclopedia Dramatica:Article of the Now/NEXT_DATE|Next]]}}
[[Category:Article of the Now]]

For QOTN:

<!-- Copy content from current QOTN page -->
{{XOTN/QOTN
|quote=Quote text
|author=Author name
|source=Source
|context=Context
|date=YYYY-MM-DD
|expires=YYYY-MM-DD
|editor=[[User:EditorName]]
|featured=true
}}

{{timeline|[[Encyclopedia Dramatica:Quote of the Now/PREVIOUS_DATE|Previous]]|[[Encyclopedia Dramatica:Quote of the Now/NEXT_DATE|Next]]}}
[[Category:Quote of the Now]]

For VOTN:

<!-- Copy content from current VOTN page -->
{{XOTN/VOTN
|title=Video Title
|video={{#ev:youtube|VIDEO_ID|300}}
|caption=Caption
|description=Description
|date=YYYY-MM-DD
|expires=YYYY-MM-DD
|editor=[[User:EditorName]]
|featured=true
}}

{{timeline|[[Encyclopedia Dramatica:Video of the Now/PREVIOUS_DATE|Previous]]|[[Encyclopedia Dramatica:Video of the Now/NEXT_DATE|Next]]}}
[[Category:Video of the Now]]

For POTN:

<!-- Copy content from current POTN page -->
{{XOTN/POTN
|image=Image.jpg
|caption=Caption
|description=Description
|width=250
|date=YYYY-MM-DD
|expires=YYYY-MM-DD
|editor=[[User:EditorName]]
|featured=true
}}

{{timeline|[[Encyclopedia Dramatica:Picture of the Now/PREVIOUS_DATE|Previous]]|[[Encyclopedia Dramatica:Picture of the Now/NEXT_DATE|Next]]}}
[[Category:Picture of the Now]]

Step 2: Update Archive Index Pages Add entries to the monthly lists in:

Format:

*[[Encyclopedia Dramatica:Article of the Now/August 18, 2025|August 18, 2025]] - [[Article Title]]

Step 3: Update "Recent Archive" Sections Edit the "Recent Archive" sections on archive pages to show latest archived content:

'''Recent articles:''' [[New Article]] (August 18) • [[Previous Article]] (August 16) • [[Older Article]] (August 14)

Step 4: Update "What Have I Missed?" Boxes Update the AOTN current page with new archived content:

<div style="text-align:center; font-size:9pt; margin-top:10px; padding:5px; background:#f0f0f0; border-radius:3px;">
'''What have I missed?'''<br/>
[[Recently Archived Article]] was 2 days ago • [[Previously Archived]] was 4 days ago • [[Older Archived]] was 6 days ago
</div>

Archive Quick Reference

Task Page to Edit What to Add
Create AOTN archive Encyclopedia Dramatica:Article of the Now/DATE Full AOTN content + timeline
Update AOTN index Encyclopedia Dramatica:Article of the Now/2025 Add monthly list entry
Update "What I missed" Encyclopedia Dramatica:XOTN/Current/AOTN Update recent archive links
Create QOTN archive Encyclopedia Dramatica:Quote of the Now/DATE Full QOTN content + timeline
Update QOTN index Encyclopedia Dramatica:Quote of the Now/2025 Add monthly list entry
Create VOTN archive Encyclopedia Dramatica:Video of the Now/DATE Full VOTN content + timeline
Update VOTN index Encyclopedia Dramatica:Video of the Now/2025 Add monthly list entry
Create POTN archive Encyclopedia Dramatica:Picture of the Now/DATE Full POTN content + timeline
Update POTN index Encyclopedia Dramatica:Picture of the Now/2025 Add monthly list entry

JavaScript Archive Generator

Use this JavaScript tool to generate monthly archive page templates. This creates placeholder entries for entire months.

How to Use

1. **Copy the code below** into a text file 2. **Save with .html extension** (e.g., "xotn_generator.html") 3. **Open in web browser** 4. **Copy the generated wiki markup** to your archive pages

Updated JavaScript Code with Month Override

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>XOTN Archive Generator</title>
<style>
body {
    font-family: monospace;
    margin: 20px;
    background: #f8f8f8;
}
h1 {
    color: #333;
    border-bottom: 3px solid #666;
    padding-bottom: 10px;
}
h2 {
    color: #666;
    border-bottom: 1px solid #ccc;
}
.output {
    background: #fff;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.controls {
    background: #e8f4f8;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #b0d4da;
    border-radius: 5px;
}
button {
    padding: 10px 20px;
    margin: 8px;
    font-size: 14px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    background: #45a049;
}
select, input {
    padding: 8px;
    margin: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}
</style>
</head>
<body>

<h1>Encyclopedia Dramatica XOTN Archive Generator</h1>

<div class="info">
<strong>Instructions:</strong> This tool generates monthly archive page templates for Encyclopedia Dramatica's "X of the Now" content.
Select your options below and click "Generate" to create wiki markup for your archive pages.
</div>

<div class="controls">
<h3>Generate Monthly Archive Templates</h3>

<label>Month Offset:
<select id="monthOffset">
  <option value="">Auto</option>
  <option value="0">Current Month</option>
  <option value="1">Next Month</option>
  <option value="2">Two Months Ahead</option>
  <option value="3">Three Months Ahead</option>
  <option value="-1">Previous Month</option>
  <option value="-2">Two Months Ago</option>
</select>
</label>

<br/>

<label>Month Override:
<select id="monthOverride">
  <option value="">(No override)</option>
  <option value="1">January</option>
  <option value="2">February</option>
  <option value="3">March</option>
  <option value="4">April</option>
  <option value="5">May</option>
  <option value="6">June</option>
  <option value="7">July</option>
  <option value="8">August</option>
  <option value="9">September</option>
  <option value="10">October</option>
  <option value="11">November</option>
  <option value="12">December</option>
</select>
</label>

<br/>

<label>Year Override:
<input type="number" id="yearOverride" placeholder="Leave blank for auto-detect" min="2011" max="2030" />
</label>

<br/>

<button onclick="generateArchives()">Generate Archive Templates</button>
<button onclick="clearOutput()">Clear Output</button>
<button onclick="copyAllToClipboard()">Copy All to Clipboard</button>
</div>

<div id="output"></div>

<script type="text/javascript">
var months = ["", "January","February","March","April","May","June","July","August","September","October","November","December"];

function generateArchives() {
    var date = new Date();
    var year = parseInt(document.getElementById('yearOverride').value) || date.getFullYear();
    var monthOverride = parseInt(document.getElementById('monthOverride').value);
    var monthOffset = parseInt(document.getElementById('monthOffset').value);
    var month;

    if (!isNaN(monthOverride)) {
        month = monthOverride;
    } else {
        month = date.getMonth() + 1 + (isNaN(monthOffset) ? 0 : monthOffset);
    }

    while (month > 12) {
        month -= 12;
        year += 1;
    }
    while (month < 1) {
        month += 12;
        year -= 1;
    }

    var days = new Date(year, month, 0).getDate();
    var monthName = months[month];

    var votn = "";
    var potn = "";
    var aotn = "";
    var qotn = "";

    for (day = days; day > 0; day--) {
        votn += "*[[Encyclopedia Dramatica:Video of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + " - ]]\n";
        potn += "*[[Encyclopedia Dramatica:Picture of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + " - ]]\n";
        aotn += "*[[Encyclopedia Dramatica:Article of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + "]] - \n";
        qotn += "*[[Encyclopedia Dramatica:Quote of the Now/" + monthName + " " + day + ", " + year + "|" + monthName + " " + day + ", " + year + " - ]]\n";
    }

    var output = document.getElementById('output');
    output.innerHTML = "";

    var aotSection = "== " + monthName + " " + year + " ==\n\n" + aotn;
    var qotSection = "== " + monthName + " " + year + " ==\n\n" + qotn;
    var votSection = "== " + monthName + " " + year + " ==\n\n" + votn;
    var potSection = "== " + monthName + " " + year + " ==\n\n" + potn;

    output.innerHTML += "<div class='output'><h2>Article of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(aotSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(aotSection).replace(/'/g, "\\'") + "')\">Copy AOTN</button></div>";

    output.innerHTML += "<div class='output'><h2>Quote of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(qotSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(qotSection).replace(/'/g, "\\'") + "')\">Copy QOTN</button></div>";

    output.innerHTML += "<div class='output'><h2>Video of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(votSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(votSection).replace(/'/g, "\\'") + "')\">Copy VOTN</button></div>";

    output.innerHTML += "<div class='output'><h2>Picture of the Now - " + monthName + " " + year + "</h2><pre>" + escapeHtml(potSection) + "</pre><button onclick=\"copyToClipboard('" + escapeHtml(potSection).replace(/'/g, "\\'") + "')\">Copy POTN</button></div>";

    output.innerHTML += "<div class='output info'><h2>Generation Summary</h2>" +
        "<p><strong>Generated:</strong> " + monthName + " " + year + " (" + days + " days)</p>" +
        "<p><strong>Usage:</strong> Copy the relevant sections above and paste them into your Encyclopedia Dramatica archive pages</p>" +
        "<p><strong>Archive Pages:</strong></p>" +
        "<ul>" +
        "<li>AOTN: <code>Encyclopedia Dramatica:Article of the Now/" + year + "</code></li>" +
        "<li>QOTN: <code>Encyclopedia Dramatica:Quote of the Now/" + year + "</code></li>" +
        "<li>VOTN: <code>Encyclopedia Dramatica:Video of the Now/" + year + "</code></li>" +
        "<li>POTN: <code>Encyclopedia Dramatica:Picture of the Now/" + year + "</code></li>" +
        "</ul>" +
        "<p><strong>Next Step:</strong> Fill in article/quote/video/picture titles as you feature them throughout the month</p></div>";
}

function escapeHtml(text) {
    var div = document.createElement('div');
    div.textContent = text;
    return div.innerHTML;
}

function copyToClipboard(text) {
    var textarea = document.createElement('textarea');
    textarea.value = text.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
    document.body.appendChild(textarea);
    textarea.select();
    document.execCommand('copy');
    document.body.removeChild(textarea);
    alert('Copied to clipboard!');
}

function copyAllToClipboard() {
    var allSections = document.querySelectorAll('.output pre');
    var allText = "";
    for (var i = 0; i < allSections.length; i++) {
        if (allSections[i].textContent) {
            allText += allSections[i].textContent + "\n\n";
        }
    }
    var textarea = document.createElement('textarea');
    textarea.value = allText;
    document.body.appendChild(textarea);
    textarea.select();
    document.execCommand('copy');
    document.body.removeChild(textarea);
    alert('All sections copied to clipboard!');
}

function clearOutput() {
    document.getElementById("output").innerHTML = "";
}

window.onload = function() {
    generateArchives();
};
</script>

</body>
</html>

JavaScript Improvements Made

  • **Better user interface** with controls and styling
  • **Flexible month/year selection** instead of hardcoded values
  • **Year wraparound handling** for cross-year generation
  • **Cleaner output formatting** with separate sections
  • **Auto-generation on page load** for immediate use
  • **Clear instructions** and usage notes
  • **Modern HTML structure** with proper styling

Usage Notes

  • **Default:** Generates next month's templates
  • **Current month:** Set offset to 0 if adding to current month
  • **Future months:** Use positive offsets (1, 2, etc.)
  • **Past months:** Use negative offset (-1) for previous month
  • **Custom year:** Override year field for generating archives for different years

Discussion

Use the talk page for general discussion about XOTN policies and procedures.