The addition of the "PHPCMS-V9" PHPCMS-V9 video model

Source: Internet
Author: User

1, download the butterfly free Fly plug http://www.phpcms.cn/show-90-8-1.html download back after decompression, cover

phpcms/and statics/directories.

2, execute an SQL statement-V9_player.sql, to increase the player code, note that the table prefix in the SQL statement needs to be replaced with your V9 database prefix, using a text editing tool such as EditPlus Open replace v9_ for your database prefix;

3, the field installation method is: \phpcms\modules\content\fields\fields.inc.php in the file appropriate place to add a line: ' video ' = ' videos field ', must be video, not other names;

4, create a new video model, content page template must choose Show_video.html

5, the new video field, the field prompt is filled out as follows, the purpose is to add a part of the function.: Open field management for the video model in Model Management,

Click "Add Field", the field type is "video field", the field name is "Dizhi", the field alias is "Address", the field prompt column adds the following:

<a href= "javascript:void ();" Title= "empties the number of sets, the system automatically rearranges from the 1th set, applies to the number of episodes in the confusion" > Number of adjustment sets </a>
<a href= "javascript:void ();" title= "Add a line for manual fill > Add a line </a>
<script>
function Vclearjs () {
$ ("Input[name= ' gvod_alt\\[\\]"). attr ("Value", "");
}
function AddOne (Returnid) {
var str = $ (' # ' +returnid). html ();
var ids = parseint (Math.random () * 10000 + 10*i);
str + = "<li id= ' image" +ids+ "' ><input type= ' text ' name= '" +returnid+ "_url[] ' value= ' style= ' width:310px; ' Ondblclick= ' Image_priview (this.value); ' class= ' Input-text ' > <input type= ' text ' name= ' "+returnid+" _alt[] ' Value= ' style= ' width:160px; ' class= ' input-text ' onfocus=\ ' if (this.value = this.defaultvalue) this.value = ' \ ' ONBL Ur=\ "if (This.value.replace (', ') = =") This.value = this.defaultvalue;\ "> <a href=\" Javascript:remove_div (' Image "+ids+" \ "> Remove </a> </li>";
$ (' # ' +returnid). html (str);
}
</script>
Note: All of the Gvod characters need to be replaced by your field name, that is, "Dizhi", remember! You cannot use the number of adjustment sets and the ability to add one line.


Default player Select "FLV", you can also choose other, whether to select "Yes" from the uploaded, other options without modification directly to the default value can be, and then click "Submit", the field is added successfully, the process

5, in the "Management column" to add a column,

6, in the background "extension" in the "menu management" in the "extended" column under the "extension" to add a menu, called " player Management",

7. Modify the show_video.html model: Change all {$gvod} in the model to {$dizhi}

8, the video model plug-in is installed successfully, you can go to your new "news video" column to add content

If you follow the above steps or not installed successfully, don't worry, give you a video tutorial, you can see:http://video.sina.com.cn/v/b/70699378-1599400597.html

Note: If you allow only one video to be uploaded at a time when adding content, you should modify the video/output.calss.php file:


When this is modified, the video address is obtained when using {$dizhi} in the details page

--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- ----

Show off your masterpiece:

Article from: http://blog.csdn.net/yanhui_wei/article/details/7916693


The addition of the "PHPCMS-V9" PHPCMS-V9 video model

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.