Bier de Stone (slavezombie) wrote in everything_lj,
Bier de Stone
slavezombie
everything_lj

ipaddress

Username of journal: slavezombie
Layout Style: tranquility ii
Basic, Paid or Plus: Paid
Problem you are having: How can I tweak my theme layer so that the ipaddress appears on each entry (next to the metadata information?



Style ID # (and/or)
17123493
Your overrides
layerinfo source_viewable = 1;
layerinfo "type" = "theme";
layerinfo "name" = "poll";



function Page::print_custom_head() {
"""








""";
}



function FriendsPage::print_body ()
{
var string kill_list = " xianvox kinky_carter terehovich tu_mama_tambien kassade bobwelder bart_calendar popxwhore25 scottchurch word_upp fiddlemearound cinem0tionlab_k quizblorg lifemusicadmin pocketofgreen spankmypirate ";

# print all entries
print "
\n";
foreach var Entry e ( $.entries ) {
if( not $kill_list->contains(" $e.poster.username ")){
$this->print_entry($e);
}
}
print "
";

var string range = "most recent entries";
if ( $.nav.skip > 0 ) {
$range = "$.nav.skip entries back";
}

print "

";
print "viewing: $range
";
# go forward/backward if possible
if ( $.nav.forward_url != "" or $.nav.backward_url != "" ) {
var string sep;
var string back;
var string forward;
if ( $.nav.backward_url != "" ) {
$back = "back in time";
}
if ( $.nav.forward_url != "" ) {
$forward = "forward in time";
}
if ( $back != "" and $forward != "" ) {
$sep = " | ";
}
print "Next 20 pages: $back$sep$forward
";
}
print "

";
}







function print_entry ( Page p, Entry e )
{
# get date/time
var string datetime;

$datetime = $e.time->date_format($*lang_fmt_date_med_day) + " | " + $e.time->time_format($*time_format) + " ";

# get metadata
var string metadata;
if ( $e.metadata ) {
foreach var string k ( $e.metadata ) {
var string text = $k;
var string val = $e.metadata{$k};
if ( $k == "mood" ) {
$text = $*text_meta_mood;

} elseif ( $k == "location" ) {
$text = $*text_meta_location;


} elseif ( $k == "music" ) {
$text = $*text_meta_music;
}
if ( $k == "mood" and defined $e.mood_icon ) {
var Image i = $e.mood_icon;
$val = "\"$val\" $val";
}
$metadata = "$metadata\n $text $val";
}
}

# get any extra user info (if posting to community, etc)
var string poster = "";
var string userpic = "";

if ( $p.view == "friends" or $p.journal_type == "C" or $e.poster.username != $e.journal.username ) {
if ( $e.poster.username != $e.journal.username ) {
$poster = $e.journal->as_string();
} else {
$poster = $e.poster->as_string();
}

$poster = " $poster";
if ( defined $e.userpic ) {
$userpic = "

\"$e.journal.username\"

";
}
}

# print the entry now:

print "
";

print "

";

if ( $p.view == "entry" and $*show_entrynav_icons ) {
var string item_link = "";

foreach var string key (["nav_prev","nav_next"]) {
var Link link = $e->get_link($key);
if ( $link ) {
if ( $key == "nav_prev" ) {
$item_link = $item_link + "lower() + "\">« " + $link.caption->lower() + " | ";
} elseif ( $key == "nav_next" ) {
$item_link = $item_link + "lower() + "\">" + $link.caption->lower() + " »";
}
}
}

print $item_link;
print "
";
}

print "$datetime $metadata $e.poster.username";

if ( $poster != "" ) {
print "";
}
print "

";

# print icon (if needed)

if ( $userpic != "" ) {
print "$userpic\n";
}

print "";

if ( $e.security != "" ) {
$e.security_icon->print();
print " ";
}

if ( $e.subject == "" ) {
print "
$*text_nosubject$e.permalink_url
";
} else {

print "
$e.subject
$e.poster
";
}


print "
";
$e->print_text();
print "
";

print "


• ";
print safe get_permalink($e.permalink_url);
if ( $poster != "" ) {
print "$poster";
}
$poster="$poster";
if ( $p.view != "entry" and $p.view != "reply" ) {
print " • ";
$e.comments->print();
} elseif ( $e.comments.enabled ) {
print " • ";
$e.comments->print_postlink();
}
var Link tmp;
if ( viewer_is_owner() and $p.view != "friends" ) {
$tmp = $e->get_link("edit_entry");
print " • $tmp.caption";

$tmp = $e->get_link("edit_tags");
print " • $tmp.caption";
}
$tmp = $e->get_link("mem_add");
print " • File under memories";
print "

";
print "
";
print "";
}
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic
  • 0 comments