YaWK  24.1
Yet another WebKit
prezi.php
Go to the documentation of this file.
1 <?php
3 {
4  /**
5  * @details<b>Prezi Widget - embed a prezi presentation on your page.</b>
6  *
7  * <p>Prezi is a modern presentation tool. With this widget, you can
8  * embed any prezi on your page. </p>
9  *
10  *
11  * @author Daniel Retzl <[email protected]>
12  * @copyright 2018 Daniel Retzl
13  * @version 1.0.0
14  * @brief Prezi Widget - embed any prezi presentation on your page
15  */
16  class prezi extends \YAWK\widget
17  {
18  /** @param object global widget object data */
19  public $widget = '';
20  /** @param string Prezi HTML Markup */
21  public $preziHtml = '';
22  /** @param string Title that will be shown above widget */
23  public $preziHeading = '';
24  /** @param string Subtext will be displayed beside title */
25  public $preziSubtext = '';
26 
27  /**
28  * @brief Load all widget settings from database and fill object
29  * @param object $db Database Object
30  * @brief Load all widget settings on object init.
31  */
32  public function __construct($db)
33  {
34  // load this widget settings from db
35  $this->widget = new \YAWK\widget();
37  foreach ($settings as $property => $value) {
38  $this->$property = $value;
39  }
40  }
41 
42  /**
43  * @brief Init and embed prezi widget
44  * @brief Example Widget Init
45  */
46  public function init()
47  { // display heading
48  echo $this->getHeading($this->preziHeading, $this->preziSubtext);
49  // output prezi html code
50  $this->embedPrezi();
51  }
52 
53  /**
54  * @brief embed prezi
55  * @brief Html Markup to embed the prezi presentation
56  */
57  public function embedPrezi()
58  { // check if html markup is set and valid
59  if (isset($this->preziHtml)
60  && (!empty($this->preziHtml))
61  && (is_string($this->preziHtml)))
62  { // output html markup
63  echo $this->preziHtml;
64  }
65  }
66 
67  public function markup()
68  {
69  /*
70  echo '<iframe
71  id="iframe_container"
72  frameborder="0"
73  webkitallowfullscreen=""
74  mozallowfullscreen=""
75  allowfullscreen=""
76  allow="autoplay; fullscreen"
77  width="550"
78  height="400"
79  src="https://prezi.com/embed/dcjy1eieemjl/?bgcolor=ffffff&lock_to_path=0&autoplay=0&autohide_ctrls=0&landing_data=bHVZZmNaNDBIWnNjdEVENDRhZDFNZGNIUE43MHdLNWpsdFJLb2ZHanI0a2R3cmd5QVhqMWtLTUV3TGZnN0pNcGRnPT0&landing_sign=Z8VjbmSXPfIR-zdmkFLgkDRZEu-EjHRhVugJALWgv6M">
80  </iframe>';
81  */
82  }
83  }
84 }
85 ?>
Prezi Widget - embed any prezi presentation on your page.
Definition: prezi.php:16
init()
Init and embed prezi widget.
Definition: prezi.php:45
__construct($db)
Load all widget settings from database and fill object.
Definition: prezi.php:31
Widgets are small, useful tools that you can include everywhere in your website.
Definition: widget.php:22
getWidgetSettingsArray($db)
Get widget settings and return it as array.
Definition: widget.php:69
getHeading($heading, $subtext)
Get widget heading and subtext, return headline.
Definition: widget.php:669
if(isset($_POST['save'])) $settings
$value