In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to add videos to phpcms. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
How does phpcms add videos?
There are three situations in which videos are added to phpcms, one is played on the home page, one is played on the list page, and the other is played 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 difference between the current catid. To play on the home page and list page is to get the player code from the content page and pass in some values, so the blogger first introduces the process of adding video to the content page.
(1) phpcms backend operation steps
First, check whether your phpcms navigation bar has a "video" menu.
If there is no "Video" menu in the navigation, you can click "Module Management options" in the "Module" menu, click "Uninstall" in the "Video Library" line, and then click "install" to find the "Video Library" line above after updating the cache. Update the column cache again. (the blogger already has a "video" option, so he will no longer demonstrate the uninstall process.)
Second, 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 registrant to register a grand account, and you can register as required. I will not repeat it here.
3. After the registration is completed, the correct configuration page will appear (some students may have errors such as failed verification, not logging in, etc., at this time, you can log out of phpcms, log in or close the browser and open and clear the cache again, or restart the computer [these days, restarting the computer can solve many problems])
Fourth, after the appearance of the interface above, it means that the "video" function has been activated. Click the "upload video" option, and click "Select File" on the right to upload the video to the phpcms server. Upload will be completed with 0 seconds left. Click submit when the upload is completed.
Click the "Video Library" option, and you will see that the uploaded video has been added on the right, but it will not be available until "approved" video is displayed in the "status" column. During this period, you can view the audit process by clicking Update status.
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, and select the corresponding columns in the content to add content, and add videos in the video library to the content. The specific implementation steps will not be described here.
Note: in the "player Management" option, you can adjust the functions of the player, such as automatic playback, whether to play sound, and so on. (changes to these features will greatly improve the user experience)
(2) PHP code
1. Click on the list page to jump to the content page to play the video
1. You can add the following code to the content page (if you want to achieve more features, such as ranking, comment, sharing, etc., you can find the default video template of PHPcms [show_video.html file under the content folder under the default folder], and paste the code from it)
{if $allow_visitor==1} {if $Video [vid]! = ""} {player_code ('video_player',$video [' channelid'], $video ['vid']) 860500)} {else} the video does not exist Please return! {/ if} {else} to read this information, you need to pay {$readpoint} {if $paytype} yuan {else} dot {/ if}, click here to pay {/ if}
Second, click on the list in the list page to play the video.
1. 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, and the pop-up layer plays the video after clicking the thumbnail, just put this code into the pop-up layer code, but it cannot be implemented if the pop-up layer code is in js, because the js data will not be refreshed during the data transfer process. In this case, you can only build another div in body. Put the pop-up layer code in div and fetch the html in div with js)
{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 vid [0] [vid], 300300)} {/ pc} {/ loop} {/ pc}
Third, realize playing the video on the home page.
1. The video code on the home page is almost the same as the video code on the list page, except that the value of catid is fixed, because the home page does not have the value of catid, so it cannot get the current catid and can only write a fixed value.)
Thank you for reading! This is the end of the method of adding video to phpcms. I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.