[user/theme] - [generator] - [imagemap instead of top box]

Nov 21, 2005 12:40

in response to violuticcio's s2styles post.
this code is a quick'n'dirty hack.
the following set commands should be added to your user layer and replace any that are currently in there.
set text_view_recent = "Recent";
set text_view_friends = "Friends";
set text_view_archive = "Archive";
set text_view_userinfo = "User Info";the following function overrides should be placed into a theme layer. if you are using one of the system-provided theme layers, you'll need to move those set commands for the colors into your user layer, create a new theme layer, place this code into it, and attach the new theme layer to your style.
function Page::print() {
var string title = $this->title();

var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
var string website;
if ($.journal.website_url != "") {
$website = """

[
$*text_website
|
$website_name
]
""";
}

var string links;
var bool firstlink = true;
foreach var string v ($.views_order) {
if ($firstlink == false) {
$links = "$links|";
} else {
$firstlink = false;
}
$links = $links + ($.view == $v ?
""+lang_viewname($v)+"" :
" "+lang_viewname($v)+"");
}

"""

""";

if ($*external_stylesheet) {
println """""";
} else {
println """";
}
$this->print_head();

"""
$title

""";
$this->print_control_strip();
"""

""";
# $this->lay_top_userpic();

var string sitename_lc = $*SITENAMESHORT->lower();

"""

""";
var string image_url = "http://pics.livejournal.com/kunzite1/pic/0019wt8k";
var string image_alt = "";
var string map_name = "navlinks";

var string recent_url = get_url($.journal, "recent");
var string friends_url = get_url($.journal, "friends");
var string archive_url = get_url($.journal, "archive");
var string userinfo_url = get_url($.journal, "userinfo");
var string tags_url = "${recent_url}tag/";
var string website_url = $.journal.website_url;

var string recent_text = $*text_view_recent;
var string friends_text = $.journal.journal_type == "C" ? $*text_view_friends_comm : $*text_view_friends;
var string archive_text = $*text_view_archive;
var string userinfo_text = $*text_view_userinfo;
var string tags_text = "Tags";
var string website_text = $.journal.website_name != "" ? $.journal.website_name : $*text_website_default_name;

var string recent_coords = " 11, 54, 154, 88";
var string friends_coords = " 31, 103, 190, 140";
var string archive_coords = "170, 51, 333, 88";
var string userinfo_coords = "212, 102, 409, 139";
var string tags_coords = "357, 55, 454, 98";
var string website_coords = "421, 104, 592, 141";
"""



""";

if (size $.linklist > 0 and $*linklist_support) {
$this->print_linklist();
}

"""

""";

$this->print_body();

"""

""";
}

function print, class page, layout generator

Previous post Next post
Up