NP_Revision 改造メモ
- 投稿日 : 2010-12-22, 20:56
- (履歴)
- タグ(NucleusPlugin)
- カテゴリ(Weblog)
- 記し人(luvsic)[PDF]
- 閲覧数(10298)
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>";
No comments yet