Changeset 72
- Timestamp:
- 06/21/07 16:56:48 (1 year ago)
- Files:
-
- branch/config/core.php (modified) (1 diff)
- branch/controllers/videos_controller.php (modified) (2 diffs)
- branch/plugins/videos (added)
- branch/plugins/videos/controllers (added)
- branch/plugins/videos/controllers/videos_controller.php (added)
- branch/plugins/videos/models (added)
- branch/plugins/videos/models/video.php (added)
- branch/plugins/videos/videos_app_controller.php (added)
- branch/plugins/videos/videos_app_model.php (added)
- branch/plugins/videos/views (added)
- branch/plugins/videos/views/videos (added)
- branch/plugins/videos/views/videos/add.ctp (added)
- branch/plugins/videos/views/videos/admin_add.ctp (added)
- branch/plugins/videos/views/videos/admin_edit.ctp (added)
- branch/plugins/videos/views/videos/admin_index.ctp (added)
- branch/plugins/videos/views/videos/admin_view.ctp (added)
- branch/plugins/videos/views/videos/edit.ctp (added)
- branch/plugins/videos/views/videos/index.ctp (added)
- branch/plugins/videos/views/videos/view.ctp (added)
- branch/tmp/cache/models/empty (deleted)
- branch/tmp/cache/persistent/empty (deleted)
- branch/tmp/cache/views/empty (deleted)
- branch/views/elements/js_include.ctp (modified) (1 diff)
- branch/views/elements/mainnav.ctp (modified) (1 diff)
- branch/views/layouts/default.ctp (modified) (2 diffs)
- branch/views/posts/index.ctp (modified) (1 diff)
- branch/views/posts/view.ctp (modified) (1 diff)
- branch/views/videos/index.ctp (modified) (3 diffs)
- branch/views/videos/video.ctp (added)
- branch/views/videos/viewuser.ctp (moved) (moved from branch/views/videos/view.ctp) (1 diff)
- branch/webroot/css/default.css (modified) (8 diffs)
- branch/webroot/css/jdMenu.css (added)
- branch/webroot/css/jdMenu.slate.css (added)
- branch/webroot/img/NoHalfMeasures.jpg (added)
- branch/webroot/img/bg.png (added)
- branch/webroot/img/gradient-alt.png (added)
- branch/webroot/img/gradient-vertical.png (added)
- branch/webroot/img/gradient.png (added)
- branch/webroot/img/h2_top.png (added)
- branch/webroot/img/header.png (added)
- branch/webroot/img/submenu.png (added)
- branch/webroot/js/flowplayer (added)
- branch/webroot/js/flowplayer/FlowPlayer.html (added)
- branch/webroot/js/flowplayer/FlowPlayer.swf (added)
- branch/webroot/js/flowplayer/FlowPlayerBlack.swf (added)
- branch/webroot/js/flowplayer/FlowPlayerJs.html (added)
- branch/webroot/js/flowplayer/FlowPlayerJs2.html (added)
- branch/webroot/js/flowplayer/FlowPlayerLP.swf (added)
- branch/webroot/js/flowplayer/FlowPlayerLight.swf (added)
- branch/webroot/js/flowplayer/FlowPlayerThermo.swf (added)
- branch/webroot/js/flowplayer/FlowPlayerWhite.swf (added)
- branch/webroot/js/flowplayer/LICENSE.txt (added)
- branch/webroot/js/flowplayer/README.txt (added)
- branch/webroot/js/flowplayer/flowPlayer.js (added)
- branch/webroot/js/flowplayer/fullscreen.js (added)
- branch/webroot/js/flowplayer/javascript.txt (added)
- branch/webroot/js/flowplayer/main_clickToPlay.jpg (added)
- branch/webroot/js/flowplayer/play-button-328x240.jpg (added)
- branch/webroot/js/flowplayer/playButtonBig.png (added)
- branch/webroot/js/flowplayer/swfobject.js (added)
- branch/webroot/js/jamal.js (deleted)
- branch/webroot/js/jquery.dimensions.js (moved) (moved from branch/webroot/js/dimensions.js)
- branch/webroot/js/jquery.jdMenu.js (added)
- branch/webroot/js/jquery.jdMenu.packed.js (added)
- branch/webroot/js/jquery.thickbox.js (moved) (moved from branch/webroot/js/thickbox.js)
- branch/webroot/js/webrocket.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/config/core.php
r70 r72 55 55 * In development mode, you need to click the flash message to continue. 56 56 */ 57 define('DEBUG', 2);57 define('DEBUG', 0); 58 58 /** 59 59 * Turn off or enable cache checking application-wide. branch/controllers/videos_controller.php
r70 r72 2 2 class VideosController extends AppController { 3 3 4 var $name = 'Videos'; 5 var $helpers = array('Html', 'Form' ); 6 var $components = array('PhpYoutube'); 4 var $dev_id = "5ya5T7dkAR0"; 5 7 6 function index() { 8 7 $this->Video->recursive = 0; … … 10 9 } 11 10 12 function view($id = null) { 13 pr($this->PhpYoutube->getDetails("MIJvpW8ZqKY")); 14 $this->set('video', $this->PhpYoutube->getDetails("MIJvpW8ZqKY")); 11 function viewuser($id = null) { 12 13 vendor('phpYoutube/phpYoutube'); 14 $phpYoutube = new phpYoutube($this->dev_id); 15 16 //pr($phpYoutube->videos_listbyuser($id)); 17 $this->set('videos', $phpYoutube->videos_listbyuser($id)); 18 } 19 20 function video($id = null) 21 { 22 vendor('phpYoutube/phpYoutube'); 23 $phpYoutube = new phpYoutube($this->dev_id); 24 25 $this->set('video_id', $id); 26 $this->set('video', $phpYoutube->videos_getdetails($id)); 15 27 } 16 28 branch/views/elements/js_include.ctp
r68 r72 1 1 <?php e($javascript->link('jquery'));?> 2 <?php e($javascript->link(' dimensions'));?>2 <?php e($javascript->link('jquery.dimensions'));?> 3 3 <?php e($javascript->link('jquery.bgiframe.min'));?> 4 4 <?php e($javascript->link('jquery.cookie'));?> 5 5 <?php e($javascript->link('jquery.form'));?> 6 6 <?php e($javascript->link('jquery.autocomplete'));?> 7 <?php e($javascript->link(' treeview/jquery.treeview.pack'));?>7 <?php e($javascript->link('jquery.jdMenu'));?> 8 8 <?php e($javascript->link('wymeditor/jquery.wymeditor'));?> 9 9 <?php e($javascript->link('wymeditor/plugins/tidy/jquery.wymeditor.tidy'));?> 10 10 <?php e($javascript->link('wymeditor/plugins/hovertools/jquery.wymeditor.hovertools'));?> 11 <?php e($javascript->link(' thickbox'));?>11 <?php e($javascript->link('jquery.thickbox'));?> 12 12 <?php e($javascript->link('webrocket'));?> branch/views/elements/mainnav.ctp
r67 r72 1 1 <?php $menus = $this->requestAction('/menus/index/1');?> 2 2 <div id="mainnav" class="primarynav"> 3 <?php e($treeMenu->generate($menus,true,' mytreemenu'));?>3 <?php e($treeMenu->generate($menus,true,'jd_menu jd_menu_slate'));?> 4 4 </div> branch/views/layouts/default.ctp
r71 r72 12 12 <?php echo $html->css('thickbox');?> 13 13 <?php echo $html->css('jquery.autocomplete');?> 14 <?php echo $html->css('jdMenu');?> 15 <?php echo $html->css('jdMenu.slate');?> 14 16 <?php echo $html->css('../js/wymeditor/skins/default/screen');?> 15 17 … … 17 19 </head> 18 20 <body class="jamal"> 19 <div id="doc3" class="yui-t2"> 20 <div id="hd"><h1>YUI: CSS Grid Builder</h1></div> 21 <div id="bd"> 22 <div id="yui-main"> 23 <div class="yui-b"><div class="yui-g" id="content"> 24 <?php if($session->check('Message.flash')): 25 $session->flash(); 26 endif; 27 ?> 21 <div id="doc3" class="yui-t7"> 22 <div id="hd"> 23 24 </div> 25 <div class="nav-area"><?php e($this->element('mainnav'));?></div> 26 <div id="bd"> 27 <div class="yui-g" id="content"> 28 <?php if($session->check('Message.flash')): 29 $session->flash(); 30 endif; 31 ?> 28 32 29 <?php echo $content_for_layout;?> 33 <?php echo $content_for_layout;?> 34 </div> 35 <div class="yui-g" id="boxes"> 36 <div class="yui-gb first"> 37 <div class="yui-u first"> 38 <?php e($this->element('tagcloud'));?> 39 </div> 40 <div class="yui-u"> 41 <?php e($this->element('tagcloud'));?> 42 </div> 43 <div class="yui-u"> 44 <?php e($this->element('tagcloud'));?> 45 </div> 46 </div> 47 </div> 48 </div> 49 <div id="ft">Footer is here.</div> 30 50 </div> 31 <div class="yui-g"> 32 <div class="yui-gb first"> 33 <div class="yui-u first"> 34 <?php e($this->element('tagcloud'));?> 35 </div> 36 <div class="yui-u"> 37 <!-- YOUR DATA GOES HERE --> 38 </div> 39 <div class="yui-u"> 40 <!-- YOUR DATA GOES HERE --> 41 </div> 42 </div> 43 </div> 44 </div> 45 </div> 46 <div class="yui-b"><?php e($this->element('mainnav'));?></div> 47 48 </div> 49 <div id="ft">Footer is here.</div> 50 </div> 51 <?php echo $cakeDebug?> 51 <?php echo $cakeDebug?> 52 52 </body> 53 53 </html> branch/views/posts/index.ctp
r57 r72 2 2 <div class="hentry"> 3 3 <h2 class="entry-title"><?php e($html->link($post['Post']['title'], array('controller'=>'posts', 'action'=>'view', $post['Post']['stub']))); ?></h2> 4 <?php echo $html->link('Edit', array('action'=>'edit', $post['Post']['id'])); ?> 5 <abbr class="updated" title=""><?php echo $post['Post']['post_date']; ?></abbr> 6 <span class="vcard author"><?php echo $html->link($post['User']['username'], array('controller'=> 'users', 'action'=>'view', $post['User']['id'])); ?></span> 4 <div class="entry-infobar"> 5 Updated on <abbr class="updated" title=""><?php echo $post['Post']['post_date']; ?></abbr> by 6 <span class="vcard author fn"><?php echo $html->link($post['User']['username'], array('controller'=> 'users', 'action'=>'view', $post['User']['id'])); ?></span> 7 </div> 7 8 <div class="entry-content"> 8 9 <?php echo $post['Post']['body']; ?> branch/views/posts/view.ctp
r57 r72 4 4 <abbr class="updated" title=""><?php echo $post['Post']['post_date']; ?></abbr> 5 5 <span class="vcard author"><?php echo $html->link($post['User']['username'], array('controller'=> 'users', 'action'=>'view', $post['User']['id'])); ?></span> 6 6 7 <div class="entry-content"> 7 8 <?php echo $post['Post']['body']; ?> branch/views/videos/index.ctp
r55 r72 3 3 4 4 <table cellpadding="0" cellspacing="0"> 5 <thead> 5 6 <tr> 6 7 <th><?php echo $paginator->sort('id');?></th> … … 18 19 <th>Actions</th> 19 20 </tr> 21 </thead> 22 <tbody> 23 <?php $row = 0; ?> 20 24 <?php foreach ($videos as $video): ?> 21 <tr >25 <tr class="<?php ($row % 2 ? e('even') : e('odd'));?>"> 22 26 <td><?php echo $video['Video']['id']; ?></td> 23 27 <td><?php echo $video['Video']['title']; ?></td> … … 38 42 </td> 39 43 </tr> 44 <?php $row++; ?> 40 45 <?php endforeach; ?> 46 </tbody> 41 47 </table> 42 48 branch/views/videos/viewuser.ctp
r55 r72 1 1 <div class="video"> 2 2 <h2>View Video</h2> 3 Found <?php e($videos['total']);?> videos 3 4 4 <dl> 5 <dt>Id</dt> 6 <dd> <?php echo $video['Video']['id']?></dd> 7 <dt>Title</dt> 8 <dd> <?php echo $video['Video']['title']?></dd> 9 <dt>Url</dt> 10 <dd> <?php echo $video['Video']['url']?></dd> 11 <dt>Video Location</dt> 12 <dd> <?php echo $video['Video']['video_location']?></dd> 13 <dt>Video Date</dt> 14 <dd> <?php echo $video['Video']['video_date']?></dd> 15 <dt>Body</dt> 16 <dd> <?php echo $video['Video']['body']?></dd> 17 <dt>Copyright Owner</dt> 18 <dd> <?php echo $video['Video']['copyright_owner']?></dd> 19 <dt>Copyright</dt> 20 <dd> <?php echo $html->link($video['Copyright']['title'], array('controller'=> 'copyrights', 'action'=>'view', $video['Copyright']['id'])); ?></dd> 21 <dt>Published</dt> 22 <dd> <?php echo $video['Video']['published']?></dd> 23 <dt>User</dt> 24 <dd> <?php echo $html->link($video['User']['name'], array('controller'=> 'users', 'action'=>'view', $video['User']['id'])); ?></dd> 25 <dt>Subject</dt> 26 <dd> <?php echo $html->link($video['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $video['Subject']['id'])); ?></dd> 27 <dt>Tags</dt> 28 <dd> <?php echo $video['Video']['tags']?></dd> 29 </dl> 30 </div> 31 <div class="actions"> 32 <ul> 33 <li><?php echo $html->link('Edit Video', array('action'=>'edit', $video['Video']['id'])); ?> </li> 34 <li><?php echo $html->link('Delete Video', array('action'=>'delete', $video['Video']['id']), null, 'Are you sure you want to delete #' . $video['Video']['id'] . '?'); ?> </li> 35 <li><?php echo $html->link('List Videos', array('action'=>'index')); ?> </li> 36 <li><?php echo $html->link('New Video', array('action'=>'add')); ?> </li> 37 <li><?php echo $html->link('List Copyright', array('controller'=> 'copyrights', 'action'=>'index')); ?> </li> 38 <li><?php echo $html->link('New Copyrights', array('controller'=> 'copyrights', 'action'=>'add')); ?> </li> 39 <li><?php echo $html->link('List User', array('controller'=> 'users', 'action'=>'index')); ?> </li> 40 <li><?php echo $html->link('New Users', array('controller'=> 'users', 'action'=>'add')); ?> </li> 41 <li><?php echo $html->link('List Subject', array('controller'=> 'subjects', 'action'=>'index')); ?> </li> 42 <li><?php echo $html->link('New Subjects', array('controller'=> 'subjects', 'action'=>'add')); ?> </li> 43 </ul> 5 <dl class="video-gallery"> 6 <?php foreach($videos['video'] as $video) : ?> 7 <dt><a href="/videos/video/<?php e($video['id']);?>" class="thickbox" title="<?php e($video['description']);?>"><?php e($video['title']);?></a></dt> 8 <dd><a href="/videos/video/<?php e($video['id']);?>" class="thickbox" title="<?php e($video['description']);?>"><img src="<?php e($video['thumbnail_url']);?>" /></a></dd> 9 10 <dd>Views: <?php e($video['view_count']);?></dd> 11 12 <dd>Comments: <?php e($video['comment_count']);?></dd> 13 14 <dd>Ave Rating: <?php e($video['rating_avg']);?></dd> 15 16 <dd>Length: <?php if ($video['length_seconds'] > 0) { 17 $mins = floor ($video['length_seconds'] / 60); 18 $secs = $video['length_seconds'] % 60; 19 printf ("%d:%2.0f", $mins, $secs); 20 } 21 ?></dd> 22 <br style="clear:left;" /> 23 <?php endforeach; ?> 24 </dl> 44 25 45 26 </div> 46 <div class="related">47 <h3>Related Tags</h3>48 <?php if(!empty($video['Tag'])):?>49 <table cellpadding="0" cellspacing="0">50 <tr>51 <th>Id</th>52 <th>Tag</th>53 <th>Actions</th>54 </tr>55 <?php foreach($video['Tag'] as $tag):?>56 <tr>57 <td><?php echo $tag['id'];?></td>58 <td><?php echo $tag['tag'];?></td>59 <td class="actions">60 <?php echo $html->link('View', array('controller'=> 'tags', 'action'=>'view', $tag['id'])); ?>61 <?php echo $html->link('Edit', array('controller'=> 'tags', 'action'=>'edit', $tag['id'])); ?>62 <?php echo $html->link('Delete', array('controller'=> 'tags', 'action'=>'delete', $tag['id']), null, 'Are you sure you want to delete #' . $tag['id'] . '?'); ?>63 </td>64 </tr>65 <?php endforeach; ?>66 </table>67 <?php endif; ?>68 69 <div class="actions">70 <ul>71 <li><?php echo $html->link('New Tag', array('controller'=> 'tags', 'action'=>'add'));?> </li>72 </ul>73 </div>74 </div>branch/webroot/css/default.css
r63 r72 1 1 /* Layout Code */ 2 2 3 body { 4 background: #000 url('../img/bg.png') repeat-x; 5 color:#fff; 6 } 7 8 a {color:#004dcb; text-decoration:none;} 9 3 10 div#hd { 4 height:1 50px;5 background: # 000;11 height:130px; 12 background: #fff url('../img/NoHalfMeasures.jpg') no-repeat; 6 13 color: #fff; 7 14 } … … 9 16 div#content { 10 17 overflow:auto; 18 min-height:340px; 11 19 } 12 20 … … 20 28 } 21 29 30 div.nav-area { 31 margin-bottom:0; 32 } 33 22 34 /* Style Code */ 35 36 div.yui-u { 37 /*border:1px solid #000;*/ 38 background:#000; 39 } 40 41 div.yui-u h3 { 42 height:20px; 43 background: url('../img/h2_top.png') repeat-x; 44 font-size:1em; 45 border:2px solid #000; 46 color:#000; 47 font-weight:bold; 48 } 23 49 24 50 h2 { font-size:2em; } … … 107 133 108 134 thead { 109 border-left:1px solid # 2293FF;135 border-left:1px solid #fff; 110 136 } 111 137 112 138 thead th { 113 background: #2293FF ;139 background: #2293FF url('../img/h2_top.png') repeat-x; 114 140 color: #FFFFFF; 115 141 font-size: 125%; 116 border-top:1px solid # 2293FF;117 border-right:1px solid # 2293FF;142 border-top:1px solid #fff; 143 border-right:1px solid #fff; 118 144 padding: 4px 0.4em 4px 0.4em; 119 145 } 120 146 121 147 tfoot td, tfoot th { 122 border-top:1px solid # 2293FF;148 border-top:1px solid #fff; 123 149 border-right: none; 124 150 font-weight: bolder; … … 128 154 129 155 tbody td, tbody th { 130 background-color: # D9ECFF;131 border-right:1px solid # 2293FF;156 background-color: #222; 157 border-right:1px solid #fff; 132 158 font-size: 110%; 133 159 padding: 0.4em 0.5em 0.4em 0.5em; … … 135 161 136 162 tbody tr.odd th, tbody tr.odd td{ 137 background-color: # BDDFFF;163 background-color: #444; 138 164 } 139 165 … … 143 169 } 144 170 145 table a:link, table a:visited, table a:active { 146 color:#444F66; 171 table a, a:link, table a:visited, table a:active { 147 172 background-color: transparent; 148 text-decoration: underline;149 173 } 150 174 151 175 table a:hover { 152 176 text-decoration:none; 153 background-color: #1E90FF;154 177 color: #FFFFFF; 155 178 } … … 177 200 ul.gallery li {float:left; margin-right:20px;} 178 201 ul.gallery li img {border:5px groove #000;} 202 203 /* Navigation */ 204 205 /* Entry */ 206 div.hentry h2 { 207 background: url('../img/h2_top.png') repeat-x; 208 } 209 210 div.hentry h2 a { 211 color:#000; 212 margin-left:30px; 213 } 214 215 div.hentry div.entry-infobar { 216 background: #000; 217 color: #fff; 218 border-bottom:2px solid #fff; 219 } 220 221 div.hentry div.entry-content { 222 padding-left:50px; 223 padding-right:50px; 224 margin-top:10px; 225 margin-bottom:10px; 226 } 227 228 div.hentry div.meta { 229 margin-top:10px; 230 clear:both; 231 border-top:2px solid #fff; 232 } 233 234 /* videos */ 235 236 div.video { 237 margin: auto 0; 238 width:60%; 239 text-align:center; 240 } 241 242 dl.video-gallery { 243 244 } 245 246 dl.video-gallery dt { 247 /*clear:left;*/ 248 text-align:left; 249 } 250 251 dl.video-gallery dd { 252 float:left; 253 margin-right:30px; 254 } branch/webroot/js/webrocket.js
r68 r72 41 41 42 42 $j(".wymsubmit").click(function () {alert($j(this).siblings(".wymeditor").val());}); 43 44 $j("ul.mytreemenu").Treeview({speed: "slow", collapsed: true, store: true}); 45 43 46 44 var autoopts = { 47 45 multiple: true, … … 50 48 51 49 $j(".tags").autocomplete("/tags/autocomplete", autoopts); 50 51 $j('ul.jd_menu').jdMenu(); 52 52 53 53 /*var options = {