There are three situations when adding videos in phpcms. One is to play on the home page, one is to play on the list page, and the other is to play on the content page. . The difference between playing on the home page and playing on the list page is whether the catid value is fixed or the current catid is obtained. Playing on the home page and list page is achieved by obtaining the player code from the content page and passing in certain values. Therefore, we will first introduce the process of adding videos on the content page.
(1) phpcms background operation steps
1. Check whether your phpcms navigation bar has "Video" menu
If there is no " "Video" menu, you can click "Module Management Options" in the "Module" menu, click "Uninstall" in the "Video Library" row, after updating the cache, find the "Video Library" row as above, click "Install", and update the column again Just cache.
2. After the "Video" menu appears, click the "Apply for Activation" option under the "Video" menu. At this time, the content on the right will require the logging in to register a Shanda account. You can register as required. No more details here. Repeat.
3. After the registration is completed, the correct configuration page will appear (some students may have error messages similar to verification failure, not logged in, etc.). At this time, you can exit phpcms, log in again, or close the browser and open it again. And clear the cache, or restart the computer [These days, restarting the computer can solve many problems])
4. After the above interface appears, it means that the "video" function has been enabled. Click the "Upload Video" option and click "Select File" on the right to upload the video to the phpcms server. The upload is complete when there are 0 seconds left. Click Submit after the upload is complete.
5. Click the "Video Library" option, and you will see that the uploaded video has been added to the right, but the video will not be available until "Approved" is displayed in the "Status" column. During this period, you can click Update Status to view the review process.
At this point, the work of adding videos to the video library has been completed. The next step is to add columns, select the video model, select the corresponding column in the content to add content, and add the video in the video library to the content. Specifically The implementation steps will not be repeated here.
(2) PHP code
1. Click the list page to jump to the content page to play the video
Just add the following code to the content page (if you want to implement more For multi-functions, such as ranking, commenting, sharing, etc., you can find the default video template of PHPcms [the show_video.html file under the content folder under the default folder] and paste the code from it)
<!--视频开始--> <div id="picys" class="plbox"> {if $allow_visitor==1} {if $video[vid]!=""} {player_code('video_player',$video['channelid'],$video['vid'],860,500)} {else} 该视频不存在,请返回! {/if} {else} <CENTER><a href="{APP_PATH}index.php?m=content&c=readpoint&allow_visitor={$allow_visitor}"><font color="red">阅读此信息需要您支付 <B><I>{$readpoint} {if $paytype}元{else}点{/if}</I></B>,点击这里支付</font></a></CENTER> {/if} </div> <!--视频结束-->
二, to realize that clicking the list in the list page will play the video
Just add the following code to the list in the list page (if some students want to realize that the list content in the list page is a thumbnail, it will appear after clicking the thumbnail To play video in the pop-up layer, you only need to put this code into the pop-up layer code. However, if the pop-up layer code is in js, it cannot be implemented because the js data will not be refreshed during the data adjustment process. In this case, only You can create another div in the body, put the pop-up layer code into the div, and use js to get the html in the div)
{pc:content action="lists" catid="$catid" num="4" siteid="$siteid" order="id DESC" moreinfo="1" page="$page"} {loop $data $key $val} {pc:get sql="select vid from v9_video_store where videoid in (select videoid from v9_video_content where contentid=$val[id])" return="data"} {player_code('video_player',1,$data[0][vid],300,300)} {/pc} {/loop} {/pc}
3. Play the video on the homepage
The video code on the homepage is almost the same as the video code on the list page, except that the value of catid is fixed. Because the homepage does not have a passed value of catid, the current catid cannot be obtained and can only be written to a fixed value)
Recommended tutorial: "phpcms"
The above is the detailed content of How to call video in phpcms?. For more information, please follow other related articles on the PHP Chinese website!

PHP CMS 是一种基于 PHP 的开源内容管理系统,用于管理网站内容,其特点包括易用性、强大功能、可扩展性、安全性高和免费开源。它可以节省时间、提升网站质量、增强协作并降低开发成本,广泛应用于新闻网站、博客、企业网站、电子商务网站和社区论坛等各种网站。

phpcms跳转到详情页方法:1、使用header函数来生成跳转链接;2、循环遍历内容列表;3、获取内容的标题和详情页链接;4、生成跳转链接即可。

标题:微信登录集成指南:PHPCMS实战在今天的互联网时代,社交化登录已经成为网站必备的功能之一。微信作为国内最流行的社交平台之一,其登录功能也被越来越多的网站所采用。本文将介绍如何在PHPCMS网站中集成微信登录功能,并提供具体的代码示例。第一步:注册微信开放平台账号首先,我们需要在微信开放平台上注册一个开发者账号,申请相应的开发权限。登录[微信开放平台]

很多站长使用PHPCMS进行二次开发建站,PHP中文网特意推出了phpcms视频教程,大家可以随时随地免费观看视频教程,不需要从百度网盘下载,非常方便。

phpcms有评论功能。phpcms内置评论模块,提供了让网站的浏览者发布自己见解的功能,使得浏览者可以互动,相互交流自己的看法,来增加网站人气。PHPCMS的评论用户留言的功能,同时还增加了审核功能,防止言论中出现违禁词汇等。对网站管理者而言,PHPCMS的评论模块可以方便的管理用户评论,可以根据时间、关键字、是否审核等条件查找并管理留言内容。

phpcms用mysql数据库。phpcms是一个PHP开源网站管理系统,采用PHP+MYSQL做为技术基础进行开发。PHPCMS V9采用OOP方式进行基础运行框架搭建,支持的PHP版本是PHP5及以上、支持的MYSQL版本是MySql 4.1以上版本。

phpcms实现微信登录的方法:1、在根目录新建“wechat.php”;2、在“\phpcms\modules\member\index.php”下增加“public function wechat() {...}”;3、在“foreground.class.php”文件中通过wechat函数判断用户是否登录即可。

phpcms修改站点名称的方法:1、使用管理员登录后台页面;2、在顶部的菜单栏找到“设置”选项单击,然后在左侧的菜单出找到“站点管理”;3、找到需要修改的站点,点击该站点域名右面的修改链接;4、在弹出的窗口中修改站点名称即可。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor
