127.patch

jobin dcruz, 07/22/2010 05:38 AM

Download (30.6 KB)

View differences:

ajax/video_queue.php
1
<?php
2

  
3
require '../include/config.php';
4

  
5
$video_id = isset($_GET['video_id']) ? (int) $_GET['video_id'] : 0;
6

  
7
$sql = "SELECT * FROM `videos` WHERE
8
       `video_id`=" . $video_id;
9
$result = mysql_query($sql) or mysql_die($sql);
10

  
11
if (mysql_num_rows($result) > 0)
12
{
13
    if (isset($_COOKIE['video_queue']) && !empty($_COOKIE['video_queue']))
14
    {
15
      
16
        $tmp = explode(',',$_COOKIE['video_queue']);
17

  
18
        if (!in_array($video_id,$tmp))
19
        {
20
            $video_ids = $_COOKIE['video_queue'] .  $video_id . ',' ;
21
            setcookie('video_queue', $video_ids, time() + 86400,'/');
22
        }
23
        
24
    }
25
    else
26
    {
27
        setcookie('video_queue', $video_id . ',', time() + 86400,'/');
28
    }
29
}
30

  
ajax/video_queue_display.php
1
<?php
2

  
3
require '../include/config.php';
4

  
5
if (isset($_COOKIE['video_queue']))
6
{
7
    if (!empty($_COOKIE['video_queue']))
8
    {
9
        $video_ids = $_COOKIE['video_queue'];
10
            
11
        if (preg_match('/,$/',$_COOKIE['video_queue'],$match))
12
        {
13
            $video_ids = preg_replace('/,$/','',$_COOKIE['video_queue']);
14
        }
15
        
16
        $sql = "SELECT * FROM `videos` WHERE
17
               `video_id` IN($video_ids)";
18
        $result = mysql_query($sql) or mysql_die($sql);
19
        
20
        if (mysql_num_rows($result) > 0)
21
        {
22
            while($tmp = mysql_fetch_assoc($result))
23
            {
24
                $tmp['video_thumb_url'] = $servers[$tmp['video_server_id']];
25
                $video_info[] = $tmp;
26
            }
27
            
28
            $smarty->assign('video_info',$video_info);
29
            $smarty->display('video_queue.tpl');
30
        }
31
        
32
    }
33
}
ajax/video_queue_remove.php
1
<?php
2

  
3
require '../include/config.php';
4

  
5
$_COOKIE['video_queue'];
6

  
7
$cookie_arr = explode(',', $_COOKIE['video_queue']);
8

  
9
for ($i = 0;$i < count($cookie_arr);$i++)
10
{
11
    if ($_GET['id'] == $cookie_arr[$i])
12
    {
13
        unset($cookie_arr[$i]);
14
    }
15
}
16

  
17
$cookie = implode(',', $cookie_arr);
18
setcookie('video_queue', $cookie, time() + 86400,'/');
js/video_queue.js
1

  
2
//$(document.ready(function(){
3
video_queue_display();
4
	$('div [rel=video_queue]').each(function(){
5
		   $(this).click(function(){
6
			     var myClass = new Array();
7
			     myClass['video-queue'] = 'video-queue-info';
8
			     myClass['video-queue-info'] = 'video-queue-info';
9
			     myClass['video-queue home-video-queue'] = 'video-queue-info home-video-queue'
10
			     var video_id = $(this).attr('id');
11
			     var class = $(this).attr('class');
12
			     $("#"+video_id).removeClass(class).addClass(myClass[class]);
13
			     $("#"+video_id).html('Added to queue');
14

  
15
			     if (video_id.match('_'))
16
			     {
17
			    	 var tmp = video_id.split('_');
18
			    	 video_id = tmp[0];
19
			     }
20
			     
21
			     var sUrl = baseurl + "/ajax/video_queue.php";
22
			     sUrl = sUrl + "?video_id=" + video_id;
23
			     $.ajax({
24
			         type: "GET",
25
			         url: sUrl,
26
			         dataType: 'html',
27
			         success: function(html){
28
			    	    video_queue_display();
29
			    	 },
30
			         error: video_queue_error
31
			     });
32
			     function video_queue_error(){
33
			     }
34
				 
35
			   });
36
	});
37

  
38
	function video_queue_display(){
39
		var show = '';
40
        var sUrl = baseurl + "/ajax/video_queue_display.php";
41
        $.ajax({
42
            type: "GET",
43
            url: sUrl,
44
            dataType: 'html',
45
            success: function(html){
46
               $("#quicklist_box").html(html);
47
               show = $.COOKIE('show');
48

  
49
               if (show == '')
50
               {
51
            	   $("#quicklist_cont").hide();
52
               }
53
               
54
            },
55
            error: function(){
56
            }
57
        });
58
    }
59
	
60
	var cookieName = '';
61
	var cookieValue = '';
62
	
63
	jQuery.COOKIE = function(cookieName,cookieValue){
64
		var expiredays = 1;
65
		
66
		if (cookieValue != undefined)
67
		{
68
			var exdate=new Date();
69
			expiredays = exdate.setDate(exdate.getDate()+expiredays);
70
			document.cookie =''+ cookieName +'= ' + cookieValue + '; expires='+exdate.toUTCString()+'; path=/';
71
		}
72
		else
73
		{
74
			var cookieValue = '';
75
        	
76
	        if (document.cookie && document.cookie != '') {
77
	        	var cookies = document.cookie.split(';');
78
	        	
79
	        	for (var i = 0; i < cookies.length; i++) {
80
	                var cookie = jQuery.trim(cookies[i]);
81
	                
82
	                if (cookie.match(cookieName + '='))
83
	                {
84
	                	cookieValue = cookie.substring(cookieName.length + 1);
85
	                }
86
	            }
87
	        }
88
	        return cookieValue;
89
		}
90
	}
91
	
92
	
93
	
94
//});
templates/channel_details.tpl
52 52
	            <a href="{$base_url}/view/{$recent_channel_videos[j].video_id}/{$recent_channel_videos[j].video_seo_name}/">
53 53
	                <img src="{$recent_channel_videos[j].video_thumb_url}/thumb/{$recent_channel_videos[j].video_folder}1_{$recent_channel_videos[j].video_id}.jpg" alt="" />
54 54
	            </a>
55
	            <div class="video-queue home-video-queue"  id="{$recent_channel_videos[j].video_id}_recent" rel="video_queue">&nbsp;</div>
55 56
	            <div class="video-time">{$recent_channel_videos[j].video_length}</div>
56 57
	        </div>
57 58
	        
......
99 100
	        <a href="{$base_url}/view/{$mostview[k].video_id}/{$mostview[k].video_seo_name}/">
100 101
	           <img src="{$mostview[k].video_thumb_url}/thumb/{$mostview[k].video_folder}1_{$mostview[k].video_id}.jpg" alt="" />
101 102
	        </a>
103
	        <div class="video-queue home-video-queue"  id="{$mostview[k].video_id}_most" rel="video_queue">&nbsp;</div>
102 104
	        <div class="video-time">{$mostview[k].video_length}</div>
103 105
	    </div>
104 106
        
templates/css/black/black.css
1295 1295
	background-color: #444444;
1296 1296
}
1297 1297

  
1298
div.quicklist_box div#quicklist_cont {
1299
    display: block;
1300
    border: 0px solid red;
1301
    background: #000000;
1302
    padding: 1px;
1303
    max-height: 400px;
1304
    overflow: auto;
1305
}
templates/css/style.css
2069 2069
div.view-video-watch-img-adjust {
2070 2070
    width: 60px;
2071 2071
    height: 45px;
2072
}
2073
.video-queue{
2074
    position: absolute;
2075
    bottom: -1px;
2076
    background-image: url('../images/quick_icon.png');
2077
    background-repeat: no-repeat;
2078
    width: 16px;
2079
    height: 15px;
2080
    cursor: pointer;
2081
    float: left;
2082
    left: 0px;
2083
}
2084
.video-queue-info{
2085
    padding-left:2px;
2086
    height:29px;
2087
    font-size:10px;
2088
    font-weight:bold;
2089
    background-color:#A0CD5B;
2090
    position:absolute;
2091
    color:#000000;;
2092
    width:100%;
2093
    cursor:pointer;
2094
    float:left;
2095
    opacity:0.8;
2096
    text-align:left;
2097
    bottom:0px;
2098
    left:0px;
2099
}
2100
 
2101
.home-video-queue{
2102
    /*bottom:-1px;
2103
    left:-1px;*/
2104
}
2105

  
2106
div.quicklist_box {
2107
    border: 1px double #c3b7ac;
2108
   border-width: 1px 0 0 1px;
2109
    background-color:#efebe7;
2110
    bottom:-1px;
2111
    font-size: 10px;
2112
    position:fixed;
2113
    right:0;
2114
    width:275px;
2115
    z-index:1000;
2116
    overflow: hidden;
2117
   -moz-border-radius: 5px 0 0 0;
2118
    -webkit-border-radius: 5px 0 0 0;
2119
    -o-border-radius: 5px 0 0 0;
2120
}
2121
div.quicklist_box_head {
2122
    color:#666666;
2123
    font-size:11px;
2124
    font-weight:bold;
2125
   height: 15px;
2126
   padding: 2px 2px 0 2px;
2127
}
2128
div.quicklist_box div.quicklist_box_head a {
2129
    font-weight: normal;
2130
   color:#333333;
2131
   border: none;
2132
   outline: none;
2133
}
2134
div.quicklist_box div.float-l {
2135
    float: left;
2136
   margin: 1px 3px 1px 1px;
2137
}
2138
div.quicklist_box div.float-r {
2139
    float: right;
2140
}
2141
div.quicklist_box div#quicklist_cont {
2142
    display: block;
2143
    border: 0px solid red;
2144
   background: #FFFFFF;
2145
   padding: 1px;
2146
   max-height: 400px;
2147
   overflow: auto;
2148
}
2149
div.quicklist_box span.video-time {
2150
    background:none repeat scroll 0 0 #333333;
2151
    bottom:4px;
2152
    color:#FFFFFF;
2153
    font-size:9px;
2154
    padding:1px;
2155
    position:absolute;
2156
    right:4px;
2157
    -moz-border-radius: 5px 0 0 5px;
2158
    -webkit-border-radius: 5px 0 0 5px;
2159
    -o-border-radius: 5px 0 0 5px;
2072 2160
}
templates/footer.tpl
27 27
    </div> <!-- footer -->
28 28

  
29 29
</div> <!-- wrapper -->
30
<div class="quicklist_box" id="quicklist_box"></div>
30 31
</body>
31 32
</html>
32 33
<script language="JavaScript" type="text/javascript">
33 34
var baseurl='{$base_url}';
34 35
</script>
35 36
<script language="JavaScript" type="text/javascript" src="{$base_url}/js/vshare.js"></script>
37
<script language="JavaScript" type="text/javascript" src="{$base_url}/js/video_queue.js"></script>
36 38
{$html_extra}
templates/group_add_fav_videos.tpl
28 28
	                        <a href="{$base_url}/view/{$favorite_videos[i].video_id}/{$favorite_videos[i].video_seo_name}/">
29 29
	                            <img src="{$favorite_videos[i].video_thumb_url}/thumb/{$favorite_videos[i].video_folder}1_{$favorite_videos[i].video_id}.jpg" alt="" />
30 30
	                        </a>
31
	                        <div class="video-queue home-video-queue"  id="{$favorite_videos[i].video_id}_favorite" rel="video_queue">&nbsp;</div>
31 32
	                        <div class="video-time">{$favorite_videos[i].video_length}</div>
32 33
	                    </div>
33 34
                    </div>
templates/group_add_videos.tpl
25 25
	                    <a href="{$base_url}/view/{$videos[i].video_id}/{$videos[i].video_seo_name}/">
26 26
	                        <img src="{$videos[i].video_thumb_url}/thumb/{$videos[i].video_folder}1_{$videos[i].video_id}.jpg" alt="" />
27 27
	                    </a>
28
	                    <div class="video-queue home-video-queue"  id="{$videos[i].video_id}_add" rel="video_queue">&nbsp;</div>
28 29
	                    <div class="video-time">{$videos[i].video_length}</div>
29 30
	                </div>
30 31
                </div>
templates/group_home.tpl
178 178
                            <a href="{$base_url}/view/{$group_videos[i].video_id}/{$group_videos[i].video_seo_name}/">
179 179
                                <img src="{$group_videos[i].video_thumb_url}/thumb/{$group_videos[i].video_folder}1_{$group_videos[i].video_id}.jpg" alt="" />
180 180
                            </a>
181
                            <div class="video-queue home-video-queue"  id="{$group_videos[i].video_id}_home" rel="video_queue">&nbsp;</div>
181 182
                            <div class="video-time">{$group_videos[i].video_length}</div>
182 183
                        </div>
183 184
                        <a href="{$base_url}/view/{$group_videos[i].video_id}/{$group_videos[i].video_seo_name}/">
templates/group_videos.tpl
21 21
	                    <a href="{$base_url}/view/{$group_videos[i].video_id}/{$group_videos[i].video_seo_name}/">
22 22
	                        <img src="{$group_videos[i].video_thumb_url}/thumb/{$group_videos[i].video_folder}1_{$group_videos[i].video_id}.jpg" alt="" />
23 23
	                    </a>
24
	                    <div class="video-queue" id="{$group_videos[i].video_id}" rel="video_queue">&nbsp;</div>
24 25
	                    <div class="video-time">{$group_videos[i].video_length}</div>
25 26
	                </div>
26 27

  
templates/index.tpl
40 40
                        <a href="{$base_url}/view/{$view.new_videos[i].video_id}/{$view.new_videos[i].video_seo_name}/">
41 41
                            <img src="{$view.new_videos[i].video_thumb_url}/thumb/{$view.new_videos[i].video_folder}1_{$view.new_videos[i].video_id}.jpg" alt="{$view.new_videos[i].video_title}" />
42 42
                        </a>
43
                        <div class="video-queue home-video-queue"  id="{$view.new_videos[i].video_id}_new" rel="video_queue">&nbsp;</div>
43 44
                        <div class="video-time">{$view.new_videos[i].video_length}</div>
44 45
                    </div>
45 46
                    
......
69 70
                        <a href="{$base_url}/view/{$view.recent_videos[i].video_id}/{$view.recent_videos[i].video_seo_name}/">
70 71
                            <img src="{$view.recent_videos[i].video_thumb_url}/thumb/{$view.recent_videos[i].video_folder}1_{$view.recent_videos[i].video_id}.jpg" alt="{$view.recent_videos[i].video_title}" />
71 72
                        </a>
73
                        <div class="video-queue home-video-queue"  id="{$view.recent_videos[i].video_id}_recent" rel="video_queue">&nbsp;</div>
72 74
                        <div class="video-time" >{$view.recent_videos[i].video_length}</div>
73 75
                    </div>
74 76
                    
templates/index_featured_videos.tpl
14 14
                    <a href="{$base_url}/view/{$featured_videos[i].video_id}/{$featured_videos[i].video_seo_name}/">
15 15
                        <img src="{$featured_videos[i].video_thumb_url}/thumb/{$featured_videos[i].video_folder}1_{$featured_videos[i].video_id}.jpg" alt="{$featured_videos[i].video_title}" />
16 16
                    </a>
17
                    <div class="video-queue home-video-queue"  id="{$featured_videos[i].video_id}_featured" rel="video_queue">&nbsp;</div>
17 18
                    <div class="video-time">{$featured_videos[i].video_length}</div>
18 19
                </div>
19 20
            </div>
templates/search_videos.tpl
22 22
	                <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">
23 23
	                    <img src="{$video_info[i].video_thumb_url}/thumb/{$video_info[i].video_folder}1_{$video_info[i].video_id}.jpg" alt="" />
24 24
	                </a>
25
	                <div class="video-queue" id="{$video_info[i].video_id}" rel="video_queue">&nbsp;</div>
25 26
	                <div class="video-time">{$video_info[i].video_length}</div>
26 27
                </div>
27 28
                
templates/tag.tpl
37 37
					<a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">
38 38
	    				<img src="{$video_info[i].video_thumb_url}/thumb/{$video_info[i].video_folder}1_{$video_info[i].video_id}.jpg" alt="" />
39 39
					</a>
40
					<div class="video-queue" id="{$video_info[i].video_id}" rel="video_queue">&nbsp;</div>
40 41
					<div class="video-time">{$video_info[i].video_length}</div>
41 42
				</div>
42 43
				
templates/user.tpl
308 308
	                       <a href="{$base_url}/view/{$new_video[i].video_id}/{$new_video[i].video_seo_name}/">
309 309
	                           <img src="{$new_video[i].video_thumb_url}/thumb/{$new_video[i].video_folder}1_{$new_video[i].video_id}.jpg" alt="{$new_videos[i].video_title}" />
310 310
	                       </a>
311
	                       <div class="video-queue" id="{$new_video[i].video_id}_new" rel="video_queue">&nbsp;</div>
311 312
	                       <div class="video-time">{$new_video[i].video_length}</div>
312 313
	                   </div>
313 314
	                   
......
334 335
	                           <a href="{$base_url}/view/{$popular[i].video_id}/{$popular[i].video_seo_name}/">
335 336
	                               <img src="{$popular[i].video_thumb_url}/thumb/{$popular[i].video_folder}1_{$popular[i].video_id}.jpg" alt="{$popular[i].video_title}" />
336 337
	                           </a>
338
	                           <div class="video-queue" id="{$popular[i].video_id}_popular" rel="video_queue">&nbsp;</div>
337 339
	                           <div class="video-time">{$popular[i].video_length}</div>
338 340
	                       </div>
339 341
	                       
templates/user_favorites.tpl
18 18
	           	       <a href="{$base_url}/view/{$favVideos[i].video_id}/{$favVideos[i].video_seo_name}/">
19 19
	           	           <img src="{$favVideos[i].video_thumb_url}/thumb/{$favVideos[i].video_folder}1_{$favVideos[i].video_id}.jpg" alt="" />
20 20
	           	       </a>
21
	           	       <div class="video-queue" id="{$favVideos[i].video_id}" rel="video_queue">&nbsp;</div>
21 22
	           	       <div class="video-time">{$favVideos[i].video_length}</div>
22 23
	           	   </div>
23 24

  
templates/user_friends_videos.tpl
17 17
					       <a href="{$base_url}/view/{$videoRows[i].video_id}/{$videoRows[i].video_seo_name}/">
18 18
					           <img src="{$videoRows[i].video_thumb_url}/thumb/{$videoRows[i].video_folder}1_{$videoRows[i].video_id}.jpg" alt="" />
19 19
					       </a>
20
					       <div class="video-queue" id="{$videoRows[i].video_id}" rel="video_queue">
20 21
					       <div class="video-time">{$videoRows[i].video_length}</div>
21 22
					   </div>
22 23
					</div>
templates/user_playlist.tpl
18 18
                        <a href="{$base_url}/view/{$videos[i].video_id}/{$videos[i].video_seo_name}/">
19 19
                            <img src="{$videos[i].video_thumb_url}/thumb/{$videos[i].video_folder}1_{$videos[i].video_id}.jpg" alt="" />
20 20
                        </a>
21
                        <div class="video-queue" id="{$videos[i].video_id}" rel="video_queue">&nbsp;</div>
21 22
                        <div class="video-time">{$videos[i].video_length}</div>
22 23
                    </div>
23 24
                    
templates/user_videos.tpl
26 26
                        <a href="{$base_url}/view/{$view.videos[i].video_id}/{$view.videos[i].video_seo_name}/">
27 27
                            <img src="{$view.videos[i].video_thumb_url}/thumb/{$view.videos[i].video_folder}1_{$view.videos[i].video_id}.jpg" alt="{$view.videos[i].video_title}" />
28 28
                        </a>
29
                        <div class="video-queue" id="{$view.videos[i].video_id}" rel="video_queue">&nbsp;</div>
29 30
                        <div class="video-time">{$view.videos[i].video_length}</div>
30 31
                    </div>
31 32

  
templates/user_videos_ajax.tpl
15 15
				        <a href="{$base_url}/view/{$user_videos[i].video_id}/{$user_videos[i].video_seo_name}/" target="_parent">
16 16
						  <img src="{$user_videos[i].video_thumb_url}/thumb/{$user_videos[i].video_folder}1_{$user_videos[i].video_id}.jpg" alt="{$user_videos[i].video_title}" />
17 17
					   </a>
18
					   <div class="video-queue" id="{$user_videos[i].video_id}_user" rel="video_queue" style="width:77px;">&nbsp;</div>
18 19
					   <div class="video-time">{$user_videos[i].video_length}</div>
19 20
					</div>
20 21
				</div>
......
55 56

  
56 57
	</div>
57 58
	
58
</div>
59
</div>
60
<script language="JavaScript" type="text/javascript" src="{$base_url}/js/video_queue.js"></script>
61

  
62
{literal}
63
<script type="text/javascript">
64
//$(document.ready(function(){
65
    $('div [rel=video_queue]').each(function(){
66
           $(this).click(function(){
67
                 var myClass = new Array();
68
                 myClass['video-queue'] = 'video-queue-info';
69
                 myClass['video-queue-info'] = 'video-queue-info';
70
                 var video_id = $(this).attr('id');
71
                 var class = $(this).attr('class');
72
                 $("#"+video_id).removeClass(class).addClass(myClass[class]);
73
                 $("#"+video_id).html('Added to queue');
74
            });
75
});
76
//});
77
</script>
78
{/literal}
templates/video.tpl
67 67
                        <a href="{$base_url}/view/{$view.videos[i].video_id}/{$view.videos[i].video_seo_name}/">
68 68
                            <img src="{$view.videos[i].video_thumb_url}/thumb/{$view.videos[i].video_folder}1_{$view.videos[i].video_id}.jpg" alt="{$view.videos[i].video_title}" />
69 69
                        </a>
70
                        <div class="video-queue" id="{$view.videos[i].video_id}" rel="video_queue">&nbsp;</div>
70 71
                        <div class="video-time">{$view.videos[i].video_length}</div>
71 72
                    </div>
72 73
                
......
105 106
                            <a href="{$base_url}/view/{$view.videos[i].video_id}/{$view.videos[i].video_seo_name}/">
106 107
                                <img src="{$view.videos[i].video_thumb_url}/thumb/{$view.videos[i].video_folder}1_{$view.videos[i].video_id}.jpg" alt="" />
107 108
                            </a>
109
                            <div class="video-queue" id="{$view.videos[i].video_id}_detail1" rel="video_queue">&nbsp;</div>
108 110
                            <div class="video-time">{$view.videos[i].video_length}</div>
109 111
                        </div>
110 112
                        
......
112 114
                            <a href="{$base_url}/view/{$view.videos[i].video_id}/{$view.videos[i].video_seo_name}/">
113 115
                                <img src="{$view.videos[i].video_thumb_url}/thumb/{$view.videos[i].video_folder}2_{$view.videos[i].video_id}.jpg" alt="" />
114 116
                            </a>
117
                            <div class="video-queue" id="{$view.videos[i].video_id}_detail2" rel="video_queue">&nbsp;</div>
115 118
                            <div class="video-time">{$view.videos[i].video_length}</div>
116 119
                        </div>
117 120
                        
......
119 122
                            <a href="{$base_url}/view/{$view.videos[i].video_id}/{$view.videos[i].video_seo_name}/">
120 123
                                <img src="{$view.videos[i].video_thumb_url}/thumb/{$view.videos[i].video_folder}3_{$view.videos[i].video_id}.jpg" alt="" />
121 124
                            </a>
125
                            <div class="video-queue" id="{$view.videos[i].video_id}_detail3" rel="video_queue">&nbsp;</div>
122 126
                            <div class="video-time">{$view.videos[i].video_length}</div>
123 127
                        </div>
124 128
                    </div>
templates/video_queue.tpl
1
{if $video_info|@count gt '0'}
2

  
3
<div class="quicklist_box_head">
4
    <div class="float-l">Quicklists({$video_info|@count})&nbsp;&nbsp;<a id="ql_remove_all" href="javascript:void(0);"><small>Remove all</small></a></div>
5
    <div class="float-r"><a id="ql_show_hide" href="javascript:void(0)">show / hide</a></div>
6
</div>
7
<div class="clear" id="quicklist_cont">
8
   {section name=i loop=$video_info}
9
       <div class="video-list clear" id="div_{$video_info[i].video_id}">
10
           <div class="float-l">
11
               <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/" style="position: relative;">
12
                   <img src="{$video_info[i].video_thumb_url}/thumb/{$video_info[i].video_folder}/1_{$video_info[i].video_id}.jpg" width="55" height="35" />
13
                   <span class="video-time">{$video_info[i].video_length}</span>
14
               </a>
15
           </div>
16
           
17
           <div class="float-l">
18
               <div class="float-l">
19
                   <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">{$video_info[i].video_title|truncate:30}</a>
20
               </div>
21
               <div class="clear float-l" style="width: 170px;">
22
                   {insert name=id_to_name assign=uname un=$video_info[i].video_user_id}
23
                   {$video_info[i].video_view_number} views &nbsp;&nbsp; <a href="{$base_url}/{$uname}">{$uname}</a>
24
               </div>
25
               <div class="float-l">
26
                  <a rel="ql_remove" id="{$video_info[i].video_id}" href="javascript:void(0);"><img src="{$base_url}/templates/images/del.gif" width="10" height="10" border="0" /></a>
27
               </div>
28
           </div>
29
       </div>
30
   {/section}
31
</div>
32

  
33
{literal}
34
<script type="text/javascript">
35
var dis = '';var show = '';
36
$("div.quicklist_box a#ql_show_hide").click(function(){
37
    $("div#quicklist_cont").slideToggle('fast',function(){
38
         dis = $("div#quicklist_cont").css('display');
39

  
40
           if (dis == 'block')
41
           {
42
               show = 1;
43
           }
44
           
45
           $.COOKIE('show', show);
46
    });
47
});
48

  
49
$("div.quicklist_box a#ql_remove_all").click(function(){
50
   $.COOKIE('video_queue', '');
51
   video_queue_display();
52
});
53

  
54
$("div.quicklist_box a[rel=ql_remove]").each(function(){
55
   $(this).click(function(){
56
       var box = $(this).attr("id");
57
       $("div#div_" + box).remove();
58
       
59
       var sUrl = baseurl + "/ajax/video_queue_remove.php?id=" + box;
60
        $.ajax({
61
            type: "GET",
62
            url: sUrl,
63
            dataType: 'html',
64
            success: function(html){
65
               video_queue_display();
66
            }
67
        });
68
   });
69
});
70

  
71
</script>
72
{/literal}
73

  
74
{/if}
templates/view_video.tpl
372 372
	                        <a href="{$base_url}/view/{$view.related_videos[i].video_id}/{$view.related_videos[i].video_seo_name}/" target="_parent">
373 373
	                           <img src="{$view.related_videos[i].video_thumb_url}/thumb/{$view.related_videos[i].video_folder}1_{$view.related_videos[i].video_id}.jpg" alt="related videos" />
374 374
	                        </a>
375
	                        <div class="video-queue" id="{$view.related_videos[i].video_id}_related" rel="video_queue" style="width:77px;">&nbsp;</div>
375 376
	                        <div class="video-time">{$view.related_videos[i].video_length}</div>
376 377
	                    </div>
377 378
                    </div>
378
-