YaWK  24.1
Yet another WebKit
YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive Class Reference

Embed CBA (Cultural Broadcasting Archive) Podcast Player. More...

Public Member Functions

 __construct ($db)
 Load all widget settings from database and fill object. More...
 
 embed ()
 
 init ()
 Initialize: prepare proerties and load javascript. More...
 
 printObject ()
 Print all object data. More...
 
 setProperties ()
 

Public Attributes

 $cbaDescription = ''
 
 $cbaEmbedCode = ''
 
 $cbaHeading = ''
 
 $cbaHeadline = ''
 
 $cbaHeight = ''
 
 $cbaMeta = ''
 
 $cbaPodcast = ''
 
 $cbaSeries = ''
 
 $cbaSocialmedia = ''
 
 $cbaSource = ''
 
 $cbaSubtext = ''
 
 $cbaTitle = ''
 
 $cbaUrl = ''
 
 $cbaWaveform = ''
 
 $cbaWidth = ''
 
 $widget = ''
 

Detailed Description

Embed CBA (Cultural Broadcasting Archive) Podcast Player.

Embed audio player from cultural broadcasting archive.

Cultural Broadcasting Archive is an austrian podcast archive. You can embed any public broadcast and set a few settings like player details, waveform display, social media links and much more. All you need to embed a player, is the URL to the cba podcast.

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

Definition at line 17 of file culturalbroadcasting.php.

Constructor & Destructor Documentation

◆ __construct()

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::__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 57 of file culturalbroadcasting.php.

59  {
60  // load this widget settings from db
61  $this->widget = new \YAWK\widget();
62  $settings = $this->widget->getWidgetSettingsArray($db);
63  foreach ($settings as $property => $value) {
64  $this->$property = $value;
65  }
if(isset($_POST['save'])) $settings
$value

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

Member Function Documentation

◆ embed()

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::embed ( )

Definition at line 182 of file culturalbroadcasting.php.

184  {
185 
186  if (isset($cbaEmbedCode) && (!empty($cbaEmbedCode)))
187  {
188  echo $this->cbaHeadline;
189  echo $cbaEmbedCode;
190  }
191  else
192  {
193  $this->cbaSource = $this->cbaUrl."/embed?".$this->cbaWaveform.$this->cbaTitle.$this->cbaSocialmedia.$this->cbaPodcast.$this->cbaSeries.$this->cbaDescription.$this->cbaMeta;
194  // HTML output
195  echo "
196  <!-- cba stream iframe -->
197  $this->cbaHeadline
198  <iframe width=\"$this->cbaWidth\"
199  height=\"$this->cbaHeight\"
200  src=\"$this->cbaSource\"
201  frameborder=\"0\"
202  scrolling=\"no\"
203  style=\"border:none; width:$this->cbaWidth; height:$this->cbaHeight;\">
204  </iframe>";
205  }

References YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive\$cbaEmbedCode, and YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive\$cbaHeadline.

Referenced by YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive\init().

◆ init()

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::init ( )

◆ printObject()

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::printObject ( )

Print all object data.

(for development and testing purpose)

Definition at line 71 of file culturalbroadcasting.php.

73  {
74  echo "<pre>";
75  print_r($this);
76  echo "</pre>";

◆ setProperties()

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::setProperties ( )

Definition at line 88 of file culturalbroadcasting.php.

90  {
91  // if a heading is set and not empty
92  if (isset($this->cbaHeading) && (!empty($this->cbaHeading)))
93  { // add a h1 tag to heading string
94  $this->cbaHeading = "$this->cbaHeading";
95 
96  // if subtext is set, add <small> subtext to string
97  if (isset($this->cbaSubtext) && (!empty($this->cbaSubtext)))
98  { // build a headline with heading and subtext
99  $this->cbaSubtext = "<small>$this->cbaSubtext</small>";
100  $this->headline = "<h1>$this->cbaHeading&nbsp;"."$this->cbaSubtext</h1>";
101  }
102  else
103  { // build just a headline - without subtext
104  $this->headline = "<h1>$this->cbaHeading</h1>"; // draw just the heading
105  }
106  }
107  else
108  { // leave empty if it's not set
109  $this->headline = '';
110  }
111 
112  /* check if waveform is set to true or false */
113  if ($this->cbaWaveform === "1")
114  {
115  $this->cbaWaveform = "&waveform=true";
116  }
117  else
118  { /* waveform false: adjust height correctly */
119  $this->cbaWaveform = "&waveform=false";
120  }
121 
122  /* is a title set? */
123  if ($this->cbaTitle === "1")
124  {
125  $this->cbaTitle = "&title=true";
126  }
127  else
128  {
129  $this->cbaTitle = "&title=false";
130  }
131 
132  /* is socialmedia set? */
133  if ($this->cbaSocialmedia === "1")
134  {
135  $this->cbaSocialmedia = "&socialmedia=true";
136  }
137  else
138  {
139  $this->cbaSocialmedia = "&socialmedia=false";
140  }
141 
142  /* is series set? */
143  if ($this->cbaSeries === "1")
144  {
145  $this->cbaSeries = "&series_link=true";
146  }
147  else
148  {
149  $this->cbaSeries = "&series_link=false";
150  }
151 
152  /* is podcast set? */
153  if ($this->cbaPodcast === "1")
154  {
155  $this->cbaPodcast = "&subscribe=true";
156  }
157  else
158  {
159  $this->cbaSeries = "&subscribe=false";
160  }
161 
162  /* is description set? */
163  if ($this->cbaDescription === "1")
164  {
165  $this->cbaDescription = "&description=true";
166  }
167  else
168  {
169  $this->cbaDescription = "&description=false";
170  }
171 
172  /* is meta set? */
173  if ($this->cbaMeta === "1")
174  {
175  $this->cbaMeta = "&meta=true";
176  }
177  else
178  {
179  $this->cbaMeta = "&meta=false";
180  }

Referenced by YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive\init().

Member Data Documentation

◆ $cbaDescription

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaDescription = ''
Parameters
stringDescription

Definition at line 44 of file culturalbroadcasting.php.

◆ $cbaEmbedCode

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaEmbedCode = ''
Parameters
stringEmbed Code

Definition at line 48 of file culturalbroadcasting.php.

Referenced by YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive\embed().

◆ $cbaHeading

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaHeading = ''
Parameters
stringHeading

Definition at line 26 of file culturalbroadcasting.php.

◆ $cbaHeadline

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaHeadline = ''
Parameters
stringHeadline

Definition at line 24 of file culturalbroadcasting.php.

Referenced by YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive\embed().

◆ $cbaHeight

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaHeight = ''
Parameters
stringHeight

Definition at line 30 of file culturalbroadcasting.php.

◆ $cbaMeta

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaMeta = ''
Parameters
stringMeta Tags

Definition at line 46 of file culturalbroadcasting.php.

◆ $cbaPodcast

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaPodcast = ''
Parameters
stringPodcast

Definition at line 40 of file culturalbroadcasting.php.

◆ $cbaSeries

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaSeries = ''
Parameters
stringSeries

Definition at line 42 of file culturalbroadcasting.php.

◆ $cbaSocialmedia

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaSocialmedia = ''
Parameters
stringSocialmedia Links

Definition at line 38 of file culturalbroadcasting.php.

◆ $cbaSource

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaSource = ''
Parameters
stringSource URL

Definition at line 50 of file culturalbroadcasting.php.

◆ $cbaSubtext

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaSubtext = ''
Parameters
stringSubtext

Definition at line 28 of file culturalbroadcasting.php.

◆ $cbaTitle

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaTitle = ''
Parameters
stringCBA Title

Definition at line 36 of file culturalbroadcasting.php.

◆ $cbaUrl

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaUrl = ''
Parameters
stringcba podcast URL

Definition at line 22 of file culturalbroadcasting.php.

◆ $cbaWaveform

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaWaveform = ''
Parameters
stringDisplay waveform?

Definition at line 34 of file culturalbroadcasting.php.

◆ $cbaWidth

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$cbaWidth = ''
Parameters
stringWidth

Definition at line 32 of file culturalbroadcasting.php.

◆ $widget

YAWK\WIDGETS\CULTURALBROADCASTING\STREAM\culturalBroadcastingArchive::$widget = ''
Parameters
objectglobal widget object data

Definition at line 20 of file culturalbroadcasting.php.


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