How to write a plugin for the PHPVibe video cms

by @PHPVibe
8 years ago


The PHPVibe plugins 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 it’s 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 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.

function HelloWorld(){
echo _lang("Welcome to my great website");

Now we hook the function to the 'home-start' action present on top of home.php

add_action('home-start', 'HelloWorld');

Sure, you can use very complex logic and code here and on all the other actions, this is just a very simple example.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.