Commit 1e7d93b3 authored by platyhouse's avatar platyhouse

.

parent 8c49361b
# StoryShare - PlatyFramework 기반 웹 애플리케이션
## 프로젝트 구조
```
/
├── admin/ # 관리자 페이지 (controllers, views)
├── application/ # 사용자 앱 (controllers, views)
├── modules/ # 앱별 추가 모듈
├── platyFramework/ # 코어 프레임워크
│ ├── apps/
│ │ ├── admin/ # 프레임워크 기본 관리자
│ │ ├── application/# 프레임워크 기본 앱
│ │ ├── modules/common/ # 공통 모듈 (models, controllers)
│ │ └── server/ # 서버 스크립트 (푸시 등)
│ └── platyLibrary/ # 라이브러리 (html, forms 등)
├── config.php # 경로/URL 설정
├── index.php # 엔트리 포인트
└── data/ # 데이터 파일 저장 (런타임 생성)
```
## MVC 구조
- **Controller**: `controllers/{폴더}/{파일}.php` - 클래스명: `{폴더}{파일}Controller`
- **View**: `views/defaultTheme/{폴더}/{파일}.html`
- **Model**: `modules/common/models/{폴더}/{파일}.php`
## URL 라우팅
컨트롤러 경로가 URL로 매핑됨. `pty` 접두사는 URL에서 제거됨.
```
platyFramework/apps/application/controllers/pty{폴더}/{파일}.php
→ https://{도메인}/{폴더}/{파일}/
예시:
platyFramework/apps/application/controllers/ptyuser/leave.php
→ https://dev.storyshare.platyhouse.com/user/leave/
platyFramework/apps/application/controllers/ptyapp/terms.php
→ https://dev.storyshare.platyhouse.com/app/terms/
```
- `index()` 메서드: 기본 URL (`/user/leave/`)
- `process()` 메서드: `/user/leave/process/`
## 설정 시스템
설정은 DB 테이블 `t_app_config`에 group/key/value 형태로 저장됨.
### system (시스템 설정)
```php
$this->config->system->appName // 앱 이름
$this->config->system->companyName // 회사명
$this->config->system->termsMemberJoin // 회원 가입 약관
$this->config->system->termsMemberPrivacy // 개인정보취급방침
$this->config->system->cdnUrl // CDN URL
$this->config->system->pushCdnUrl // 푸시 CDN URL
$this->config->system->paidContent // 유료 게시글 안내 문구
$this->config->system->PlatyHouseAppsApiKey // PlatyHouse API 키
```
### mobileapp (모바일앱 설정)
```php
$this->config->mobileapp->packageName // 안드로이드 패키지명
$this->config->mobileapp->iosPackageName // iOS 패키지명
$this->config->mobileapp->iosAppId // iOS 앱 ID
$this->config->mobileapp->coupangRewardId // 쿠팡 리워드 ID
$this->config->mobileapp->coupangRewardHeight
$this->config->mobileapp->push_image_attach_type
$this->config->mobileapp->is0VisibleBoardCommentProfileImage
$this->config->mobileapp->_item['key'] // 동적 키 접근
```
### user (사용자 설정)
```php
$this->config->user->signUp // 가입 포인트
$this->config->user['usePhoneCert'] // 휴대폰 인증 사용
$this->config->user['usePhoneNumber'] // 휴대폰 번호 사용
$this->config->user['useEmail'] // 이메일 사용
$this->config->user['useNickName'] // 닉네임 사용
```
### app (앱 설정)
```php
$this->config->app->askUrl // 문의 URL
```
### shorturl (단축 URL)
```php
$this->config->shorturl->bitlyLoginId
$this->config->shorturl->bitlyApiKey
$this->config->shorturl->genericAccessToken
```
설정 관리 화면:
- 시스템: `platyFramework/apps/admin/views/defaultTheme/app/config_system.html`
- 모바일앱: `platyFramework/apps/admin/views/defaultTheme/app/config_mobileapp.html`
## 주요 파일 위치
- 회원 탈퇴: `platyFramework/apps/application/controllers/ptyuser/leave.php`
- 사용자 API: `platyFramework/apps/modules/common/controllers/ptyuser/api.php`
- 게시판 API: `platyFramework/apps/modules/common/controllers/ptyboard/api.php`
- 푸시 전송: `platyFramework/apps/server/sendPushManager.php`
## 개발 규칙
- PHP short tag 사용: `<? ?>`, `<?= ?>`
- 네임스페이스: `platyFramework`
- 뷰에서 `$form->getInput()`, `$form->getTextEdit()` 등 폼 헬퍼 사용
- heredoc 문법으로 HTML 직접 작성하는 패턴 사용 가능
\ No newline at end of file
......@@ -8,6 +8,7 @@ namespace platyFramework;
* @var ptyTableItemModel $item
* @var theme $this
*/
?>
<script src="/platyFramework/apps/admin/views/defaultTheme/resources/plugins/ckeditor/ckeditor.js"></script>
<script>CKEDITOR.config.startupMode = 'wysiwyg';</script>
......@@ -21,6 +22,10 @@ namespace platyFramework;
<div class='col-md-12'>
<?= $form->getInput("어플리케이션 명칭", "appName", "", ""); ?>
</div>
<div class='col-md-12'>
<?= $form->getInput("회사명", "companyName", "", ""); ?>
</div>
<? if ($_SESSION['superAdmin'] == 1 || $_SERVER['REMOTE_ADDR'] == "125.132.167.178" || $_SERVER['HTTP_X_FORWARDED_FOR'] == "125.132.167.178") { ?>
<div class='col-md-12'>
<?= $form->getInput("@PlatyHouse API Key", "PlatyHouseAppsApiKey", "", ""); ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment