Nucleusの改造

リンク用のソースを表示させる(Nucleus)

「スキンの編集 'grey': 個別アイテムページ」の

<h2>コメントの追加</h2>

の下辺りにでも。

<h2>リンクソース</h2>
■記事用リンクソース:<br />
&lt;a href="<%sitevar(url)%>?itemid=<%itemid%>"
title="<%blogsetting(name)%> - <%itemtitle%>"&gt;<%itemtitle%>&lt;/a&gt;<br />
■Wiki用リンクソース:<br />
[[<%itemtitle%>&gt;<%sitevar(url)%>?itemid=<%itemid%>]]

index.phpを表示させていないときのコメントのエラー

index.php 内で

$CONF['Self'] = '';

とし、URL表示でindex.phpを表示させていないとき、コメントでエラーがでます。

/?itemid=xxxとなるはずが、/action.php?itemid=xxxとなってしまいます。

そこで、action.phpの75行目を編集します。

Header('Location: ' . postVar('url'));

となっている部分を

$url = $CONF['IndexURL'] . createItemLink($post['itemid']);
Header('Location: ' . $url);

とします。

検索窓の折り返しを削除

nucleus\forms\searchform.template の<br>を削除

Nucleusのボタンのリンクを日本のサイトへ

nucleus\forms\nucleusbutton.template のリンクを

http://japan.nucleuscms.org/

に変更

xreaのデータベース文字化け対策

nucleus\libs\globalfunctions.php

$MYSQL_CONN = @mysql_connect(

の後ろに

mysql_query("SET NAMES utf8", $MYSQL_CONN);

を挿入

トラックバックのfancyURL

  • action.phpがあるルートにtrackback(拡張子なし)というファイルを作成。<code php><?php $CONF = array(); include('./config.php'); common functions
    $data = explode(“/”,serverVar('PATH_INFO')); $id = intval($data[1]); $pluginName = 'TrackBack';
    only continue when the plugin is really installed if (!$manager→pluginInstalled('NP_' . $pluginName)) exit;

$plugin =& $manager→getPlugin('NP_' . $pluginName); if (!$plugin) exit;

if ($id) $REQUEST['tbid'] = $id;

$plugin→handlePing(); ?></code>

  • ルートの.htaccessに次の文字列を追記。
    <FilesMatch "^trackback$">
        ForceType application/x-httpd-php
    </FilesMatch>
  • NPTrackback.phpを編集。<code php>function getTrackBackUrl($itemid) { global $CONF; hack $baseurl = preg_replace('{^(.+)/action.php}', '$1/', $CONF['ActionURL']); return $baseurl.'trackback/'.$itemid; }</code> ===== エラーメッセージを強調 ===== * skin/grey/grey.cssに<code css>.error {color:red;background:yellow;}</code> ===== 管理画面のメニューがボニョボニョするのをやめさせる ===== * nucleus/styles/admin.cssの<code css>#quickmenu a:hover { background: #ffffff url(quickb-hover.jpg) top left fixed repeat-y; / color: #000; modify */ color: #333; letter-spacing: 1px; white-space: nowrap; / add */ }</code>のletter-spacing: 1px;をコメントアウト。