{ANCHOR }
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
1
{ANCHOR place="after_video_player"}
Copied!
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. 1.
    register_anchor
  2. 2.
    register_anchor_function

Register_Anchor

1
register_anchor(String[text you want to display on this anchor point], String[Anchor place]);
Copied!
now if you want to show a text “Hello World!” , you simply have to do is
1
register_anchor("Hello World!","after_video_player");
Copied!

Register_Anchor_Function

1
register_anchor(String[function name], String[Anchor place]);
Copied!
now if you want to execute a function on place “after_video_player” , here how you will do that
1
register_anchor_function("my_function","after_video_player");
Copied!
and you also have to write my_function code such as
1
function my_function(){ echo "Hello World!"; }
Copied!

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
1
{ANCHOR place='after_video_player' data="This is me, Mickey!"}
Copied!
and the function you want to call is my_function($text) , you just have to do is
1
register_anchor_function("my_function","after_video_player");
2
function my_function($text){ echo "Hello World! ".$text; }
Copied!
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
Loading...
Last modified 12d ago
Copy link