Fixed : main structure.sql for category column

Fixed : view photo link in activity feeds
Fixed : Private collection display
Removed : Colons from pad video filter
Fixed : The swapped links in download.html
Fixed : Topic post parsing
Removed : Ajax link from Back to topics
Added : Upgrade 2.6 SQL
This commit is contained in:
Fawaz 2011-08-04 11:06:38 +00:00
parent 4bc9ffcece
commit 2dfac5af2a
11 changed files with 18 additions and 15 deletions

1
sql/2.5.1~2.6.txt Normal file
View file

@ -0,0 +1 @@
ALTER TABLE `cb_video` CHANGE `category` `category` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0'

View file

@ -79,7 +79,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}collections` (
`collection_name` varchar(225) NOT NULL, `collection_name` varchar(225) NOT NULL,
`collection_description` text NOT NULL, `collection_description` text NOT NULL,
`collection_tags` text NOT NULL, `collection_tags` text NOT NULL,
`category` varchar(20) NOT NULL, `category` varchar(100) NOT NULL,
`userid` int(10) NOT NULL, `userid` int(10) NOT NULL,
`views` bigint(20) NOT NULL, `views` bigint(20) NOT NULL,
`date_added` datetime NOT NULL, `date_added` datetime NOT NULL,
@ -296,7 +296,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}groups` (
`group_description` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `group_description` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`group_tags` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `group_tags` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`group_url` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `group_url` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`category` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `category` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`group_privacy` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `group_privacy` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`video_type` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `video_type` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`post_type` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `post_type` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
@ -903,7 +903,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}video` (
`file_name` varchar(32) NOT NULL, `file_name` varchar(32) NOT NULL,
`description` text, `description` text,
`tags` mediumtext NOT NULL, `tags` mediumtext NOT NULL,
`category` varchar(20) NOT NULL DEFAULT '0', `category` varchar(100) NOT NULL DEFAULT '0',
`broadcast` varchar(10) NOT NULL DEFAULT '', `broadcast` varchar(10) NOT NULL DEFAULT '',
`location` mediumtext, `location` mediumtext,
`datecreated` date DEFAULT NULL, `datecreated` date DEFAULT NULL,

View file

@ -0,0 +1 @@
ALTER TABLE `{tbl_prefix}video` CHANGE `category` `category` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0'

View file

@ -229,7 +229,7 @@ class cbfeeds
$farr['action_title'] $farr['action_title']
= sprintf(lang('user_has_uploaded_new_photo'),$userlink); = sprintf(lang('user_has_uploaded_new_photo'),$userlink);
$farr['links'][] = array('link'=>videoLink($cbphoto->photo_links($photo,'view_item')),'text'=>lang('view_photo')); $farr['links'][] = array('link'=>($cbphoto->photo_links($photo,'view_item')),'text'=>lang('view_photo'));
$farr['icon'] = 'images.png'; $farr['icon'] = 'images.png';
} }

View file

@ -274,7 +274,7 @@ class Collections extends CBCategory
$cond = ""; $cond = "";
if(!has_access('admin_access',TRUE) && $p['user'] != userid()) if(!has_access('admin_access',TRUE) && $p['user'] != userid())
$cond .= " ".tbl('collections.active')." = 'yes' AND ".tbl('collections.broadcast')." = 'public' "; $cond .= " ".tbl('collections.active')." = 'yes'";
elseif($p['user'] == userid()) elseif($p['user'] == userid())
$cond .= " ".tbl('collections.active')." = 'yes'"; $cond .= " ".tbl('collections.active')." = 'yes'";
else else

View file

@ -164,7 +164,7 @@ class ffmpeg
$opt_av .= " -s {$width}x{$height} -aspect $ratio -padcolor 000000 -padtop $pad_top -padbottom $pad_bottom -padleft $pad_left -padright $pad_right "; $opt_av .= " -s {$width}x{$height} -aspect $ratio -padcolor 000000 -padtop $pad_top -padbottom $pad_bottom -padleft $pad_left -padright $pad_right ";
}else }else
{ {
$opt_av .= "-s {$width}x{$height} -aspect $ratio -vf 'pad=0:0:0:0:black'"; $opt_av .= "-s {$width}x{$height} -aspect $ratio -vf pad=0:0:0:0:black";
} }

View file

@ -2,12 +2,13 @@
<script> <script>
var download_file = '{$vdo.download_file}'; var download_file = '{$vdo.download_file}';
{literal} {literal}
$(document).ready /* $(document).ready
(function() (function()
{ {
setTimeout("location.href='"+download_file+"'",3000); setTimeout("location.href='"+download_file+"'",3000);
} }
) )
*/
{/literal} {/literal}
</script> </script>
@ -21,4 +22,4 @@ var download_file = '{$vdo.download_file}';
{videoLink vdetails=$vdo assign='vidlink'} {videoLink vdetails=$vdo assign='vidlink'}
{assign value=$vdo.download_file var='downloadfile'} {assign value=$vdo.download_file var='downloadfile'}
<p>{$redirectmsg|sprintf:$vidlink:$downloadfile}</p></div> <p>{$redirectmsg|sprintf:$downloadfile:$vidlink}</p></div>

View file

@ -2,7 +2,7 @@
{lang code='photo' assign='object_type'} {lang code='photo' assign='object_type'}
<!-- onClick="get_item(this,'{$object.ci_id}','{$object.collection_id}','{$type}','next');"--> <!-- onClick="get_item(this,'{$object.ci_id}','{$object.collection_id}','{$type}','next');"-->
<div class="moveL" style="width:65%; margin:0px 10px;"> <div class="moveL" style="width:65%; margin:0px 10px;">
{assign var=json value=$photo.photo_details|json_decode}
<div style="background:#f3f3f3; border:1px solid #ccc; padding:10px 0px;"> <div style="background:#f3f3f3; border:1px solid #ccc; padding:10px 0px;">
<div align="center"><a {if $nextLink} {assign var='nextItem' value=$nextLink} {else} {assign var='nextItem' value=$preLink} {/if} <div align="center"><a {if $nextLink} {assign var='nextItem' value=$nextLink} {else} {assign var='nextItem' value=$preLink} {/if}
href="{$cbphoto->photo_links($nextItem.0,'view_item')}" href="{$cbphoto->photo_links($nextItem.0,'view_item')}"

View file

@ -14,14 +14,14 @@
<li {if $mode == "view_report_form"}class="selected"{/if}><a href="{group_link details=$group type='view_report_form'}" onClick="groupsAjax(event,this);" id="gpAllReport"><img src="{$imageurl}/dot.gif" class="redShield"/> Report</a></li> <li {if $mode == "view_report_form"}class="selected"{/if}><a href="{group_link details=$group type='view_report_form'}" onClick="groupsAjax(event,this);" id="gpAllReport"><img src="{$imageurl}/dot.gif" class="redShield"/> Report</a></li>
</ul> </ul>
<div id="ajaxGroupResultContainer"> <div id="ajaxGroupResultContainer">
<div class="groupSep"><span class="SepText"><a href="{group_link details=$group type='view_topics'}" onclick="groupsAjax(event,this)">Back To Topics</a></span></div> <div class="groupSep"><span class="SepText"><a href="{group_link details=$group type='view_topics'}" >Back To Topics</a></span></div>
<div style="height:5px;"></div> <div style="height:5px;"></div>
<div class="topic_post clearfix"> <div class="topic_post clearfix">
<div class="topic_title">{$topic.topic_title}</div> <div class="topic_title">{$topic.topic_title}</div>
{assign var=topic_starter value=$userquery->get_user_details($topic.userid)} {assign var=topic_starter value=$userquery->get_user_details($topic.userid)}
{include file="$style_dir/blocks/user.html" user=$topic_starter block_type="topic_view"} {include file="$style_dir/blocks/user.html" user=$topic_starter block_type="topic_view"}
<div class="moveR topic_content" style="width:88%"> <div class="moveR topic_content" style="width:88%">
{$topic.topic_post} {$topic.topic_post|description}
<div style="height:5px"></div> <div style="height:5px"></div>
<div style="font:normal 10px Tahoma; color:#787878">{lang code="Added"}: {$topic.date_added|niceTime}</div> <div style="font:normal 10px Tahoma; color:#787878">{lang code="Added"}: {$topic.date_added|niceTime}</div>
</div> </div>

View file

@ -22,7 +22,7 @@ $order = tbl("collection_items").".ci_id DESC";
if($cbcollection->is_viewable($c)) if($cbcollection->is_viewable($c))
{ {
$param = array("type"=>$type,"cid"=>$c); $param = array("type"=>$type,"cid"=>$c);
$cdetails = $cbcollection->get_collections($param); $cdetails = $cbcollection->get_collection($c,"AND ".tbl($cbcollection->section_tbl).".type = '$type' ");
if($cdetails) if($cdetails)
{ {
@ -55,10 +55,10 @@ if($cbcollection->is_viewable($c))
$pages->paginate($total_pages,$page); $pages->paginate($total_pages,$page);
assign('objects',$items); assign('objects',$items);
assign("c",$cdetails[0]); assign("c",$cdetails);
assign("type",$type); assign("type",$type);
assign("cid",$c); assign("cid",$c);
subtitle($cdetails[0]['collection_name']); subtitle($cdetails['collection_name']);
} else { } else {
e(lang("collection_not_exists")); e(lang("collection_not_exists"));
$Cbucket->show_page = false; $Cbucket->show_page = false;

View file

@ -109,7 +109,7 @@ if($cbcollection->is_viewable($cid))
} }
} else } else
$Cbucket->show_page = false; $Cbucket->show_page = false;
template_files('view_item.html'); template_files('view_item.html');
display_it(); display_it();
?> ?>