Recent posts
#91
The YouTube logo on the player
One of the most commonly searched queries by our users/webmasters interested in video sharing is "How to remove/get rid of the YouTube logo on YouTube embedded videos." However, achieving this task is challenging, often temporary, and comes with high risks. Not only do you risk limitations imposed by YouTube or being banned from the API, but you may also draw the ire of Google, potentially resulting in removal from its listings.
The typical approach involves creating a proxy file that captures and decodes the link to the YouTube video. However, this method requires constant updates and code changes whenever YouTube modifies its platform. This can be frustrating, and it's advisable to reconsider pursuing this idea.
YouTube advertising on the player
Whenever you embed a YouTube video using their iframe or a supported player, YouTube advertising will still appear on your website. While it may be annoying, content creators are positioned to earn substantial revenue through the Google network.
In such cases, the best choice is to accept and adapt to it.
PHPVibe exclusively employs safe players compliant with YouTube's policies to the fullest extent. Both video ads and the YouTube logo will persist and will not be removed from our CMS.
If you observe our clients attempting to remove these elements, kindly refrain from seeking assistance from us.
The CMS is open source, allowing each owner to customize it according to their needs.
One of the most commonly searched queries by our users/webmasters interested in video sharing is "How to remove/get rid of the YouTube logo on YouTube embedded videos." However, achieving this task is challenging, often temporary, and comes with high risks. Not only do you risk limitations imposed by YouTube or being banned from the API, but you may also draw the ire of Google, potentially resulting in removal from its listings.
The typical approach involves creating a proxy file that captures and decodes the link to the YouTube video. However, this method requires constant updates and code changes whenever YouTube modifies its platform. This can be frustrating, and it's advisable to reconsider pursuing this idea.
YouTube advertising on the player
Whenever you embed a YouTube video using their iframe or a supported player, YouTube advertising will still appear on your website. While it may be annoying, content creators are positioned to earn substantial revenue through the Google network.
In such cases, the best choice is to accept and adapt to it.
PHPVibe exclusively employs safe players compliant with YouTube's policies to the fullest extent. Both video ads and the YouTube logo will persist and will not be removed from our CMS.
If you observe our clients attempting to remove these elements, kindly refrain from seeking assistance from us.
The CMS is open source, allowing each owner to customize it according to their needs.
#92
The PHPVibe do_action() hook is inspired by the hook with the same name used by WordPress.
It allows you to place actions that run on typical requests just as on WordPress.
Common actions in PHPVibe are:
You can hook a function to an action hook using add_action().
Usage:
$tag
(string) (required) The name of the hook you wish to execute.
Default: None
$arg
(mixed) (optional) The list of arguments to send to this hook.
Default: Empty string
It allows you to place actions that run on typical requests just as on WordPress.
Common actions in PHPVibe are:
Code Select
All are located in the file lib/functions.phpYou can hook a function to an action hook using add_action().
Usage:
Code Select
Parameters$tag
(string) (required) The name of the hook you wish to execute.
Default: None
$arg
(mixed) (optional) The list of arguments to send to this hook.
Default: Empty string
#93
add_filter() and apply_filter()
PHPVibe's add__filter() hooks a function to a specific filter action.
Usage:
If you wish to dynamically inject a new title to the PHPVibe page:
Calls the functions added to a filter hook.
The callback functions attached to the filter hook $tag are invoked by calling this function. This function can be used to create a new filter hook by simply calling this function with the name of the new hook specified using the $tag parameter.
Usage:
Useful hooks in PHPVibe
These two hooks may also help a lot (after the SEO hooks explained upper):
PHPVibe's add__filter() hooks a function to a specific filter action.
Usage:
Code Select
Example:If you wish to dynamically inject a new title to the PHPVibe page:
Code Select
PHPVibe's apply_filter()Calls the functions added to a filter hook.
The callback functions attached to the filter hook $tag are invoked by calling this function. This function can be used to create a new filter hook by simply calling this function with the name of the new hook specified using the $tag parameter.
Usage:
Code Select
Example:Code Select
Useful hooks in PHPVibe
These two hooks may also help a lot (after the SEO hooks explained upper):
Code Select
They inject custom css and js in your template file. You can attach an add_filter() to them easily.Code Select
#94
The PHPVibe plugin system is fairly simple to use and code for.
It relies on the hooks and filters present in PHPVibe (very similar to WordPress's system).
The plugin needs to have its own folder name and contain the file plugin.php, it needs to be activated through the 'Plugins' menu in the administration area.
A simple plugin example adding a message at the start of your homepage.
Create /plugins/hello/plugin.php
Top of the file (plugin details, commented):
Create the function returning the message.
In the simplest form ever you can use the language system to modify and translate the message.
It relies on the hooks and filters present in PHPVibe (very similar to WordPress's system).
The plugin needs to have its own folder name and contain the file plugin.php, it needs to be activated through the 'Plugins' menu in the administration area.
A simple plugin example adding a message at the start of your homepage.
Create /plugins/hello/plugin.php
Top of the file (plugin details, commented):
Code Select
Create the function returning the message.
In the simplest form ever you can use the language system to modify and translate the message.
Code Select
Now we hook the function to the 'home-start' action present on top of home.phpCode Select
Sure, you can use very complex logic and code here and on all the other actions, this is just a very simple example. #95
PHPVibe comes with a few simple but efficient conditional functions for components restrictions (all located in lib/functions.php):
is_home() – Returns true if the current page is the homepage
is_video() – Returns true for single video & music pages
is_picture() – Returns true for single image
is_channel() – Returns true for single channel
For all the rest you could use the function is_com($com)
Example:
The structure is RewritenUrl format, Component, arrays of methods.
You could also just
is_home() – Returns true if the current page is the homepage
is_video() – Returns true for single video & music pages
is_picture() – Returns true for single image
is_channel() – Returns true for single channel
For all the rest you could use the function is_com($com)
Example:
Code Select
To see the components you could check the router declarations in index.phpCode Select
The structure is RewritenUrl format, Component, arrays of methods.
You could also just
Code Select
to print the current component. #96
Code Select
The PHPVibe cms uses a tone of web sources, through web sources people can easily generate a video autoembed by submitting just the link.
We will be using the logic of the plugin system to achieve a new source without touching the code from lib/class.providers.php
First, let's add our new source to the supported array of websites.
Code Select
Now let's provide the embed logic for this new example source:
For v5, v6 versions of PHPVibe
Code Select
For PHPVibe v11+
Code Select
So now we have the function that gets the link to the external video source and turns it into an iframe embed.
Let's hook it to the PHPVibe embeds through the filter EmbedModify.
Code Select
Now we have a new source of embeds for our visitors.
If you can scrape, or the source returns details (thumbnails, duration, title, description, tags), you can hook this also:
for PHPVibe 5-6
Code Select
for PHPVibe 11+
Code Select
The function gets hooked to the filter EmbedDetails
Code Select
Now you will be returning video details on the second submission page. #97
OverVideo html ads allow the placing of an html/js ad in the following positions: pre-roll, post-roll, and over-video (as static or annotation).
PHPVibe comes ready with over-video html spots (Available for all local players) and VAST/VPAID ads support for VideoJS.
PHPVibe comes ready with over-video html spots (Available for all local players) and VAST/VPAID ads support for VideoJS.
#98
Check also : Use a VAST file to deliver in-player ads -> https://forums.phpvibe.com/how-tos/use-a-vast-file-to-deliver-in-player-ads/
#99
Videos boot conversions and sales, also show geat ROI and build trust.
With video marketing, you can easily explain everything and engage even the laziest of buyers!
The true "in video" ads used also by YouTube are the VAST/VPAID ads.
To understand what they are please read this.
PHPVibe comes by default with VideoJs's VAST/VPAID plugin (IMA SDK Plugin for Video.js) pre-installed for the player. Adding an ad is as simple as copy/pasting the link to the ad tag in the admin panel.
See some example tags at Google.
With video marketing, you can easily explain everything and engage even the laziest of buyers!
The true "in video" ads used also by YouTube are the VAST/VPAID ads.
To understand what they are please read this.
PHPVibe comes by default with VideoJs's VAST/VPAID plugin (IMA SDK Plugin for Video.js) pre-installed for the player. Adding an ad is as simple as copy/pasting the link to the ad tag in the admin panel.
See some example tags at Google.
Code Select
#100
Delivering a custom video ad to PHPVibe is simple.
You can simply build your VAST file and save it somewhere, then link to it in Settings-> Players
All the rest are set in the video file:
Impression – Where the player should send the impressions (custom tracking link?)
kipoffset="00:00:05″ – The skip value for the ad. If the ad is longer than this time the "Skip Ad" button will show up.
ClickThrough is the url you send the user once he clicks on the ads.
Video files for ads are set in the "MediaFile" tag of the vast xml.
Here is a full sample https://pastebin.com/Meh67CXr
You can simply build your VAST file and save it somewhere, then link to it in Settings-> Players
All the rest are set in the video file:
Impression – Where the player should send the impressions (custom tracking link?)
kipoffset="00:00:05″ – The skip value for the ad. If the ad is longer than this time the "Skip Ad" button will show up.
ClickThrough is the url you send the user once he clicks on the ads.
Video files for ads are set in the "MediaFile" tag of the vast xml.
Here is a full sample https://pastebin.com/Meh67CXr
Code Select