ClipBucket anchors are basically hook points where you can execute your codes via plugins

for example

if you want to call code under your video player, you will simply create or write an anchor after your player code as follows

{ANCHOR place="after_video_player"}

now if you want to call code at this anchor, you will simply “register anchor code” or “anchor function”

there are two functions for registering codes for anchor points

  1. register_anchor
  2. register_anchor_function

Register_Anchor

register_anchor(String[text you want to display on this anchor point], String[Anchor place]);  

now if you want to show a text “Hello World!” , you simply have to do is

 register_anchor("Hello World!","after_video_player");

Register_Anchor_Function

register_anchor(String[function name], String[Anchor place]);  

now if you want to execute a function on place “after_video_player” , here how you will do that

register_anchor_function("my_function","after_video_player");

and you also have to write my_function code such as

 function my_function(){ echo "Hello World!"; }  

Passing Parameters To Function Via Anchor

if you want to pass paramters to function via anchor, its really simple. First you have to add a paramter in anchor function

{ANCHOR place='after_video_player' data="This is me, Mickey!"}

and the function you want to call is my_function($text) , you just have to do is

register_anchor_function("my_function","after_video_player");
function my_function($text){ echo "Hello World! ".$text;  }

it will show the whole phrase as “Hello World! This is me, Mickey”;

Hope i have cleared the mystery of our Anchor points, need more help regarding this , please leave a comment or discuss it on forums.clip-bucket.com

Tags:
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.00 out of 5)
Loading...