New tutorial: Killfile for Friends pages

Oct 01, 2005 20:54

This is in response to Carrie's earlier post. I opted to use a theme layer instead of a layout layer, which follows the idea of lithiana's comments killfile tutorial. I think I've listed all the layouts that can use this customization, although I might be wrong. Also, any way to neaten up the long list? :)
This is the first time I've written a tutorial, so...yeah.


[paid] [boxer, FS, mag, nebula, NP, punq, SG, TI, unearth] Hiding particular users' posts on the Friends page

Paid Accounts OnlyThe following tutorial requires creating and editing a custom theme layer, which in turn requires a paid, permanent, or early adopter account. Please read What are the paid account benefits? and How do I buy a paid account? to learn about the paid account benefits and how to buy a paid account.
This tutorial requires the creation of a theme layer. If you already have a theme layer, you will need to edit it and add the code below. If you do not have a theme layer, you will need to create one by following the instructions in the Theme Layer tutorial.

This tutorial will add a Usenet-style "killfile" to the Friends page, which will hide particular users' posts on your Friends page.

If your theme layer or layout already has code to print the Friends page, modify it to include the code described below. Otherwise, add the following code to your theme layer:

function FriendsPage::print_body {
var string kill_list = " exampleusername1 exampleusername2 exampleusername3 ";
foreach var Entry e ($.entries) {
if( not $kill_list->contains(" $e.poster.username ")){
$this->print_entry($e);
}
}
}
Replace "exampleusername1," "exampleusername2," and "exampleusername3" with the usernames of the users you wish to ignore, making sure to keep a space between each username. Now, the entries by these users are not printed.

Additional References
What are the different S2 layer types?
Compiled by chineseinbed. Based on tutorials by miome, teine, and lithiana.

@ status-resolved, § flexible squares, [s2], § magazine, [paid], § punquin, § a sturdy gesture, § unearthed, § tabular indent, § nebula, § notepad

Up