给AVS添加描述(how to add a description to a video)
UPDATE
you might need edit few files.
1. add the input field to the tpl file: /templates/frontend/yourcolor/upload_video.tpl
name the field as description
<div class="separator">
<label for="description">Description:</label>
<textarea name="description" id="upload_video_description">{$video.description} </textarea><br />
<span class="expl">Description of video required.</span><br />
<span id="video_tags_error" class="error" style="display: none;">{t c='upload.video_description_empty'}</span>
</div>
2. edit : modules/upload/video.php
below this : $anonymous = $filter->get('video_anonymous');
add: $description = $filter->get('description');
below this: channel = " .$category. ", keyword = '" .mysql_real_escape_string($keywords). "',
add: description = '".mysql_real_escape_string($description)."',
3. edit video.php
find: $sql = "SELECT v.VID, v.UID, v.title, v.channel, v.keyword, v.viewnumber, v.type,
replace with: $sql = "SELECT v.VID, v.UID, v.title, v.channel, v.keyword, v.viewnumber, v.type, v.description,
4. edit: /templates/frontend/yourcolor/video.tpl
find:
<div class="video_addtime">
{insert name=time_range assign=addtime time=$video.addtime}
{$addtime}
</div>
below that add:
<div>
Description: {$video.description}
</div>
step 5
edit:
templates/backend/default/videos_edit.tpl
below
<label for="keyword">Keywords (tags): </label>
<textarea name="keyword">{$video[0].keyword}</textarea><br>
add:
<label for="description">Description: </label>
<textarea name="description">{$video[0].description}</textarea><br>
step 6
edit
siteadmin/modules/videos/edit.php
below:
$keyword = trim($_POST['keyword']);
add:
$description = trim($_POST['description']);
- next -
below:
elseif ( strlen($keyword) < 3 )
$errors[] = 'Video keyword(tags) field cannot be blank!';
add:
elseif ( strlen($description) < 3 )
$errors[] = 'Video Description field cannot be blank!';
- next -
AFTER:
keyword = '" .mysql_real_escape_string($keyword). "',
ADD:
description = '" .mysql_real_escape_string($description). "',
step 7
edit
templates/frontend/your color/edit.tpl
find:
<div class="separator">
<label for="upload_video_keywords">{t c='global.tags'}:</label>
<textarea name="keyword" id="upload_video_keywords">{$video.keyword}</textarea><br />
<span class="expl">{t c='upload.tags_expl'}</span><br />
<span id="video_tags_error" class="error" style="display: none;">{t c='upload.video_tags_empty'}</span>
</div>
add below:
<div class="separator">
<label for="description">Description:</label>
<textarea name="description" id="upload_video_description">{$video.description } </textarea><br />
<span class="expl">Description of video required.</span><br />
<span id="video_tags_error" class="error" style="display: none;">{t c='upload.video_description_empty'}</span>
</div>
step 8
edit
public html/edit.php
find
$thumb = $filter->get('thumb', 'INTEGER');
add below
$description = $filter->get('description');
find
if ( $keyword == '' ) {
$errors[] = $lang['upload.video_tags_empty'];
} else {
$keyword = prepare_string($keyword, false);
}
add below
if ( $description == '' ) {
$errors[] = $lang['upload.video_description_empty'];
}
find
keyword = '".mysql_real_escape_string($keyword)."',
add below
description = '".mysql_real_escape_string($description)."'
step 9
edit
public_html/language/en_US.lang.php
find
$lang['upload.video_file_empty'] = 'Please selected a video file!';
add after
$lang['upload.video_description_empty'] = 'Please enter a video description!';
THIS LAST STEP WITH THE LANGUAGE NEEDS TO BE DONE WITH ALL THE LANGUAGES YOU WILL BE USING
thats all, i'm not including any css part so you might have to adjust the position of the css layout your self. You can do this also for games, by default the game table inside the database dont have description field, you might try to add it your self.
Hope that help, good luck.
This needs to be done in the file 2 times.
Quote
4. edit: /templates/frontend/yourcolor/video.tpl
find:
<div class="video_addtime">
{insert name=time_range assign=addtime time=$video.addtime}
{$addtime}
</div>below that add:
<div>
Description: {$video.description}
</div>
给AVS添加描述(how to add a description to a video)的更多相关文章
- oracle给字段添加描述
oracle中,我们有时候需要给表的字段添加描述.用以下语句即可. alter table a add b varchar2(2); comment on column a.b is '这是表a的字 ...
- [转]Sql Server 给表与字段添加描述
/* 在SQL语句中通过系统存储过sp_addextendedproperty可为表字段添加上动态的说明(备注)下面是SQL SERVER帮助文档中对sp_addextendedproperty存储过 ...
- 向SQL Server 现有表中添加新列并添加描述.
注: sql server 2005 及以上支持. 版本估计是不支持(工作环境2005,2008). 工作需要, 需要向SQL Server 现有表中添加新列并添加描述. 从而有个如下存储过程. (先 ...
- 用sql 语句给字段添加描述
用sql 语句给字段添加描述 IF not exists (SELECT * FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', ...
- delphi XE Datasnap SERVER 在windows 7 下为服务添加描述信息
网上对服务添加描述信息的,多数是用注册表的方式,而注册表的方式,我在win7 下测试,不知为什么,总是不行,把执行的CMD以管理员模式开启,还是没加进去. 于是在网上查到下面的代码,保存供叁考,原文博 ...
- SQL Server 添加描述
添加描述的格式 exec sys.sp_addextendedproperty @name = N'MS_Description' ,@value = 'value',@level0type=N'SC ...
- git 给分支添加描述 管理分支实用方法
1.背景 在我们工作中,正常情况我们处在一个迭代中,一个人最多会有几个功能,比较正常的操作我们会给每个大功能创建不同的分支,方便管理. 我们可以非常愉快的进行版本管理,遇到特殊情况我们也可以方便版本退 ...
- Python可迭代对象中的添加和删除(add,append,pop,remove,insert)
list: classmates = ['Michael', 'Bob', 'Tracy'] classmates.append('Adam') //添加在末尾,没有add()方法 classmate ...
- 添加静态路由 route add -host 子网掩码 -- 在线解析
1.215 ----- R(172.16.0.1) <--------- gw(61.146.164.109) | ...
随机推荐
- sql server 查询日期中的常用语句, 例如本周第一天, 年内的第几周,有用
--本周第一天 SELECT DATEADD(Day,1-(DATEPART(Weekday,getdate())+@@DATEFIRST-1)%7,getdate()) --or s ...
- ie中弹出框中元素的定位
用selenium在ie8浏览器中定位一个弹出框时,直接用ie developer tools可能不一定能定位到,有一个解决的办法是直接在url后面加上#noHide,刷新后,然后再用ie devel ...
- HDOJ 1846 Brave Game
Problem Description 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫<勇敢者的游戏>(英文名称:Zathura),一直到现在,我依然对于电影中 ...
- Codeforces Round #216 (Div. 2) E. Valera and Queries 树状数组 离线处理
题意:n个线段[Li, Ri], m次询问, 每次询问由cnt个点组成,输出包含cnt个点中任意一个点的线段的总数. 由于是无修改的,所以我们首先应该往离线上想, 不过我是没想出来. 首先反着做,先求 ...
- OpenStack简单测试性能监控数据记录
- [置顶] VC++界面编程之--使用分层窗口实现界面皮肤
使用分层界面来实现界面皮肤的好处是:可以保证图片边缘处理不失真,且能用于异形窗口上,如一些不规则的窗口,你很难用SetWindowRgn来达到理想效果. 在很多情况下,界面的漂亮与否,取决于PS的制作 ...
- Android网络:开发浏览器(一)——基本的浏览网页功能开发
我们定义这个版本为1.0版本. 首先,因为要制作一个浏览器,那么就不能通过调用内置浏览器来实现网页的浏览功能,但是可以使用WebView组件来进行. 在此之前,我们可以来看看两种网页显示方式: ...
- javaweb笔记5之请求编码问题
post提交: 设置实体内容的编码:request.setCharacterEncoding("utf-8"); 注意:一定要在获取所有参数之前设置,否则设置无效! get方式提交 ...
- 4th day
老师讲的好快啊... /* 建一个innodb类型且字符集为utf8的表,其中包括以下类型的字段:int(自增长),float,char,varchar,datetime,date,text,enum ...
- poj 3478 The Stable Marriage Problem 稳定婚姻问题
题目给出n个男的和n个女的各自喜欢对方的程度,让你输出一个最佳搭配,使得他们全部人的婚姻都是稳定的. 所谓不稳婚姻是说.比方说有两对夫妇M1,F1和M2,F2,M1的老婆是F1,但他更爱F2;而F2的 ...