ybase
smarty+smartyview設定
app/plugins/smartyを作り直す
- githubから見てリンクになってしまったから
- git rm -r --cached でインデックスから消す
$ rm -rf app/plugins/smarty $ unzip kaz29-smartyview-f5b69cc.zip ... $ mv kaz29-smartyview-f5b69cc smarty $ git rm -r --cached app/plugins/smarty rm 'app/plugins/smarty' $ git add app/plugins/smarty/ $ git commit [installSmarty b73b281] app/plugins/smartyをzipから取ってきた 9 files changed, 671 insertions(+), 1 deletions(-) delete mode 160000 app/plugins/smarty create mode 100644 app/plugins/smarty/.gitignore create mode 100644 app/plugins/smarty/INSTALL.ja.txt create mode 100644 app/plugins/smarty/controllers/mypages_controller.php create mode 100644 app/plugins/smarty/readme.txt create mode 100644 app/plugins/smarty/views/helpers/smarty.php create mode 100644 app/plugins/smarty/views/layouts/smarty/mylayout.tpl create mode 100644 app/plugins/smarty/views/mypages/smarty/index.tpl create mode 100644 app/plugins/smarty/views/smarty.php $ git push origin installSmarty Counting objects: 23, done. Delta compression using up to 2 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (20/20), 9.71 KiB, done. Total 20 (delta 2), reused 0 (delta 0) To git@github.com:iphlox/ybase.git 724e9c8..b73b281 installSmarty -> installSmarty
ステータスグリーン
- http://localhost/ybase/web/smarty/mypages/ がステータスグリーンになってない
- 調べてみるとtemplates_cのaddし忘れたらしい。ちがう、あえて外したんだ。
- やっぱり必要だ
- そろそろ.gitignoreの出番かな
$ pwd /Applications/MAMP/htdocs/ybase/app/tmp/smarty $ ls cache $ mkdir templates_c $ chmod go+w templates_c $ git add app/tmp/smarty/templates_c $ git rm -r --cached app/tmp/smarty/templates_c $ git add app/tmp/smarty/templates_c $ git rm --cached app/tmp/smarty/templates_c/.DS_Store $ git commit -a [installSmarty 99b5612] templates_cをaddしてステータスグリーン 1 files changed, 10 insertions(+), 0 deletions(-) $ git push origin installSmarty Counting objects: 9, done. Delta compression using up to 2 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 510 bytes, done. Total 5 (delta 4), reused 0 (delta 0) To git@github.com:iphlox/ybase.git b73b281..99b5612 installSmarty -> installSmarty
emptyをaddしておく
$ git add app/tmp/smarty/templates_c/empty $ git add app/tmp/smarty/cache/empty $ git commit -a [installSmarty 46fbac7] emptyをaddしておく 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100755 app/tmp/smarty/cache/empty create mode 100755 app/tmp/smarty/templates_c/empty $ git push origin installSmarty Counting objects: 8, done. Delta compression using up to 2 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 498 bytes, done. Total 5 (delta 2), reused 0 (delta 0) To git@github.com:iphlox/ybase.git 99b5612..46fbac7 installSmarty -> installSmarty
- Finderからコピーしたemptyだと、コピー元ファイルの情報がgithubに反映されてしまった
- touch emptyで作り直してあげなおした
smartyview設定変更
Configure::write( 'Smarty.subDir', ''); Configure::write( 'Smarty.layoutPath', '');
- mypages_controllerを配置して動作確認した
- app/plugins/smarty/のcontrollersやview/mypagesなどを_付きにリネームして不活性にしてテストした
- http://localhost/ybase/web/mypages/
- 混乱してる
$ git reset HEAD app/plugins/smarty/controllers/mypages_controller.php Unstaged changes after reset: M app/config/bootstrap.php $ git reset HEAD app/plugins/smarty/views/helpers/smarty.php Unstaged changes after reset: M app/config/bootstrap.php $ git reset HEAD app/plugins/smarty/views/layouts/smarty/mylayout.tpl Unstaged changes after reset: M app/config/bootstrap.php $ git reset HEAD app/plugins/smarty/views/mypages/smarty/index.tpl Unstaged changes after reset: M app/config/bootstrap.php $ git rm --cached -r app/plugins/smarty/controllers rm 'app/plugins/smarty/controllers/mypages_controller.php' $ git rm --cached -r app/plugins/smarty/views/helpers rm 'app/plugins/smarty/views/helpers/smarty.php' $ git rm --cached -r app/plugins/smarty/views/layouts rm 'app/plugins/smarty/views/layouts/smarty/mylayout.tpl' $ git rm --cached -r app/plugins/smarty/views/mypages rm 'app/plugins/smarty/views/mypages/smarty/index.tpl' $ git add app/controllers/mypages_controller.php $ git add app/views/helpers/smarty.php $ git add app/views/layouts/mylayout.tpl $ git add app/views/mypages/index.tpl $ git add app/config/bootstrap.php $ git commit [installSmarty a9b5fb2] app/config/bootstrap.php修正 1 files changed, 2 insertions(+), 2 deletions(-) $ git push origin installSmarty Counting objects: 9, done. Delta compression using up to 2 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 428 bytes, done. Total 5 (delta 4), reused 0 (delta 0) To git@github.com:iphlox/ybase.git 3e465d6..a9b5fb2 installSmarty -> installSmarty