4 use lib
"$ENV{LJHOME}/cgi-bin";
8 BML
::register_block
("DOMAIN", "S", $LJ::DOMAIN
);
10 BML
::register_block
("SITEROOT", "S", $LJ::SITEROOT
);
11 BML
::register_block
("SITENAME", "S", $LJ::SITENAME
);
12 BML
::register_block
("ADMIN_EMAIL", "S", $LJ::ADMIN_EMAIL
);
13 BML
::register_block
("SUPPORT_EMAIL", "S", $LJ::SUPPORT_EMAIL
);
14 BML
::register_block
("CHALRESPJS", "", $LJ::COMMON_CODE
{'chalresp_js'});
16 BML
::register_block
("IMGPREFIX", "S", sub {
17 return $LJ::IS_SSL ?
$LJ::SSLIMGPREFIX
: $LJ::IMGPREFIX
;
20 BML
::register_block
("STATPREFIX", "S", sub {
21 return $LJ::IS_SSL ?
$LJ::SSLSTATPREFIX
: $LJ::STATPREFIX
;
24 BML
::register_block
("JSPREFIX", "S", sub {
25 return $LJ::IS_SSL ?
$LJ::SSLJSPREFIX
: $LJ::JSPREFIX
;
28 # dynamic blocks to implement calling our ljuser function to generate HTML
29 # <?ljuser banana ljuser?>
30 # <?ljcomm banana ljcomm?>
31 # <?ljuserf banana ljuserf?>
32 BML
::register_block
("LJUSER", "DS", sub { LJ
::ljuser
($_[0]->{DATA
}); });
33 BML
::register_block
("LJCOMM", "DS", sub { LJ
::ljuser
($_[0]->{DATA
}); });
34 BML
::register_block
("LJUSERF", "DS", sub { LJ
::ljuser
($_[0]->{DATA
}, { full
=> 1 }); });
36 # dynamic needlogin block, needs to be dynamic so we can get at the full URLs and
37 # so we can translate it
38 BML
::register_block
("NEEDLOGIN", "", \
&LJ
::needlogin_redirect
);
41 my $dl = "<a href=\"$LJ::SITEROOT/files/%%DATA%%\">HTTP</a>";
42 BML
::register_block
("DL", "DR", $dl);
46 BML
::register_block
("METACTYPE", "S", '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">')
48 BML
::register_block
("METACTYPE", "S", '<meta http-equiv="Content-Type" content="text/html">')