YaWK  24.1
Yet another WebKit
YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo Class Reference

Facebook Like Page - embed like my facebook page. More...

+ Inheritance diagram for YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo:

Public Member Functions

 __construct ($db)
 Load all widget settings from database and fill object. More...
 
 embedVideo ()
 Embed any public facebook video on your page. More...
 
 init ()
 Init facebook video. More...
 
- Public Member Functions inherited from YAWK\widget
 getHeading ($heading, $subtext)
 Get widget heading and subtext, return headline. More...
 
 getWidgetSettingsArray ($db)
 Get widget settings and return it as array. More...
 
 printObject ()
 Print all object data. More...
 

Public Attributes

 $fbVideoEmbedCode = ""
 
 $fbVideoHeading = ""
 
 $fbVideoHeight = "265"
 
 $fbVideoSubtext = ""
 
 $fbVideoWidth = "450"
 
 $widget = ''
 
- Public Attributes inherited from YAWK\widget
 $data
 
 $date_publish
 
 $date_unpublish
 
 $folder
 
 $id
 
 $marginBottom
 
 $marginTop
 
 $name
 
 $pageID
 
 $position
 
 $published
 
 $sort
 
 $widgetTitle
 
 $widgetType
 

Additional Inherited Members

- Static Public Member Functions inherited from YAWK\widget
static getAllSettingsIntoArray ($db, $widgetID)
 Returns an array with all widget settings data. More...
 
static getAllWidgetTypes ($db)
 Return all widget types as associative array. More...
 
static getCurrentWidgetPath ($db)
 return current widget path More...
 
static getFacebookLikeBox ()
 return the facebook likebox widget More...
 
static getLoginBox ()
 return the user login box widget More...
 
static loadWidgetsOfPage ($db, $page)
 Returns an array of all widgets that are linked with given page->id. More...
 

Detailed Description

Facebook Like Page - embed like my facebook page.

Facebook video - embed any public facebook video on your page

Use this widget if you want to embed a facebook video on your page. You can embed any video, as long as it is public.

Author
Daniel Retzl danie.nosp@m.lret.nosp@m.zl@gm.nosp@m.ail..nosp@m.com
Version
1.0.0

Definition at line 15 of file fb_video.php.

Constructor & Destructor Documentation

◆ __construct()

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::__construct (   $db)

Load all widget settings from database and fill object.

Parameters
object$dbDatabase Object

Load all widget settings on object init.

Definition at line 35 of file fb_video.php.

37  {
38  // load this widget settings from db
39  $this->widget = new \YAWK\widget();
40  $settings = $this->widget->getWidgetSettingsArray($db);
41  foreach ($settings as $property => $value) {
42  $this->$property = $value;
43  }
if(isset($_POST['save'])) $settings
$value

References $db, $settings, $value, and YAWK\widget\getWidgetSettingsArray().

Member Function Documentation

◆ embedVideo()

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::embedVideo ( )

Embed any public facebook video on your page.

Embed any public facebook video on your page

Definition at line 61 of file fb_video.php.

63  { // check if url is set
64  if (isset($this->fbVideoEmbedCode) && (!empty($this->fbVideoEmbedCode)))
65  { // encode url string
66  $this->fbVideoEmbedCode = str_replace("width=\"500\"", "width=\"$this->fbVideoWidth\"", $this->fbVideoEmbedCode);
67  $this->fbVideoEmbedCode = str_replace("height=\"625\"", "height=\"$this->fbVideoHeight\"", $this->fbVideoEmbedCode);
68  // embed facebook video
69  // REMEMBER: this could be blocked by AdBlock Browser Plugins
71  }
72  else
73  { // html embed code is not set - throw msg
74  echo "Unable to load Facebook video: Embed html code is not set or empty.";
75  }

References YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo\$fbVideoEmbedCode.

◆ init()

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::init ( )

Init facebook video.

Facebook video Widget

Definition at line 49 of file fb_video.php.

51  {
52  // embed heading
53  echo $this->getHeading($this->fbVideoHeading, $this->fbVideoSubtext);
54  // embed like Page
55  $this->embedvideo();
getHeading($heading, $subtext)
Get widget heading and subtext, return headline.
Definition: widget.php:669

References YAWK\widget\getHeading().

Member Data Documentation

◆ $fbVideoEmbedCode

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::$fbVideoEmbedCode = ""
Parameters
stringHtml code that you get from facebook

Definition at line 20 of file fb_video.php.

Referenced by YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo\embedVideo().

◆ $fbVideoHeading

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::$fbVideoHeading = ""
Parameters
objectstring Heading above the facebook video

Definition at line 26 of file fb_video.php.

◆ $fbVideoHeight

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::$fbVideoHeight = "265"
Parameters
stringHeight of the video in px or percent

Definition at line 24 of file fb_video.php.

◆ $fbVideoSubtext

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::$fbVideoSubtext = ""
Parameters
objectstring Subtext beside the heading

Definition at line 28 of file fb_video.php.

◆ $fbVideoWidth

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::$fbVideoWidth = "450"
Parameters
stringWidth of the video in px or percent

Definition at line 22 of file fb_video.php.

◆ $widget

YAWK\WIDGETS\FACEBOOK\VIDEO\fbVideo::$widget = ''
Parameters
objectglobal widget object data

Definition at line 18 of file fb_video.php.


The documentation for this class was generated from the following file: