S2 Smooth Sailing Welcome Note on all pages

Nov 30, 2006 20:43



function RecentPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
var int i = size $.entries - 1;
if ($i<0) {
"""
$*text_noentries_recent""";
}else{
foreach var int pos (0..$i) {
var Entry e = $.entries[$pos];
$this->print_entry($e);
}
}
}

function FriendsPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
var int i = size $.entries - 1;
if ($i<0) {
"""

$*text_noentries_recent""";
}else{
foreach var int pos (0..$i) {
var Entry e = $.entries[($*layout_friends_sortorder=="newest"?$pos:$i-$pos)];
$this->print_entry($e);
}
}
}

function DayPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
var int i = size $.entries - 1;
if ($i<0) {
"""

$*text_noentries_day""";
}else{
foreach var int pos (0..$i) {
var Entry e = $.entries[($*layout_day_sortorder=="newest"?$i-$pos:$pos)];
$this->print_entry($e);
}
}
}

function MonthPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
foreach var MonthDay day ($.days) {
if ($day.has_entries) {
"""

"""; print $day.date->date_format("%%dayord%%"); """

""";
$day->print_subjectlist();
"""
""";
}
}
}

function YearPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
var int i = size $.months - 1;
if ($i<0) { return; }
foreach var int pos (0..$i) {
var YearMonth month = $.months[($*layout_year_sortorder=="newest"?$i-$pos:$pos)];
if ($month.has_entries) {
$this->print_month($month);
}
}
}

function EntryPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
$this->print_entry($.entry);
if (size $.comments >0) {

if ($.entry.itemid!=int($*layout_guestbook_entryid)) {
$this->lay_print_bodytitlebox($*text_comment_seperator,"midtitle");
}else {
$this->lay_print_bodytitlebox($*text_signature_seperator,"midtitle");
}
if (viewer_is_owner()) { $this->print_multiform_start(); }
$this->print_comments($.comments);
if (not $.comment_pages.all_subitems_displayed) {
"""
""";
$.comment_pages->print();
"""""";
}
"""
""";
if (viewer_is_owner()) {
$this->print_multiform_actionline();
$this->print_multiform_end();
}else{
if ($.entry.itemid!=int($*layout_guestbook_entryid)) {
""" $*text_post_comment_entrypage""";
}else{
""" $*text_post_comment_guestbook""";
}
}
"""""";
}
}

function MessagePage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
"""
""";
"""
$.message""";
$this->print_links();
"""""";
}

function TagsPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
"""

""";
if (size $.tags == 0 ) {
"""$*text_tags_none""";
}elseif ($*layout_tagspage=="table") {
$this->lay_print_tagstable();
}else{
$this->lay_print_tagslist();
}
"""""";
}

function ReplyPage::print_body() {
if ($*sticky_post != "") {
# print the welcome note, styled like an entry by default, but with CSS id
# tags so that the welcome note can be customised through Custom CSS.
"""
""";
if ($*sticky_subject != "") {
"""

$*sticky_subject
""";
}
"""
$*sticky_post
""";
}
if ($.replyto.depth==0) {
$this->print_entry($.entry);
}else{
$.replyto->lay_print();
}
if ($.entry.itemid==int($*layout_guestbook_entryid) and $.replyto.depth==0) {
$this->lay_print_bodytitlebox($*text_signing_form,"midtitle");
}elseif ($.replyto.depth==0) {
$this->lay_print_bodytitlebox($*text_comment_form,"midtitle");
}else{
$this->lay_print_bodytitlebox($*text_reply_form,"midtitle");
}
"""
""";
if ($.replyto.depth==0 and int($*layout_guestbook_entryid)!=0 and $.entry.itemid!=int($*layout_guestbook_entryid) and $*text_replypage_warning!="") {

print $*text_replypage_warning;
}
"""

""";
$.form->print();
"""""";
}

smooth sailing, s2

Previous post Next post
Up