aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-03 20:37:47 +0100
committerSem <sembrestels@riseup.net>2011-11-03 20:37:47 +0100
commita8e625f47a8b197f6cb89b67f37ef5d0a756619d (patch)
tree1f1df7f065d8c2961d33eb58d2ff484d5dfe4108
parentde84bf42063eae58bd5832d125c6445b5315baaf (diff)
downloadelgg-a8e625f47a8b197f6cb89b67f37ef5d0a756619d.tar.gz
elgg-a8e625f47a8b197f6cb89b67f37ef5d0a756619d.tar.bz2
Removed all $CONFIG and pg/ appearitions.
-rw-r--r--actions/add.php4
-rw-r--r--actions/edit.php6
-rw-r--r--actions/tubesearch.php9
-rw-r--r--all.php4
-rw-r--r--browse.php6
-rw-r--r--edit.php6
-rw-r--r--friends.php4
-rw-r--r--index.php8
-rw-r--r--new.php5
-rw-r--r--start.php42
-rw-r--r--views/default/forms/browsetube.php6
-rw-r--r--views/default/object/videolist.php10
-rw-r--r--views/default/staticvideo/index.php2
-rw-r--r--views/default/videolist/group_video_header.php4
-rw-r--r--views/default/videolist/groupprofile_videolist.php10
-rw-r--r--views/default/videolist/icon.php8
-rw-r--r--watch.php9
17 files changed, 60 insertions, 83 deletions
diff --git a/actions/add.php b/actions/add.php
index 87f459a3a..4fd6481ae 100644
--- a/actions/add.php
+++ b/actions/add.php
@@ -189,7 +189,7 @@ else if($pageContainer == "vimeo"){
// Before we can set metadata, we need to save the video
if (!$videolist->save()) {
register_error(elgg_echo("videolist:error"));
- forward("pg/videolist/new");
+ forward("videolist/new");
}
//add video tags
$videolist_tags_array = string_to_tag_array($_SESSION['videolisttags']);
@@ -208,7 +208,7 @@ unset($_SESSION['candidate_profile_video_access_id']); unset($_SESSION['candidat
unset($_SESSION['videolisttags']);unset($_SESSION['Pagecontainer']);
// Forward to the main videolist page
-forward("pg/videolist/owned/".page_owner_entity()->username);
+forward("videolist/owned/".page_owner_entity()->username);
// Remove the videolist cache
unset($_SESSION['candidate_profile_video_access_id']); unset($_SESSION['candidate_profile_video']);
diff --git a/actions/edit.php b/actions/edit.php
index 46df32e16..3aa536e4c 100644
--- a/actions/edit.php
+++ b/actions/edit.php
@@ -2,8 +2,6 @@
/**
* Elgg video edit
*/
-
-global $CONFIG;
// Get variables
$title = strip_tags(get_input("title_videourl"));
@@ -14,7 +12,7 @@ $guid = (int) get_input('video_guid');
if (!$video = get_entity($guid)) {
register_error(elgg_echo("videolist:noentity"));
- forward($CONFIG->wwwroot . "pg/videolist/" . $_SESSION['user']->username);
+ forward(elgg_get_site_url() . "videolist/" . $_SESSION['user']->username);
exit;
}
@@ -39,4 +37,4 @@ if ($result)
else
register_error(elgg_echo("videolist:editfailed"));
-forward($_SERVER['HTTP_REFERER']); \ No newline at end of file
+forward($_SERVER['HTTP_REFERER']);
diff --git a/actions/tubesearch.php b/actions/tubesearch.php
index 82f946ab6..761bbb41e 100644
--- a/actions/tubesearch.php
+++ b/actions/tubesearch.php
@@ -30,7 +30,6 @@ if ($page_owner === false || is_null($page_owner)) {
set_page_owner($_SESSION['guid']);
}
-global $CONFIG;
$queryFeed = get_input('q');
$start_index = get_input('start_index');
$results_perpage = 10;
@@ -116,7 +115,7 @@ if (!isset($queryFeed) || empty($queryFeed)) {
$body .= "<b>Description : </b>".substr($media->group->description, 0, 140)." ...</p>";
$body .= '</td>';
- $body .= "<td class='video_actions'><a class='action_button small' onclick=\"javascript:showV_idFeed('".$showEncodedVideo."', ".$k.")\">".elgg_echo('videolist:play:video')."</a> <a class='action_button small' href=\"".$CONFIG->wwwroot."pg/videolist/new/".$container."/title_videourl/".$vid_array[1]."/page/".$queryCatgory."\">".elgg_echo('videolist:add:video')."</a></td>";
+ $body .= "<td class='video_actions'><a class='action_button small' onclick=\"javascript:showV_idFeed('".$showEncodedVideo."', ".$k.")\">".elgg_echo('videolist:play:video')."</a> <a class='action_button small' href=\"".elgg_get_site_url()."videolist/new/".$container."/title_videourl/".$vid_array[1]."/page/".$queryCatgory."\">".elgg_echo('videolist:add:video')."</a></td>";
$body .= '</tr>';
$body .= '</table></div>';
@@ -208,7 +207,7 @@ if (!isset($queryFeed) || empty($queryFeed)) {
$body .= "<p class='entity_subtext'><b>Description : </b>".$desc_src."</p>";
$body .= '</td>';
- $body .= "<td class='video_actions'><a class='action_button small' onclick=\"javascript:showV_idFeedMetacafe('".$showEncodedVideo."', ".$k.")\">".elgg_echo('videolist:play:video')."</a> <a class='action_button small' href=\"".$CONFIG->wwwroot."pg/videolist/new/".$container."/title_videourl/".$metacafevideoIdArray[0]."/page/".$queryCatgory."\">".elgg_echo('videolist:add:video')."</a></td>";
+ $body .= "<td class='video_actions'><a class='action_button small' onclick=\"javascript:showV_idFeedMetacafe('".$showEncodedVideo."', ".$k.")\">".elgg_echo('videolist:play:video')."</a> <a class='action_button small' href=\"".elgg_get_site_url()."videolist/new/".$container."/title_videourl/".$metacafevideoIdArray[0]."/page/".$queryCatgory."\">".elgg_echo('videolist:add:video')."</a></td>";
$body .= '</tr>';
$body .= '</table>';
@@ -301,7 +300,7 @@ if (!isset($queryFeed) || empty($queryFeed)) {
$body .= "<b>Tags : </b>".implode(', ', $aTags)."</p>";
$body .= '</td>';
- $body .= "<td class='video_actions'><a class='action_button small' onclick=\"javascript:showV_idFeedVimeo('".$embedidArray[0]."', ".$k.")\">".elgg_echo('videolist:play:video')."</a> <a class='action_button small' href=\"".$CONFIG->wwwroot."pg/videolist/new/".$container."/title_videourl/".$embedidArray[0]."/page/".$queryCatgory."\">".elgg_echo('videolist:add:video')."</a></td>";
+ $body .= "<td class='video_actions'><a class='action_button small' onclick=\"javascript:showV_idFeedVimeo('".$embedidArray[0]."', ".$k.")\">".elgg_echo('videolist:play:video')."</a> <a class='action_button small' href=\"".elgg_get_site_url()."videolist/new/".$container."/title_videourl/".$embedidArray[0]."/page/".$queryCatgory."\">".elgg_echo('videolist:add:video')."</a></td>";
$body .= '</tr>';
$body .= '</table>';
@@ -314,4 +313,4 @@ if (!isset($queryFeed) || empty($queryFeed)) {
}
}
-exit; \ No newline at end of file
+exit;
diff --git a/all.php b/all.php
index 98b180525..caccd7c3e 100644
--- a/all.php
+++ b/all.php
@@ -22,7 +22,7 @@ if ($page_owner === false || is_null($page_owner)) {
$title = sprintf(elgg_echo("videolist:search"));
// get the filter menu
-$friend_link = $CONFIG->wwwroot . "pg/videolist/friends/" . $page_owner->username;
+$friend_link = elgg_get_site_url() . "videolist/friends/" . $page_owner->username;
// Get objects
$area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'videolist', 'friend_link' => $friend_link));
set_input('show_viewtype', 'all');
@@ -41,4 +41,4 @@ set_context('videolist');
$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3);
// Finally draw the page
-page_draw($title, $body); \ No newline at end of file
+page_draw($title, $body);
diff --git a/browse.php b/browse.php
index c8314b9c6..2392ef19a 100644
--- a/browse.php
+++ b/browse.php
@@ -8,8 +8,6 @@
* @author Prateek Choudhary <synapticfield@gmail.com>
* @copyright Prateek Choudhary
*/
-
-global $CONFIG;
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
@@ -33,7 +31,7 @@ if(isset($container_guid) && !empty($container_guid)) {
}
}
-elgg_push_breadcrumb(elgg_echo('videolist:find'), $CONFIG->wwwroot."mod/videolist/all.php");
+elgg_push_breadcrumb(elgg_echo('videolist:find'), elgg_get_site_url()."videolist/all/");
elgg_push_breadcrumb(elgg_echo("videolist:browsemenu"));
$title = elgg_echo("videolist:browsemenu");
@@ -48,4 +46,4 @@ $area3 = elgg_view('annotation/latest_comments', array('comments' => $comments))
$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3);
-page_draw($title, $body); \ No newline at end of file
+page_draw($title, $body);
diff --git a/edit.php b/edit.php
index b94e49275..cc06dd9c4 100644
--- a/edit.php
+++ b/edit.php
@@ -26,8 +26,8 @@ if ($video_file = get_entity($video_file)) {
if ($video_file->canEdit()) {
// set up breadcrumbs
- elgg_push_breadcrumb(elgg_echo('videolist:all'), $CONFIG->wwwroot."mod/videolist/all.php");
- elgg_push_breadcrumb(sprintf(elgg_echo("videolist:user"),$page_owner->name), $CONFIG->wwwroot."pg/videolist/".$page_owner->username);
+ elgg_push_breadcrumb(elgg_echo('videolist:all'), elgg_get_site_url()."videolist/all.php");
+ elgg_push_breadcrumb(sprintf(elgg_echo("videolist:user"),$page_owner->name), elgg_get_site_url()."videolist/".$page_owner->username);
elgg_push_breadcrumb(sprintf(elgg_echo("videolist:edit")));
$area1 = elgg_view('navigation/breadcrumbs');
@@ -40,4 +40,4 @@ if ($video_file = get_entity($video_file)) {
forward();
}
-?> \ No newline at end of file
+?>
diff --git a/friends.php b/friends.php
index d9e84e896..8d90ae1a3 100644
--- a/friends.php
+++ b/friends.php
@@ -11,8 +11,6 @@
// Start engine
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
-global $CONFIG;
$page_owner = page_owner_entity();
if ($page_owner === false || is_null($page_owner)) {
@@ -21,7 +19,7 @@ if ($page_owner === false || is_null($page_owner)) {
}
// get the filter menu
-$friend_link = $CONFIG->wwwroot . "pg/videolist/friends/" . $page_owner->username;
+$friend_link = elgg_get_site_url() . "videolist/friends/" . $page_owner->username;
// get the filter menu
$area1 = elgg_view("page_elements/content_header", array('context' => "friends", 'type' => 'videolist', 'friend_link' => $friend_link));
diff --git a/index.php b/index.php
index 0c78470f3..4ca5495e1 100644
--- a/index.php
+++ b/index.php
@@ -8,8 +8,6 @@
* @author Prateek Choudhary <synapticfield@gmail.com>
* @copyright Prateek Choudhary
*/
-
-global $CONFIG;
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
@@ -32,14 +30,14 @@ if(isset($container_guid) && !empty($container_guid)) {
}
}
-elgg_push_breadcrumb(elgg_echo('videolist:find'), $CONFIG->wwwroot."mod/videolist/all.php");
+elgg_push_breadcrumb(elgg_echo('videolist:find'), elgg_get_site_url()."videolist/all");
elgg_push_breadcrumb(sprintf(elgg_echo("videolist:home"),$page_owner->name));
$title = sprintf(elgg_echo("videolist:home"), "$owner->name");
//set videolist header
if(page_owner() == get_loggedin_userid()) {
// get the filter menu
- $friend_link = $CONFIG->wwwroot . "pg/videolist/friends/" . $page_owner->username;
+ $friend_link = elgg_get_site_url() . "videolist/friends/" . $page_owner->username;
$area1 .= elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'videolist', 'friend_link' => $friend_link));
}elseif(page_owner_entity() instanceof ElggGroup){
$area1 .= elgg_view('navigation/breadcrumbs');
@@ -67,4 +65,4 @@ set_context('videolist');
$body = elgg_view_layout('one_column_with_sidebar', $area1.$area2, $area3);
// Finally draw the page
-page_draw($title, $body); \ No newline at end of file
+page_draw($title, $body);
diff --git a/new.php b/new.php
index 169a48fb5..881fba6ff 100644
--- a/new.php
+++ b/new.php
@@ -9,7 +9,6 @@
* @copyright Prateek Choudhary
*/
-global $CONFIG;
// Render the video upload page
// Load Elgg engine
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
@@ -39,7 +38,7 @@ if(isset($container_guid) && !empty($container_guid)){
$title = sprintf(elgg_echo("videolist:add"));
//set up breadcrumbs
-elgg_push_breadcrumb(elgg_echo('videolist:all'), $CONFIG->wwwroot."mod/videolist/all.php");
+elgg_push_breadcrumb(elgg_echo('videolist:all'), elgg_get_site_url()."videolist/all/");
elgg_push_breadcrumb(elgg_echo("videolist:add"));
$area1 = elgg_view('navigation/breadcrumbs');
@@ -47,4 +46,4 @@ $area1 .= elgg_view('page_elements/content_header', array('context' => "action",
$area2 .= elgg_view("forms/add");
$body = elgg_view_layout('one_column_with_sidebar', $area1 . $area2, $area3);
-page_draw($title, $body); \ No newline at end of file
+page_draw($title, $body);
diff --git a/start.php b/start.php
index 9e8f73f92..ad2985e4a 100644
--- a/start.php
+++ b/start.php
@@ -12,15 +12,14 @@
register_elgg_event_handler('init','system','videolist_init');
function videolist_init() {
- global $CONFIG;
- add_menu(elgg_echo('videolist'), $CONFIG->wwwroot . "mod/videolist/all.php");
+ add_menu(elgg_echo('videolist'), elgg_get_site_url() . "videolist/all");
// Extend system CSS with our own styles
elgg_extend_view('css','videolist/css');
// Load the language file - default is english
- register_translations($CONFIG->pluginspath . "videolist/languages/");
+ register_translations(elgg_get_plugins_path() . "videolist/languages/");
// Register a page handler, so we can have nice URLs
register_page_handler('videolist','videolist_page_handler');
@@ -63,10 +62,10 @@ function videolist_init() {
register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook');
// Register actions
- register_action("videolist/add", $CONFIG->pluginspath . "videolist/actions/add.php");
- register_action("videolist/edit", $CONFIG->pluginspath . "videolist/actions/edit.php");
- register_action("videolist/tubesearch", $CONFIG->pluginspath . "videolist/actions/tubesearch.php");
- register_action("videolist/delete", $CONFIG->pluginspath . "videolist/actions/delete.php");
+ register_action("videolist/add", elgg_register_plugins_path() . "videolist/actions/add.php");
+ register_action("videolist/edit", elgg_register_plugins_path() . "videolist/actions/edit.php");
+ register_action("videolist/tubesearch", elgg_register_plugins_path() . "videolist/actions/tubesearch.php");
+ register_action("videolist/delete", elgg_register_plugins_path() . "videolist/actions/delete.php");
}
/**
@@ -117,45 +116,41 @@ function videolist_page_handler($page) {
function videolist_pagesetup() {
- global $CONFIG;
$page_owner = page_owner_entity();
if ($page_owner instanceof ElggGroup && get_context() == "groups") {
- //add_submenu_item(sprintf(elgg_echo("videolist:group"), page_owner_entity()->name), $CONFIG->wwwroot . "pg/videolist/owned/" . page_owner_entity()->username);
+ //add_submenu_item(sprintf(elgg_echo("videolist:group"), page_owner_entity()->name), elgg_get_site_url() . "videolist/owned/" . page_owner_entity()->username);
} else if (get_context() == "videolist") {
/**********************************************************************************************
****if user is OR is not registered user then show him following page menus to choose from
***********************************************************************************************/
/*
- add_submenu_item(elgg_echo('videolist:home'),$CONFIG->wwwroot."pg/videolist/". $page_owner->username);
+ add_submenu_item(elgg_echo('videolist:home'),elgg_get_site_url()."videolist/". $page_owner->username);
- add_submenu_item(elgg_echo('videolist:new'),$CONFIG->wwwroot."pg/videolist/new");
+ add_submenu_item(elgg_echo('videolist:new'),elgg_get_site_url()."videolist/new");
- add_submenu_item(elgg_echo('videolist:find'),$CONFIG->wwwroot."pg/videolist/search/");
+ add_submenu_item(elgg_echo('videolist:find'),elgg_get_site_url()."videolist/search/");
*/
} else if (get_context() == "group") {
- //add_submenu_item(sprintf(elgg_echo("videolist:home"),page_owner_entity()->name), $CONFIG->wwwroot . "pg/videolist/owned/" . page_owner_entity()->username);
+ //add_submenu_item(sprintf(elgg_echo("videolist:home"),page_owner_entity()->name), elgg_get_site_url() . "videolist/owned/" . page_owner_entity()->username);
if ($page_owner->canEdit()) {
- //add_submenu_item(sprintf(elgg_echo('videolist:browsemenu'),page_owner_entity()->name), $CONFIG->wwwroot . "pg/videolist/browse/". page_owner_entity()->username);
- //add_submenu_item(sprintf(elgg_echo('videolist:new'),page_owner_entity()->name), $CONFIG->wwwroot . "pg/videolist/new/". page_owner_entity()->username);
+ //add_submenu_item(sprintf(elgg_echo('videolist:browsemenu'),page_owner_entity()->name), elgg_get_site_url() . "videolist/browse/". page_owner_entity()->username);
+ //add_submenu_item(sprintf(elgg_echo('videolist:new'),page_owner_entity()->name), elgg_get_site_url() . "videolist/new/". page_owner_entity()->username);
}
}
}
function video_url($entity) {
- global $CONFIG;
$video_id = $entity->video_id;
- return $CONFIG->url . "pg/videolist/watch/" . $entity->getGUID() . "/" . $video_id;
+ return elgg_get_site_url() . "videolist/watch/" . $entity->getGUID() . "/" . $video_id;
}
function videolist_url($videolistpage) {
- global $CONFIG;
-
$owner = $videolistpage->container_guid;
$userdata = get_entity($owner);
$title = $videolistpage->title;
$title = friendly_title($title);
- return $CONFIG->url . "pg/videolist/watch/" . $videolistpage->getGUID();
+ return elgg_get_site_url() . "videolist/watch/" . $videolistpage->getGUID();
}
/**
@@ -202,11 +197,9 @@ function videolist_object_notifications_intercept($hook, $entity_type, $returnva
}
function videolist_profile_menu($hook, $entity_type, $return_value, $params) {
- global $CONFIG;
-
$return_value[] = array(
'text' => elgg_echo('videolist'),
- 'href' => "{$CONFIG->url}pg/videolist/owned/{$params['owner']->username}",
+ 'href' => elgg_get_site_url() . "videolist/owned/{$params['owner']->username}",
);
return $return_value;
@@ -270,8 +263,7 @@ function videolist_get_entity_icon_url(ElggEntity $entity, $size = 'medium') {
// tiny thumbnails are too small to be useful, so give a generic video icon
if ($size == 'tiny') {
- global $CONFIG;
- return "{$CONFIG->url}mod/videolist/graphics/video_icon_tiny.png";
+ return elgg_get_site_url() . "mod/videolist/graphics/video_icon_tiny.png";
}
return $entity->thumbnail;
diff --git a/views/default/forms/browsetube.php b/views/default/forms/browsetube.php
index 82201a81c..bbe2b8935 100644
--- a/views/default/forms/browsetube.php
+++ b/views/default/forms/browsetube.php
@@ -42,13 +42,13 @@ if(isset($confirm_action) && ($confirm_action == 'search_video')) {
$body .= "<div class='elgg_horizontal_tabbed_nav margin_top'>";
$body .= "<ul id='videonav'>";
$body .= "<li class='selected' id='YT'>";
-$body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=youtube\">YouTube</a>";
+$body .= "<a href=\"".$vars['url']."videolist/browse/".$getcontainer_guid."?q=youtube\">YouTube</a>";
$body .= "</li>";
$body .= "<li id='MC'>";
-$body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=metacafe\">Metacafe</a>";
+$body .= "<a href=\"".$vars['url']."videolist/browse/".$getcontainer_guid."?q=metacafe\">Metacafe</a>";
$body .= "</li>";
$body .= "<li id='VM'>";
-$body .= "<a href=\"".$vars['url']."pg/videolist/browse/".$getcontainer_guid."?q=vimeo\">Vimeo</a>";
+$body .= "<a href=\"".$vars['url']."videolist/browse/".$getcontainer_guid."?q=vimeo\">Vimeo</a>";
$body .= "</li>";
$body .= "</ul>";
$body .= "</div>";
diff --git a/views/default/object/videolist.php b/views/default/object/videolist.php
index 82336ec97..d67d35b23 100644
--- a/views/default/object/videolist.php
+++ b/views/default/object/videolist.php
@@ -6,8 +6,6 @@
/* @copyright Prateek.Choudhary
/*****************************************************************************************/
-global $CONFIG;
-
$video_file = $vars['entity'];
if(!empty($video_file)) {
@@ -22,7 +20,7 @@ if(!empty($video_file)) {
$mime = "image/html";
$thumbnail = $videothumbnail;
- $watch_URL = $vars['url']."pg/videolist/watch/".$video_guid;
+ $watch_URL = $vars['url']."videolist/watch/".$video_guid;
$object_acl = get_readable_access_level($video_file->access_id);
// metadata block, - access level, edit, delete, + options view extender
@@ -40,17 +38,17 @@ if(!empty($video_file)) {
if(get_input('show_viewtype') == "all") {
$info .= '<p class="entity_title"><a href="' .$watch_URL. '">'.$title.'</a></p>';
- $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/videolist/owned/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+ $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}videolist/owned/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
$info .= "</p>";
$icon = "<a class='video_icon' href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
echo "<div class='video_entity'>".elgg_view_listing($icon, $info)."</div>";
} else {
$info .= '<p class="entity_title"><a href="' .$watch_URL. '">'.$title.'</a></p>';
- $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/videolist/owned/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+ $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}videolist/owned/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
$info .= "</p>";
$icon = "<a class='video_icon' href=\"{$watch_URL}\">" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . "</a>";
echo "<div class='video_entity'>".elgg_view_listing($icon, $info)."</div>";
}
} else {
echo "<p class='margin_top'>".elgg_echo('videolist:none:found')."</p>";
-} \ No newline at end of file
+}
diff --git a/views/default/staticvideo/index.php b/views/default/staticvideo/index.php
index e5f6d8fad..8d265fd50 100644
--- a/views/default/staticvideo/index.php
+++ b/views/default/staticvideo/index.php
@@ -27,7 +27,7 @@ if(!empty($owner_videos)) {
$video_guid = $node->guid;
$video_id = $node->video_id;
$videodiv .= "<div id='videobox'>";
- $videodiv .= "<a href='".$vars['url']."pg/videolist/watch/".$video_guid."'>";
+ $videodiv .= "<a href='".$vars['url']."videolist/watch/".$video_guid."'>";
$videodiv .= "<img src='http://img.youtube.com/vi/".$video_id."/default.jpg' width='150' alt='no video'/>";
$videodiv .= "</a>";
diff --git a/views/default/videolist/group_video_header.php b/views/default/videolist/group_video_header.php
index dd12d1d96..e6d13bca3 100644
--- a/views/default/videolist/group_video_header.php
+++ b/views/default/videolist/group_video_header.php
@@ -5,7 +5,7 @@
$user = page_owner_entity();
$user_name = elgg_view_title($user->name . "'s " . elgg_echo('videos'));
-$url = $CONFIG->wwwroot . "pg/videolist/browse/". $user->username . "/";
+$url = elgg_get_site_url() . "videolist/browse/". $user->username . "/";
//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>';
@@ -19,4 +19,4 @@ else
<div class="content_header_options">
<?php echo $upload_link; ?>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/views/default/videolist/groupprofile_videolist.php b/views/default/videolist/groupprofile_videolist.php
index badfa13a6..33a22ab68 100644
--- a/views/default/videolist/groupprofile_videolist.php
+++ b/views/default/videolist/groupprofile_videolist.php
@@ -11,7 +11,7 @@
?>
<div class="group_tool_widget video">
-<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/videolist/owned/" . page_owner_entity()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span>
+<span class="group_widget_link"><a href="<?php echo $vars['url'] . "videolist/owned/" . page_owner_entity()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span>
<h3><?php echo elgg_echo("videolist:group"); ?></h3>
<?php
@@ -31,17 +31,17 @@ if ($videos) {
$owner = get_entity($f->getOwner());
$numcomments = elgg_count_comments($f);
echo "<div class='entity_listing clearfloat'>";
- echo "<div class='entity_listing_icon'><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\"><img src=\"".$f->thumbnail."\" border=\"0\" width=\"85\" /></a></div>";
+ echo "<div class='entity_listing_icon'><a href=\"{$vars['url']}videolist/watch/{$f->guid}\"><img src=\"".$f->thumbnail."\" border=\"0\" width=\"85\" /></a></div>";
echo "<div class='entity_listing_info'>";
- echo "<p class='entity_title'><a href=\"{$vars['url']}pg/videolist/watch/{$f->guid}\">" . $f->title ."</a></p><p class='entity_subtext'><a href=\"{$vars['url']}pg/profile/{$owner->username}\">{$owner->name}</a> ";
+ echo "<p class='entity_title'><a href=\"{$vars['url']}videolist/watch/{$f->guid}\">" . $f->title ."</a></p><p class='entity_subtext'><a href=\"{$vars['url']}profile/{$owner->username}\">{$owner->name}</a> ";
echo friendly_time($f->time_created) . "</p>";
echo "</div></div>";
}
} else {
- $upload_video = $vars['url'] . "pg/videolist/browse/" . page_owner_entity()->username;
+ $upload_video = $vars['url'] . "videolist/browse/" . page_owner_entity()->username;
echo "<p class='margin_top'><a href=\"{$upload_video}\">" . elgg_echo("videolist:add") . "</a></p>";
}
echo "</div>";
-?> \ No newline at end of file
+?>
diff --git a/views/default/videolist/icon.php b/views/default/videolist/icon.php
index 46c186db1..36b30e5ca 100644
--- a/views/default/videolist/icon.php
+++ b/views/default/videolist/icon.php
@@ -9,10 +9,8 @@
* @link http://elgg.com/
*/
-global $CONFIG;
-
if($vars['videolist']){
- echo "<img src=\"{$CONFIG->wwwroot}mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
} else {
$mime = $vars['mimetype'];
if (isset($vars['thumbnail'])) {
@@ -32,7 +30,7 @@ if($vars['videolist']){
if ($size == 'large') {
echo "<img src=\"{$thumbnail}\" border=\"0\" />";
} else {
- echo "<img src=\"{$CONFIG->wwwroot}mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
+ echo "<img src=\"".elgg_get_site_url()."mod/videolist/graphics/icons/Video_Icon.jpg\" border=\"0\" />";
}
}
-} \ No newline at end of file
+}
diff --git a/watch.php b/watch.php
index 778af59c2..4c92cc63b 100644
--- a/watch.php
+++ b/watch.php
@@ -8,7 +8,6 @@
* @author Prateek Choudhary <synapticfield@gmail.com>
* @copyright Prateek Choudhary
*/
-global $CONFIG;
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
@@ -26,8 +25,8 @@ if ($videos = get_entity($video_id)) {
$page_owner = $_SESSION['user'];
set_page_owner($page_owner->getGUID());
}
- elgg_push_breadcrumb(elgg_echo('videolist:all'), $CONFIG->wwwroot."mod/videolist/all.php");
- elgg_push_breadcrumb(sprintf(elgg_echo("videolist:user"),$page_owner->name), $CONFIG->wwwroot."pg/videolist/".$page_owner->username);
+ elgg_push_breadcrumb(elgg_echo('videolist:all'), elgg_get_site_url()."videolist/all.php");
+ elgg_push_breadcrumb(sprintf(elgg_echo("videolist:user"),$page_owner->name), elgg_get_site_url()."videolist/".$page_owner->username);
elgg_push_breadcrumb(sprintf($video->title));
$area1 = elgg_view('navigation/breadcrumbs');
@@ -41,10 +40,10 @@ if ($videos = get_entity($video_id)) {
$area1 .= "<div id='content_header' class='clearfloat'><div class='content_header_title'><h2>".$title."</h2></div>";
if ($videos->canEdit()) {
$area1 .= "<div class='content_header_options'>
- <a class='action_button' href=\"{$CONFIG->wwwroot}mod/videolist/edit.php?video={$videos->getGUID()}\">".elgg_echo('edit')."</a>";
+ <a class='action_button' href=\"".elgg_get_site_url()."videolist/edit.php?video={$videos->getGUID()}\">".elgg_echo('edit')."</a>";
$area1 .= elgg_view('output/confirmlink',array(
- 'href' => $CONFIG->wwwroot . "action/videolist/delete?video=" . $videos->getGUID(),
+ 'href' => elgg_get_site_url() . "action/videolist/delete?video=" . $videos->getGUID(),
'text' => elgg_echo('delete'),
'is_action' => true,
'confirm' => elgg_echo('document:delete:confirm'),