Usericons are enabled by default on the Recent Entries view of Flexible Squares, so this tutorial covers how to disable them. It will override the print_entry
function. This 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.
Copy and paste the following code into your theme layer to disable usericons in the Recent view only:
function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor) { $e->print_linkbar(); # Userpic var string userpic = ""; if ($*show_entry_userpic) { if ($p.view == "friends" or $p.view == "entry") { if (defined $e.userpic) { $userpic = $userpic + """<img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name"""; if ($e.poster.username != $e.journal.username) { $userpic = $userpic + " in $e.journal.name"; } $userpic = $userpic + "\">"; } } elseif ($p.journal_type == "C" and $p.view == "recent") { if (defined $e.userpic) { $userpic = $userpic + """<img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name" title="$e.poster.name" />"""; } } } print """ <div class="subcontent"> """; if (($p.view == "recent" and $p.journal_type != "C" ) or $p.view == "day") { print """$userpic"""; } else { if ($p.view == "recent" and $p.journal_type == "C" ) { """<div class="userpicfriends" style="background-color: $*entry_bgcolor;">"""; } else { """<div class="userpicfriends" style="background-color: $bgcolor;">"""; } print """$userpic"""; # Poster if ($p.view == "friends" or $p.view == "entry") { var UserLite linkto; $linkto = $e.poster; #print "$e.poster.username"; """<br /><a href=\"""" + $linkto->base_url() + "\">"; "<font color=\"$fgcolor\">$linkto.username</font></a>"; } elseif ($p.journal_type == "C" and $p.view == "recent") { var UserLite linkto; $linkto = $e.poster; #print "$e.poster.username"; """<br /><a href=\"""" + $linkto->base_url() + "\">"; "$linkto.username</a>"; } if (($p.view == "friends" or $p.view == "entry") and $e.poster.username != $e.journal.username) { var UserLite linkto; $linkto = $e.journal; """<br />[<a href=\"""" + $linkto->base_url() + "\">"; "<font color=\"$fgcolor\">$linkto.username</font></a>]"; } if ($p.view == "recent" and $p.journal_type == "C") { print "</div>"; } if ($p.view != "recent" and $p.view != "day") { print """</div>"""; } } # Date, time, subject var string time = ""; $time = $time + """ @ """; $time = $time + $e.time->time_format("short"); var string date = ""; $date = $date + $e.time->date_format("long_day"); """ <div class="datesubject"><div class="date">"""; print $e.time->date_format("%%dd%% %%month%% %%yyyy%%"); "$time </div>"; """ <div class="subject">"""; if ($e.security != "") { $e.security_icon->print(); } """ $e.subject </div> </div> """; """ <div class="entry"> <div class="entry_text">"""; $e->print_text(); print "</div> "; # Currents var string currents =""; $e->print_metadata(); # Comments """ <div class="clear"> </div> <div class="comments">"""; if ($p.view != "entry" or $p.view != "reply") { $e.comments->print(); } elseif ($e.comments.enabled) { $e.comments->print_postlink(); } else { " "; } """ </div> </div> </div> <div class="separator"></div> <div class="clear"> </div>"""; }
If you want to disable all usericons (ie, the usericons on your Friends page as well as your Recent page), use the following code instead:
set show_entry_userpic = false;
Compile your layer, and it's ready to use. You will need to apply your theme layer via the Customize interface in order for your changes to take effect.
Contributed by dandelion.
Comments Disabled:
Comments have been disabled for this post.