# HG changeset patch # User ymh # Date 1271751989 -7200 # Node ID 38d569fca46f1d7d2bf70f14802071ddafa6c45d # Parent 971621d37b74905ce3f1e7e6d35f4ed768b07cfd# Parent ca07ccdd09d3490570f5afb52b7d1f1e9e35e7a9 Merge with ca07ccdd09d3490570f5afb52b7d1f1e9e35e7a9 diff -r ca07ccdd09d3 -r 38d569fca46f build/README --- a/build/README Fri Apr 16 11:35:35 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -Folder that gather all necessary ressources (scripots) to maitain the project diff -r ca07ccdd09d3 -r 38d569fca46f build/deploy.launch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/deploy.launch Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff -r ca07ccdd09d3 -r 38d569fca46f build/deploy.xml --- a/build/deploy.xml Fri Apr 16 11:35:35 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ - - - - - description - - - - - - - - - - - - - - - - - - - - - - - - - ${build}${sonyengine.path}/mosatags.sonyengine.war - - - - - - - - - - - - - - - - - - - - - - - - diff -r ca07ccdd09d3 -r 38d569fca46f build/lib/catalina-ant.jar Binary file build/lib/catalina-ant.jar has changed diff -r ca07ccdd09d3 -r 38d569fca46f engine/build/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engine/build/README Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,1 @@ +Folder that gather all necessary ressources (scripots) to maitain the project diff -r ca07ccdd09d3 -r 38d569fca46f engine/build/deploy.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engine/build/deploy.xml Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,81 @@ + + + + + description + + + + + + + + + + + + + + + + + + + + + + + + + ${build}${sonyengine.path}/mosatags.sonyengine.war + + + + + + + + + + + + + + + + + + + + + + + + diff -r ca07ccdd09d3 -r 38d569fca46f engine/build/lib/catalina-ant.jar Binary file engine/build/lib/catalina-ant.jar has changed diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/config/routing.yml --- a/web/thdProject/apps/frontend/config/routing.yml Fri Apr 16 11:35:35 2010 +0200 +++ b/web/thdProject/apps/frontend/config/routing.yml Tue Apr 20 10:26:29 2010 +0200 @@ -49,13 +49,12 @@ ######## # TAGGING ######## - + tagging: url: /tagging/:tag/:page_nb - param: { module: tag, action: index, tag:all, page_nb: 1 } + param: { module: tag, action: index, tag: all, page_nb: 1 } requirements: { page_nb: \d+ } - ######## # FILMS ######## @@ -69,9 +68,18 @@ url: /top-des-films/:page/:page_nb param: { module: films, action: viewTopFilmList, page: page, page_nb: 1 } - - + +######### +# REFLEXONOMIES +######### + +searchReflex: + url: /reflex/:film_uniqueid/:tag/:direction/:distance + param: { module: reflex, action: index, tag: all, direction: more, distance: 5 } + requirements: { direction: more|less, distance: \d+ } + + default_index: url: /:module param: { action: index } diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/partials/templates/_navigation.php diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/reflex/actions/actions.class.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/reflex/actions/actions.class.php Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,48 @@ +getRequestFormat(); + $this->film_uniqueid = (string) $request->getParameter('film_uniqueid'); + $this->tag = (string) $request->getParameter('tag'); + $this->direction = (string) $request->getParameter('direction'); + $this->distance = (int)$request->getParameter('distance'); + + $this->distance = $this->distance * ($this->direction=='more'?1.0:-1.0) / 100.0; + + $sonyengine = SonyengineClient::getInstance(); + $result = $client->engineFind($this->film_uniqueid,$this->tag,$this->distance,true); + foreach($results as $res) + { + $primaryKeys[] = $res['id']; + } + + if(!empty($primaryKeys)) + { + $this->mostTaggedFilms = Doctrine::getTable('ThdFilm')->findByScoredId($primaryKeys); + } + else + { + $this->mostTaggedFilms = array(); + } + + return sfView::SUCCESS; + } +} diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/reflex/actions/components.class.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/reflex/actions/components.class.php Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,31 @@ +from('ThdFilm F') + ->leftJoin('F.images I ') + ->leftJoin('F.videos V') + ->where("F.ref='{$ref}'"); + $this->film = $query->execute()->getFirst(); + if (!$this->film) return sfView::NONE; + + // retrieve video infos + $videos = $this->film->getVideos(); + $this->filmVideo = ($videos) ? $videos[0] : null; + + return sfView::SUCCESS; + } + + +} \ No newline at end of file diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/reflex/config/view.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/reflex/config/view.yml Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,10 @@ +all: + + stylesheets: [ /css/flashplayer.css, search.css ] + + javascripts: [ /js/flowplayer/flowplayer-3.1.0.min.js, /js/flowplayer/uc.flowplayer.config.js] + + + components: + sideBar: [ tag, tagNavigator ] + \ No newline at end of file diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/reflex/templates/_player.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/reflex/templates/_player.php Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,98 @@ + +
+

getTitle(); + // original title if exist + + if($film->getOriginalTitle()!= null) + { + echo " {".$film->getOriginalTitle()."}"; + } + ?> + De getDirectorsArray(), 'name'); ?>

+ +
diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/reflex/templates/_suggestionFilmList.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/reflex/templates/_suggestionFilmList.php Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,15 @@ +
+

Les films suivants

+ +
\ No newline at end of file diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/reflex/templates/_tagNavigator.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/reflex/templates/_tagNavigator.php Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,12 @@ +
+

Autres Tags associés à cet extrait

+ +
\ No newline at end of file diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/reflex/templates/indexSuccess.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/reflex/templates/indexSuccess.php Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,3 @@ +

Résultats de la recherche reflexonomique

+ + 'all', 'filmCount' => '10', 'mostTaggedFilms' => $mostTaggedFilms, 'pageIndex' => $pageIndex, 'pageNbItems' => $pageNbItems)); ?> diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/search/actions/viewTagListAction.class.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/apps/frontend/modules/search/actions/viewTagListAction.class.php Tue Apr 20 10:26:29 2010 +0200 @@ -0,0 +1,38 @@ +getRequestFormat(); + $this->tag = (string) $request->getParameter('tag'); + $pageNb = (int) $this->getRequestParameter('page_nb', 1); + $this->pageIndex = $pageNb -1; + $this->pageNbItems = 10; + $this->indexNbItems = 2; + + + $solr = uvmcSolrServicesManager::getInstance()->getService(); + $response = $solr->search("tags:".$this->tag, $this->pageIndex * $this->pageNbItems, $this->pageNbItems); + + $results = unserialize($response->getRawResponse()); + + $primaryKeys = array(); + foreach($results['response']['docs'] as $doc) + { + $primaryKeys[] = $doc['id']; + } + + if(!empty($primaryKeys)) + { + $this->mostTaggedFilms = Doctrine::getTable('ThdFilm')->findByScoredId($primaryKeys); + } + else + { + $this->mostTaggedFilms = array(); + } + + return sfView::SUCCESS; + } +} \ No newline at end of file diff -r ca07ccdd09d3 -r 38d569fca46f web/thdProject/apps/frontend/modules/tag/templates/_tagNavigator.php --- a/web/thdProject/apps/frontend/modules/tag/templates/_tagNavigator.php Fri Apr 16 11:35:35 2010 +0200 +++ b/web/thdProject/apps/frontend/modules/tag/templates/_tagNavigator.php Tue Apr 20 10:26:29 2010 +0200 @@ -2,7 +2,7 @@

Autres Tags associés à cet extrait