From 059badecbc0be895c6165430e5096a9ab653027e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 15 Mar 2014 14:56:18 -0300 Subject: Squashed 'mod/livestream/' content from commit 89d1f38 git-subtree-dir: mod/livestream git-subtree-split: 89d1f3877f241f34e3ed3baad3c9ee9a4fee79e7 --- views/default/delete.php | 37 ++++++++++++++++ views/default/list.php | 15 +++++++ .../default/livestream/groupprofile_livestream.php | 32 ++++++++++++++ views/default/new.php | 27 ++++++++++++ views/default/object/list.php | 14 ++++++ views/default/object/livestream.php | 38 ++++++++++++++++ views/default/view.php | 50 ++++++++++++++++++++++ 7 files changed, 213 insertions(+) create mode 100755 views/default/delete.php create mode 100755 views/default/list.php create mode 100755 views/default/livestream/groupprofile_livestream.php create mode 100755 views/default/new.php create mode 100755 views/default/object/list.php create mode 100755 views/default/object/livestream.php create mode 100755 views/default/view.php (limited to 'views') diff --git a/views/default/delete.php b/views/default/delete.php new file mode 100755 index 000000000..b6121e9ce --- /dev/null +++ b/views/default/delete.php @@ -0,0 +1,37 @@ + +
+
+ +

+ +

+ + +guid){ + echo elgg_view( + 'input/hidden', + array( + 'internalname' => 'stream_id', + 'options_values' => $options, + 'value' => $item->guid + ) + ); + } +?> + +

+ +
+
diff --git a/views/default/list.php b/views/default/list.php new file mode 100755 index 000000000..a5b10465e --- /dev/null +++ b/views/default/list.php @@ -0,0 +1,15 @@ + 'object', + 'subtype' => 'livestream', + 'container_guids' => Array($page_owner->guid), + 'offset' => $offset, + 'limit' => 4 +); + +echo elgg_list_entities($options); + +?> \ No newline at end of file diff --git a/views/default/livestream/groupprofile_livestream.php b/views/default/livestream/groupprofile_livestream.php new file mode 100755 index 000000000..6cb8378a9 --- /dev/null +++ b/views/default/livestream/groupprofile_livestream.php @@ -0,0 +1,32 @@ + 'object', + 'subtype' => 'livestream', + 'container_guid' => elgg_get_page_owner_guid(), + 'limit' => 6, + 'full_view' => false, + 'pagination' => false, +); + + +$content = elgg_list_entities($options); +$new_link = elgg_view('output/url', array( + 'href' => $CONFIG->wwwroot.'livestream/'.$page_owner->username.'/new/', + 'text' => elgg_echo('livestream:new_item'), +)); +$viewall_link = elgg_view('output/url', array( + 'href' => $CONFIG->wwwroot . "livestream/" . $page_owner->username, + 'text' => elgg_echo('livestream:viewall'), +)); + +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('livestream:group'), + 'content' => $content, + 'add_link' => $new_link, + 'all_link' => $viewall_link +)); + + +?> diff --git a/views/default/new.php b/views/default/new.php new file mode 100755 index 000000000..e318f70fd --- /dev/null +++ b/views/default/new.php @@ -0,0 +1,27 @@ +".elgg_view('input/text', array('internalname' => 'title', 'value' => ''))."
"; + $form_body.= elgg_echo("livestream:type")."
".elgg_view('input/radio', array('internalname' => 'mediatype', 'value' => '', 'options' => livestream_gettypes()))."
"; + $form_body.= elgg_echo("livestream:src").elgg_view('input/text', array('internalname' => 'src', 'value' => ''))."
"; + $form_body.= elgg_echo("livestream:width").elgg_view('input/text', array('internalname' => 'width', 'value' => '80'))."
"; + $form_body.= elgg_echo("livestream:height").elgg_view('input/text', array('internalname' => 'height', 'value' => '50'))."
"; + $form_body.= elgg_view( + 'input/hidden', + array( + 'internalname' => 'container_guid', + 'options_values' => $options, + 'value' => $vars['entity']->container_id?(int)$vars['entity']->container_id : page_owner() + ) + ); + $form_body.= ""; + echo elgg_view('input/form', array('body' => $form_body, 'action' => $vars['url']."action/livestream/new")); + + //$object = new ElggObject(); +?> diff --git a/views/default/object/list.php b/views/default/object/list.php new file mode 100755 index 000000000..9ab6789bd --- /dev/null +++ b/views/default/object/list.php @@ -0,0 +1,14 @@ + +
+ wwwroot."livestream/".$owner->username."/view/".$item->guid."\">".$item->title." + + "; + + echo elgg_echo($row); + +?> diff --git a/views/default/object/livestream.php b/views/default/object/livestream.php new file mode 100755 index 000000000..ea500aa10 --- /dev/null +++ b/views/default/object/livestream.php @@ -0,0 +1,38 @@ +guid); + + +//foreach($data as $x => $item){ + $src = $item->src; + + $owner = livestream_get_owner($item); + + /* the following html code raises this funny notice + * + * NOTICE: SELECT e.* from elgg_users_entity u join elgg_entities e on e.guid=u.guid where + * + * u.username='com.fluendo.player.Cortado.class' + * + * and ( (e.access_id = -2\n\t\t\tAND e.owner_guid + * IN (\n\t\t\t\tSELECT guid_one FROM + * elgg_entity_relationships\n\t\t\t\tWHERE relationship='friend' AND guid_two=6\n\t\t\t)) + * OR (e.access_id IN (2,1,4,5,6)\n\t\t\tOR (e.owner_guid = 6)\n\t\t\tOR + * (\n\t\t\t\te.access_id = 0\n\t\t\t\tAND e.owner_guid = 6\n\t\t\t)\n\t\t) + * and e.enabled='yes') results cached, referer: + * http://localhost/lorea/elgg/livestream/alice + * + * */ + + $player = "wwwroot."livestream/".$owner->username."/view/".$item->guid."\">".$item->title.""; + + $row = " +
+ $player +
+ "; + + + echo elgg_echo($row); +//} + +?> diff --git a/views/default/view.php b/views/default/view.php new file mode 100755 index 000000000..4c13dfbab --- /dev/null +++ b/views/default/view.php @@ -0,0 +1,50 @@ +src; + /* the following html code raises this funny notice + * + * NOTICE: SELECT e.* from elgg_users_entity u join elgg_entities e on e.guid=u.guid where + * + * u.username='com.fluendo.player.Cortado.class' + * + * and ( (e.access_id = -2\n\t\t\tAND e.owner_guid + * IN (\n\t\t\t\tSELECT guid_one FROM + * elgg_entity_relationships\n\t\t\t\tWHERE relationship='friend' AND guid_two=6\n\t\t\t)) + * OR (e.access_id IN (2,1,4,5,6)\n\t\t\tOR (e.owner_guid = 6)\n\t\t\tOR + * (\n\t\t\t\te.access_id = 0\n\t\t\t\tAND e.owner_guid = 6\n\t\t\t)\n\t\t) + * and e.enabled='yes') results cached, referer: + * http://localhost/lorea/elgg/livestream/alice + * + * */ + + $autoplay = ($item->autoplay) ? "autoplay" : ""; + + $row = " +
+ $item->title
+ +
+
+ "; + + echo elgg_echo($row); +} + + +?> -- cgit v1.2.3