NP_Revision 改造メモ

NP_Revision v0.7-6 について。
HTML周りをちょっと触ったメモ。

  • 文字化け対策
  • 検索エンジンクローラ除け
  • 管理画面へのパスを削除、不足したCSS追加


Before

487行目付近

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
echo "<html><head><title>Revision overview for item ".$itemid."</title>";
echo "<link rel='stylesheet' type='text/css' href='".$CONF['AdminURL']."styles/bookmarklet.css' /><style type='text/css'>\n";
echo "th { text-align: left; }\n .diff-blockheader { background: #EEE; font-weight: bold; width: 50%; }\n";
echo ".diff-context { background: #EEE; white-space: normal; width: 50%; }\n.diff-deletedline { background: #F99; white-space: normal; width: 50%; }\n.diff-deletedline .diffchange { background: #933; color: #FFF; }\n";
echo ".diff-addedline { background: #9F9; white-space: normal; width: 50%; }\n.diff-addedline .diffchange { background: #393; color: #FFF; }\n</style></head><body>";
echo "<h1>Revision overview for item ".$itemid."</h1>";

After

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
echo "<html><head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\" />\n";
echo "<meta name=\"robots\" content=\"NOINDEX,NOFOLLOW,NOARCHIVE\" />\n";
echo "<title>Revision overview for item ".$itemid."</title>\n";
echo "<style type='text/css'>\n";
echo "table { empty-cells: show; border-collapse: collapse; }\n";
echo "th,td { text-align: left; border:1px solid #ddd; padding: 4px; font-size: 9pt; vertical-align: top; }\n";
echo ".diff-blockheader { background: #EEE; font-weight: bold; width: 50%; }\n";
echo ".diff-context { background: #EEE; white-space: normal; width: 50%; }\n";
echo ".diff-deletedline { background: #F99; white-space: normal; width: 50%; }\n";
echo ".diff-deletedline .diffchange { background: #933; color: #FFF; }\n";
echo ".diff-addedline { background: #9F9; white-space: normal; width: 50%; }\n";
echo ".diff-addedline .diffchange { background: #393; color: #FFF; }\n";
echo "</style></head><body>";
echo "<h1>Revision overview for item ".$itemid."</h1>";
Skooler Records

No comments yet

%3c%69%6e%70%75%74%20%74%79%70%65%3d%22%68%69%64%64%65%6e%22%20%6e%61%6d%65%3d%22%6e%70%5f%70%72%6f%74%65%63%74%62%79%6d%64%35%22%20%76%61%6c%75%65%3d%22%66%34%38%39%37%63%62%65%30%32%66%30%38%63%37%34%64%37%38%66%39%62%36%38%33%33%64%39%63%35%39%64%22%3e %3c%69%6e%70%75%74%20%74%79%70%65%3d%22%68%69%64%64%65%6e%22%20%6e%61%6d%65%3d%22%6e%70%5f%70%72%6f%74%65%63%74%62%79%6d%64%35%5f%68%61%73%68%22%20%76%61%6c%75%65%3d%22%65%31%64%61%63%33%35%66%30%39%39%63%66%36%33%65%64%37%33%37%30%38%30%62%34%38%63%62%66%31%34%65%22%3e
© 2006 – 2018 by Luvsic. Some rights reserved.