Announcement

Collapse
No announcement yet.

Getting Values of bbcode in plugins

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting Values of bbcode in plugins

    Hy,
    I have created a plugin and for some purpose i want to use
    PHP Code:
    {vb:raw code
    inside my plugin so evey time a thread is viewed it send fresh video id to that plugin

  • #2
    code is a variable. In php it would be $code. You would need to set it somewhere. BBCode is not a variable they are formatting tags within a larger variable like $post['text'].

    To get help with custom programming you need to visit www.vbulletin.org.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


    • #3
      Originally posted by Wayne Luke View Post
      code is a variable. In php it would be $code. You would need to set it somewhere. BBCode is not a variable they are formatting tags within a larger variable like $post['text'].

      To get help with custom programming you need to visit www.vbulletin.org.

      I have already posted there but no one is answering

      Here is my plugin code
      PHP Code:
      global $vbulletin$post$thread;

      function 
      video_api_thumb($vid){
      $id $vid;
      $thumbnail_720_url='https://api.dailymotion.com/video/'.$id.'?fields=thumbnail_720_url';
      $json_thumbnail file_get_contents($thumbnail_720_url);
      $get_thumbnail json_decode($json_thumbnailTRUE);
      $thumb=$get_thumbnail['thumbnail_720_url'];
      }
      $postTxt $post['text'];
      $v_code $code;
      $thumb_url video_api_thumb($v_code);

      $templater vB_Template::create('dailymotion_video_api');
      $templater->render();
      vB_Template::preRegister('bbcode_video',array('video_thumb_url' => $thumb_url'video_code' => $v_code)); 
      I have set $code and tried printing it its not returning any value

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X