YaWK  24.1
Yet another WebKit
YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting Class Reference

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

+ Inheritance diagram for YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting:

Public Member Functions

 __construct ($db)
 Load all widget settings from database and fill object. More...
 
 embedPosting ()
 Embed any public facebook posting on your page. More...
 
 init ()
 Init facebook posting. 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

 $fbPostEmbedCode = ""
 
 $fbPostHeading = ""
 
 $fbPostHeight = "265"
 
 $fbPostSubtext = ""
 
 $fbPostWidth = "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 Posting - embed any public facebook posting on your page

Use this widget if you want to embed a facebook posting on your page. You can embed any posting, 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_post.php.

Constructor & Destructor Documentation

◆ __construct()

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::__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_post.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

◆ embedPosting()

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::embedPosting ( )

Embed any public facebook posting on your page.

Embed any public facebook posting on your page

Definition at line 61 of file fb_post.php.

63  { // check if url is set
64  if (isset($this->fbPostEmbedCode) && (!empty($this->fbPostEmbedCode)))
65  { // encode url string
66  $this->fbPostEmbedCode = str_replace("width=\"500\"", "width=\"$this->fbPostWidth\"", $this->fbPostEmbedCode);
67  $this->fbPostEmbedCode = str_replace("height=\"625\"", "height=\"$this->fbPostHeight\"", $this->fbPostEmbedCode);
68  // embed facebook posting
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 Posting: Embed html code is not set or empty.";
75  }

References YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting\$fbPostEmbedCode.

Referenced by YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting\init().

◆ init()

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::init ( )

Init facebook posting.

Facebook Posting Widget

Definition at line 49 of file fb_post.php.

51  {
52  // embed heading
53  echo $this->getHeading($this->fbPostHeading, $this->fbPostSubtext);
54  // embed like Page
55  $this->embedPosting();
embedPosting()
Embed any public facebook posting on your page.
Definition: fb_post.php:61
getHeading($heading, $subtext)
Get widget heading and subtext, return headline.
Definition: widget.php:669

References YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting\embedPosting(), and YAWK\widget\getHeading().

Member Data Documentation

◆ $fbPostEmbedCode

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::$fbPostEmbedCode = ""
Parameters
stringHtml code that you get from facebook

Definition at line 20 of file fb_post.php.

Referenced by YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting\embedPosting().

◆ $fbPostHeading

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::$fbPostHeading = ""
Parameters
objectstring Heading above the facebook posting

Definition at line 26 of file fb_post.php.

◆ $fbPostHeight

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::$fbPostHeight = "265"
Parameters
stringHeight of the posting in px or percent

Definition at line 24 of file fb_post.php.

◆ $fbPostSubtext

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::$fbPostSubtext = ""
Parameters
objectstring Subtext beside the heading

Definition at line 28 of file fb_post.php.

◆ $fbPostWidth

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::$fbPostWidth = "450"
Parameters
stringWidth of the posting in px or percent

Definition at line 22 of file fb_post.php.

◆ $widget

YAWK\WIDGETS\FACEBOOK\POSTING\fbPosting::$widget = ''
Parameters
objectglobal widget object data

Definition at line 18 of file fb_post.php.


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