]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Removed all $CONFIG and pg/ appearitions.
authorSem <sembrestels@riseup.net>
Thu, 3 Nov 2011 19:37:47 +0000 (20:37 +0100)
committerSem <sembrestels@riseup.net>
Thu, 3 Nov 2011 19:37:47 +0000 (20:37 +0100)
17 files changed:
actions/add.php
actions/edit.php
actions/tubesearch.php
all.php
browse.php
edit.php
friends.php
index.php
new.php
start.php
views/default/forms/browsetube.php
views/default/object/videolist.php
views/default/staticvideo/index.php
views/default/videolist/group_video_header.php
views/default/videolist/groupprofile_videolist.php
views/default/videolist/icon.php
watch.php

index 87f459a3a30655adc63457da3314a504e279125e..4fd6481ae1db0f1739aa2eea5abcb6336275fd1b 100644 (file)
@@ -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']);
index 46df32e16f3e78c0d374cb582cd8534c2dffcce1..3aa536e4c7b838e5fd1943ca170b96a7e738634b 100644 (file)
@@ -2,8 +2,6 @@
 /**\r
  * Elgg video edit\r
  */\r
-\r
-global $CONFIG;\r
        \r
 // Get variables\r
 $title = strip_tags(get_input("title_videourl"));\r
@@ -14,7 +12,7 @@ $guid = (int) get_input('video_guid');
 \r
 if (!$video = get_entity($guid)) {\r
        register_error(elgg_echo("videolist:noentity"));\r
-       forward($CONFIG->wwwroot . "pg/videolist/" . $_SESSION['user']->username);\r
+       forward(elgg_get_site_url() . "videolist/" . $_SESSION['user']->username);\r
        exit;\r
 }\r
        \r
@@ -39,4 +37,4 @@ if ($result)
 else\r
        register_error(elgg_echo("videolist:editfailed"));\r
        \r
-forward($_SERVER['HTTP_REFERER']);
\ No newline at end of file
+forward($_SERVER['HTTP_REFERER']);\r
index 82f946ab6c1f9be5c3a3ae46aa154c374c908224..761bbb41eefbe2e3d3fbb08aa109c7fdfa7fe74f 100644 (file)
@@ -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 98b1805254472eb7fad63b5c37ceba63f45412c9..caccd7c3e4778bda277634529164fdd954005640 100644 (file)
--- 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);
index c8314b9c6365dc5c0694a3863e387bbfcd7b4aad..2392ef19a7caab32f6edff089de2df405b08b7ec 100644 (file)
@@ -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);
index b94e492755d3160589d7c0f1d35238b7de5773ba..cc06dd9c4bcd5122a88dc3cf649825d73db07bfe 100644 (file)
--- 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
+?>
index d9e84e896d63ac787121e8828f377e18ab6dabbd..8d90ae1a3574facf0a69747d2c198515b2a361d9 100644 (file)
@@ -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));
        
index 0c78470f3ca59d6c95615976d65505beb64e5b53..4ca5495e10c1d68f05ad68c7cdd06666d90633ad 100644 (file)
--- 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 169a48fb5701693e1d765f5c27c3bd621bcfdb18..881fba6ff6e9b1ad89355888cbbe4e5b2c296962 100644 (file)
--- 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);
index 9e8f73f92b5137c6d8aabf0d479bb2fc5faa13a2..ad2985e4a6b7c359b0a678347f9b189c8a51277e 100644 (file)
--- a/start.php
+++ b/start.php
 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;
index 82201a81c2d2368aab1f6fe779c9a317a3007386..bbe2b893533855b332590a1ccd4bc1de8ddce3ac 100644 (file)
@@ -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>";
index 82336ec9770909895fecaaa87cf14328a5750c6d..d67d35b236547d3c13858a44e0ebc95b94454b51 100644 (file)
@@ -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
+}
index e5f6d8fadfa9277e73a55eff8323055147dbfdbd..8d265fd50adde703713a7e76dd35098a499f4fc8 100644 (file)
@@ -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>";
 
index dd12d1d967c0cff03fad9202ff9655d65b2edf10..e6d13bca36712582a170c854353b8d2ca683bd7e 100644 (file)
@@ -5,7 +5,7 @@
  \r
 $user = page_owner_entity();\r
 $user_name = elgg_view_title($user->name . "'s " . elgg_echo('videos'));\r
-$url = $CONFIG->wwwroot . "pg/videolist/browse/". $user->username . "/";\r
+$url = elgg_get_site_url() . "videolist/browse/". $user->username . "/";\r
 //if the user is a memebr of the group, show find button\r
 if($user->isMember(get_loggedin_user()))\r
        $upload_link = "<a href=\"{$url}\" class='action_button'>" . elgg_echo('videolist:browsemenu') . '</a>';\r
@@ -19,4 +19,4 @@ else
        <div class="content_header_options">\r
                <?php echo $upload_link; ?>\r
        </div>\r
-</div>
\ No newline at end of file
+</div>\r
index badfa13a60d3b69c5249efd33aa43137f82cdec5..33a22ab682f91d1ba101e3bfcb86e396f93ec5ed 100644 (file)
@@ -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
+?>
index 46c186db1671145c6c427b2128f5713b32e13bec..36b30e5ca6bc6565976b4cf7cfc474cbeea235c5 100644 (file)
@@ -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
+}
index 778af59c2628c7a1b2d161ceac248da5f6585918..4c92cc63bfb848bfb75b5d713bdca913f9a29b1a 100644 (file)
--- 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'),