Club Penguin Rewritten Wiki
(Remove link to wiki resigned from and am only doing server-side stuff on now.)
Tag: Source edit
 
(2 intermediate revisions by the same user not shown)
Line 22: Line 22:
   
 
:::That's some awesome work! Feel free to use that for the item type pages. I can add some styling to the subpage nav later unless you already have some. [[User:PerapinCP|PerapinCP]] ([[Message Wall:PerapinCP|talk]]) 08:41, 20 October 2020 (UTC)
 
:::That's some awesome work! Feel free to use that for the item type pages. I can add some styling to the subpage nav later unless you already have some. [[User:PerapinCP|PerapinCP]] ([[Message Wall:PerapinCP|talk]]) 08:41, 20 October 2020 (UTC)
  +
  +
::::Okay, thanks will do. It's not perfect but perhaps better than the default? If so, the following can be used as a starting point (it was styled for a different theme, so it might need some tweaking and there may be unanticipated changes needed depending on your current theme):
  +
  +
<pre>
  +
/* ---- NavlistSubpage Styles ---- */
  +
.NavSubpage {
  +
font-weight:bold;
  +
background-color:white;
  +
}
  +
.NavSubpage .mw-selflink {
  +
color: white!important;
  +
background-color: #0078a0;
  +
border-top: 1px solid #0078a0;
  +
border-bottom: 1px solid #0088a0;
  +
border: 1px solid #0078a0!important;
  +
}
  +
.NavSubpage a.mw-selflink:hover {
  +
color:white!important;
  +
border: 1px solid #0078a0!important;
  +
}
  +
.NavSubpage tr td {
  +
padding: 0px;
  +
text-align: center;
  +
width: 25px;
  +
}
  +
.NavSubpage a {
  +
color: #008CBA;
  +
background-color: white;
  +
padding: 4px 7px;
  +
padding: 4px 8px;
  +
border-left: 1px solid #92b2bc;
  +
border-top: 1px solid #92b2bc;
  +
border-bottom: 1px solid #92b2bc;
  +
border-right: 0px;
  +
}
  +
.NavSubpage td:last-of-type a {
  +
border-right: 1px solid #92b2bc;
  +
}
  +
.NavSubpage a:hover {
  +
color: #ec8504!important;
  +
}
  +
</pre>
  +
  +
Oh and I forgot, I changed my Fandom name to match my usual wiki name :). [[User:Cryscryb|Cryscryb]] ([[User talk:Cryscryb|talk]]) 23:13, 20 October 2020 (UTC)

Latest revision as of 22:53, 24 October 2020

Page suggestion

Silly question, on these pages instead of just bulleted DPL lists, why not do something like the following to create a useful table that lets users compare items at a glance? (try this on the actual page and you'll see you get a sortable wikitable that grabs its values from each page's ItemInfobox). Plus, it's reasonably easy to create a surrogate template for this and use that to format the table, which means an image thumbnail could be added to the left, and stuff can be calculated, added, or controlled with styles, parser functions etc.

{{#dpl:
|category=Neck Items
|uses=Template:ItemInfobox
|include={ItemInfobox}:available:type:cost:party:found
|table=class="wikitable sortable",Item,Available,Type,Cost,Party,Found
|noresultsheader=no matching country found.\n
|allowcachedresults=true
|ordermethod=titlewithoutnamespace
}}

Also, I'd be happy to create a surrogate template and get that working with the images at the left as an example if the staff is interested. We use DPL3 to do all kinds of interesting things on our (independent) wiki, it can be very useful. Just a thought. HauntedMiss (talk) 05:19, 20 October 2020 (UTC)

I'm interested! That would be a cool improvement for this page. My concern with DPL is with it not handling queries with over 500 results. For example, DPL won't show every item for the Body Item category. PerapinCP (talk) 06:05, 20 October 2020 (UTC)
Great, I understand that concern. Usually when it hits 500 results we paginate onto a subpage. You can stop the results from A-M for example, and then make a subpage /2 and put N-Z on the next page, or whatever is needed to get the job done. I usually add a note that once the results hit 500+ they will stop displaying and need to be paginated along with a current count of how many are in that category (if they are categorized in the same category). Also I make a single nav template to use between page and subpage to put on both to allow easier navigation between them, but I haven't tried it on a Fandom wiki that one, I'm sure it should work though, it just uses parser functions and magic words. :) HauntedMiss (talk) 06:42, 20 October 2020 (UTC) Edit: Ah, silly me, apologies I was skimming, I'll try that category as an example.
Here's an example, though keep in mind the subpage navigation at the top and bottom won't work on the first page because the first page should never be a subpage itself (which it is in my user space). Once placed on a first-level page, it will work fine, as long as it's subpages are numbered pagename/2, pagename/3 etc. For now the template can accommodate up to 10 subpages, but that can be easily expanded. Basically I use the |count=500 to restrict results to 500 (of course because that's the limit), then create a subpage /2 |offset=500 to offset the next page by 500 to show the next 500 results. and so on and so forth. It is not perfect but it works, if that is livable for the staff. Also the subpage nav can be styled to be much nicer, though it may require additions to the Common.css to do that as inline styling on this kind of template is pretty difficult, easier to just put a CSS class on the table that holds the numbers and style it globally.
That's some awesome work! Feel free to use that for the item type pages. I can add some styling to the subpage nav later unless you already have some. PerapinCP (talk) 08:41, 20 October 2020 (UTC)
Okay, thanks will do. It's not perfect but perhaps better than the default? If so, the following can be used as a starting point (it was styled for a different theme, so it might need some tweaking and there may be unanticipated changes needed depending on your current theme):
/* ---- NavlistSubpage Styles ---- */
.NavSubpage {
	font-weight:bold;
	background-color:white;
}
.NavSubpage .mw-selflink {
    color: white!important;
    background-color: #0078a0;
    border-top: 1px solid #0078a0;
    border-bottom: 1px solid #0088a0;
	border: 1px solid #0078a0!important;
}
.NavSubpage a.mw-selflink:hover {
	color:white!important;
	border: 1px solid #0078a0!important;
}
.NavSubpage tr td {
    padding: 0px;
    text-align: center;
    width: 25px;
}
.NavSubpage a {
    color: #008CBA;
    background-color: white;
    padding: 4px 7px;
    padding: 4px 8px;
	border-left: 1px solid #92b2bc;
    border-top: 1px solid #92b2bc;
    border-bottom: 1px solid #92b2bc;
    border-right: 0px;
}
.NavSubpage td:last-of-type a {
    border-right: 1px solid #92b2bc;
}
.NavSubpage a:hover {
    color: #ec8504!important;
}

Oh and I forgot, I changed my Fandom name to match my usual wiki name :). Cryscryb (talk) 23:13, 20 October 2020 (UTC)