GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tonowp/p2-php: ServerSide 2ch viewer

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

972 Commits
972 Commits

Folders and files

NameName
Last commit message
Last commit date
conf
conf
 
 
data
data
 
 
doc
doc
 
 
lib
lib
 
 
rep2
rep2
 
 
scripts
scripts
 
 
style
style
 
 
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
init.php
init.php
 
 
router.php
router.php
 
 

Repository files navigation

rep2 expack

なんだかんだで歴史の長い、PHPでつくられたサーバーサイド2ちゃんねるビューワーです。

作りがレガシーなのは作っているひとがいちばんよくわかっているので、勘弁してつかあさい。

次世代版建設予定地

セットアップ

Git & Composerで

  1. 本体をclone
git clone git://github.com/rsky/p2-php.git
  cd p2-php
  1. 依存ライブラリをダウンロード
curl -L -O https://github.com/downloads/rsky/p2-php/p2pear.phar

MD5 (p2pear.phar) = 5e02b3d21bccc7a23422f1c43d2d971f

curl -O http://getcomposer.org/composer.phar
  php composer.phar install
  1. Webサーバが書き込めるようにディレクトリのアクセス権をセット
    (CGI/suEXECIやCLI/Built-in web serverでは不要)
chmod 0777 data/* rep2/ic

Zipでくれ

つTags

Built-in web serverで使ってみる (PHP 5.4+)

PHP 5.4の新機能、ビルトインウェブサーバーで簡単に試せます。

ルートディレクトリで以下のようにすると、Webサーバーの設定をしなくても http://localhost:8080/ でrep2を使えます。(Windowsでも!)

php -S localhost:8080 -t rep2 router.php

moriyoshi++

画像を自動で保存したい

スレに貼られている画像を自動で保存する機能、ImageCache2があります。

see also doc/ImageCache2/README.txt, doc/ImageCache2/INSTALL.txt

準備

  1. SQLite以外のデータベースを使う場合はデータベースサーバーを立ち上げておく。

  2. conf/conf_admin_ex.inc.phpでImageCache2を有効にする。

$_conf['expack.ic2.enabled'] = 3;
  1. conf/conf_ic2.inc.phpでDSNを設定する。
$_conf['expack.ic2.general.dsn'] = 'mysql://username:password@localhost:3306/database';
  1. setupスクリプトを実行する。
php scripts/ic2.php setup

注意

  • PHP 5.4ではSQLite2がサポートされなくなったので、ImageCache2を使いたいときはMySQLかPostgreSQLが必要です。
  • ホストにlocalhostを指定して接続できないときは、代わりに127.0.0.1にしてみてください。

設定を変えたい

細かい挙動の変更は メニュー > 設定管理 > ユーザー設定編集 から行えます。

Webブラウザから変更できない項目は conf/conf_admin.inc.php (基本), conf/conf_admin_ex.inc.php (拡張パック), conf/conf_ic2.inc.php (ImageCache2) を直接編集します。

どういうことができるか書き起こすのが面倒なので設定ファイルのコメントを見てください。

更新

本体

git pull

p2pear.pharが古いとき

curl -L -O https://github.com/downloads/rsky/p2-php/p2pear.phar

composer.jsonが更新されたとき

php composer.phar update

古いバージョンからの移行

144c0e91cでルートディレクトリにあったWeb経由でアクセスされるファイルをrep2ディレクトリに移動する等、ファイル構成を変更しました。

既存のデータをそのまま使い続けるには、conf/conf_user_admin.inc.php および conf/conf_ic2.inc.php を下記のように旧版相当の設定にします。

conf/conf_user_admin.inc.php

※ dataディレクトリの位置はindex.phpがある階層よりひとつ上。

$_conf['data_dir'] = P2_BASE_DIR . '/data';
$_conf['dat_dir']  = P2_BASE_DIR . '/data';
$_conf['idx_dir']  = P2_BASE_DIR . '/data';
$_conf['pref_dir'] = P2_BASE_DIR . '/data';

conf/conf_ic2.inc.php

$_conf['expack.ic2.general.cachedir'] = P2_WWW_DIR . '/cache';
$_conf['expack.ic2.general.cacheuri'] = './cache';
// 以下はSQLite2の場合のみ
$_conf['expack.ic2.general.dsn'] = 'sqlite:///' . P2_WWW_DIR . '/cache/imgcache.sqlite';

※ SQLite2な人は rep2/cache/imgcache.sqlite を data/db/imgcache.sqlite に移動して DSNは "sqlite:///{$_conf['db_dir']}/imgcache.sqlite" がおすすめ。

Authors & Contributors

  • aki (original) http://akid.s17.xrea.com/
  • rsk (expack) https://github.com/rsky/p2-php/
  • unpush https://github.com/unpush/p2-php/
  • thermon https://github.com/thermon/p2-php/
  • part32の892 (+live) http://plus-live.main.jp/
  • 2ch p2/rep2スレの>>1-1000

License

see LICENSE.txt

About

ServerSide 2ch viewer

sourceforge.jp/projects/p2-php/

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.