Announcement

Collapse
No announcement yet.

Video Widget

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

  • [CMS] Video Widget

    Is it possible to create a widget that will find and play the most recently uploaded video or a selected uploaded video??

    I would like to play, on my cms page, the latest video uploaded or a selected to my forums similar to YouTube video widget.

    Can someone provide me with the php that I can use in a PHP Direct Execution widget for this?


    Create the widget:
    AdminCP > vBulletin CMS > Widgets > Create New Widget
    Widget Type: PHP Direct Execution Widget
    Title: Video-uploaded
    SAVE

    Now, find your widget in the list and click on Configure Next to it and enter valid PHP into the text area there.

    Using a query: NEED HELP HERE
    PHP Code:

    $myquery = vB::$db->query_first("
    SELECT
    post.threadid, thread.title
    FROM "
    . TABLE_PREFIX . "post AS post
    INNER JOIN "
    . TABLE_PREFIX . "thread AS thread ON (thread.threadid = post.threadid)
    WHERE post.userid = "
    .vB::$vbulletin->userinfo['userid']. "
    ORDER BY post.dateline DESC
    "
    );
    $threadurl = '<a href="' . fetch_seo_url(thread, $myquery) . '" title="'. $myquery[title] .'">'. $myquery[title] .'</a>';
    $output .= "<br />" . $threadurl;
    Last edited by reddyink; Sat 30th Jul '11, 1:39pm.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X