Macとかの雑記帳

scuttleを導入したばかりですが、scuttleの強化版SemanticScuttleというのを知り、古いのは嫌なので切換えました。思いのほか情報が少なく苦戦したのでメモ。

 

導入

※SemanticScuttle 0.97.1で実施。
  1. SemanticScuttleをダウンロードし解凍。

  2. 解凍したフォルダ内にあるwwwフォルダの中身を全て一つ上の階層に移動。

  3. phpmyadminで新規データベースを作成。

  4. xamppのhtdocs内に解凍したファイルを放り込む。


  5. 解凍したフォルダ内にはフォルダが4つ。
    sscu_before.jpg



    その中のwwwフォルダの中身を全て出してしまう。
    scc_after.jpg


  6. dataフォルダ内にあるtables.sqlファイルを作成したデータベースにインポート。

  7. dataフォルダ内にあるconfig.default.phpファイルをconfig.phpにリネームし編集。


  8. config.phpの編集

    * HTML output configuration
    $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;
    //ページサムネイル。デフォルトは非表示。詳細は後述。



    ここで接続確認してみると
    Fatal error: require_once() [function.require]: Failed opening required '/Volumes/Mac_2nd/App/Applications2/XAMPP/xamppfiles/htdocs/semanticscuttle0.97.1/../src/SemanticScuttle/header.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamppfiles/lib/php/pear') in /Volumes/Mac_2nd/App/Applications2/XAMPP/xamppfiles/htdocs/semanticscuttle0.97.1/www-header.php on line 18
    といったエラーを吐かれたので...
  9. www-header.phpの18行目を編集。
  10. require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
    となっているのを
    require_once dirname(__FILE__) . '/src/SemanticScuttle/header.php';
    に変更。

  11. ブラウザで接続してみる。




設定

サムネイル表示を有効にしただけでは残念な事になるので色々と変更します。

data/templates/bookmarks-thumbnail.inc.tpl.php
を編集。


下の赤字部分を追加。
<?php
/**
* 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に下記を追加。
min-height: 150px;
height: auto;



下はデフォルトのデザイン。個人的にいまいちなので前回に引き続きデザイン変更。
ssc.gif


スタイルシートを弄って完成

スポンサード リンク