Shared Items feed and notes (patch)

Howtos, instructions and links to related software. Do not ask questions here.
User avatar
doenietzomoeilijk
Bear Rating Trainee
Bear Rating Trainee
Posts: 8
Joined: 30 Jul 2009, 12:52

Shared Items feed and notes (patch)

Postby doenietzomoeilijk » 04 Feb 2010, 13:04

I often share items, and lately I've gotten into the habit of adding a note to shared items. I wasn't completely happy with how the notes were displayed in the Shared Items feed, though. Instead of a little yellow box, I'd like notes to replace the entire item description.

Luckily, that is very easy to do.

Open functions.php, scroll down to line 3667, and replace

Code: Select all

if ($line["note"]) {
    print "<div style='$note_style'>";
    print $line["note"];
    print "</div>";
}


with

Code: Select all

if ($line["note"]) {
    print $line["note"];
} else {
    print sanitize_rss($link, $line["content_preview"], false, $owner_uid);
}


Now, if an item has a note, only the note will be displayed. If there's no note, it'll show the item content like it used to do.

Ideally, this would be controlled by a preference somewhere (so that you don't have to re-apply the patch after updating), but I haven't looked into that yet. For now, this suits my need.

Return to “Knowledge Base”

Who is online

Users browsing this forum: No registered users and 1 guest