That Little Duck...
Thanks!
function print_module_tags(string title) {
# Specify your delimiter. One character only -- extra chars get truncated.
var string delimiter = ":";
# Do you want to show the tag use counts?
var bool show_count = true;
# Specify the text to show just before the use count, if any
var string pre_count = "(";
# Specify the text to show just after the use count, if any
var string post_count = ")";
### Don't change below unless you know what you are doing!
var Page p = get_page();
var string list = "";
if (size $p->visible_tag_list() > 0) {
if ($delimiter->length() > 1) {
$delimiter = $delimiter->substr(0, 1);
}
var string[] closing_html;
var string[] prev_tags;
var int tag_list_pos = 0;
var string tier_code = "";
$closing_html[0] = "";
$prev_tags[0] = "";
foreach var TagDetail t ($p->visible_tag_list()) {
var string[] tags;
if ($t.name) {
var int array_counter = 0;
var string buffer = "";
foreach var string char ($t.name) {
if($char == $delimiter) {
$tags[$array_counter] = $buffer;
$array_counter = $array_counter + 1;
$buffer = "";
}
else {
$buffer = $buffer + $char;
}
}
$tags[$array_counter] = $buffer;
var int pos = 0;
foreach var string tier($tags) {
if (size $closing_html <= $pos) {
$closing_html[$pos] = "";
}
if (size $prev_tags <= $pos) {
$prev_tags[$pos] = "";
}
if (size $tags == ($pos + 1)) {
$tier_code = """<a href="$t.url">$tier</a>""";
if ($show_count) {
$tier_code = $tier_code + """ ${pre_count}${t.use_count}${post_count}" "";
}
}
else {
$tier_code = """$tier""";
}
if ($prev_tags[$pos] == "") {
$list = $list + """<ul class="module-list"><li class="module-list-item">$tier_code""";
$closing_html[$pos] = "</li></ul>";
}
elseif ($tags[$pos] != $prev_tags[$pos]) {
var int i = 0;
foreach var string html ($closing_html) {
if ($i > $pos) {
$list = $list + $closing_html[$i];
$closing_html[$i] = "";
}
$i++;
}
if ($closing_html[$pos] == "") {
$list = $list + """<ul class="module-list"><li class="module-list-item">$tier_code""";
$closing_html[$pos] = "</li></ul>";
}
else {
$list = $list + """</li><li class="module-list-item">$tier_code""";
}
}
else {
}
$pos++;
}
$prev_tags = $tags;
}
$tag_list_pos++;
}
var int i = 0;
var string remaining_html = "";
foreach var string html ($closing_html) {
if ($html != "") {
$remaining_html = $html + $remaining_html;
$closing_html[$i] = "";
}
$i++;
}
$list = $list + $remaining_html;
}
open_module("categories", $title, "");
print """$list""";
var string tags_url = $p.journal->base_url() + "/tag/";
close_module();
}
.module-categories ul ul li{
list-style-type:circle;
margin: 3px 0 1px 15px;
padding-left:0;
background:none;
}
/* ENTER WIDTH HERE */
#container{
width:1024px;
background:white;
}
/* THE REST */
#pagebody, #banner{
width:auto;
margin:0;
}
#alpha{
width:75% !important;
margin:0;
}
#beta{
width:25% !important;
margin:0;
}
#alpha-inner{
border-right:15px solid white;
}
#pagebody{
border-top:15px solid white;
}
#container{
border:15px solid white;
}
#gamma-inner{
border-left:15px solid white;
}
/* GET RID OF ORIGINAL BACKGROUND */
#alpha, #beta, #banner{
background:none !important;
}
#alpha-inner{
background: #e7e7ec !important;
margin:15px;
}
#beta-inner{
background: #E7E2C6 !important;
margin:15px;
margin-left:0;
}
#banner-inner{
background:#527276 !important;
margin:15px;
margin-bottom:0;
}
/* NOT SURE WHY THIS IS NEEDED, BUT IT IS */
#banner{
padding-top:1px;
}
#alpha{
width:71% !important;
}
#beta{
width:25% !important;
}
function print_module_tags(string title) {
var int minSize = 10; # minimum size of tag links, in pixels
var int maxSize = 24; # maximum size of tag links, in pixels
var Page p = get_page();
var TagDetail[] tags = $p->visible_tag_list();
if (size($tags) < 1) { return; }
var int most_count = 1;
open_module("categories", $title, "");
foreach var TagDetail tag ($tags) {
if ($tag.use_count > $most_count) { $most_count = $tag.use_count; }
}
var string[] links = [];
foreach var TagDetail tag ($tags) {
var string uses = get_plural_phrase($tag.use_count, "text_tag_uses");
var string security = $tag.visibility;
var int tagtextsize = $minSize;
if ($tag.use_count > 1) {
$tagtextsize = (($maxSize-$minSize)*$tag.use_count)/$mo st_count + $minSize;
}
$links[size $links] = """<a href="$tag.url" style="font-size: ${tagtextsize}px;" title="$uses, $security">$tag.name</a>""";
}
print_module_list($links);
close_module();
}
.module-categories li{
float:left;
}
.module-categories li{
float:left;
background:none;
margin:0;
}
.module-categories ul{
height:150px;
overflow:auto;
}
function Entry::print_metadata() {
if (size $.metadata) {
"""<div class="metadata">\n""";
if(($.mood_icon)) {
"""<div style="float:left; padding-right:10px;">""";
print "$.mood_icon";
"</div>";
}
foreach var string m ($.metadata) {
"<div><strong>"; print lang_metadata_title($m); "</strong>: ";
print $.metadata{$m}; "</div>\n";
}
"</div>\n";
}
}
set sidebar_primary = [
[ "userprofile", "Userpic Title", "0", "1" ],
[ "viewlinks", "Viewlinks Title" ],
[ "customtext" ],
[ "calendar" ],
[ "links", "Links Title" ],
[ "tags", "Tags Title" ],
[ "pagesummary", "Summary Title" ],
[ "syndicate", "Syndicate Title" ],
[ "poweredby", "Poweredby Title" ],
];
set sidebar_primary = [
[ "userprofile", "Userpic Title", "0", "1" ],
[ "viewlinks", "Viewlinks Title" ],
[ "customtext" ],
[ "calendar" ],
[ "links", "Links Title" ],
];
set sidebar_secondary= [
[ "tags", "Tags Title" ],
[ "pagesummary", "Summary Title" ],
[ "syndicate", "Syndicate Title" ],
[ "poweredby", "Poweredby Title" ],
];
function print_module_customtext(string title, string text, string titlelink_url) {
var Page p = get_page();
##### First Box #####
$title = "Unfold";
open_module("customtext",$title, "");
"""
And the words retreat breathing histories into stories untold
And I unfold.
""";
close_module();
##### Second Box #####
var string title2;
$title2 = "Childlike Wildlife";
open_module("customtext2", $title2, "");
"""
I do not become me
For path tunnels or straightaways
""";
close_module();
##### Third Box #####
var string title3;
$title3 = "Tonight, Not Again";
open_module("customtext3", $title3, "");
"""
The night.
She brushed her hands upon my flushed cheek.
""";
close_module();
}
set sidebar_primary = [
[ "userprofile", "Userpic Title", "0", "1" ],
[ "viewlinks", "Viewlinks Title" ],
[ "customtext" ],
[ "calendar" ],
[ "links", "Links Title" ],
[ "tags", "Tags Title" ],
[ "pagesummary", "Summary Title" ],
[ "syndicate", "Syndicate Title" ],
[ "poweredby", "Poweredby Title" ],
];
set text_meta_mood = "Schmood";
set text_meta_music = "Schmusic";
set text_meta_location = "Schmocal";
function Entry::print_metadata() {
if (size $.metadata) {
"""<div class="metadata">\n""";
foreach var string m ($.metadata) {
"<div><strong>"; print lang_metadata_title($m); "</strong>: ";
if ($m == "mood") {
" $.mood_icon ";
}
print $.metadata{$m}; "</div>\n";
}
"</div>\n";
}
}
#### This is just CSS. Change the green parts. ####
set custom_css = "
#banner-links li{display:inline; background:none;}
#banner-links ul{background:#527276;padding:2px 0;margin:0 15px;}
#banner{margin:0px auto !important;}
";
#### Add the code to the banner. ####
function print_banner(Page p) {
container_open("banner");
"<h1 id='banner-header'>$p.global_title</h1>" ;
"<h2 id='banner-description'>$p.global_subtit le</h2>";
container_close();
"<div id='banner-links'>";
var string[] links = [];
foreach var string k ($p.views_order) {
$links[size $links] = """<a href="$p.view_url{$k}">"""+lang_viewname( $k)+"""</a>""";
}
print_module_list($links);
"</div>";
}
function Entry::print_metadata() {
if (size $.metadata) {
"""<div class="metadata">""";
####### mood icon here. delete if you don't want this.######
"""<div style="float:left; padding-right:10px;">""";
if(($.mood_icon)) {
print "$.mood_icon";
}
"</div>";
######################################## #####################
foreach var string m ($.metadata) {
var string val = $.metadata{$m};
var string moodimg = "<img src='http://pics.livejournal.com/carriep 63/pic/0009f257'>";
var string musicimg = "<img src='http://pics.livejournal.com/carriep 63/pic/0009gxyz'>";
var string locimg = "<img src='http://pics.livejournal.com/carriep 63/pic/0009e5dd'>";
if ($m == "mood") {
print """<div>${moodimg} $val</div>""";
}
if ($m == "music") {
print """<div>${musicimg} $val</div>""";
}
if ($m == "location") {
print """<div>${locimg} $val</div>""";
}
}
"""<div style="clear:both;"></div></div>""";
}
}
set base_theme = "none";
set base_theme = "none";
set custom_css = "
Your CSS here
";
set base_theme = "none";
set linked_stylesheet = "http://somefilename.css";
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |