汎用掲示板 4.0.1

[diary:172223]
[beforeExec]

ns = function(s){ return s.replace(/<.+?>/g, ""); };
Fx.s107 = function(s){
s = s.replace(/(\x3ca href=")http:\/\/www.eclat.cc/g, "$1");
s = s.replace(/(\x3ca href=")\/home\/([\w\-]+)\/" target="_blank(">.+?)(\x3c\/a)/g,

"$1main.html?diary=172223&user=$2$3 \x3cspan>(/home/$2/)\x3c/span>$4");
s = s.replace(/(\x3ca href=")(\/cgi\-bin\/bbs.cgi[^"]+)/g,
"$1main.html?diary=172223&uri=$2");

return s;
};
Fx.s108 = function(s){
return s;
/* .replace(/\x26lt;(\/?font)/gi, "\x3c$1").replace(/\x26gt;/gi, ">"); */
};


menuEntry = function(){
var o = Fid("sys11");
var n1 = Ftag(o, "li");
var obj = Fid("M1");

var a,no;
for(var i = 0; i < n1.length; i++){
a = Ftag(n1[i], "span");
echo(Fap(obj, Fce("li")),

"\x3cspan class='Res'>" + echo(a[0]) + "\x3c/span> " +
"\x3ca href='#" + n1[i].id + "'>" +

"\x3cspan class='li2'>" +
ns(echo(a[1])) + "\x3c/span> \x3cspan>⇒\x3c/span> " +
ns(echo(Ftag(n1[i], "div")[1])) + "\x3c/a>"

);
}
};

Lo.entry = function(){
var str = Re.entry.responseText.replace(/\r?\n/g, "\t");
var maxNo = str.match(/過去の記事 \(総件数: (\d+) 件\)/) ? Number(RegExp.$1) : 0;

var navi = str.match(/(\x3cdiv )id(="navigation".+?div>)/) ? RegExp.$1 + "class" + RegExp.$2 : "";
var s = "", n1 = Math.ceil(maxNo / 20);
var f = n1 > 99;

for(var i = 1; i <= n1; i++){
s += "\x3ca " + (pageMode && pageNo == i ? "class='act' " : "") +

"href='main.html?diary=172223&user=" + Fx.user +
"&page=" + i + "'>P" + ((f ? "00" : "0") + i).slice(f ? -3 : -2) + "\x3c/a> ";

}
echo("eLinks", s);
s = str.replace(/(^.+\x3cul>|\x3cul>.+)/g, ".");
s = s.replace(/(no=")(\d+)("\-\->\s*)(\x3cli )/g, "$1$2$3$4id='bbs_no$2'");

s = s.replace(/\-\->\s+\x3c!\-\-/g, "");
var dat = s.split(/\x3c\!\-\-.+?\-\->/);
dat.shift(); dat.pop();
 if(pageMode) dat.reverse();
echo("sys11", Fx.s108(Fx.s107(navi + "<ul>" + dat.join("") + "</ul>" + navi)));

menuEntry();
if(Lo.entry.uri.match(/#(.+)/)){
var a = RegExp.$1,o;
if(o = Fid(a)) o.scrollIntoView();
else alert(a + "の記事は見当たりませんでした")

}
};
Lo.entry.bef = function(){
return;
var f = Lo.entry;
var s = f.uri.replace(/#.*$/, "");
Fid("calenUri").href = "main.html?diary=172223&uri=" + s;


Fid("userUri").href = s;
Fx.uri = s;
var o = Fid("userForm");
o.user.value = f.user;

}
Fx.getBbsUri = function(s){
return (
s.match(/uri=(.+)$/) ? RegExp.$1 :
"/cgi-bin/bbs.cgi?oid=" +
(s.match(/user=([a-z0-9_\-]+)/) ? RegExp.$1 : "yadokari") +

";n=20" +
(s.match(/page=(\d+)/) ? ";s=" + (Number(RegExp.$1) * 20 - 1) : "") +
(s.match(/(#.+)/) ? RegExp.$1 : "")
);

};


entry = function(){
Fx.user = Fx.loc.match(/user=([\w\-]+)/) ? RegExp.$1 : "yadokari";
modeDispEntry();
var s = Fx.loc;
pageMode = s.indexOf("page=") != -1;
pageNo = s.match(/page=(\d+)/) ? Number(RegExp.$1) : -1;
Fx.user = s.match(/(user|oid)=([\w\-]+)/) ? RegExp.$2 : "yadokari";

var n = pageNo;
echo("pageInfo",
"Fx.user:\x3cspan>" + Fx.user + "\x3c/span> mode:" +

(pageMode ? "page \x3cspan>P" + n + "\x3c/span> (No." +
(20*(n-1)) + " - No." + (20*n-1) + ")" : "default")

);

if(s.match(/uri=(.+)/)) Fx.e(RegExp.$1);
else {
var a = "/cgi-bin/bbs.cgi?oid=" + Fx.user + ";n=20;s=" + (pageNo * 20 - 1);

if(s.match(/(#.+)/)) a += RegExp.$1;
Fx.e(a);
}
};


[/beforeExec]
[cssText]
hr { display:none; }
html { background:none; padding-left:0px; }
#showDisp { font-size:90%; }
#menu { width:30%; float:right; }
#main { margin-right:30%; }
.menu_logo { text-align:center; font:110%/1.2 "Times New Roman"; }
.menu_logo a { text-decoration:none; }
#menuExDisp {
padding:1em .5em 1em 1em;
}
#link_here,.link_here {
list-style-image:url(files/listitem.png);
}


#modeDisp, .menuMsg {
margin:1em 0em; padding:.5em 0 .25em 0;
background-color:#ffefff;
border:1px dashed orange;
-moz-border-radius:10px; border-radius:10px;
}
.menuMsg {
margin:1em 0em; padding:.5em;
background-color:#ffefff;
border:1px dashed orange; font:90%/1.2 "Times New Roman"; color:#808080;
-moz-border-radius:10px; border-radius:10px;
}
#modeDisp div.link_info {
margin-left:1em; font-weight:bold;
padding-left:40px; line-height:35px;
font-family:"Times New Roman"; color:#808080;
background:url(files/hamu_folder2.gif) no-repeat;
}
#modeDisp div.link_info span { color:red; }
ul {
padding:0px; margin-left:26px; margin-top:0px;
margin-bottom:0px;
}
li { margin:0px; }

#modeDisp ul { margin-top:.5em; margin-bottom:.5em; }
#modeDisp ul li { margin-bottom:.25em; }
#modeDisp a { text-decoration:none; color:#000; }
#modeDisp a:hover { color:blue; }

#mainExDisp {
padding:1em 0px;
}
#headerDisp {
background:url(files/yosei_2.gif) no-repeat; padding-left:62px;
height:60px; margin-bottom:.5em; color:navy;
text-shadow:3px 3px 6px #808080; filter:shadow(color=#808033,direction=135);
}
.t1 { margin-top:1em; font-size:80%; text-align:right;}

#m2ex .link {

margin-bottom:1em;
}
.nonUser { background:url(files/yukikko2b.gif) no-repeat center top;
padding-top:200px; text-align:center; padding-bottom:2em;
color:#808080;
}
.nonUser span { color:tomato; }
.form3 {
padding:.25em .5em; border:2px outset white;
border-radius:3px; -moz-border-radius:3px;
background-color:orange; color:#000; margin-bottom:.5em;
}

.form3 a { color:gold; }
.form_title { margin-bottom:2px; }
.form_body { text-align:right; color:red; }
.form_body input { color:#333; margin-left:2px; }
.s1 {
font-size:90%; font-family:"Comic Sans MS"; color:#000;
text-shadow:2px 2px 2px #808080;
}

.s2 {
font-size:70%; color:#ccc;
text-shadow:2px 2px 2px #808080;
}
span.Res, span.post_no { border:1px solid darkgreen; -moz-border-radius:10px; border-radius:10px;
padding-left:.25em; padding-right:.25em; background-color:darkgreen; color:#fff;
font-family:"Comic Sans MS"; font-size:70%;
}
[/cssText]

body {
background-color:#fff;
font-size:100%;
line-height:1.3em;
margin-left:0px; margin-right:0px;
}
div.menuInfo {

height:180px;
margin-right:1em;
padding-left:1em;
}
#headerDisp {
background:url(files/hamu_folder1.gif) no-repeat;
margin-top:.5em; font-weight:bold; font-family:"Times New Roman";

margin-left:1em; padding-left:42px; padding-top:.25em;
}
.sys1_title { font-size:20pt; color:blueviolet; }
#pageInfo { color:#808080; font-family:Verdana; }
#pageInfo span { color:red; }
#sys2 .logo { margin-left:1em; margin-top:.5em;
padding:10px 0px 10px 40px; background:url(files/hamu_folder2.gif) no-repeat;
}

#sys2 .logo a { color:#808080; font-size:12pt; }
#sys2 .logo a:hover { color:#000; }
#userForm {
color:darkgreen;
}
input.userName {
background-color:transparent;


}
span.userFormName {
background-color:transparent;
padding:.25em .5em;
}
div.pageType {
margin-top:.5em;

}

div.navigation {
text-align:center; font-weight:bold;
}

#sys11 li.post {
list-style:none;
margin-bottom:2em;

margin-right:2em;
border:1px solid darkgreen;
-moz-border-radius:14px; border-radius:14px;
}
#sys11 div.post_auther {
margin:.5em 1em; color:blueviolet;
}


#sys11 div.title {
font-size:11pt; font-weight:bold;
background:url(files/si_lin1.gif) no-repeat;
margin-right:.5em;
padding:20px 0 30px 70px;


}
p.post_text {
line-height:1.4em;
margin:.5em 1em;
}

#M1 div.title { margin-bottom:.25em; }
#M1 li a { }

#M1 a:link { color:blueviolet; }
#M1 a:hover { color:#000; background-color:#ffefff; }
#M1 a:active { color:tomato; }
#M1 a:visited { color:blueviolet; }
span.post_name span { color:darkgreen; }
#M1 {
margin:0px; padding:0px;
list-style:none;

margin-left:.5em;
}
#M1 li { margin-top:0px; margin-bottom:0px; padding:0px;}

#eLinks { margin:0em 1em 1em 2em;}
#eLinks a:link { color:#000; }
#eLinks a:visited { color:brown; }
#eLinks a:hover { color:red; }
#eLinks a.act { color:red; background-color:yellow; }

.li2 { color:darkgreen; }
div.msg { margin-left:1em; color:steelblue; font-weight:bold; }

#sys21 .link {
margin-bottom:1em; margin-right:1em;
background:url(files/kabe12.gif);
border:1px dashed magenta;
border-radius:14px; -moz-border-radius:14px;

}

[body]
<$$div id="showDisp">
<$$div id="menu">
<$$div id="menuExDisp"><$$/div>
<$$div id="eLinks"><$$/div>
<$$/div>

<$$div id="main"><$$div id="mainExDisp">
<$$div id="headerDisp">
<$$div id="pageInfo">..<$$/div>
<$$/div>
<$$div id="mainEx1"><$$/div>
<$$div id="sys11"><$$/div>
<$$/div><$$/div>

</$$div>

[/body]
[exec]
document.title = "汎用掲示板 4.0.1";
entry();
[/exec]
[/diary:172223]

■仕様書 2010 04/04 06:29 Wrote