2014-01-09 2 views
0

www.milesj.me의 작곡가를 사용하여 내 사이트에 cakephp forum plugin과 Admin plugin을 설치했습니다. 포럼 및 관리자 플러그인이 성공적으로 설치되었습니다.cakephp : Admin Plugin Conflict

하지만 Admin 플러그인이 기존 사이트 관리자 패널과 충돌합니다. 기존 사이트의 URL은 localhost/domain/admin이고 Admin 플러그인의 URL과 동일합니다.

아무도이 충돌을 해결하는 방법을 알고 있습니까?

감사합니다. 당신의 구성/core.php에서

답변

0

: 관리자 플러그인 이후

/** 
* Uncomment the define below to use CakePHP prefix routes. 
* 
* The value of the define determines the names of the routes 
* and their associated controller actions: 
* 
* Set to an array of prefixes you want to use in your application. Use for 
* admin or other prefixed routes. 
* 
* Routing.prefixes = array('admin', 'manager'); 
* 
* Enables: 
* `admin_index()` and `/admin/controller/index` 
* `manager_index()` and `/manager/controller/index` 
* 
*/ 
Configure::write('Routing.prefixes', array('admin')); 

는 이미 다른 값으로 설정 관리자와 URL을 사용하고 있습니다.

컨트롤러의 기존 'admin'메소드도 변경해야합니다 (예 : admin_index()에서 _index()).

+0

언급 한 라인은 이미 주석 처리가되어 있지 않습니다. – user3153854

+0

'admin'을 다른 것으로 변경하려고 시도 했습니까? 'siteadmin'? – savedario

+0

그래,하지만 그때 오류가 발생 ... 나는 이것이 일반적인 문제이며 아무도 이것에 대한 답변을 가지고 궁금 해서요, 심지어 내가 봤 거든 대답을 찾을 수 없습니다 ... – user3153854

0

어쩌면 당신은 죄송이

/* 
    Router::connect('/admin/'. $section . '/:action/*', $menu['url'], array('section' => $section)); 
    Router::connect('/admin/'. $section, $menu['url'] + array('action' => 'index'), array('section' => $section)); 
    */ 
    Router::connect('/dash/'. $section . '/:action/*', $menu['url'], array('section' => $section)); 
    Router::connect('/dash/'. $section, $menu['url'] + array('action' => 'index'), array('section' => $section)); 
} 
/* 
Router::connect('/admin/:model/:action/*', 
    array('plugin' => 'admin', 'controller' => 'crud'), 
    array('model' => '[_a-z0-9]+\.[_a-z0-9]+')); 
*/ 
Router::connect('/dash/:model/:action/*', 
    array('plugin' => 'admin', 'controller' => 'crud'), 
    array('model' => '[_a-z0-9]+\.[_a-z0-9]+')); 

/* 
Router::connect('/admin/:action/*', array('plugin' => 'admin', 'controller' => 'admin')); 
*/ 
Router::connect('/dash/:action/*', array('plugin' => 'admin', 'controller' => 'admin')); 

같은 응용 프로그램/플러그인/관리/구성/routes.php 수정을 시도 할 수 있습니다. 그것은 장님입니다. 테스트를 거치지는 않았지만 올바른 방법으로 생각됩니다. Admin 플러그인이 설치된 누군가가 그것을 확인할 수 있다면 좋을 것입니다.