diff options
author | Dave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-26 16:07:09 +0000 |
---|---|---|
committer | Dave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-26 16:07:09 +0000 |
commit | a1d056d0bf0a28fc2589995b3eff66d5425dd06d (patch) | |
tree | 44e2e6fd80fc43f1b4b7ef9d62b56deac2f03d46 | |
parent | 413a10665f90bc588b07d3e2a5376fa2f387ba09 (diff) | |
download | elgg-a1d056d0bf0a28fc2589995b3eff66d5425dd06d.tar.gz elgg-a1d056d0bf0a28fc2589995b3eff66d5425dd06d.tar.bz2 |
videos now work for groups
git-svn-id: http://code.elgg.org@6234 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | actions/add.php | 2 | ||||
-rw-r--r-- | manifest.xml | 14 | ||||
-rw-r--r-- | views/default/forms/add.php | 8 | ||||
-rw-r--r-- | views/default/videolist/group_video_header.php | 3 |
4 files changed, 17 insertions, 10 deletions
diff --git a/actions/add.php b/actions/add.php index 528e65269..87f459a3a 100644 --- a/actions/add.php +++ b/actions/add.php @@ -23,7 +23,7 @@ if ($page_owner === false || is_null($page_owner)) { set_page_owner($_SESSION['guid']); } -if($page_owner->type == "group") { +if($page_owner instanceof ElggGroup) { $entity_referer = $page_owner->type.":".$page_owner->getGUID(); } else { $entity_referer = $page_owner->username; diff --git a/manifest.xml b/manifest.xml index d627b963b..52a2dcd48 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <plugin_manifest> - <field key="author" value="Prateek Choudhary" /> - <field key="version" value="1.8" /> - <field key="description" value="Elgg Videolist" /> - <field key="copyright" value="(C) prateek.choudhary 2008-09, Elgg 2010" /> - <field key="licence" value="GNU Public License version 2" /> - <field key="elgg_version" value="2010030101" /> - <field key="admin_interface" value="simple" /> + <field key="author" value="Prateek Choudhary" /> + <field key="version" value="1.8" /> + <field key="description" value="Elgg Videolist" /> + <field key="copyright" value="(C) prateek.choudhary 2008-09, Elgg 2010" /> + <field key="licence" value="GNU Public License version 2" /> + <field key="elgg_version" value="2010030101" /> + <field key="admin_interface" value="simple" /> <field key="elgg_install_state" value="enabled" /> </plugin_manifest> diff --git a/views/default/forms/add.php b/views/default/forms/add.php index 765bb9c09..2ee5d9c2e 100644 --- a/views/default/forms/add.php +++ b/views/default/forms/add.php @@ -30,6 +30,12 @@ if(page_owner_entity() instanceof ElggGroup){ }else{ $access_id = get_default_access(get_loggedin_user()); } +//if it is a group, pull out the group access view +if(page_owner_entity() instanceof ElggGroup){ + $options = group_access_options(page_owner_entity()); +}else{ + $options = ''; +} $title_videourl = get_input('title_videourl'); $Pagecontainer = get_input('page'); $get_addvideourl = get_input('add_videourl'); @@ -149,7 +155,7 @@ $body .= elgg_view('input/tags', array('internalname' => 'videolisttags', 'value $body .= '</label></p>'; $body .= '<p><label>'.elgg_echo("videolist:title_access").'<br />'; -$body .= elgg_view('input/access',array('internalname'=>'access_id', 'value' => $access_id)); +$body .= elgg_view('input/access',array('internalname'=>'access_id', 'value' => $access_id, 'options' => $options)); $body .= '</label></p>'; $body .= elgg_view('input/submit', array('internalname'=>'submit','value'=>elgg_echo('videolist:submit'))); $body .= '</form>'; diff --git a/views/default/videolist/group_video_header.php b/views/default/videolist/group_video_header.php index d3f59b773..dd12d1d96 100644 --- a/views/default/videolist/group_video_header.php +++ b/views/default/videolist/group_video_header.php @@ -6,7 +6,8 @@ $user = page_owner_entity();
$user_name = elgg_view_title($user->name . "'s " . elgg_echo('videos'));
$url = $CONFIG->wwwroot . "pg/videolist/browse/". $user->username . "/";
-if(isloggedin())
+//if the user is a memebr of the group, show find button
+if($user->isMember(get_loggedin_user()))
$upload_link = "<a href=\"{$url}\" class='action_button'>" . elgg_echo('videolist:browsemenu') . '</a>';
else
$upload_link = '';
|