導入
※SemanticScuttle 0.97.1で実施。- SemanticScuttleをダウンロードし解凍。
- 解凍したフォルダ内にあるwwwフォルダの中身を全て一つ上の階層に移動。
- phpmyadminで新規データベースを作成。
- xamppのhtdocs内に解凍したファイルを放り込む。
- dataフォルダ内にあるtables.sqlファイルを作成したデータベースにインポート。
- dataフォルダ内にあるconfig.default.phpファイルをconfig.phpにリネームし編集。
- www-header.phpの18行目を編集。
- ブラウザで接続してみる。
config.phpの編集
$sitename = 'SemanticScuttle';
//サイト名
$welcomeMessage = 'Welcome to SemanticScuttle!'.' Social bookmarking for small communities.';
//サイトの説明文。
* System configuration
$root = 'http://example.com/';
//SemanticScuttleを設置したURLを入力
$locale = 'ja_JP';
//言語の設定。
$usecache = false;
//キャッシュの設定。trueにするとサーバーによってはサイトが表示されなくなる。
* Database configuration
$dbtype = 'mysql4';
//データベースのバージョン
$dbhost = 'localhost';
//ホスト名
$dbport = null;
//このままでも接続できた
$dbuser = 'username';
//ユーザー名
$dbpass = 'password';
//データベースのパスワード
$dbname = 'scuttle';
//データベース名
* Users
$adminemail = 'admin@example.org';
//メールアドレス
* Anti SPAM measures
$antispamQuestion = 'name of this application';
//スパム対策。ユーザー登録時の質問。
$antispamAnswer = 'semanticscuttle';
//上の質問の答え
$enableRegistration = true;
//新規登録。falseにすると登録できなくなる。
* Website Thumbnails
$enableWebsiteThumbnails = false;
//ページサムネイル。デフォルトは非表示。詳細は後述。
ここで接続確認してみると
設定
サムネイル表示を有効にしただけでは残念な事になるので色々と変更します。下の赤字部分を追加。
/**
* Bookmark thumbnail image
* Shows the website thumbnail for the bookmark.
*
* Expects a $row variable with bookmark data.
*/
if (!$GLOBALS['enableWebsiteThumbnails']) {
return;
}
$thumbnailHash = md5(
$address . $GLOBALS['thumbnailsUserId'] . $GLOBALS['thumbnailsKey']
);
echo '<a href="'. $address .'"'. $rel .' ><img class="thumbnail" src="http://capture.heartrails.com/160x150/cool?'.$address.'" />';
//echo '<a href="'. $address .'"'. $rel .' ><img class="thumbnail" src="http://www.artviper.net/screenshots/screener.php?url='.$address.'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />';
//echo '<img class="thumbnail" onclick="window.location.href=\''.$address.'\'" src="http://www.artviper.net/screenshots/screener.php?url='.$address.'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />';
?>
このままだとサイトの表示が崩れるので、スタイルシートも編集。
html > body li.xfolkentryに下記を追加。
height: auto;
下はデフォルトのデザイン。個人的にいまいちなので前回に引き続きデザイン変更。
スタイルシートを弄って完成。
スポンサード リンク