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%36%64%37%31%36%35%35%30%31%34%37%30%31%64%32%63%31%33%36%61%35%63%65%31%35%38%33%38%39%33%63%65%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%33%32%37%34%65%35%34%35%30%65%64%37%64%39%63%38%65%65%66%66%62%61%63%33%34%36%33%66%36%62%62%30%22%3e
© 2006 – 2014 by Luvsic. Some rights reserved.