Editing Comrade:CriticalResist/sandbox/Essays documentation

Warning: You are not logged in, comrade. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be instead attributed to your username.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 23: Line 23:


This documentation goes through each template and the module one by one.
This documentation goes through each template and the module one by one.
== New category ==
You guessed it, I updated the essays page.
The documentation is still valid with just one addition: you need to add the '''Essays''' category to your essay to have it published. I also limited the count to 15 essays on the [[ProleWiki:Essays|front page]], and added a link to "all essays" at the end of the list, which takes you to the category page which uses the ''exact same code'' as the front page, except without the count limit for the feed (although I had to limit the width of the overall container because category pages are wider for some reason).
That's the only difference, I've updated the dpl codes below to reflect this.


== Essays_homepage ==
== Essays_homepage ==
Line 80: Line 73:
The code:<blockquote><nowiki><dpl></nowiki>
The code:<blockquote><nowiki><dpl></nowiki>


category = Essays
namespace = Essay


ordermethod = lastedit
ordermethod = lastedit
Line 94: Line 87:
addeditdate=true
addeditdate=true


titlemaxlength=57
titlemaxlength=60


userdateformat = Y-m-d format = ,\n* <span class="essay-small">%DATE%</span>, <span class="lastupdate-title">[[%PAGE%|%TITLE%]]</span>,
userdateformat = Y-m-d format = ,\n* <span class="essay-small">%DATE%</span>, <span class="lastupdate-title">[[%PAGE%|%TITLE%]]</span>,


</ dpl></blockquote>What it does is create a list of the 7 most recently updated essays (that is, when an edit was committed) **as long as they are in the Essays category**. You can change that 7 count to anything else in the template by editing '''count = 7''' in the DPL code.
</ dpl></blockquote>What it does is create a list of the 7 most recently updated essays (that is, when an edit was committed). You can change that 7 count to anything else in the template by editing '''count = 7''' in the DPL code.


titlemaxlength sets how many characters can appear in the title variable before we truncate it with ... I picked 57 (60-3 to account for the ellipses the code adds) so that it still looks good on desktop (about 2 full lines of text), but we can change it at any time.
titlemaxlength sets how many characters can appear in the title variable before we truncate it with ... I picked 60 so that it still looks good on desktop (about 2 full lines of text), but we can change it at any time.


Notably we also order by last edit (ordermethod), meaning the most recently updated essay will be pushed to the top of the list.
Notably we also order by last edit (ordermethod), meaning the most recently updated essay will be pushed to the top of the list.
Line 152: Line 145:
<blockquote><nowiki><dpl></nowiki>
<blockquote><nowiki><dpl></nowiki>


category=Essays
namespace=Essay


mode=unordered
mode=unordered
Line 158: Line 151:
includesubpages=false
includesubpages=false


ordermethod= firstedit,pagetouched
ordermethod=firstedit


order=descending
order=descending
Line 165: Line 158:


<nowiki></dpl></nowiki></blockquote>
<nowiki></dpl></nowiki></blockquote>




Line 175: Line 167:


ordermethod= is how the output will be sorted. Firstedit means that it will list the output by first edit made, i.e. page creation. Lastedit is the last edit made (used for Latest Updates). There’s several other ordering methods available.
ordermethod= is how the output will be sorted. Firstedit means that it will list the output by first edit made, i.e. page creation. Lastedit is the last edit made (used for Latest Updates). There’s several other ordering methods available.
''Pagetouched'' is a bit different, basically it looks at when the page was last updated in such a way that the cache was refreshed. Since we grab pages by their inclusion in a category, we want to know when new pages are added to the category, not when the ''category page'' itself was updated (since we don't update a category page once it's created, meaning we go into the editor and commit an edit). You can categorize with more than one parameter and that's what we did, we first categorize by date of first edit, and then by page touched. Not entirely sure why this works but basically it ensures we get essays ordered by the date they got the category added for the first time only. Otherwise every time you updated your essay in any way it would get bumped to the top of the list.
I think it's technically possible that if you remove the Essays category and add it again you can bump your essay to the top of the feed but I trust our editors not to do that and play fair.


order=ascending or descending to sort the list one way or the other.
order=ascending or descending to sort the list one way or the other.


include= this is the important one. Include allows you to include something specific with your output, pulled from the page. In this case we pull the content of the infobox_essay template. You can go really deep with the include property, I recommend looking it up on the documentation.
include= this is the important one. Include allows you to include something specific with your output, pulled from the page. In this case we pull the content of the infobox_essay template.


This code together creates a bullet-point list ordered from most recent to oldest essay and pulls the infobox essay template under each bullet point.
This code together creates a bullet-point list ordered from most recent to oldest essay and pulls the infobox essay template under each bullet point.
ProleWiki upholds the abolition of private property, including intellectual property, so feel free to publish any work at will.
Cancel Editing help (opens in new window)