diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
commit | bb1f45eb02bac603d67ac08cb674c4050a245c28 (patch) | |
tree | 239c6afba40d3160be53c22984e3b7ba1b7442ec | |
parent | b5c5261077640d2390f4e3c44cc51bfe4bed2e4c (diff) | |
download | elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.gz elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.bz2 |
Refs #2598: Converted most $vars['url'] to elgg_get_site_url()
git-svn-id: http://code.elgg.org/elgg/trunk@7149 36083f99-b078-4883-b0ff-0f9b5a30f544
187 files changed, 426 insertions, 426 deletions
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php index 3e7e29dee..88d41d269 100644 --- a/mod/blog/views/default/blog/forms/edit.php +++ b/mod/blog/views/default/blog/forms/edit.php @@ -64,7 +64,7 @@ if (isset ($vars['entity'])) { } // add a delete button if editing - $delete_url = "{$vars['url']}action/blog/delete?guid={$blog->getGUID()}"; + $delete_url = elgg_get_site_url()."action/blog/delete?guid={$blog->getGUID()}"; $delete_link = elgg_view('output/confirmlink', array( 'href' => $delete_url, 'text' => elgg_echo('delete'), @@ -219,7 +219,7 @@ ___END; echo elgg_view('input/form', array( 'internalid' => 'blog_post_edit', 'internalname' => 'blog_post', - 'action' => "{$vars['url']}action/blog/save", + 'action' => elgg_get_site_url()."action/blog/save", 'body' => $form_body )); @@ -265,7 +265,7 @@ elgg_clear_sticky_form('blog'); return false; } - var draftURL = "<?php echo $vars['url']; ?>action/blog/auto_save_revision"; + var draftURL = "<?php echo elgg_get_site_url(); ?>action/blog/auto_save_revision"; var postData = form.serializeArray(); // force draft status @@ -282,7 +282,7 @@ elgg_clear_sticky_form('blog'); // get a copy of the body to compare for auto save oldDescription = $('form[name=blog_post]').find('textarea[name=description]').val(); -/* we don't seems to be using the text counter anymoreÉ +/* we don't seems to be using the text counter anymore� $('#excerpt.excerpt').each(function(){ var allowed = 200; diff --git a/mod/blog/views/default/blog/sidebar_edit.php b/mod/blog/views/default/blog/sidebar_edit.php index 1efa17c23..3b884437f 100644 --- a/mod/blog/views/default/blog/sidebar_edit.php +++ b/mod/blog/views/default/blog/sidebar_edit.php @@ -27,7 +27,7 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) { if ($revisions) { echo '<ul class="blog_revisions">'; - $load_base_url = "{$vars['url']}pg/blog/{$owner->username}/edit/{$blog->getGUID()}/"; + $load_base_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/"; foreach ($revisions as $revision) { $time = elgg_view_friendly_time($revision->time_created); diff --git a/mod/blog/views/default/blog/sidebar_revisions.php b/mod/blog/views/default/blog/sidebar_revisions.php index b2323e7b3..43215963b 100644 --- a/mod/blog/views/default/blog/sidebar_revisions.php +++ b/mod/blog/views/default/blog/sidebar_revisions.php @@ -31,7 +31,7 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) { $n = count($revisions); echo '<ul class="blog_revisions">'; - $load_base_url = "{$vars['url']}pg/blog/{$owner->username}/edit/{$blog->getGUID()}/"; + $load_base_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/"; // show the "published revision" if ($blog->status == 'published') { diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index bf85ea407..fc88eea25 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -20,7 +20,7 @@ $excerpt = $blog->excerpt; $body = autop($blog->description); $owner_icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); -$owner_blog_link = "<a href=\"{$vars['url']}pg/blog/$owner->username\">{$owner->name}</a>"; +$owner_blog_link = "<a href=\"".elgg_get_site_url()."pg/blog/$owner->username\">{$owner->name}</a>"; $author_text = sprintf(elgg_echo('blog:author_by_line'), $owner_blog_link); if($blog->tags){ $tags = "<p class=\"tags\">" . elgg_view('output/tags', array('tags' => $blog->tags)) . "</p>"; @@ -48,10 +48,10 @@ if ($blog->comments_on != 'Off') { $edit = elgg_view('output/access', array('entity' => $vars['entity'])); if ($blog->canEdit()) { - $edit_url = "{$vars['url']}pg/blog/{$owner->username}/edit/{$blog->getGUID()}/"; + $edit_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/"; $edit_link = "<span class='entity_edit'><a href=\"$edit_url\">" . elgg_echo('edit') . '</a></span>'; - $delete_url = "{$vars['url']}action/blog/delete?guid={$blog->getGUID()}"; + $delete_url = elgg_get_site_url()."action/blog/delete?guid={$blog->getGUID()}"; $delete_link = "<span class='delete_button'>" . elgg_view('output/confirmlink', array( 'href' => $delete_url, 'text' => elgg_echo('delete'), diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php index 38ef95152..5cb8ca6d8 100644 --- a/mod/bookmarks/views/default/bookmarks/bookmarklet.php +++ b/mod/bookmarks/views/default/bookmarks/bookmarklet.php @@ -21,7 +21,7 @@ if (!$name && ($user = get_loggedin_user())) { ?> <h3><?php echo elgg_echo('bookmarks:browser_bookmarklet')?></h3> -<a href="javascript:location.href='<?php echo $vars['url']; ?>pg/bookmarks/<?php echo $name; ?>/add?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"> <img src="<?php echo $vars['url']; ?>_graphics/elgg_bookmarklet.gif" border="0" title="<?php echo elgg_echo('bookmarks:this');?>" /> </a> +<a href="javascript:location.href='<?php echo elgg_get_site_url(); ?>pg/bookmarks/<?php echo $name; ?>/add?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)"> <img src="<?php echo elgg_get_site_url(); ?>_graphics/elgg_bookmarklet.gif" border="0" title="<?php echo elgg_echo('bookmarks:this');?>" /> </a> <br /> <a class="link" onclick="elgg_slide_toggle(this,'#elgg_sidebar','.bookmarklet');">Instructions</a> diff --git a/mod/bookmarks/views/default/bookmarks/form.php b/mod/bookmarks/views/default/bookmarks/form.php index deef1f7af..927ed445d 100644 --- a/mod/bookmarks/views/default/bookmarks/form.php +++ b/mod/bookmarks/views/default/bookmarks/form.php @@ -35,7 +35,7 @@ if(isset($vars['entity'])){ $url = "action/bookmarks/add"; } ?> -<form id="bookmark_edit_form" class="margin_top" action="<?php echo $vars['url'] . $url; ?>" method="post"> +<form id="bookmark_edit_form" class="margin_top" action="<?php echo elgg_get_site_url() . $url; ?>" method="post"> <?php echo elgg_view('input/securitytoken'); ?> <p> <label> diff --git a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php index b476e8cf2..59619d587 100755 --- a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php +++ b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php @@ -5,7 +5,7 @@ $bookmarks = elgg_get_entities(array('type' => 'object', 'subtype' => 'bookmarks 'container_guids' => elgg_get_page_owner_guid(), 'limit' => 6)); ?> <div class="group_tool_widget bookmarks"> -<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span> +<span class="group_widget_link"><a href="<?php echo elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span> <h3><?php echo elgg_echo('bookmarks:group') ?></h3> <?php if($bookmarks){ @@ -29,7 +29,7 @@ if($bookmarks){ echo "<div class='entity_listing clearfloat'>" . $info . "</div>"; } } else { - $create_bookmark = $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username . "/add"; + $create_bookmark = elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner()->username . "/add"; echo "<p class='margin_top'><a href=\"{$create_bookmark}\">" . elgg_echo("bookmarks:new") . "</a></p>"; } echo "</div>";
\ No newline at end of file diff --git a/mod/bookmarks/views/default/widgets/bookmarks/view.php b/mod/bookmarks/views/default/widgets/bookmarks/view.php index 1504ec8b4..b401f86ad 100644 --- a/mod/bookmarks/views/default/widgets/bookmarks/view.php +++ b/mod/bookmarks/views/default/widgets/bookmarks/view.php @@ -43,7 +43,7 @@ if($bookmarks){ } - $user_inbox = $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username; + $user_inbox = elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner()->username; if (get_entities('object', 'bookmarks', $vars['entity']->container_guid, '', '', '', true) > $num) echo "<div class='ContentWrapper bookmarks more'><a href=\"{$user_inbox}\">".elgg_echo('bookmarks:read')."</a></div>"; diff --git a/mod/captcha/views/default/input/captcha.php b/mod/captcha/views/default/input/captcha.php index 5b42bc3c9..c113d5baf 100644 --- a/mod/captcha/views/default/input/captcha.php +++ b/mod/captcha/views/default/input/captcha.php @@ -13,7 +13,7 @@ $token = captcha_generate_token(); <label> <?php echo elgg_echo('captcha:entercaptcha'); ?> <div class="captcha_image"> - <img class="captcha-input-image" alt="captcha" src="<?php echo $vars['url'] . "pg/captcha/$token"; ?>" /> + <img class="captcha-input-image" alt="captcha" src="<?php echo elgg_get_site_url() . "pg/captcha/$token"; ?>" /> </div> <div class="captcha_input"> <?php echo elgg_view('input/text', array('internalname' => 'captcha_input')); ?> diff --git a/mod/categories/views/default/categories/view.php b/mod/categories/views/default/categories/view.php index 7ee0170d9..043b1d78e 100644 --- a/mod/categories/views/default/categories/view.php +++ b/mod/categories/views/default/categories/view.php @@ -9,7 +9,7 @@ if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) { $categories = array($categories); } foreach($categories as $category) { - $link = $vars['url'] . 'pg/categories/list/?category=' . urlencode($category); + $link = elgg_get_site_url() . 'pg/categories/list/?category=' . urlencode($category); if (!empty($linkstr)) { $linkstr .= ', '; } diff --git a/mod/defaultwidgets/views/default/defaultwidgets/editor.php b/mod/defaultwidgets/views/default/defaultwidgets/editor.php index 6a3756d13..6400ed55d 100644 --- a/mod/defaultwidgets/views/default/defaultwidgets/editor.php +++ b/mod/defaultwidgets/views/default/defaultwidgets/editor.php @@ -76,8 +76,8 @@ $(document).ready(function () { </h3> </td> <td width="17px" align="right"></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -143,8 +143,8 @@ $(document).ready(function () { </h3> </td> <td width="17px" align="right"></td> - <td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> - <td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> + <td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> + <td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -188,8 +188,8 @@ $(document).ready(function () { </h3> </td> <td width="17px" align="right"></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -229,8 +229,8 @@ $(document).ready(function () { </h3> </td> <td width="17px" align="right"></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -252,7 +252,7 @@ $(document).ready(function () { </div><!-- /#customise_page_view --> -<form action="<?php echo $vars['url']; ?>action/defaultwidgets/update" method="post"> +<form action="<?php echo elgg_get_site_url(); ?>action/defaultwidgets/update" method="post"> <textarea type="textarea" value="Left widgets" style="display:none" name="debugField1" id="debugField1" /><?php echo $leftcolumn_widgets; ?></textarea> <textarea type="textarea" value="Middle widgets" style="display:none" name="debugField2" id="debugField2" /><?php echo $middlecolumn_widgets; ?></textarea> <textarea type="textarea" value="Right widgets" style="display:none" name="debugField3" id="debugField3" /><?php echo $rightcolumn_widgets; ?></textarea> diff --git a/mod/diagnostics/views/default/diagnostics/runalltests.php b/mod/diagnostics/views/default/diagnostics/runalltests.php index c4c831fcd..8baf3eee0 100644 --- a/mod/diagnostics/views/default/diagnostics/runalltests.php +++ b/mod/diagnostics/views/default/diagnostics/runalltests.php @@ -7,5 +7,5 @@ $form_body .= elgg_view('input/submit', array('internalname' => 'execute', 'value' => elgg_echo('diagnostics:test:executeall'))); - echo elgg_view('input/form', array('action' => $vars['url'] . "pg/diagnostics/tests/all", 'body' => $form_body)); + echo elgg_view('input/form', array('action' => elgg_get_site_url() . "pg/diagnostics/tests/all", 'body' => $form_body)); ?>
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/admin/css.php b/mod/ecml/views/default/ecml/admin/css.php index b83d0566f..0b018733a 100644 --- a/mod/ecml/views/default/ecml/admin/css.php +++ b/mod/ecml/views/default/ecml/admin/css.php @@ -55,32 +55,32 @@ -moz-border-radius: 5px; } .ecml_web_service_list li a.youtube { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_youtube.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_youtube.gif); width:102px; } .ecml_web_service_list li a.slideshare { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_slideshare.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_slideshare.gif); } .ecml_web_service_list li a.vimeo { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_vimeo.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_vimeo.gif); width:130px; } .ecml_web_service_list li a.googlemaps { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_googlemaps.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_googlemaps.gif); } .ecml_web_service_list li a.blip_tv { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_bliptv.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_bliptv.gif); width:102px; } .ecml_web_service_list li a.dailymotion { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_dailymotion.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_dailymotion.gif); } .ecml_web_service_list li a.livevideo { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_livevideo.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_livevideo.gif); width:166px; } .ecml_web_service_list li a.redlasso { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/logo_redlasso.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/logo_redlasso.gif); background-position:center 4px; width:130px; } @@ -103,7 +103,7 @@ } .ecml_embed_instructions, .ecml_embed_preview { - background-image: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); background-repeat: no-repeat; background-position: 0px -367px; padding-left: 12px; @@ -129,12 +129,12 @@ float:right; } #url_status.success { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/url_status.png); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/url_status.png); background-repeat: no-repeat; background-position: left top; } #url_status.failure { - background-image: url(<?php echo $vars['url']; ?>mod/ecml/graphics/url_status.png); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/ecml/graphics/url_status.png); background-repeat: no-repeat; background-position: left bottom; } diff --git a/mod/ecml/views/default/ecml/help/blip.tv.php b/mod/ecml/views/default/ecml/help/blip.tv.php index f462ab1e0..bac4c99c3 100644 --- a/mod/ecml/views/default/ecml/help/blip.tv.php +++ b/mod/ecml/views/default/ecml/help/blip.tv.php @@ -9,4 +9,4 @@ echo '<p>' . elgg_echo('ecml:keywords:blip.tv:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/blip.tv.png" />
\ No newline at end of file +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/blip.tv.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/dailymotion.php b/mod/ecml/views/default/ecml/help/dailymotion.php index de4add4ff..80efa91e7 100644 --- a/mod/ecml/views/default/ecml/help/dailymotion.php +++ b/mod/ecml/views/default/ecml/help/dailymotion.php @@ -9,4 +9,4 @@ echo '<p>' . elgg_echo('ecml:keywords:dailymotion:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/dailymotion.png" />
\ No newline at end of file +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/dailymotion.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/googlemaps.php b/mod/ecml/views/default/ecml/help/googlemaps.php index 4e99b4c73..d55c351fb 100644 --- a/mod/ecml/views/default/ecml/help/googlemaps.php +++ b/mod/ecml/views/default/ecml/help/googlemaps.php @@ -9,4 +9,4 @@ echo '<p>' . elgg_echo('ecml:keywords:googlemaps:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/googlemaps.png" />
\ No newline at end of file +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/googlemaps.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/livevideo.php b/mod/ecml/views/default/ecml/help/livevideo.php index 6f3244c45..1343a34da 100644 --- a/mod/ecml/views/default/ecml/help/livevideo.php +++ b/mod/ecml/views/default/ecml/help/livevideo.php @@ -9,4 +9,4 @@ echo '<p>' . elgg_echo('ecml:keywords:livevideo:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/livevideo.png" />
\ No newline at end of file +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/livevideo.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/redlasso.php b/mod/ecml/views/default/ecml/help/redlasso.php index ec51cbcd2..07b497913 100644 --- a/mod/ecml/views/default/ecml/help/redlasso.php +++ b/mod/ecml/views/default/ecml/help/redlasso.php @@ -9,5 +9,5 @@ echo '<p>' . elgg_echo('ecml:keywords:redlasso:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/redlasso_1.png" /> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/redlasso_2.png" /> +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/redlasso_1.png" /> +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/redlasso_2.png" /> diff --git a/mod/ecml/views/default/ecml/help/slideshare.php b/mod/ecml/views/default/ecml/help/slideshare.php index 860c70cfc..45ada4b54 100644 --- a/mod/ecml/views/default/ecml/help/slideshare.php +++ b/mod/ecml/views/default/ecml/help/slideshare.php @@ -9,4 +9,4 @@ echo '<p>' . elgg_echo('ecml:keywords:slideshare:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/slideshare.png" />
\ No newline at end of file +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/slideshare.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/vimeo.php b/mod/ecml/views/default/ecml/help/vimeo.php index 24fd35e31..e5f6ae28a 100644 --- a/mod/ecml/views/default/ecml/help/vimeo.php +++ b/mod/ecml/views/default/ecml/help/vimeo.php @@ -9,4 +9,4 @@ echo '<p>' . elgg_echo('ecml:keywords:vimeo:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/vimeo.png" />
\ No newline at end of file +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/vimeo.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/ecml/help/youtube.php b/mod/ecml/views/default/ecml/help/youtube.php index 42febde2c..53be4a3c0 100644 --- a/mod/ecml/views/default/ecml/help/youtube.php +++ b/mod/ecml/views/default/ecml/help/youtube.php @@ -9,4 +9,4 @@ echo '<p>' . elgg_echo('ecml:keywords:youtube:usage') . '</p>'; ?> -<img src="<?php echo $vars['url']?>mod/ecml/graphics/youtube.png" />
\ No newline at end of file +<img src="<?php echo elgg_get_site_url()?>mod/ecml/graphics/youtube.png" />
\ No newline at end of file diff --git a/mod/ecml/views/default/embed/web_services/content.php b/mod/ecml/views/default/embed/web_services/content.php index 125da80a2..cfe9fccf5 100644 --- a/mod/ecml/views/default/embed/web_services/content.php +++ b/mod/ecml/views/default/embed/web_services/content.php @@ -92,8 +92,8 @@ $(function() { // counter for paused input to try to validate/generate a preview. var rest_timeout_id = null; var rest_min_time = 750; - var embed_generate_ecml_url = '<?php echo $vars['url']; ?>pg/ecml_generate'; - var embed_ecml_keyword_help_url = '<?php echo $vars['url']; ?>pg/ecml/'; + var embed_generate_ecml_url = '<?php echo elgg_get_site_url(); ?>pg/ecml_generate'; + var embed_ecml_keyword_help_url = '<?php echo elgg_get_site_url(); ?>pg/ecml/'; var internal_name = '<?php echo addslashes($internal_name); ?>'; var web_services_ecml_update = function() { diff --git a/mod/embed/views/default/embed/css.php b/mod/embed/views/default/embed/css.php index a177b0692..1fed16080 100644 --- a/mod/embed/views/default/embed/css.php +++ b/mod/embed/views/default/embed/css.php @@ -39,10 +39,10 @@ padding:0; } #facebox .footer img.close_image { - background: url(<?php echo $vars['url']; ?>mod/embed/images/close_button.gif) no-repeat left top; + background: url(<?php echo elgg_get_site_url(); ?>mod/embed/images/close_button.gif) no-repeat left top; } #facebox .footer img.close_image:hover { - background: url(<?php echo $vars['url']; ?>mod/embed/images/close_button.gif) no-repeat left -31px; + background: url(<?php echo elgg_get_site_url(); ?>mod/embed/images/close_button.gif) no-repeat left -31px; } #facebox_overlay { position: fixed; diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php index 3eff5d429..583ea71e5 100644 --- a/mod/embed/views/default/embed/embed.php +++ b/mod/embed/views/default/embed/embed.php @@ -137,7 +137,7 @@ $(document).ready(function() { // tabs $('.embed_section').click(function() { var section = $(this).attr('id'); - var url = '<?php echo $vars['url']; ?>pg/embed/embed?active_section=' + section + '&internal_name=' + internal_name; + var url = '<?php echo elgg_get_site_url(); ?>pg/embed/embed?active_section=' + section + '&internal_name=' + internal_name; $('#facebox .body .content').load(url); return false; diff --git a/mod/embed/views/default/embed/js.php b/mod/embed/views/default/embed/js.php index c8fe3bc53..fbc6a0340 100644 --- a/mod/embed/views/default/embed/js.php +++ b/mod/embed/views/default/embed/js.php @@ -112,8 +112,8 @@ $.extend($.facebox, { settings: { opacity : 0.7, overlay : true, - loadingImage : '<?php echo $vars['url']; ?>_graphics/ajax_loader_bw.gif', - closeImage : '<?php echo $vars['url']; ?>_graphics/spacer.gif', + loadingImage : '<?php echo elgg_get_site_url(); ?>_graphics/ajax_loader_bw.gif', + closeImage : '<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif', imageTypes : [ 'png', 'jpg', 'jpeg', 'gif' ], faceboxHtml : '\ <div id="facebox" class="hidden"> \ @@ -121,7 +121,7 @@ $.extend($.facebox, { <div class="body"> \ <div class="footer"> \ <a href="#" class="close"> \ - <img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" title="close" class="close_image" width="22" height="22" border="0" /> \ + <img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" title="close" class="close_image" width="22" height="22" border="0" /> \ </a> \ </div> \ <div class="content"> \ diff --git a/mod/embed/views/default/embed/link.php b/mod/embed/views/default/embed/link.php index 5b69ffdcc..e2c3b1bff 100644 --- a/mod/embed/views/default/embed/link.php +++ b/mod/embed/views/default/embed/link.php @@ -11,4 +11,4 @@ if (is_plugin_enabled('ecml')) { } ?> -<a class="longtext_control small link" href="<?php echo $vars['url'] . 'pg/embed'; ?>?<?php echo $active_section; ?>internal_name=<?php echo $vars['internalname']; ?>" rel="facebox"><?php echo elgg_echo('media:insert'); ?></a> +<a class="longtext_control small link" href="<?php echo elgg_get_site_url() . 'pg/embed'; ?>?<?php echo $active_section; ?>internal_name=<?php echo $vars['internalname']; ?>" rel="facebox"><?php echo elgg_echo('media:insert'); ?></a> diff --git a/mod/embed/views/default/embed/upload/content.php b/mod/embed/views/default/embed/upload/content.php index 199eb7ede..c0b7afb11 100644 --- a/mod/embed/views/default/embed/upload/content.php +++ b/mod/embed/views/default/embed/upload/content.php @@ -35,7 +35,7 @@ if ($upload_sections) { // change for pulldown $('#embed_upload').change(function() { var upload_section = $(this).val(); - var url = '<?php echo $vars['url']; ?>pg/embed/embed?active_section=upload&active_upload_section=' + upload_section; + var url = '<?php echo elgg_get_site_url(); ?>pg/embed/embed?active_section=upload&active_upload_section=' + upload_section; $('#facebox .body .content').load(url); }); diff --git a/mod/file/views/default/file/css.php b/mod/file/views/default/file/css.php index 74f18427e..46913dea7 100644 --- a/mod/file/views/default/file/css.php +++ b/mod/file/views/default/file/css.php @@ -99,7 +99,7 @@ } .filerepo_user_gallery_link a { padding:2px 25px 5px 0; - background: transparent url(<?php echo $vars['url']; ?>mod/file/graphics/icon_gallery.gif) no-repeat right top; + background: transparent url(<?php echo elgg_get_site_url(); ?>mod/file/graphics/icon_gallery.gif) no-repeat right top; display:block; } .filerepo_user_gallery_link a:hover { diff --git a/mod/file/views/default/file/embed_upload.php b/mod/file/views/default/file/embed_upload.php index 60c75bfb9..50f77cbb8 100644 --- a/mod/file/views/default/file/embed_upload.php +++ b/mod/file/views/default/file/embed_upload.php @@ -21,7 +21,7 @@ $form_body .= '<p>' . elgg_view('input/submit', array('value' => elgg_echo('uplo echo elgg_view('input/form', array( 'body' => $form_body, 'internalid' => 'file_embed_upload', - 'action' => $vars['url'] . 'action/file/upload', + 'action' => elgg_get_site_url() . 'action/file/upload', )); ?> @@ -35,7 +35,7 @@ $(document).ready(function() { var info = jQuery.parseJSON(data); if (info.status == 'success') { - $('.popup .content').load('<?php echo $vars['url'] . 'pg/embed/embed'; ?>?active_section=file'); + $('.popup .content').load('<?php echo elgg_get_site_url() . 'pg/embed/embed'; ?>?active_section=file'); } else { $('.popup .content').find('form').prepend('<p>' + info.message + '</p>'); } diff --git a/mod/file/views/default/file/groupprofile_files.php b/mod/file/views/default/file/groupprofile_files.php index f520f0d2e..23b087c31 100644 --- a/mod/file/views/default/file/groupprofile_files.php +++ b/mod/file/views/default/file/groupprofile_files.php @@ -41,7 +41,7 @@ //get a link to the users files - $users_file_url = $vars['url'] . "pg/file/" . elgg_get_page_owner()->username; + $users_file_url = elgg_get_site_url() . "pg/file/" . elgg_get_page_owner()->username; echo "<p><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></p>"; diff --git a/mod/file/views/default/file/icon.php b/mod/file/views/default/file/icon.php index 1af8f0273..f2cb38785 100644 --- a/mod/file/views/default/file/icon.php +++ b/mod/file/views/default/file/icon.php @@ -36,7 +36,7 @@ case 'image/gif' : case 'image/bmp' : if ($thumbnail) { - echo "<img src=\"{$vars['url']}mod/file/thumbnail.php?file_guid={$vars['file_guid']}&size={$size}\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/thumbnail.php?file_guid={$vars['file_guid']}&size={$size}\" border=\"0\" />"; } else { if (!empty($mime) && elgg_view_exists("file/icon/{$mime}")) { echo elgg_view("file/icon/{$mime}", $vars); diff --git a/mod/file/views/default/file/specialcontent/audio/mid.php b/mod/file/views/default/file/specialcontent/audio/mid.php index cf216a3b3..61b3218f1 100644 --- a/mod/file/views/default/file/specialcontent/audio/mid.php +++ b/mod/file/views/default/file/specialcontent/audio/mid.php @@ -1,4 +1,4 @@ -<object type="audio/midi" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/midi" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/audio/mp3.php b/mod/file/views/default/file/specialcontent/audio/mp3.php index 83b77c391..cb4ab9376 100644 --- a/mod/file/views/default/file/specialcontent/audio/mp3.php +++ b/mod/file/views/default/file/specialcontent/audio/mp3.php @@ -1,4 +1,4 @@ -<object type="audio/mpeg" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/mpeg" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/audio/mpeg.php b/mod/file/views/default/file/specialcontent/audio/mpeg.php index 83b77c391..cb4ab9376 100644 --- a/mod/file/views/default/file/specialcontent/audio/mpeg.php +++ b/mod/file/views/default/file/specialcontent/audio/mpeg.php @@ -1,4 +1,4 @@ -<object type="audio/mpeg" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/mpeg" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/audio/x-wav.php b/mod/file/views/default/file/specialcontent/audio/x-wav.php index 21af956c2..b637eb1e1 100644 --- a/mod/file/views/default/file/specialcontent/audio/x-wav.php +++ b/mod/file/views/default/file/specialcontent/audio/x-wav.php @@ -1,4 +1,4 @@ -<object type="audio/x-wav" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/x-wav" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/image/default.php b/mod/file/views/default/file/specialcontent/image/default.php index b034857c2..8034c87d4 100644 --- a/mod/file/views/default/file/specialcontent/image/default.php +++ b/mod/file/views/default/file/specialcontent/image/default.php @@ -2,7 +2,7 @@ if ($vars['full'] && $smallthumb = $vars['entity']->smallthumb) { - echo "<p><a href=\"{$vars['url']}mod/file/download.php?file_guid={$vars['entity']->getGUID()}\"><img src=\"{$vars['url']}mod/file/thumbnail.php?file_guid={$vars['entity']->getGUID()}&size=large\" border=\"0\" /></a></p>"; + echo "<p><a href=\"".elgg_get_site_url()."mod/file/download.php?file_guid={$vars['entity']->getGUID()}\"><img src=\"".elgg_get_site_url()."mod/file/thumbnail.php?file_guid={$vars['entity']->getGUID()}&size=large\" border=\"0\" /></a></p>"; } diff --git a/mod/file/views/default/file/typecloud.php b/mod/file/views/default/file/typecloud.php index e404327ae..0e2f3a53c 100644 --- a/mod/file/views/default/file/typecloud.php +++ b/mod/file/views/default/file/typecloud.php @@ -21,7 +21,7 @@ $label = elgg_echo('all'); } - $url = $vars['url'] . "mod/file/search.php?subtype=file"; + $url = elgg_get_site_url() . "mod/file/search.php?subtype=file"; if ($tag != "all") $url .= "&md_type=simpletype&tag=" . urlencode($tag); if (isset($vars['friend_guid']) && $vars['friend_guid'] != false) { diff --git a/mod/file/views/default/file/upload.php b/mod/file/views/default/file/upload.php index f89cf86d3..b7b99e3b3 100644 --- a/mod/file/views/default/file/upload.php +++ b/mod/file/views/default/file/upload.php @@ -38,7 +38,7 @@ ?> -<form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" enctype="multipart/form-data" method="post" class="margin_top"> +<form action="<?php echo elgg_get_site_url(); ?>action/<?php echo $action; ?>" enctype="multipart/form-data" method="post" class="margin_top"> <p> <label> <?php diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index 6c979f13e..c1d2a3d13 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -28,8 +28,8 @@ echo "<div class='filerepo_gallery_item'>"; if ($vars['entity']->smallthumb) { echo "<p class='filerepo_title'>" . $file->title . "</p>"; - echo "<p><a href=\"{$file->getURL()}\"><img src=\"{$vars['url']}mod/file/thumbnail.php?size=medium&file_guid={$vars['entity']->getGUID()}\" border=\"0\" /></a></p>"; - echo "<p class='filerepo_timestamp'><small><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->username}</a> {$friendlytime}</small></p>"; + echo "<p><a href=\"{$file->getURL()}\"><img src=\"".elgg_get_site_url()."mod/file/thumbnail.php?size=medium&file_guid={$vars['entity']->getGUID()}\" border=\"0\" /></a></p>"; + echo "<p class='filerepo_timestamp'><small><a href=\"".elgg_get_site_url()."pg/file/{$owner->username}\">{$owner->username}</a> {$friendlytime}</small></p>"; //get the number of comments $numcomments = elgg_count_comments($vars['entity']); @@ -40,10 +40,10 @@ //if the user can edit, display edit and delete links if ($file->canEdit()) { echo "<div class='filerepo_controls'><p>"; - echo "<a href=\"{$vars['url']}mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a> "; + echo "<a href=\"".elgg_get_site_url()."mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a> "; echo elgg_view('output/confirmlink',array( - 'href' => $vars['url'] . "action/file/delete?file=" . $file->getGUID(), + 'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(), 'text' => elgg_echo("delete"), 'confirm' => elgg_echo("file:delete:confirm"), 'is_action' => true, @@ -56,7 +56,7 @@ } else { echo "<p class='filerepo_title'>{$title}</p>"; echo "<a href=\"{$file->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'large')) . "</a>"; - echo "<p class='filerepo_timestamp'><small><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}</small></p>"; + echo "<p class='filerepo_timestamp'><small><a href=\"".elgg_get_site_url()."pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}</small></p>"; //get the number of comments $numcomments = elgg_count_comments($file); if ($numcomments) @@ -68,7 +68,7 @@ } else { $info = "<p class='entity_title'> <a href=\"{$file->getURL()}\">{$title}</a></p>"; - $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}"; + $info .= "<p class='entity_subtext'><a href=\"".elgg_get_site_url()."pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}"; $numcomments = elgg_count_comments($file); if ($numcomments) $info .= ", <a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>"; @@ -84,7 +84,7 @@ ?> <div class="filerepo_file"> <div class="filerepo_icon"> - <a href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php + <a href="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid)); @@ -94,17 +94,17 @@ <div class="filerepo_title_owner_wrapper"> <?php //get the user and a link to their gallery - $user_gallery = $vars['url'] . "mod/file/search.php?md_type=simpletype&subtype=file&tag=image&owner_guid=" . $owner->guid . "&search_viewtype=gallery"; + $user_gallery = elgg_get_site_url() . "mod/file/search.php?md_type=simpletype&subtype=file&tag=image&owner_guid=" . $owner->guid . "&search_viewtype=gallery"; ?> <div class="filerepo_user_gallery_link"><a href="<?php echo $user_gallery; ?>"><?php echo sprintf(elgg_echo("file:user:gallery"),''); ?></a></div> - <div class="filerepo_title"><h2><a href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo $title; ?></a></h2></div> + <div class="filerepo_title"><h2><a href="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo $title; ?></a></h2></div> <div class="filerepo_owner"> <?php echo elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny')); ?> - <p class="filerepo_owner_details"><b><a href="<?php echo $vars['url']; ?>pg/file/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b><br /> + <p class="filerepo_owner_details"><b><a href="<?php echo elgg_get_site_url(); ?>pg/file/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b><br /> <small><?php echo $friendlytime; ?></small></p> </div> </div> @@ -138,7 +138,7 @@ ?> - <div class="filerepo_download"><p><a class="action_button small" href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_echo("file:download"); ?></a></p></div> + <div class="filerepo_download"><p><a class="action_button small" href="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_echo("file:download"); ?></a></p></div> <?php @@ -147,11 +147,11 @@ <div class="filerepo_controls"> <p> - <a href="<?php echo $vars['url']; ?>mod/file/edit.php?file_guid=<?php echo $file->getGUID(); ?>"><?php echo elgg_echo('edit'); ?></a> + <a href="<?php echo elgg_get_site_url(); ?>mod/file/edit.php?file_guid=<?php echo $file->getGUID(); ?>"><?php echo elgg_echo('edit'); ?></a> <?php echo elgg_view('output/confirmlink',array( - 'href' => $vars['url'] . "action/file/delete?file=" . $file->getGUID(), + 'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(), 'text' => elgg_echo("delete"), 'confirm' => elgg_echo("file:delete:confirm"), 'is_action' => true, diff --git a/mod/file/views/default/widgets/filerepo/view.php b/mod/file/views/default/widgets/filerepo/view.php index 74c7810d9..aac2c4012 100644 --- a/mod/file/views/default/widgets/filerepo/view.php +++ b/mod/file/views/default/widgets/filerepo/view.php @@ -58,7 +58,7 @@ //get a link to the users files - $users_file_url = $vars['url'] . "pg/file/" . get_user($f->owner_guid)->username; + $users_file_url = elgg_get_site_url() . "pg/file/" . get_user($f->owner_guid)->username; echo "<div class='filerepo_widget_singleitem_more'><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></div>"; echo "</div>"; diff --git a/mod/file/views/rss/object/file.php b/mod/file/views/rss/object/file.php index b7f8c9f13..52d26382f 100644 --- a/mod/file/views/rss/object/file.php +++ b/mod/file/views/rss/object/file.php @@ -22,5 +22,5 @@ <link><?php echo $vars['entity']->getURL(); ?></link> <title><![CDATA[<?php echo $title; ?>]]></title> <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description> - <enclosure url="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" length="<?php echo $vars['entity']->size(); ?>" type="<?php echo $vars['entity']->getMimeType(); ?>" /> + <enclosure url="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" length="<?php echo $vars['entity']->size(); ?>" type="<?php echo $vars['entity']->getMimeType(); ?>" /> </item> diff --git a/mod/groups/actions/delete.php b/mod/groups/actions/delete.php index 7d66b2a25..2983bc2ce 100644 --- a/mod/groups/actions/delete.php +++ b/mod/groups/actions/delete.php @@ -15,5 +15,5 @@ register_error(elgg_echo('group:notdeleted')); $url_name = get_loggedin_user()->username; - forward("{$vars['url']}pg/groups/member/{$url_name}"); + forward(elgg_get_site_url()."pg/groups/member/{$url_name}"); ?>
\ No newline at end of file diff --git a/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php index 3fedbd0dc..72e66480b 100644 --- a/mod/groups/views/default/forms/forums/addtopic.php +++ b/mod/groups/views/default/forms/forums/addtopic.php @@ -35,7 +35,7 @@ ?> <!-- display the input form --> -<form id="group_addtopic" action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post" class="margin_top"> +<form id="group_addtopic" action="<?php echo elgg_get_site_url(); ?>action/<?php echo $action; ?>" method="post" class="margin_top"> <?php echo elgg_view('input/securitytoken'); ?> <p> diff --git a/mod/groups/views/default/forms/forums/edittopic.php b/mod/groups/views/default/forms/forums/edittopic.php index 5470299db..1426385ed 100644 --- a/mod/groups/views/default/forms/forums/edittopic.php +++ b/mod/groups/views/default/forms/forums/edittopic.php @@ -26,7 +26,7 @@ ?> <!-- display the input form --> - <form id="group_edittopic" action="<?php echo $vars['url']; ?>action/groups/edittopic" method="post"> + <form id="group_edittopic" action="<?php echo elgg_get_site_url(); ?>action/groups/edittopic" method="post"> <?php echo elgg_view('input/securitytoken'); ?> <p> diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index 5bfc0d4fb..a78e0b982 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -13,7 +13,7 @@ } ?> -<form action="<?php echo $vars['url']; ?>action/groups/edit" id="edit_group" enctype="multipart/form-data" method="post" class="margin_top"> +<form action="<?php echo elgg_get_site_url(); ?>action/groups/edit" id="edit_group" enctype="multipart/form-data" method="post" class="margin_top"> <?php echo elgg_view('input/securitytoken'); ?> @@ -150,7 +150,7 @@ if (is_array($vars['config']->group) && sizeof($vars['config']->group) > 0) if ($vars['entity']) { ?> <div class="delete_group"> - <form action="<?php echo $vars['url'] . "action/groups/delete"; ?>"> + <form action="<?php echo elgg_get_site_url() . "action/groups/delete"; ?>"> <?php echo elgg_view('input/securitytoken'); $warning = elgg_echo("groups:deletewarning"); diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php index 0cbf82454..3298a7450 100644 --- a/mod/groups/views/default/forms/groups/invite.php +++ b/mod/groups/views/default/forms/groups/invite.php @@ -12,7 +12,7 @@ if ($friends) { ?> -<form action="<?php echo $vars['url']; ?>action/groups/invite" method="post" id="invite_to_group" class="margin_top"> +<form action="<?php echo elgg_get_site_url(); ?>action/groups/invite" method="post" id="invite_to_group" class="margin_top"> <?php echo elgg_view('input/securitytoken'); diff --git a/mod/groups/views/default/forum/maintopic.php b/mod/groups/views/default/forum/maintopic.php index 03e628846..9a3cc64cb 100644 --- a/mod/groups/views/default/forum/maintopic.php +++ b/mod/groups/views/default/forum/maintopic.php @@ -26,11 +26,11 @@ if (groups_can_edit_discussion($vars['entity'], elgg_get_page_owner()->owner_guid)) {
echo "<div class='entity_metadata'>";
echo "<span class='delete_button'>".elgg_view("output/confirmlink",array(
- 'href' => $vars['url'] . "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
+ 'href' => elgg_get_site_url() . "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
'text' => elgg_echo('delete'),
'confirm' => elgg_echo('deleteconfirm')
))."</span>";
- echo "<span class='entity_edit'><a class='link' href=\"{$vars['url']}pg/groups/edittopic/{$group_guid}/{$topic}/\">".elgg_echo('edit')."</a></span>";
+ echo "<span class='entity_edit'><a class='link' href=\"".elgg_get_site_url()."pg/groups/edittopic/{$group_guid}/{$topic}/\">".elgg_echo('edit')."</a></span>";
echo "</div>";
}
diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php index 5c1f5a099..ea6431037 100644 --- a/mod/groups/views/default/forum/topics.php +++ b/mod/groups/views/default/forum/topics.php @@ -12,7 +12,7 @@ if(elgg_get_page_owner()->isMember(get_loggedin_user())) { ?> <div class="content_header_options"> - <a class="action_button" href="<?php echo $vars['url']; ?>mod/groups/addtopic.php?group_guid=<?php echo $vars['group_guid']; ?>"><?php echo elgg_echo("groups:addtopic"); ?></a> + <a class="action_button" href="<?php echo elgg_get_site_url(); ?>mod/groups/addtopic.php?group_guid=<?php echo $vars['group_guid']; ?>"><?php echo elgg_echo("groups:addtopic"); ?></a> </div> <?php } diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php index 2eb532830..f12a3f306 100644 --- a/mod/groups/views/default/forum/viewposts.php +++ b/mod/groups/views/default/forum/viewposts.php @@ -17,7 +17,7 @@ echo elgg_view('navigation/breadcrumbs'); $count = $vars['entity']->countAnnotations('group_topic_post'); $offset = (int) get_input('offset',0); -$baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; +$baseurl = elgg_get_site_url() . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; echo elgg_view('navigation/pagination',array( 'limit' => 50, 'offset' => $offset, diff --git a/mod/groups/views/default/groups/find.php b/mod/groups/views/default/groups/find.php index 534469052..659d7c5ea 100644 --- a/mod/groups/views/default/groups/find.php +++ b/mod/groups/views/default/groups/find.php @@ -8,7 +8,7 @@ $tag_string = elgg_echo('groups:search:tags'); ?> <h3><?php echo elgg_echo('groups:searchtag'); ?></h3> -<form id="groupsearchform" action="<?php echo $vars['url']; ?>pg/groups/world/" method="get"> +<form id="groupsearchform" action="<?php echo elgg_get_site_url(); ?>pg/groups/world/" method="get"> <input type="text" name="tag" value="<?php echo $tag_string; ?>" onclick="if (this.value=='<?php echo $tag_string; ?>') { this.value='' }" class="search_input" /> <input type="submit" value="<?php echo elgg_echo('go'); ?>" /> </form>
\ No newline at end of file diff --git a/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php index b84a224ab..ed4e41c0d 100644 --- a/mod/groups/views/default/groups/forum_latest.php +++ b/mod/groups/views/default/groups/forum_latest.php @@ -5,7 +5,7 @@ //check to make sure this group forum has been activated if($vars['entity']->forum_enable != 'no'){ ?> -<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/groups/forum/" . elgg_get_page_owner_guid(); ?>"><?php echo elgg_echo('link:view:all')?></a></span> +<span class="group_widget_link"><a href="<?php echo elgg_get_site_url() . "pg/groups/forum/" . elgg_get_page_owner_guid(); ?>"><?php echo elgg_echo('link:view:all')?></a></span> <h3><?php echo elgg_echo('groups:latestdiscussion'); ?></h3> <?php @@ -18,13 +18,13 @@ if($vars['entity']->forum_enable != 'no'){ echo "<div class='entity_listing clearfloat'>"; echo "<div class='entity_listing_icon'>" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'tiny')) . "</div>"; - echo "<div class='entity_listing_info'><p class='entity_title'><a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$f->guid}&group_guid={$vars['entity']->guid}\">" . $f->title . "</a></p>"; + echo "<div class='entity_listing_info'><p class='entity_title'><a href=\"".elgg_get_site_url()."mod/groups/topicposts.php?topic={$f->guid}&group_guid={$vars['entity']->guid}\">" . $f->title . "</a></p>"; echo "<p class='entity_subtext'>".elgg_echo('comments').": " . $count_annotations . "</p></div>"; echo "</div>"; } } else { if(elgg_get_page_owner()->isMember(get_loggedin_user())){ - $create_discussion = $vars['url'] . "mod/groups/addtopic.php?group_guid=" . elgg_get_page_owner_guid(); + $create_discussion = elgg_get_site_url() . "mod/groups/addtopic.php?group_guid=" . elgg_get_page_owner_guid(); echo "<p class='margin_top'><a href=\"{$create_discussion}\">".elgg_echo("groups:addtopic")."</a></p>"; }else{ echo "<p class='margin_top'>". elgg_echo("grouptopic:notcreated") . "</p>"; diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php index 63af0dc07..aedb3f8e5 100644 --- a/mod/groups/views/default/groups/group_sort_menu.php +++ b/mod/groups/views/default/groups/group_sort_menu.php @@ -11,7 +11,7 @@ $filter = $vars['filter']; //url - $url = $vars['url'] . "pg/groups/world/"; + $url = elgg_get_site_url() . "pg/groups/world/"; ?> <div class="elgg_horizontal_tabbed_nav margin_top"> diff --git a/mod/groups/views/default/groups/grouplisting.php b/mod/groups/views/default/groups/grouplisting.php index 3e30259eb..1466234ab 100644 --- a/mod/groups/views/default/groups/grouplisting.php +++ b/mod/groups/views/default/groups/grouplisting.php @@ -26,10 +26,10 @@ $info .= "<p class='entity_subtext groups'>" . $mem . " / <b>" . get_group_membe //for admins only - display the feature or unfeature option if(isadminloggedin()) { if($vars['entity']->featured_group == "yes"){ - $url = elgg_add_action_tokens_to_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action_type=unfeature"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action_type=unfeature"); $wording = elgg_echo("groups:makeunfeatured"); }else{ - $url = elgg_add_action_tokens_to_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action_type=feature"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action_type=feature"); $wording = elgg_echo("groups:makefeatured"); } // display 'make featured' option diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php index 19f09fb2e..9d8aae8fc 100644 --- a/mod/groups/views/default/groups/groupprofile.php +++ b/mod/groups/views/default/groups/groupprofile.php @@ -7,14 +7,14 @@ $user = get_loggedin_user(); -elgg_push_breadcrumb(elgg_echo('groups:all'), "{$vars['url']}pg/groups/world"); +elgg_push_breadcrumb(elgg_echo('groups:all'), elgg_get_site_url()."pg/groups/world"); // create user actions $actions = array(); if ($vars['entity']->canEdit()) { // breadcrumb trail - elgg_push_breadcrumb(elgg_echo('groups:yours'), "{$vars['url']}pg/groups/member/{$user->username}"); + elgg_push_breadcrumb(elgg_echo('groups:yours'), elgg_get_site_url()."pg/groups/member/{$user->username}"); // edit and invite $actions["mod/groups/edit.php?group_guid={$vars['entity']->getGUID()}"] = elgg_echo('groups:edit'); @@ -23,7 +23,7 @@ if ($vars['entity']->canEdit()) { if ($vars['entity']->isMember($user)) { // breadcrumb trail - elgg_push_breadcrumb(elgg_echo('groups:yours'), "{$vars['url']}pg/groups/member/{$user->username}"); + elgg_push_breadcrumb(elgg_echo('groups:yours'), elgg_get_site_url()."pg/groups/member/{$user->username}"); // leave $url = elgg_add_action_tokens_to_url("action/groups/leave?group_guid={$vars['entity']->getGUID()}"); @@ -50,7 +50,7 @@ $action_buttons = ''; if (!empty($actions)) { $action_buttons = '<div class="content_header_options">'; foreach ($actions as $url => $action) { - $action_buttons .= "<a class=\"action_button\" href=\"{$vars['url']}$url\">$action</a>"; + $action_buttons .= "<a class=\"action_button\" href=\"".elgg_get_site_url()."$url\">$action</a>"; } $action_buttons .= '</div>'; } diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php index c90a29128..297dc31d4 100644 --- a/mod/groups/views/default/groups/invitationrequests.php +++ b/mod/groups/views/default/groups/invitationrequests.php @@ -15,13 +15,13 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) { 'override' => 'true' ))."</div>"; - $url = elgg_add_action_tokens_to_url("{$vars['url']}action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}"); ?> <div class="entity_listing_info"> <a href="<?php echo $url; ?>" class="submit_button"><?php echo elgg_echo('accept'); ?></a> <?php echo str_replace('<a', '<a class="action_button disabled" ', elgg_view('output/confirmlink',array( - 'href' => $vars['url'] . "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}", + 'href' => elgg_get_site_url() . "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}", 'confirm' => elgg_echo('groups:invite:remove:check'), 'text' => elgg_echo('delete'), ))); diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php index b08e521cf..6dde33bd4 100644 --- a/mod/groups/views/default/groups/membershiprequests.php +++ b/mod/groups/views/default/groups/membershiprequests.php @@ -16,13 +16,13 @@ )); echo "</div>"; - $url = elgg_add_action_tokens_to_url("{$vars['url']}action/groups/addtogroup?user_guid={$request->guid}&group_guid={$vars['entity']->guid}"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/groups/addtogroup?user_guid={$request->guid}&group_guid={$vars['entity']->guid}"); ?> <div class="entity_listing_info"> <a href="<?php echo $url; ?>" class="submit_button"><?php echo elgg_echo('accept'); ?></a> <?php echo str_replace('<a', '<a class="action_button disabled" ', elgg_view('output/confirmlink',array( - 'href' => $vars['url'] . 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid, + 'href' => elgg_get_site_url() . 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid, 'confirm' => elgg_echo('groups:joinrequest:remove:check'), 'text' => elgg_echo('delete'), ))); diff --git a/mod/groups/views/default/groups/side_menu.php b/mod/groups/views/default/groups/side_menu.php index 3048ea431..99eb13a11 100644 --- a/mod/groups/views/default/groups/side_menu.php +++ b/mod/groups/views/default/groups/side_menu.php @@ -1,8 +1,8 @@ <ul class="submenu page_navigation"> <?php if(isloggedin()){ - echo "<li><a href=\"{$vars['url']}pg/groups/member/{get_loggedin_user()->username}\">". elgg_echo('groups:yours') ."</a></li>"; - echo "<li><a href=\"{$vars['url']}pg/groups/invitations/{get_loggedin_user()->username}\">". elgg_echo('groups:invitations') ."</a></li>"; + echo "<li><a href=\"".elgg_get_site_url()."pg/groups/member/{get_loggedin_user()->username}\">". elgg_echo('groups:yours') ."</a></li>"; + echo "<li><a href=\"".elgg_get_site_url()."pg/groups/invitations/{get_loggedin_user()->username}\">". elgg_echo('groups:invitations') ."</a></li>"; } ?> </ul>
\ No newline at end of file diff --git a/mod/groups/views/default/icon/group/default/large.php b/mod/groups/views/default/icon/group/default/large.php index a9d69a691..e5e30ac3e 100644 --- a/mod/groups/views/default/icon/group/default/large.php +++ b/mod/groups/views/default/icon/group/default/large.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/groups/graphics/defaultlarge.gif"; + echo elgg_get_site_url() . "mod/groups/graphics/defaultlarge.gif"; ?>
\ No newline at end of file diff --git a/mod/groups/views/default/icon/group/default/medium.php b/mod/groups/views/default/icon/group/default/medium.php index 47cf328b8..f7bd9376d 100644 --- a/mod/groups/views/default/icon/group/default/medium.php +++ b/mod/groups/views/default/icon/group/default/medium.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/groups/graphics/defaultmedium.gif"; + echo elgg_get_site_url() . "mod/groups/graphics/defaultmedium.gif"; ?>
\ No newline at end of file diff --git a/mod/groups/views/default/icon/group/default/small.php b/mod/groups/views/default/icon/group/default/small.php index b052c1cc3..2a0ef7d93 100644 --- a/mod/groups/views/default/icon/group/default/small.php +++ b/mod/groups/views/default/icon/group/default/small.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/groups/graphics/defaultsmall.gif"; + echo elgg_get_site_url() . "mod/groups/graphics/defaultsmall.gif"; ?>
\ No newline at end of file diff --git a/mod/groups/views/default/icon/group/default/tiny.php b/mod/groups/views/default/icon/group/default/tiny.php index 1023d06e2..2920da6b6 100644 --- a/mod/groups/views/default/icon/group/default/tiny.php +++ b/mod/groups/views/default/icon/group/default/tiny.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/groups/graphics/defaulttiny.gif"; + echo elgg_get_site_url() . "mod/groups/graphics/defaulttiny.gif"; ?>
\ No newline at end of file diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index 2fdf24723..9729c9d83 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -36,7 +36,7 @@ if (get_context() == "search") { //get the group avatar $icon = elgg_view("profile/icon",array('entity' => $u, 'size' => 'tiny')); //get the group and topic title - $info .= "<p class='entity_subtext'><b>" . elgg_echo('groups:topic') . ":</b> <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>"; + $info .= "<p class='entity_subtext'><b>" . elgg_echo('groups:topic') . ":</b> <a href=\"".elgg_get_site_url()."mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>"; if ($group instanceof ElggGroup) { $info .= "<p class='entity_title'><b>" . elgg_echo('group') . ":</b> <a href=\"{$group->getURL()}\">".htmlentities($group->name, ENT_QUOTES, 'UTF-8') ."</a></p>"; } @@ -47,20 +47,20 @@ if (get_context() == "search") { }else{ $info = "<p class='entity_subtext groups'>" . sprintf(elgg_echo('groups:forum:created'), $forum_created, $counter) . "</p>"; } - $info .= "<p class='entity_title'>" . elgg_echo('groups:started') . " " . $topic_owner->name . ": <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>"; + $info .= "<p class='entity_title'>" . elgg_echo('groups:started') . " " . $topic_owner->name . ": <a href=\"".elgg_get_site_url()."mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>"; if (groups_can_edit_discussion($vars['entity'], elgg_get_page_owner()->owner_guid)) { // display the delete link to those allowed to delete $info .= "<div class='entity_metadata'>"; $info .= '<span class="entity_edit">' . elgg_view("output/url", array( - 'href' => $vars['url'] . "mod/groups/edittopic.php?group={$vars['entity']->container_guid}&topic={$vars['entity']->guid}", + 'href' => elgg_get_site_url() . "mod/groups/edittopic.php?group={$vars['entity']->container_guid}&topic={$vars['entity']->guid}", 'text' => elgg_echo('edit'), )); $info .= '</span>'; // display the delete link to those allowed to delete $info .= '<span class="delete_button">' . elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid, + 'href' => elgg_get_site_url() . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )); diff --git a/mod/groups/views/default/river/forum/topic/create.php b/mod/groups/views/default/river/forum/topic/create.php index 09b2a3483..bb38e1cf3 100644 --- a/mod/groups/views/default/river/forum/topic/create.php +++ b/mod/groups/views/default/river/forum/topic/create.php @@ -6,7 +6,7 @@ $forumtopic = $object->guid; $group_guid = $object->container_guid; $group = get_entity($group_guid); - $url = $vars['url'] . "mod/groups/topicposts.php?topic=" . $forumtopic . "&group_guid=" . $group_guid; + $url = elgg_get_site_url() . "mod/groups/topicposts.php?topic=" . $forumtopic . "&group_guid=" . $group_guid; //$comment = $object->getAnnotations("group_topic_post", 1, 0, "asc"); //foreach($comment as $c){ $contents = $object->description; diff --git a/mod/invitefriends/views/default/invitefriends/form.php b/mod/invitefriends/views/default/invitefriends/form.php index 301f99ce3..de8d77388 100644 --- a/mod/invitefriends/views/default/invitefriends/form.php +++ b/mod/invitefriends/views/default/invitefriends/form.php @@ -6,7 +6,7 @@ */ echo elgg_view('input/form', array( - 'action' => $vars['url'] . 'action/invitefriends/invite', + 'action' => elgg_get_site_url() . 'action/invitefriends/invite', 'body' => elgg_view('invitefriends/formitems'), 'method' => 'post' ) diff --git a/mod/logbrowser/views/default/logbrowser/adminlinks.php b/mod/logbrowser/views/default/logbrowser/adminlinks.php index e84e385ed..c52419c89 100644 --- a/mod/logbrowser/views/default/logbrowser/adminlinks.php +++ b/mod/logbrowser/views/default/logbrowser/adminlinks.php @@ -1,4 +1,4 @@ <?php ?> -<a href="<?php echo $vars['url']; ?>mod/logbrowser/?user_guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("logbrowser:explore"); ?></a>
\ No newline at end of file +<a href="<?php echo elgg_get_site_url(); ?>mod/logbrowser/?user_guid=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("logbrowser:explore"); ?></a>
\ No newline at end of file diff --git a/mod/logbrowser/views/default/logbrowser/form.php b/mod/logbrowser/views/default/logbrowser/form.php index 7c993e6a2..eb2dd95ba 100644 --- a/mod/logbrowser/views/default/logbrowser/form.php +++ b/mod/logbrowser/views/default/logbrowser/form.php @@ -46,7 +46,7 @@ $wrappedform = elgg_view('input/form', array( 'body' => $form, 'method' => 'get', - 'action' => "{$vars['url']}pg/admin/logbrowser", + 'action' => elgg_get_site_url()."pg/admin/logbrowser", )); ?> diff --git a/mod/members/views/default/members/members_navigation.php b/mod/members/views/default/members/members_navigation.php index 1a79c3cfd..f3d53a954 100644 --- a/mod/members/views/default/members/members_navigation.php +++ b/mod/members/views/default/members/members_navigation.php @@ -11,7 +11,7 @@ $filter = $vars['filter']; //url - $url = $vars['url'] . "mod/members/index.php"; + $url = elgg_get_site_url() . "mod/members/index.php"; ?> <div class="elgg_horizontal_tabbed_nav margin_top"> diff --git a/mod/members/views/default/members/search.php b/mod/members/views/default/members/search.php index 8d9a9543b..993df239b 100644 --- a/mod/members/views/default/members/search.php +++ b/mod/members/views/default/members/search.php @@ -8,14 +8,14 @@ <div class="sidebar_container"> <h3><?php echo elgg_echo('members:searchtag'); ?></h3> -<form id="memberssearchform" class="member_tags" action="<?php echo $vars['url']; ?>mod/members/index.php?" method="get"> +<form id="memberssearchform" class="member_tags" action="<?php echo elgg_get_site_url(); ?>mod/members/index.php?" method="get"> <input type="text" name="tag" value="Member tags" onclick="if (this.value=='Member tags') { this.value='' }" class="search_input" /> <input type="hidden" name="filter" value="search_tags" /> <input type="submit" value="<?php echo elgg_echo('go'); ?>" /> </form> <h3><?php echo elgg_echo('members:searchname'); ?></h3> -<form id="memberssearchform" class="member_name" action="<?php echo $vars['url']; ?>mod/members/index.php?" method="get"> +<form id="memberssearchform" class="member_name" action="<?php echo elgg_get_site_url(); ?>mod/members/index.php?" method="get"> <input type="text" name="tag" value="Members name" onclick="if (this.value=='Members name') { this.value='' }" class="search_input" /> <input type="hidden" name="subtype" value="" /> <input type="hidden" name="object" value="user" /> diff --git a/mod/messageboard/views/default/messageboard/css.php b/mod/messageboard/views/default/messageboard/css.php index 62ae629c0..b7782e8e3 100644 --- a/mod/messageboard/views/default/messageboard/css.php +++ b/mod/messageboard/views/default/messageboard/css.php @@ -78,7 +78,7 @@ p.message_item_timestamp { width:14px; height:14px; margin:0 3px 3px 0; - background: url("<?php echo $vars['url']; ?>_graphics/icon_customise_remove.png") no-repeat 0 0; + background: url("<?php echo elgg_get_site_url(); ?>_graphics/icon_customise_remove.png") no-repeat 0 0; text-indent: -9000px; } .messageboard .delete_message a:hover { diff --git a/mod/messageboard/views/default/messageboard/forms/add.php b/mod/messageboard/views/default/messageboard/forms/add.php index ec61ebee7..d44e477bf 100644 --- a/mod/messageboard/views/default/messageboard/forms/add.php +++ b/mod/messageboard/views/default/messageboard/forms/add.php @@ -8,7 +8,7 @@ ?> <div id="mb_input_wrapper"> - <form action="<?php echo $vars['url']; ?>action/messageboard/add" method="post" name="messageboardForm"> + <form action="<?php echo elgg_get_site_url(); ?>action/messageboard/add" method="post" name="messageboardForm"> <!-- textarea for the contents --> <textarea name="message_content" value="" class="input_textarea"></textarea><br /> diff --git a/mod/messageboard/views/default/messageboard/messageboard_content.php b/mod/messageboard/views/default/messageboard/messageboard_content.php index c0f4cea3c..5f3db4d18 100644 --- a/mod/messageboard/views/default/messageboard/messageboard_content.php +++ b/mod/messageboard/views/default/messageboard/messageboard_content.php @@ -33,7 +33,7 @@ echo "<div class='delete_message'>" . elgg_view("output/confirmlink",array( - 'href' => $vars['url'] . "action/messageboard/delete?annotation_id=" . $vars['annotation']->id, + 'href' => elgg_get_site_url() . "action/messageboard/delete?annotation_id=" . $vars['annotation']->id, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</div>"; @@ -50,9 +50,9 @@ //create the url to their messageboard $user_mb = "pg/messageboard/" . $msg_owner->username; - echo "<a href=\"" . $vars['url'] . $user_mb . "\">".elgg_echo('messageboard:replyon')." " . $msg_owner->name . "'s " . elgg_echo('messageboard:messageboard') . "</a> | "; + echo "<a href=\"" . elgg_get_site_url() . $user_mb . "\">".elgg_echo('messageboard:replyon')." " . $msg_owner->name . "'s " . elgg_echo('messageboard:messageboard') . "</a> | "; - echo "<a href=\"" . $vars['url'] . "mod/messageboard/history.php?user=" . $msg_owner->guid ."\">" . elgg_echo('messageboard:history') . "</a>"; + echo "<a href=\"" . elgg_get_site_url() . "mod/messageboard/history.php?user=" . $msg_owner->guid ."\">" . elgg_echo('messageboard:history') . "</a>"; } ?> diff --git a/mod/messageboard/views/default/widgets/messageboard/view.php b/mod/messageboard/views/default/widgets/messageboard/view.php index 223cbc007..8c1abb47b 100644 --- a/mod/messageboard/views/default/widgets/messageboard/view.php +++ b/mod/messageboard/views/default/widgets/messageboard/view.php @@ -25,12 +25,12 @@ if (isloggedin()) { $("#postit").click(function(){ //display the ajax loading gif at the start of the function call - //$('#loader').html('<img src="<?php echo $vars['url']; ?>_graphics/ajax_loader.gif" />'); + //$('#loader').html('<img src="<?php echo elgg_get_site_url(); ?>_graphics/ajax_loader.gif" />'); $('#loader').html('<?php echo elgg_view('ajax/loader',array('slashes' => TRUE)); ?>'); //load the results back into the message board contents and remove the loading gif //remember that the actual div being populated is determined on views/default/messageboard/messageboard.php - $("#messageboard_wrapper").load("<?php echo $vars['url']; ?>mod/messageboard/ajax_endpoint/load.php", {messageboard_content:$("[name=message_content]").val(), pageOwner:$("[name=pageOwner]").val(), numToDisplay:<?php echo $num_display; ?>}, function(){ + $("#messageboard_wrapper").load("<?php echo elgg_get_site_url(); ?>mod/messageboard/ajax_endpoint/load.php", {messageboard_content:$("[name=message_content]").val(), pageOwner:$("[name=pageOwner]").val(), numToDisplay:<?php echo $num_display; ?>}, function(){ $('#loader').empty(); // remove the loading gif $('[name=message_content]').val(''); // clear the input textarea }); //end @@ -53,7 +53,7 @@ if (isloggedin()) { <!-- menu options --> <div id="messageboard_widget_menu"> - <a href="<?php echo $vars['url']; ?>pg/messageboard/<?php echo $user->username; ?>"><?php echo elgg_echo("messageboard:viewall"); ?></a> + <a href="<?php echo elgg_get_site_url(); ?>pg/messageboard/<?php echo $user->username; ?>"><?php echo elgg_echo("messageboard:viewall"); ?></a> </div> <!-- loading graphic --> diff --git a/mod/messages/views/default/messages/css.php b/mod/messages/views/default/messages/css.php index 36871e22e..95bcba108 100644 --- a/mod/messages/views/default/messages/css.php +++ b/mod/messages/views/default/messages/css.php @@ -8,24 +8,24 @@ /* messages/new messages icon & counter in elgg_topbar */ a.privatemessages { - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; padding-left:16px; margin:4px 15px 0 5px; cursor:pointer; } a.privatemessages:hover { text-decoration: none; - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; } a.privatemessages.new { - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left 2px; padding-left:18px; margin:4px 15px 0 5px; color:white; } a.privatemessages.new:hover { text-decoration: none; - background:transparent url(<?php echo $vars['url']; ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; + background:transparent url(<?php echo elgg_get_site_url(); ?>mod/messages/graphics/toolbar_messages_icon.gif) no-repeat left -36px; } a.privatemessages.new span { background-color: red; diff --git a/mod/messages/views/default/messages/forms/reply.php b/mod/messages/views/default/messages/forms/reply.php index c717f9b13..998c0071f 100644 --- a/mod/messages/views/default/messages/forms/reply.php +++ b/mod/messages/views/default/messages/forms/reply.php @@ -12,7 +12,7 @@ } ?> -<form class="margin_top" id="messages_reply_form" action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm"> +<form class="margin_top" id="messages_reply_form" action="<?php echo elgg_get_site_url(); ?>action/messages/send" method="post" name="messageForm"> <?php echo elgg_view('action/securitytoken'); ?> <!-- populate the title space with the orginal message title, inserting re: before it --> diff --git a/mod/messages/views/default/messages/forms/send.php b/mod/messages/views/default/messages/forms/send.php index 7fea03842..a2d373549 100644 --- a/mod/messages/views/default/messages/forms/send.php +++ b/mod/messages/views/default/messages/forms/send.php @@ -22,7 +22,7 @@ unset($_SESSION['msg_to']); unset($_SESSION['msg_title']); unset($_SESSION['msg_contents']); ?> -<form id="messages_send_form" action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm"> +<form id="messages_send_form" action="<?php echo elgg_get_site_url(); ?>action/messages/send" method="post" name="messageForm"> <?php echo elgg_view('input/securitytoken'); //check to see if the message recipient has already been selected @@ -34,7 +34,7 @@ unset($_SESSION['msg_contents']); echo "<div class='entity_listing messages clearfloat'><div class='entity_listing_icon'>".elgg_view("profile/icon",array('entity' => $user, 'size' => 'tiny'))."</div>"; //draw it - echo "<div class='entity_listing_info'>".elgg_echo("messages:to").": <a href='{$vars['url']}pg/profile/".$user->username."'>".$user->name."</a>"; + echo "<div class='entity_listing_info'>".elgg_echo("messages:to").": <a href='".elgg_get_site_url()."pg/profile/".$user->username."'>".$user->name."</a>"; //set the hidden input field to the recipients guid echo "<input type='hidden' name='send_to' value=\"{$send_to}\" />"; echo "</div></div>"; diff --git a/mod/messages/views/default/messages/forms/view.php b/mod/messages/views/default/messages/forms/view.php index 3d76c56ca..c957e9610 100644 --- a/mod/messages/views/default/messages/forms/view.php +++ b/mod/messages/views/default/messages/forms/view.php @@ -19,4 +19,4 @@ if($vars['page_view'] == "inbox"){ $body .= '<input class="cancel_button" type="button" onclick="javascript:$(\'input[type=checkbox]\').click();" value="'.elgg_echo('messages:toggle').'" />'; $body .= '</div>'; -echo elgg_view('input/form',array('body' => $body, 'action' => $vars['url'] . 'action/messages/delete', 'method' => 'post', 'internalid' => 'messages_list_form'));
\ No newline at end of file +echo elgg_view('input/form',array('body' => $body, 'action' => elgg_get_site_url() . 'action/messages/delete', 'method' => 'post', 'internalid' => 'messages_list_form'));
\ No newline at end of file diff --git a/mod/messages/views/default/messages/menu.php b/mod/messages/views/default/messages/menu.php index 6fbeedd46..566a87179 100644 --- a/mod/messages/views/default/messages/menu.php +++ b/mod/messages/views/default/messages/menu.php @@ -8,5 +8,5 @@ // login check already performed in profile/icon ?> <li class="user_menu_profile"> - <a class="send_message" href="<?php echo $vars['url']; ?>mod/messages/send.php?send_to=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("messages:sendmessage"); ?></a> + <a class="send_message" href="<?php echo elgg_get_site_url(); ?>mod/messages/send.php?send_to=<?php echo $vars['entity']->guid; ?>"><?php echo elgg_echo("messages:sendmessage"); ?></a> </li>
\ No newline at end of file diff --git a/mod/messages/views/default/messages/messages.php b/mod/messages/views/default/messages/messages.php index e2bce0f44..ec94c5f0f 100644 --- a/mod/messages/views/default/messages/messages.php +++ b/mod/messages/views/default/messages/messages.php @@ -12,14 +12,14 @@ // set some variables to use below if(get_input("type") == "sent"){ // send back to the users sentbox - $url = $vars['url'] . "mod/messages/sent.php"; + $url = elgg_get_site_url() . "mod/messages/sent.php"; // set up breadcrumbs context elgg_push_breadcrumb(elgg_echo('messages:sent'), $url); //this is used on the delete link so we know which type of message it is $type = "sent"; } else { //send back to the users inbox - $url = $vars['url'] . "pg/messages/" . get_loggedin_user()->username; + $url = elgg_get_site_url() . "pg/messages/" . get_loggedin_user()->username; // set up breadcrumbs context elgg_push_breadcrumb(elgg_echo('messages:inbox'), $url); //this is used on the delete link so we know which type of message it is @@ -46,7 +46,7 @@ if (isloggedin()) <div class="content_header_options"> <a class="action_button message_reply" onclick="elgg_slide_toggle(this,'#elgg_page_contents','#message_reply_form');"><?php echo elgg_echo('messages:answer'); ?></a> <?php echo elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/messages/delete?message_id=" . $vars['entity']->getGUID() . "&type={$type}&submit=" . elgg_echo('delete'), + 'href' => elgg_get_site_url() . "action/messages/delete?message_id=" . $vars['entity']->getGUID() . "&type={$type}&submit=" . elgg_echo('delete'), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), 'class' => "action_button disabled" @@ -64,11 +64,11 @@ if (isloggedin()) //get an instance of the user who the message has been sent to so we can access the name and icon $user_object = get_entity($vars['entity']->toId); $message_icon = elgg_view("profile/icon",array('entity' => $user_object, 'size' => 'tiny')); - $message_owner = elgg_echo('messages:to').": <a href='{$vars['url']}pg/profile/".$user_object->username."'>".$user_object->name."</a>"; + $message_owner = elgg_echo('messages:to').": <a href='".elgg_get_site_url()."pg/profile/".$user_object->username."'>".$user_object->name."</a>"; }else{ $user_object = get_entity($vars['entity']->fromId); $message_icon = elgg_view("profile/icon",array('entity' => $user_object, 'size' => 'tiny')); - $message_owner = elgg_echo('messages:from').": <a href='{$vars['url']}pg/profile/".$user_object->username."'>".get_entity($vars['entity']->fromId)->name."</a>"; + $message_owner = elgg_echo('messages:from').": <a href='".elgg_get_site_url()."pg/profile/".$user_object->username."'>".get_entity($vars['entity']->fromId)->name."</a>"; } ?> <div class="entity_listing_icon"><?php echo $message_icon ?></div> @@ -92,7 +92,7 @@ if (isloggedin()) <!-- reply form --> <div id="message_reply_form" class="hidden margin_top"> <h2><?php echo elgg_echo('messages:answer'); ?></h2> - <form action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm" class="margin_top" id="messages_send_form"> + <form action="<?php echo elgg_get_site_url(); ?>action/messages/send" method="post" name="messageForm" class="margin_top" id="messages_send_form"> <?php echo elgg_view('input/securitytoken'); ?> <p><label><?php echo elgg_echo("messages:title"); ?>: <br /><input type='text' name='title' class="input_text" value='<?php echo $reply_title; ?>' /></label></p> <p class="longtext_inputarea"><label><?php echo elgg_echo("messages:message"); ?>:</label> diff --git a/mod/messages/views/default/messages/topbar.php b/mod/messages/views/default/messages/topbar.php index 4aa23b91a..51ca8a15b 100644 --- a/mod/messages/views/default/messages/topbar.php +++ b/mod/messages/views/default/messages/topbar.php @@ -17,10 +17,10 @@ if($num_messages){ if($num == 0) { ?> - <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages" > </a> + <a href="<?php echo elgg_get_site_url(); ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages" > </a> <?php }else{ ?> - <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a> + <a href="<?php echo elgg_get_site_url(); ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a> <?php } diff --git a/mod/messages/views/default/messages/view.php b/mod/messages/views/default/messages/view.php index 41ad11104..7d9e45ad2 100644 --- a/mod/messages/views/default/messages/view.php +++ b/mod/messages/views/default/messages/view.php @@ -41,7 +41,7 @@ if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) { echo "<div class='message_subject'>"; // display delete button echo "<span class='delete_button'>" . elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/messages/delete?message_id=" . $message->getGUID() . "&type=inbox&submit=" . urlencode(elgg_echo('delete')), + 'href' => elgg_get_site_url() . "action/messages/delete?message_id=" . $message->getGUID() . "&type=inbox&submit=" . urlencode(elgg_echo('delete')), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</span>"; @@ -76,7 +76,7 @@ if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) { echo "<div class='message_subject'>"; //display the link to 'delete' echo "<div class='delete_button'>" . elgg_view("output/confirmlink", array( - 'href' => $vars['url'] . "action/messages/delete?message_id=" . $message->getGUID() . "&type=sent&submit=" . urlencode(elgg_echo('delete')), + 'href' => elgg_get_site_url() . "action/messages/delete?message_id=" . $message->getGUID() . "&type=sent&submit=" . urlencode(elgg_echo('delete')), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</div>"; diff --git a/mod/notifications/views/default/notifications/css.php b/mod/notifications/views/default/notifications/css.php index 19615162b..385c55b0b 100644 --- a/mod/notifications/views/default/notifications/css.php +++ b/mod/notifications/views/default/notifications/css.php @@ -66,16 +66,16 @@ outline: none; } #notificationstable td.emailtogglefield a.emailtoggleOff { - background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right 2px; + background: url(<?php echo elgg_get_site_url(); ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right 2px; } #notificationstable td.emailtogglefield a.emailtoggleOn { - background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right -36px; + background: url(<?php echo elgg_get_site_url(); ?>mod/notifications/graphics/icon_notifications_email.gif) no-repeat right -36px; } #notificationstable td.sitetogglefield a.sitetoggleOff { - background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_site.gif) no-repeat right 2px; + background: url(<?php echo elgg_get_site_url(); ?>mod/notifications/graphics/icon_notifications_site.gif) no-repeat right 2px; } #notificationstable td.sitetogglefield a.sitetoggleOn { - background: url(<?php echo $vars['url']; ?>mod/notifications/graphics/icon_notifications_site.gif) no-repeat right -37px; + background: url(<?php echo elgg_get_site_url(); ?>mod/notifications/graphics/icon_notifications_site.gif) no-repeat right -37px; } .notification_friends, .notification_personal, diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php index f1e103b72..9f1273488 100644 --- a/mod/notifications/views/default/notifications/subscriptions/form.php +++ b/mod/notifications/views/default/notifications/subscriptions/form.php @@ -23,7 +23,7 @@ echo elgg_view('input/form',array( elgg_view('notifications/subscriptions/collections') . elgg_view('notifications/subscriptions/forminternals'), 'method' => 'post', - 'action' => $vars['url'] . 'action/notificationsettings/save', + 'action' => elgg_get_site_url() . 'action/notificationsettings/save', )); ?> diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php index 0d066bf80..e866037cc 100644 --- a/mod/pages/views/default/forms/pages/edit.php +++ b/mod/pages/views/default/forms/pages/edit.php @@ -40,7 +40,7 @@ if (!$vars['entity']) { } ?> <div class="contentWrapper"> -<form action="<?php echo $vars['url']; ?>action/pages/edit" method="post"> +<form action="<?php echo elgg_get_site_url(); ?>action/pages/edit" method="post"> <?php echo elgg_view('input/securitytoken'); if (is_array($vars['config']->pages) && sizeof($vars['config']->pages) > 0) { diff --git a/mod/pages/views/default/forms/pages/editwelcome.php b/mod/pages/views/default/forms/pages/editwelcome.php index e6d1f925a..625628639 100644 --- a/mod/pages/views/default/forms/pages/editwelcome.php +++ b/mod/pages/views/default/forms/pages/editwelcome.php @@ -21,7 +21,7 @@ if($vars['entity']) { $page_owner = $vars['owner']->guid; ?> -<form action="<?php echo $vars['url']; ?>action/pages/editwelcome" method="post"> +<form action="<?php echo elgg_get_site_url(); ?>action/pages/editwelcome" method="post"> <p class="longtext_inputarea"> <label> diff --git a/mod/pages/views/default/icon/object/page/medium.php b/mod/pages/views/default/icon/object/page/medium.php index bb81a9653..ebf028ef7 100644 --- a/mod/pages/views/default/icon/object/page/medium.php +++ b/mod/pages/views/default/icon/object/page/medium.php @@ -5,4 +5,4 @@ * @package ElggPages */ -echo $vars['url'] . "mod/pages/images/pages_lrg.gif"; +echo elgg_get_site_url() . "mod/pages/images/pages_lrg.gif"; diff --git a/mod/pages/views/default/icon/object/page/small.php b/mod/pages/views/default/icon/object/page/small.php index 55466f539..850c78a51 100644 --- a/mod/pages/views/default/icon/object/page/small.php +++ b/mod/pages/views/default/icon/object/page/small.php @@ -5,4 +5,4 @@ * @package ElggPages */ -echo $vars['url'] . "mod/pages/images/pages.gif";
\ No newline at end of file +echo elgg_get_site_url() . "mod/pages/images/pages.gif";
\ No newline at end of file diff --git a/mod/pages/views/default/icon/object/page_top/medium.php b/mod/pages/views/default/icon/object/page_top/medium.php index bb5c367b2..d1200ad61 100644 --- a/mod/pages/views/default/icon/object/page_top/medium.php +++ b/mod/pages/views/default/icon/object/page_top/medium.php @@ -5,5 +5,5 @@ * @package ElggPages */ -echo $vars['url'] . "mod/pages/images/pages_lrg.gif"; +echo elgg_get_site_url() . "mod/pages/images/pages_lrg.gif"; ?> diff --git a/mod/pages/views/default/icon/object/page_top/small.php b/mod/pages/views/default/icon/object/page_top/small.php index 5be6e578d..bb9e0047a 100644 --- a/mod/pages/views/default/icon/object/page_top/small.php +++ b/mod/pages/views/default/icon/object/page_top/small.php @@ -5,4 +5,4 @@ * @package ElggPages */ -echo $vars['url'] . "mod/pages/images/pages.gif"; +echo elgg_get_site_url() . "mod/pages/images/pages.gif"; diff --git a/mod/pages/views/default/pages/css.php b/mod/pages/views/default/pages/css.php index 78298c6a1..48991b904 100644 --- a/mod/pages/views/default/pages/css.php +++ b/mod/pages/views/default/pages/css.php @@ -18,7 +18,7 @@ } .treeview .hitarea { - background: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default.gif) -64px -25px no-repeat; + background: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-default.gif) -64px -25px no-repeat; height: 16px; width: 16px; margin-left: -16px; @@ -44,36 +44,36 @@ .treeview .hover { color: red; cursor: pointer; } -.treeview li { background: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default-line.gif) 0 0 no-repeat; } +.treeview li { background: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-default-line.gif) 0 0 no-repeat; } .treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } .treeview .expandable-hitarea { background-position: -80px -3px; } .treeview li.last { background-position: 0 -1766px } -.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-default.gif); } +.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-default.gif); } .treeview li.lastCollapsable { background-position: 0 -111px } .treeview li.lastExpandable { background-position: -32px -67px } .treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } -.treeview-red li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-red-line.gif); } -.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-red.gif); } +.treeview-red li { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-red-line.gif); } +.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-red.gif); } -.treeview-black li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-black-line.gif); } -.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-black.gif); } +.treeview-black li { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-black-line.gif); } +.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-black.gif); } -.treeview-gray li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-gray-line.gif); } -.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-gray.gif); } +.treeview-gray li { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-gray-line.gif); } +.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-gray.gif); } -.treeview-famfamfam li { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-famfamfam-line.gif); } -.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(<?php echo $vars['url']; ?>mod/pages/images/treeview-famfamfam.gif); } +.treeview-famfamfam li { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-famfamfam-line.gif); } +.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/treeview-famfamfam.gif); } .filetree li { padding: 3px 0 2px 16px; } .filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; } -.filetree span.folder { background: url(<?php echo $vars['url']; ?>mod/pages/images/folder.gif) 0 0 no-repeat; } -.filetree li.expandable span.folder { background: url(<?php echo $vars['url']; ?>mod/pages/images/folder-closed.gif) 0 0 no-repeat; } -.filetree span.file { background: url(<?php echo $vars['url']; ?>mod/pages/images/file.gif) 0 0 no-repeat; } +.filetree span.folder { background: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/folder.gif) 0 0 no-repeat; } +.filetree li.expandable span.folder { background: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/folder-closed.gif) 0 0 no-repeat; } +.filetree span.file { background: url(<?php echo elgg_get_site_url(); ?>mod/pages/images/file.gif) 0 0 no-repeat; } .pagesTreeContainer { margin:0; @@ -94,7 +94,7 @@ #pages_page .tags { padding:0 0 0 16px; margin:10px 0 4px 0; - background:transparent url(<?php echo $vars['url']; ?>_graphics/icon_tag.gif) no-repeat scroll left 2px; + background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/icon_tag.gif) no-repeat scroll left 2px; } #pages_page img[align="left"] { diff --git a/mod/pages/views/default/pages/metatags.php b/mod/pages/views/default/pages/metatags.php index b803a32a5..f40cc9b2d 100644 --- a/mod/pages/views/default/pages/metatags.php +++ b/mod/pages/views/default/pages/metatags.php @@ -12,14 +12,14 @@ if (empty($treeguid)) { } ?> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.js" ></script> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/pages/javascript/jquery.treeview.async.js" ></script> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/pages/javascript/jquery.treeview.js" ></script> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/pages/javascript/jquery.treeview.async.js" ></script> <script type="text/javascript"> $(document).ready( function() { $("#pagesTree").treeview({ - url: "<?php echo $vars['url']; ?>mod/pages/pagesTree.php", + url: "<?php echo elgg_get_site_url(); ?>mod/pages/pagesTree.php", currentpage: "<?php echo get_input('page_guid'); ?>" }, "<?php echo $treeguid; ?>") diff --git a/mod/pages/views/default/widgets/pages/view.php b/mod/pages/views/default/widgets/pages/view.php index d51fd008a..f42a1a85f 100644 --- a/mod/pages/views/default/widgets/pages/view.php +++ b/mod/pages/views/default/widgets/pages/view.php @@ -20,7 +20,7 @@ if (!$num_display) { $pages = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => $num_display, 'full_view' => FALSE)); if ($pages) { - $pagesurl = $vars['url'] . "pg/pages/owned/" . elgg_get_page_owner()->username; + $pagesurl = elgg_get_site_url() . "pg/pages/owned/" . elgg_get_page_owner()->username; $pages .= "<div class=\"pages_widget_singleitem_more\"><a href=\"{$pagesurl}\">" . elgg_echo('pages:more') . "</a></div>"; } diff --git a/mod/profile/actions/cropicon.php b/mod/profile/actions/cropicon.php index 310d34b3d..21280463e 100644 --- a/mod/profile/actions/cropicon.php +++ b/mod/profile/actions/cropicon.php @@ -63,7 +63,7 @@ if ($small !== FALSE && $medium !== FALSE && $tiny !== FALSE) { } //forward the user back to the upload page to crop -$url = "{$vars['url']}pg/profile/{$profile_owner->username}/edit/icon"; +$url = elgg_get_site_url()."pg/profile/{$profile_owner->username}/edit/icon"; if (isloggedin()) { forward($url); diff --git a/mod/profile/views/default/icon/user/default/large.php b/mod/profile/views/default/icon/user/default/large.php index 3ce382532..ac28f8e9a 100644 --- a/mod/profile/views/default/icon/user/default/large.php +++ b/mod/profile/views/default/icon/user/default/large.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultlarge.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultlarge.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/master.php b/mod/profile/views/default/icon/user/default/master.php index 7c5ea847c..129b0d375 100644 --- a/mod/profile/views/default/icon/user/default/master.php +++ b/mod/profile/views/default/icon/user/default/master.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultmaster.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultmaster.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/medium.php b/mod/profile/views/default/icon/user/default/medium.php index d5f6db343..8815a65bc 100644 --- a/mod/profile/views/default/icon/user/default/medium.php +++ b/mod/profile/views/default/icon/user/default/medium.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultmedium.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultmedium.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/small.php b/mod/profile/views/default/icon/user/default/small.php index 55f113c41..895aa15cc 100644 --- a/mod/profile/views/default/icon/user/default/small.php +++ b/mod/profile/views/default/icon/user/default/small.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaultsmall.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaultsmall.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/tiny.php b/mod/profile/views/default/icon/user/default/tiny.php index e47cdd3da..866c61533 100644 --- a/mod/profile/views/default/icon/user/default/tiny.php +++ b/mod/profile/views/default/icon/user/default/tiny.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaulttiny.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaulttiny.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/icon/user/default/topbar.php b/mod/profile/views/default/icon/user/default/topbar.php index ad11588fa..0ff3dbaaa 100644 --- a/mod/profile/views/default/icon/user/default/topbar.php +++ b/mod/profile/views/default/icon/user/default/topbar.php @@ -1,3 +1,3 @@ <?php - echo $vars['url'] . "mod/profile/graphics/defaulttopbar.gif"; + echo elgg_get_site_url() . "mod/profile/graphics/defaulttopbar.gif"; ?>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/commentwall/commentwall_content.php b/mod/profile/views/default/profile/commentwall/commentwall_content.php index 360627c0c..666c95a87 100644 --- a/mod/profile/views/default/profile/commentwall/commentwall_content.php +++ b/mod/profile/views/default/profile/commentwall/commentwall_content.php @@ -16,7 +16,7 @@ // if the user looking at the comment can edit, show the delete link if ($vars['annotation']->canEdit()) { echo "<div class='entity_metadata'><span class='delete_button'>" . elgg_view("output/confirmlink",array( - 'href' => $vars['url'] . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id, + 'href' => elgg_get_site_url() . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</span></div>"; diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php index a5765082c..dcb520ea1 100644 --- a/mod/profile/views/default/profile/commentwall/commentwalladd.php +++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php @@ -4,7 +4,7 @@ */ ?> <div id="comment_wall_add"> -<form action="<?php echo $vars['url']; ?>action/profile/addcomment" method="post" name="messageboardForm"> +<form action="<?php echo elgg_get_site_url(); ?>action/profile/addcomment" method="post" name="messageboardForm"> <!-- textarea for the contents --> <textarea name="message_content" value="" class="commentwall"></textarea><br /> <!-- the person posting an item on the message board --> diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php index b65201b66..22ebaa8f1 100644 --- a/mod/profile/views/default/profile/css.php +++ b/mod/profile/views/default/profile/css.php @@ -272,7 +272,7 @@ ul#twitter_update_list { padding-left:0; } ul#twitter_update_list li { - background-image: url(<?php echo $vars['url']; ?>mod/profile/graphics/speech_bubble_tail.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/profile/graphics/speech_bubble_tail.gif); background-position:right bottom; background-repeat: no-repeat; list-style-image:none; @@ -298,7 +298,7 @@ ul#twitter_update_list li span a { display:inline !important; } p.visit_twitter a { - background:url(<?php echo $vars['url']; ?>mod/profile/graphics/twitter16px.png) left no-repeat; + background:url(<?php echo elgg_get_site_url(); ?>mod/profile/graphics/twitter16px.png) left no-repeat; padding:0 0 0 20px; margin:0; } @@ -406,17 +406,17 @@ p.visit_twitter a { bottom:0; } .avatar_menu_arrow { - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -150px top; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -150px top; width:15px; height:15px; } .avatar_menu_arrow_on { - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -150px -16px; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -150px -16px; width:15px; height:15px; } .avatar_menu_arrow_hover { - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -150px -32px; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -150px -32px; width:15px; height:15px; } diff --git a/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php index 310536527..5e9cef774 100644 --- a/mod/profile/views/default/profile/edit.php +++ b/mod/profile/views/default/profile/edit.php @@ -8,7 +8,7 @@ * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now */ ?> -<form action="<?php echo $vars['url']; ?>action/profile/edit" method="post" id="edit_profile" class="margin_top"> +<form action="<?php echo elgg_get_site_url(); ?>action/profile/edit" method="post" id="edit_profile" class="margin_top"> <?php echo elgg_view('input/securitytoken') ?> <p><label> diff --git a/mod/profile/views/default/profile/editdefaultprofile.php b/mod/profile/views/default/profile/editdefaultprofile.php index daf3c577f..ece99c290 100644 --- a/mod/profile/views/default/profile/editdefaultprofile.php +++ b/mod/profile/views/default/profile/editdefaultprofile.php @@ -26,4 +26,4 @@ $formbody = <<< END END; echo "<p class='margin_top'>" . elgg_echo('profile:explainchangefields') . "</p>"; -echo elgg_view('input/form', array('body' => $formbody, 'action' => $vars['url'] . 'action/profile/editdefault')); +echo elgg_view('input/form', array('body' => $formbody, 'action' => elgg_get_site_url() . 'action/profile/editdefault')); diff --git a/mod/profile/views/default/profile/editdefaultprofileitems.php b/mod/profile/views/default/profile/editdefaultprofileitems.php index dc15f0c50..368529118 100644 --- a/mod/profile/views/default/profile/editdefaultprofileitems.php +++ b/mod/profile/views/default/profile/editdefaultprofileitems.php @@ -1,6 +1,6 @@ -<script language="javascript" type="text/javascript" src="<?php echo $vars['url']?>mod/profile/vendor/jquery.jeditable.mini.js"></script> +<script language="javascript" type="text/javascript" src="<?php echo elgg_get_site_url()?>mod/profile/vendor/jquery.jeditable.mini.js"></script> <script language="javascript" type="text/javascript"> -var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>'; +var reorderURL = '<?php echo elgg_add_action_tokens_to_url(elgg_get_site_url() . 'action/profile/editdefault/reorder', FALSE); ?>'; function sortCallback(event, ui) { var orderArr = $('#sortable_profile_fields').sortable('toArray'); var orderStr = orderArr.join(','); @@ -23,7 +23,7 @@ $(document).ready(function() { $save = elgg_echo('save'); $cancel = elgg_echo('cancel'); - $edit_url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/editfield", FALSE); + $edit_url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/profile/editdefault/editfield", FALSE); foreach($vars['items'] as $item) { echo <<< END @@ -49,9 +49,9 @@ END; echo elgg_view("profile/", array('value' => $item->translation)); //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - $url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/delete?id={$item->shortname}"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/profile/editdefault/delete?id={$item->shortname}"); echo "<li id=\"{$item->shortname}\"><div class='delete_button'><a href=\"$url\">" . elgg_echo('delete') . "</a></div>"; - echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='{$vars['url']}mod/profile/graphics/drag_handle.png'/>"; + echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='".elgg_get_site_url()."mod/profile/graphics/drag_handle.png'/>"; echo "<b class=\"profile_field_editable\"><span class=\"{$item->shortname}_editable\">$item->translation</span></b>: [".elgg_echo($item->type)."]"; echo "</li>"; diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php index 53de19c59..cdfa68a8a 100644 --- a/mod/profile/views/default/profile/editicon.php +++ b/mod/profile/views/default/profile/editicon.php @@ -13,7 +13,7 @@ $currentuser = get_loggedin_user(); ?> <div id="edit_profile_avatar"> <!-- grab the required js for icon cropping --> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js"></script> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/profile/views/default/js/jquery.imgareaselect-0.8.min.js"></script> <p class="margin_top"><?php echo elgg_echo('profile:profilepictureinstructions'); ?></p> @@ -30,7 +30,7 @@ $currentuser = get_loggedin_user(); </div> <div id="avatar_upload"> - <form action="<?php echo $vars['url']; ?>action/profile/iconupload" method="post" enctype="multipart/form-data"> + <form action="<?php echo elgg_get_site_url(); ?>action/profile/iconupload" method="post" enctype="multipart/form-data"> <?php echo elgg_view('input/securitytoken'); ?> <input type="hidden" name="username" value="<?php echo $currentuser->username; ?>" /> <p><label><?php echo elgg_echo("profile:editicon"); ?></label><br /> @@ -127,7 +127,7 @@ $currentuser = get_loggedin_user(); <div class="clearfloat"></div> -<form action="<?php echo $vars['url']; ?>action/profile/cropicon" method="post" /> +<form action="<?php echo elgg_get_site_url(); ?>action/profile/cropicon" method="post" /> <?php echo elgg_view('input/securitytoken'); ?> <input type="hidden" name="username" value="<?php echo get_loggedin_user()->username; ?>" /> <input type="hidden" name="x_1" value="<?php echo get_loggedin_user()->x1; ?>" id="x_1" /> diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php index 82404676e..71b25fe6c 100644 --- a/mod/profile/views/default/profile/icon.php +++ b/mod/profile/views/default/profile/icon.php @@ -46,7 +46,7 @@ if ($vars['entity'] instanceof ElggUser) { if (!$override) { ?> <div class="usericon <?php echo $vars['size']; ?>"> - <div class="avatar_menu_button"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" width="15" height="15" /></div> + <div class="avatar_menu_button"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" border="0" width="15" height="15" /></div> <div class="sub_menu"> <h3 class="displayname"><a href="<?php echo $vars['entity']->getURL(); ?>"><?php echo $vars['entity']->name; ?> <span class="username"><?php echo "@" . $vars['entity']->username; ?></span></a></h3> @@ -67,10 +67,10 @@ if ($vars['entity'] instanceof ElggUser) { // if looking at your own avatar menu - provide a couple of handy links ?> <li class="user_menu_profile"> - <a class="edit_profile" href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/details"><?php echo elgg_echo("profile:edit"); ?></a> + <a class="edit_profile" href="<?php echo elgg_get_site_url()?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/details"><?php echo elgg_echo("profile:edit"); ?></a> </li> <li class="user_menu_profile"> - <a class="edit_avatar" href="<?php echo $vars['url']?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a> + <a class="edit_avatar" href="<?php echo elgg_get_site_url()?>pg/profile/<?php echo $vars['entity']->username; ?>/edit/icon"><?php echo elgg_echo("profile:editicon"); ?></a> </li> <?php } @@ -96,7 +96,7 @@ if ($vars['entity'] instanceof ElggUser) { // Rounded avatar corners - CSS3 method - users avatar as background image so we can clip it with border-radius in supported browsers ?> - <img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" border="0" <?php echo $align; ?> alt="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> style="background: url(<?php echo $vars['entity']->getIcon($vars['size']); ?>) no-repeat;" class="<?php echo $vars['size']; ?>" /> + <img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" border="0" <?php echo $align; ?> alt="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" title="<?php echo htmlentities($vars['entity']->name, ENT_QUOTES, 'UTF-8'); ?>" <?php echo $vars['js']; ?> style="background: url(<?php echo $vars['entity']->getIcon($vars['size']); ?>) no-repeat;" class="<?php echo $vars['size']; ?>" /> <?php /* original avatar method diff --git a/mod/profile/views/default/profile/menu/adminlinks.php b/mod/profile/views/default/profile/menu/adminlinks.php index 6d99613ea..020240261 100644 --- a/mod/profile/views/default/profile/menu/adminlinks.php +++ b/mod/profile/views/default/profile/menu/adminlinks.php @@ -13,16 +13,16 @@ if (isadminloggedin()){ <a href="<?php echo $vars['url']; ?>pg/settings/user/<?php echo $vars['entity']->username; ?>/"><?php echo elgg_echo('profile:editdetails'); ?></a> <?php if (!$vars['entity']->isBanned()) { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => "{$vars['url']}action/admin/user/ban?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("ban"), 'href' => elgg_get_site_url()."action/admin/user/ban?guid={$vars['entity']->guid}")); } else { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => "{$vars['url']}action/admin/user/unban?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("unban"), 'href' => elgg_get_site_url()."action/admin/user/unban?guid={$vars['entity']->guid}")); } - echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => "{$vars['url']}action/admin/user/delete?guid={$vars['entity']->guid}")); - echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => "{$vars['url']}action/admin/user/resetpassword?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("delete"), 'href' => elgg_get_site_url()."action/admin/user/delete?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("resetpassword"), 'href' => elgg_get_site_url()."action/admin/user/resetpassword?guid={$vars['entity']->guid}")); if (!$vars['entity']->isAdmin()) { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => "{$vars['url']}action/admin/user/makeadmin?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("makeadmin"), 'href' => elgg_get_site_url()."action/admin/user/makeadmin?guid={$vars['entity']->guid}")); } else { - echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => "{$vars['url']}action/admin/user/removeadmin?guid={$vars['entity']->guid}")); + echo elgg_view('output/confirmlink', array('text' => elgg_echo("removeadmin"), 'href' => elgg_get_site_url()."action/admin/user/removeadmin?guid={$vars['entity']->guid}")); } } } diff --git a/mod/profile/views/default/profile/menu/friendlinks.php b/mod/profile/views/default/profile/menu/friendlinks.php index ce3af5a3c..f9e72dd4f 100644 --- a/mod/profile/views/default/profile/menu/friendlinks.php +++ b/mod/profile/views/default/profile/menu/friendlinks.php @@ -10,13 +10,13 @@ $ts = time(); $token = generate_action_token($ts); if ($vars['entity']->isFriend()) { echo elgg_view('output/confirmlink', array( - 'href' => "{$vars['url']}action/friends/remove?friend={$vars['entity']->getGUID()}", + 'href' => elgg_get_site_url()."action/friends/remove?friend={$vars['entity']->getGUID()}", 'text' => elgg_echo('friend:remove'), 'class' => 'remove_friend' )); } else { echo elgg_view('output/confirmlink', array( - 'href' => "{$vars['url']}action/friends/add?friend={$vars['entity']->getGUID()}", + 'href' => elgg_get_site_url()."action/friends/add?friend={$vars['entity']->getGUID()}", 'text' => elgg_echo('friend:add'), 'class' => 'add_friend' )); diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php index 57c1dfb8b..f80f54cc2 100755 --- a/mod/profile/views/default/profile/profile_ownerblock.php +++ b/mod/profile/views/default/profile/profile_ownerblock.php @@ -38,26 +38,26 @@ if ($section == 'details') { $profile_actions = ""; if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) { $profile_actions = "<div class='clearfloat profile_actions'>"; - $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/details' class='action_button'>". elgg_echo('profile:edit') ."</a>"; - $profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') ."</a>"; + $profile_actions .= "<a href='".elgg_get_site_url()."pg/profile/{$user->username}/edit/details' class='action_button'>". elgg_echo('profile:edit') ."</a>"; + $profile_actions .= "<a href='".elgg_get_site_url()."pg/profile/{$user->username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') ."</a>"; $profile_actions .= "</div>"; } else { $profile_actions = "<div class='profile_actions'>"; if (isloggedin()) { if (get_loggedin_userid() != $user->getGUID()) { if ($user->isFriend()) { - $url = "{$vars['url']}action/friends/remove?friend={$user->getGUID()}"; + $url = elgg_get_site_url()."action/friends/remove?friend={$user->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); $profile_actions .= "<a href=\"$url\" class='action_button'>" . elgg_echo('friend:remove') . "</a>"; } else { - $url = "{$vars['url']}action/friends/add?friend={$user->getGUID()}"; + $url = elgg_get_site_url()."action/friends/add?friend={$user->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); $profile_actions .= "<a href=\"$url\" class='action_button'>" . elgg_echo('friend:add') . "</a>"; } } } if (is_plugin_enabled('messages') && isloggedin()) { - $profile_actions .= "<a href=\"{$vars['url']}mod/messages/send.php?send_to={$user->guid}\" class='action_button'>". elgg_echo('messages:send') ."</a>"; + $profile_actions .= "<a href=\"".elgg_get_site_url()."mod/messages/send.php?send_to={$user->guid}\" class='action_button'>". elgg_echo('messages:send') ."</a>"; } $profile_actions .= "</div>"; } @@ -78,32 +78,32 @@ if (isadminloggedin()) { //check tools are enabled - hard-coded for phase1 // @todo - provide a view to extend for profile pages ownerblock tool-links if(is_plugin_enabled('blog')){ - $blog_link = "<li><a href=\"{$vars['url']}pg/blog/{$username}\">Blog</a></li>"; + $blog_link = "<li><a href=\"".elgg_get_site_url()."pg/blog/{$username}\">Blog</a></li>"; }else{ $blog_link = ""; } if(is_plugin_enabled('bookmarks')){ - $bookmark_link = "<li><a href=\"{$vars['url']}pg/bookmarks/{$username}\">Bookmarks</a></li>"; + $bookmark_link = "<li><a href=\"".elgg_get_site_url()."pg/bookmarks/{$username}\">Bookmarks</a></li>"; }else{ $bookmark_link = ""; } if(is_plugin_enabled('document')){ - $docs_link = "<li><a href=\"{$vars['url']}pg/document/{$username}\">Documents</a></li>"; + $docs_link = "<li><a href=\"".elgg_get_site_url()."pg/document/{$username}\">Documents</a></li>"; }else{ $docs_link = ""; } if(is_plugin_enabled('feeds')){ - $feeds_link = "<li><a href=\"{$vars['url']}pg/feeds/{$username}\">Feeds</a></li>"; + $feeds_link = "<li><a href=\"".elgg_get_site_url()."pg/feeds/{$username}\">Feeds</a></li>"; }else{ $feeds_link = ""; } if(is_plugin_enabled('tidypics')){ - $tidypics_link = "<li><a href=\"{$vars['url']}pg/photos/owned/{$username}\">Photos</a></li>"; + $tidypics_link = "<li><a href=\"".elgg_get_site_url()."pg/photos/owned/{$username}\">Photos</a></li>"; }else{ $tidypics_link = ""; } if(is_plugin_enabled('videolist')){ - $video_link = "<li><a href=\"{$vars['url']}pg/videolist/owned/{$username}\">Videos</a></li>"; + $video_link = "<li><a href=\"".elgg_get_site_url()."pg/videolist/owned/{$username}\">Videos</a></li>"; }else{ $video_link = ""; } diff --git a/mod/profile/views/default/profile/topbar_extend.php b/mod/profile/views/default/profile/topbar_extend.php index c1c4e13bb..dd38b9557 100644 --- a/mod/profile/views/default/profile/topbar_extend.php +++ b/mod/profile/views/default/profile/topbar_extend.php @@ -7,5 +7,5 @@ $user = get_loggedin_user(); if (($user instanceof ElggUser) && ($user->guid > 0)) { $friends = elgg_echo('friends'); - echo "<a class='myfriends' href=\"{$vars['url']}pg/friends/{$user->username}\" title=\"$friends\">$friends</a>"; + echo "<a class='myfriends' href=\"".elgg_get_site_url()."pg/friends/{$user->username}\" title=\"$friends\">$friends</a>"; } diff --git a/mod/reportedcontent/views/default/reportedcontent/css.php b/mod/reportedcontent/views/default/reportedcontent/css.php index 12a48662d..3dcdbc36b 100644 --- a/mod/reportedcontent/views/default/reportedcontent/css.php +++ b/mod/reportedcontent/views/default/reportedcontent/css.php @@ -14,7 +14,7 @@ #report_this a { font-size: 90%; padding:0 0 4px 20px; - background: url(<?php echo $vars['url']; ?>mod/reportedcontent/graphics/icon_reportthis.gif) no-repeat left top; + background: url(<?php echo elgg_get_site_url(); ?>mod/reportedcontent/graphics/icon_reportthis.gif) no-repeat left top; } /* admin area */ .admin_settings.reported_content { diff --git a/mod/reportedcontent/views/default/reportedcontent/footer_link.php b/mod/reportedcontent/views/default/reportedcontent/footer_link.php index 0b365273f..0e953e0b9 100644 --- a/mod/reportedcontent/views/default/reportedcontent/footer_link.php +++ b/mod/reportedcontent/views/default/reportedcontent/footer_link.php @@ -10,5 +10,5 @@ $text = elgg_echo('reportedcontent:this'); ?> <div id="report_this"> - <a href="javascript:location.href='<?php echo $vars['url']; ?>mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)" title="<?php echo $title; ?>"><?php echo $text; ?></a> + <a href="javascript:location.href='<?php echo elgg_get_site_url(); ?>mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)" title="<?php echo $title; ?>"><?php echo $text; ?></a> </div> diff --git a/mod/reportedcontent/views/default/reportedcontent/form.php b/mod/reportedcontent/views/default/reportedcontent/form.php index fe4287888..b22bc05f6 100644 --- a/mod/reportedcontent/views/default/reportedcontent/form.php +++ b/mod/reportedcontent/views/default/reportedcontent/form.php @@ -18,7 +18,7 @@ $shares = array(); $owner = get_loggedin_user(); ?> -<form action="<?php echo $vars['url']; ?>action/reportedcontent/add" method="post" class="margin_top"> +<form action="<?php echo elgg_get_site_url(); ?>action/reportedcontent/add" method="post" class="margin_top"> <?php echo elgg_view('input/securitytoken'); ?> <p> diff --git a/mod/reportedcontent/views/default/reportedcontent/listing.php b/mod/reportedcontent/views/default/reportedcontent/listing.php index 11d6978ac..1004effc9 100644 --- a/mod/reportedcontent/views/default/reportedcontent/listing.php +++ b/mod/reportedcontent/views/default/reportedcontent/listing.php @@ -26,8 +26,8 @@ if($vars['entity']){ echo "<div class='admin_settings reported_content {$reportedcontent_background}'>"; echo "<div class='clearfloat controls'>"; if($report->state != 'archived') - echo "<a class='action_button' href=\"" . elgg_add_action_tokens_to_url($vars['url'] . "action/reportedcontent/archive?item={$report->guid}") . "\">" . elgg_echo('reportedcontent:archive') . "</a>"; - echo "<a class='action_button disabled' href=\"" . elgg_add_action_tokens_to_url($vars['url'] . "action/reportedcontent/delete?item={$report->guid}") . "\" onclick=\"return confirm('" . elgg_echo('reportedcontent:areyousure') . "')\">" . elgg_echo('reportedcontent:delete') . "</a></div>"; + echo "<a class='action_button' href=\"" . elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/reportedcontent/archive?item={$report->guid}") . "\">" . elgg_echo('reportedcontent:archive') . "</a>"; + echo "<a class='action_button disabled' href=\"" . elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/reportedcontent/delete?item={$report->guid}") . "\" onclick=\"return confirm('" . elgg_echo('reportedcontent:areyousure') . "')\">" . elgg_echo('reportedcontent:delete') . "</a></div>"; echo "<p><b>" . elgg_echo('reportedcontent:by') . ": </b><a href=\"{$user_url}\">" . $user . "</a>, " . elgg_view_friendly_time($report->time_created) . "</p>"; echo "<p><b>" . elgg_echo('reportedcontent:objecttitle') . ": </b>" . $report->title; echo "<br /><a onclick=\"elgg_slide_toggle(this,'.reported_content','.container{$id}');\" class='details_link'>" . elgg_echo('reportedcontent:moreinfo') . "</a></p>"; diff --git a/mod/riverdashboard/views/default/riverdashboard/container.php b/mod/riverdashboard/views/default/riverdashboard/container.php index c7123a722..9f0164b43 100644 --- a/mod/riverdashboard/views/default/riverdashboard/container.php +++ b/mod/riverdashboard/views/default/riverdashboard/container.php @@ -10,7 +10,7 @@ $(document).ready(function(){ function activityUpdateChecker(interval) { this.intervalID = null; this.interval = interval; - this.url = '<?php echo $vars['url']; ?>mod/riverdashboard/endpoint/ping.php'; + this.url = '<?php echo elgg_get_site_url(); ?>mod/riverdashboard/endpoint/ping.php'; this.seconds_passed = 0; this.start = function() { diff --git a/mod/riverdashboard/views/default/riverdashboard/css.php b/mod/riverdashboard/views/default/riverdashboard/css.php index 20da6ebeb..ec27f9686 100644 --- a/mod/riverdashboard/views/default/riverdashboard/css.php +++ b/mod/riverdashboard/views/default/riverdashboard/css.php @@ -14,12 +14,12 @@ padding:1px 8px 2px 24px; margin-top:9px; cursor: pointer; - background: red url("<?php echo $vars['url']; ?>mod/riverdashboard/graphics/refresh.png") no-repeat 5px 3px; + background: red url("<?php echo elgg_get_site_url(); ?>mod/riverdashboard/graphics/refresh.png") no-repeat 5px 3px; -webkit-border-radius: 10px; -moz-border-radius: 10px; } #riverdashboard_updates a.update_link:hover { - background: #4690D6 url("<?php echo $vars['url']; ?>mod/riverdashboard/graphics/refresh.png") no-repeat 5px -22px; + background: #4690D6 url("<?php echo elgg_get_site_url(); ?>mod/riverdashboard/graphics/refresh.png") no-repeat 5px -22px; color:white; text-decoration: none; } @@ -62,7 +62,7 @@ width:20px; height:25px; margin:0 2px 0 2px; - background: url(<?php echo $vars['url']; ?>mod/riverdashboard/graphics/follow_icon.png) no-repeat left -7px; + background: url(<?php echo elgg_get_site_url(); ?>mod/riverdashboard/graphics/follow_icon.png) no-repeat left -7px; } /* LATEST COMMENTS IN RIVER */ diff --git a/mod/riverdashboard/views/default/riverdashboard/js.php b/mod/riverdashboard/views/default/riverdashboard/js.php index 2b761cdcd..4eec41149 100644 --- a/mod/riverdashboard/views/default/riverdashboard/js.php +++ b/mod/riverdashboard/views/default/riverdashboard/js.php @@ -17,7 +17,7 @@ 'entity_guid': guid } - $(likesList).load('<?php echo $vars['url'];?>mod/riverdashboard/endpoint/get_likes.php', params, function(data) { + $(likesList).load('<?php echo elgg_get_site_url();?>mod/riverdashboard/endpoint/get_likes.php', params, function(data) { // hide comments myParent.find('.comments_container').animate({"height": "toggle", "opacity": "toggle"}, { duration: 400 }); // change selected tab @@ -57,7 +57,7 @@ 'offset': numComments } - $.post('<?php echo $vars['url'];?>mod/riverdashboard/endpoint/get_comments.php', params, function(data) { + $.post('<?php echo elgg_get_site_url();?>mod/riverdashboard/endpoint/get_comments.php', params, function(data) { commentsList.prepend(data); showLess.toggle(); diff --git a/mod/riverdashboard/views/default/riverdashboard/menu.php b/mod/riverdashboard/views/default/riverdashboard/menu.php index 5ab4821a8..889cfbbd2 100644 --- a/mod/riverdashboard/views/default/riverdashboard/menu.php +++ b/mod/riverdashboard/views/default/riverdashboard/menu.php @@ -18,9 +18,9 @@ switch($vars['orient']) { <?php if(isloggedin()){ ?> - <li <?php echo $allselect; ?> ><a href="<?php echo $vars['url']; ?>pg/activity/"><?php echo elgg_echo('all'); ?></a></li> - <li <?php echo $friendsselect; ?> ><a href="<?php echo $vars['url']; ?>pg/activity/?display=friends"><?php echo elgg_echo('friends'); ?></a></li> - <li <?php echo $mineselect; ?> ><a href="<?php echo $vars['url']; ?>pg/activity/?display=mine"><?php echo elgg_echo('mine'); ?></a></li> + <li <?php echo $allselect; ?> ><a href="<?php echo elgg_get_site_url(); ?>pg/activity/"><?php echo elgg_echo('all'); ?></a></li> + <li <?php echo $friendsselect; ?> ><a href="<?php echo elgg_get_site_url(); ?>pg/activity/?display=friends"><?php echo elgg_echo('friends'); ?></a></li> + <li <?php echo $mineselect; ?> ><a href="<?php echo elgg_get_site_url(); ?>pg/activity/?display=mine"><?php echo elgg_echo('mine'); ?></a></li> <?php } ?> diff --git a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php index d440e7ab6..fdc5dd535 100644 --- a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php +++ b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php @@ -14,5 +14,5 @@ if (isset($vars['entity']) && isloggedin()) { $form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID())); $form_body .= elgg_view('input/submit', array('value' => elgg_echo("Comment"))); $form_body .= "</div>"; - echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add")); + echo elgg_view('input/form', array('body' => $form_body, 'action' => elgg_get_site_url()."action/comments/add")); }
\ No newline at end of file diff --git a/mod/riverdashboard/views/default/riverdashboard/sitemessage.php b/mod/riverdashboard/views/default/riverdashboard/sitemessage.php index c59c3e2d5..2d3c7aa57 100644 --- a/mod/riverdashboard/views/default/riverdashboard/sitemessage.php +++ b/mod/riverdashboard/views/default/riverdashboard/sitemessage.php @@ -14,7 +14,7 @@ if ($site_message) { $message = $mes->description; $dateStamp = elgg_view_friendly_time($mes->time_created); $delete = elgg_view("output/confirmlink",array( - 'href' => $vars['url'] . "action/riverdashboard/delete?message=" . $mes->guid, + 'href' => elgg_get_site_url() . "action/riverdashboard/delete?message=" . $mes->guid, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )); @@ -49,7 +49,7 @@ if ($site_message) { EOT; //display the form - echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body)); + echo elgg_view('input/form', array('action' => elgg_get_site_url()."action/$action", 'body' => $form_body)); }//end of admin if statement @@ -71,7 +71,7 @@ EOT; </div> EOT; //display the form - echo elgg_view('input/form', array('action' => "{$vars['url']}action/$action", 'body' => $form_body)); + echo elgg_view('input/form', array('action' => elgg_get_site_url()."action/$action", 'body' => $form_body)); }//end of admin check }//end of main if diff --git a/mod/search/views/default/search/listing.php b/mod/search/views/default/search/listing.php index e72479cf0..c9dda25f0 100644 --- a/mod/search/views/default/search/listing.php +++ b/mod/search/views/default/search/listing.php @@ -25,7 +25,7 @@ $query = http_build_query( ) ); -$url = "{$vars['url']}pg/search?$query"; +$url = elgg_get_site_url()."pg/search?$query"; // get pagination if (array_key_exists('pagination', $vars) && $vars['pagination']) { diff --git a/mod/search/views/default/search/search_box.php b/mod/search/views/default/search/search_box.php index 94d91a26a..df66d11f5 100644 --- a/mod/search/views/default/search/search_box.php +++ b/mod/search/views/default/search/search_box.php @@ -13,7 +13,7 @@ $value = stripslashes($value); ?> <div id="elgg_search"> - <form id="searchform" action="<?php echo $vars['url']; ?>pg/search/" method="get"> + <form id="searchform" action="<?php echo elgg_get_site_url(); ?>pg/search/" method="get"> <fieldset> <input type="text" size="21" name="q" value="<?php echo elgg_echo('search'); ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' };" class="search_input" /> <input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search_submit_button" /> diff --git a/mod/sitepages/views/default/sitepages/footer_menu.php b/mod/sitepages/views/default/sitepages/footer_menu.php index 80799e0f5..d3858cb20 100644 --- a/mod/sitepages/views/default/sitepages/footer_menu.php +++ b/mod/sitepages/views/default/sitepages/footer_menu.php @@ -7,7 +7,7 @@ ?> <div class="footer_toolbar_links">| -<a href="<?php echo $vars['url']; ?>pg/sitepages/read/About/"><?php echo elgg_echo('sitepages:about'); ?></a> | -<a href="<?php echo $vars['url']; ?>pg/sitepages/read/Terms/"><?php echo elgg_echo('sitepages:terms'); ?></a> | -<a href="<?php echo $vars['url']; ?>pg/sitepages/read/Privacy/"><?php echo elgg_echo('sitepages:privacy'); ?></a> | +<a href="<?php echo elgg_get_site_url(); ?>pg/sitepages/read/About/"><?php echo elgg_echo('sitepages:about'); ?></a> | +<a href="<?php echo elgg_get_site_url(); ?>pg/sitepages/read/Terms/"><?php echo elgg_echo('sitepages:terms'); ?></a> | +<a href="<?php echo elgg_get_site_url(); ?>pg/sitepages/read/Privacy/"><?php echo elgg_echo('sitepages:privacy'); ?></a> | </div>
\ No newline at end of file diff --git a/mod/sitepages/views/default/sitepages/menu.php b/mod/sitepages/views/default/sitepages/menu.php index 0ff96287b..ec145cc67 100644 --- a/mod/sitepages/views/default/sitepages/menu.php +++ b/mod/sitepages/views/default/sitepages/menu.php @@ -6,7 +6,7 @@ */ $page_type = $vars['page_type']; -$url = "{$vars['url']}pg/admin/plugin_settings/sitepages/"; +$url = elgg_get_site_url()."pg/admin/plugin_settings/sitepages/"; ?> <div class="elgg_horizontal_tabbed_nav margin_top"> diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php index 5168190c3..df30f4f1e 100644 --- a/mod/thewire/views/default/object/thewire.php +++ b/mod/thewire/views/default/object/thewire.php @@ -30,13 +30,13 @@ if (isset($vars['entity'])) { <?php if(isloggedin()){ ?> - <a href="<?php echo $vars['url']; ?>mod/thewire/add.php?wire_username=<?php echo $vars['entity']->getOwnerEntity()->username; ?>" class="action_button reply small"><?php echo elgg_echo('thewire:reply'); ?></a> + <a href="<?php echo elgg_get_site_url(); ?>mod/thewire/add.php?wire_username=<?php echo $vars['entity']->getOwnerEntity()->username; ?>" class="action_button reply small"><?php echo elgg_echo('thewire:reply'); ?></a> <?php }//close reply if statement // if the user looking at thewire post can edit, show the delete link if ($vars['entity']->canEdit()) { echo "<span class='delete_button'>" . elgg_view("output/confirmlink",array( - 'href' => $vars['url'] . "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(), + 'href' => elgg_get_site_url() . "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(), 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )) . "</span>"; @@ -45,10 +45,10 @@ if (isset($vars['entity'])) { </div> <div class="wire_post_info"> - <a href="<?php echo $vars['url']; ?>pg/thewire/<?php echo $vars['entity']->getOwnerEntity()->username; ?>"><?php echo $user_name; ?></a> + <a href="<?php echo elgg_get_site_url(); ?>pg/thewire/<?php echo $vars['entity']->getOwnerEntity()->username; ?>"><?php echo $user_name; ?></a> <?php $desc = $vars['entity']->description; - //$desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc); + //$desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . elgg_get_site_url() . 'pg/thewire/$1">$1</a>',$desc); echo parse_urls($desc); ?> <p class="entity_subtext"> diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php index 9dee87274..0e0674a7e 100644 --- a/mod/thewire/views/default/river/object/thewire/create.php +++ b/mod/thewire/views/default/river/object/thewire/create.php @@ -6,7 +6,7 @@ $url = $object->getURL(); $string = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}:</a> "; $desc = $object->description; -//$desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . $vars['url'] . 'pg/thewire/$1">$1</a>',$desc); +//$desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@<a href="' . elgg_get_site_url() . 'pg/thewire/$1">$1</a>',$desc); $string .= parse_urls($desc); $string .= " <span class='entity_subtext'>" . elgg_view_friendly_time($object->time_created); if (isloggedin()){ diff --git a/mod/thewire/views/default/thewire/css.php b/mod/thewire/views/default/thewire/css.php index 3b50be652..36c9bc844 100644 --- a/mod/thewire/views/default/thewire/css.php +++ b/mod/thewire/views/default/thewire/css.php @@ -48,7 +48,7 @@ .wire_post { padding-bottom:10px; margin-bottom:5px; - background-image: url(<?php echo $vars['url']; ?>mod/thewire/graphics/thewire_speech_bubble.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>mod/thewire/graphics/thewire_speech_bubble.gif); background-repeat: no-repeat; background-position: right bottom; } diff --git a/mod/thewire/views/default/thewire/forms/add.php b/mod/thewire/views/default/thewire/forms/add.php index 90fdabceb..5e29549e2 100644 --- a/mod/thewire/views/default/thewire/forms/add.php +++ b/mod/thewire/views/default/thewire/forms/add.php @@ -13,8 +13,8 @@ ?> <div class="new_wire_post clearfloat"> <h3><?php echo elgg_echo("thewire:doing"); ?></h3> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/thewire/views/default/thewire/scripts/counter.js"></script> -<form action="<?php echo $vars['url']; ?>action/thewire/add" method="post" name="new_post"> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/thewire/views/default/thewire/scripts/counter.js"></script> +<form action="<?php echo elgg_get_site_url(); ?>action/thewire/add" method="post" name="new_post"> <?php $action_txt = elgg_echo('post'); $display .= "<textarea name='new_post_textarea' value='' onKeyDown=\"textCounter(document.new_post.new_post_textarea,document.new_post.remLen1,140)\" onKeyUp=\"textCounter(document.new_post.new_post_textarea,document.new_post.remLen1,140)\">{$msg}</textarea>"; diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php index a313b65ef..dbcb7385c 100644 --- a/mod/thewire/views/default/thewire/profile_status.php +++ b/mod/thewire/views/default/thewire/profile_status.php @@ -5,7 +5,7 @@ */ $owner = $vars['entity']->guid; -$url_to_wire = $vars['url'] . "pg/thewire/" . $vars['entity']->username; +$url_to_wire = elgg_get_site_url() . "pg/thewire/" . $vars['entity']->username; //grab the user's latest from the wire $params = array( diff --git a/mod/thewire/views/default/widgets/thewire/view.php b/mod/thewire/views/default/widgets/thewire/view.php index c3f9e7858..bed5c140b 100644 --- a/mod/thewire/views/default/widgets/thewire/view.php +++ b/mod/thewire/views/default/widgets/thewire/view.php @@ -10,6 +10,6 @@ $content = elgg_list_entities(array('types' => 'object', 'subtypes' => 'thewire' echo $content; if ($content) { - $blogurl = $vars['url'] . "pg/thewire/" . elgg_get_page_owner()->username; + $blogurl = elgg_get_site_url() . "pg/thewire/" . elgg_get_page_owner()->username; echo "<div class=\"shares_widget_wrapper\"><a href=\"{$blogurl}\">".elgg_echo('thewire:moreposts')."</a></div>"; } diff --git a/mod/tinymce/views/default/input/longtext.php b/mod/tinymce/views/default/input/longtext.php index 840c14daa..2f90d5a1c 100644 --- a/mod/tinymce/views/default/input/longtext.php +++ b/mod/tinymce/views/default/input/longtext.php @@ -27,7 +27,7 @@ if (!$tinymce_js_loaded) { ?> <!-- include tinymce --> -<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>mod/tinymce/vendor/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> +<script language="javascript" type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/tinymce/vendor/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> <!-- intialise tinymce, you can find other configurations here http://wiki.moxiecode.com/examples/tinymce/installation_example_01.php --> <script language="javascript" type="text/javascript"> tinyMCE.init({ @@ -37,7 +37,7 @@ tinyMCE.init({ plugins : "spellchecker,autosave,fullscreen,paste", relative_urls : false, remove_script_host : false, - document_base_url : "<?php echo $vars['url']; ?>", + document_base_url : "<?php echo elgg_get_site_url(); ?>", theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,bullist,numlist,undo,redo,link,unlink,image,blockquote,code,pastetext,pasteword,more,fullscreen", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", @@ -61,7 +61,7 @@ tinyMCE.init({ tinymce.DOM.setHTML(tinymce.DOM.get(tinyMCE.activeEditor.id + '_path_row'), text); }); }, - content_css: '<?php echo $vars['url']; ?>mod/tinymce/tinymce_content.css' + content_css: '<?php echo elgg_get_site_url(); ?>mod/tinymce/tinymce_content.css' }); function toggleEditor(id) { diff --git a/mod/twitter/views/default/twitter/css.php b/mod/twitter/views/default/twitter/css.php index 5dd57ce65..1a0b21394 100644 --- a/mod/twitter/views/default/twitter/css.php +++ b/mod/twitter/views/default/twitter/css.php @@ -14,7 +14,7 @@ padding:0; } #twitter_widget li { - background: url(<?php echo $vars['url']; ?>mod/twitter/graphics/thewire_speech_bubble.gif) no-repeat right bottom; + background: url(<?php echo elgg_get_site_url(); ?>mod/twitter/graphics/thewire_speech_bubble.gif) no-repeat right bottom; list-style-image:none; list-style-position:outside; list-style-type:none; @@ -31,7 +31,7 @@ display:block; } p.visit_twitter a { - background:url(<?php echo $vars['url']; ?>mod/twitter/graphics/twitter16px.png) left no-repeat; + background:url(<?php echo elgg_get_site_url(); ?>mod/twitter/graphics/twitter16px.png) left no-repeat; padding:0 0 0 20px; margin:0; } diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php index dff1487e7..999eab44f 100644 --- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php +++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php @@ -43,6 +43,6 @@ $form_body .= elgg_echo('uservalidationbyemail:admin:with_checked') . elgg_view( $form_body .= '<br />' . elgg_view('input/button', array('value' => elgg_echo('submit'))); echo elgg_view('input/form', array( - 'action' => $vars['url'] . 'action/uservalidationbyemail/bulk_action', + 'action' => elgg_get_site_url() . 'action/uservalidationbyemail/bulk_action', 'body' => $form_body ));
\ No newline at end of file diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php index 368be6ab9..dbfc0ac66 100644 --- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php +++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php @@ -20,19 +20,19 @@ $created = sprintf(elgg_echo('uservalidationbyemail:admin:user_created'), elgg_v $validate = elgg_view('output/confirmlink', array( 'confirm' => sprintf(elgg_echo('uservalidationbyemail:confirm_validate_user'), $user->username), - 'href' => $vars['url'] . "action/uservalidationbyemail/validate/?user_guids[]=$user->guid", + 'href' => elgg_get_site_url() . "action/uservalidationbyemail/validate/?user_guids[]=$user->guid", 'text' => elgg_echo('uservalidationbyemail:admin:validate') )); $resend_email = elgg_view('output/confirmlink', array( 'confirm' => sprintf(elgg_echo('uservalidationbyemail:confirm_resend_validation'), $user->username), - 'href' => $vars['url'] . "action/uservalidationbyemail/resend_validation/?user_guids[]=$user->guid", + 'href' => elgg_get_site_url() . "action/uservalidationbyemail/resend_validation/?user_guids[]=$user->guid", 'text' => elgg_echo('uservalidationbyemail:admin:resend_validation') )); $delete = elgg_view('output/confirmlink', array( 'confirm' => sprintf(elgg_echo('uservalidationbyemail:confirm_delete'), $user->username), - 'href' => $vars['url'] . "action/uservalidationbyemail/delete/?user_guids[]=$user->guid", + 'href' => elgg_get_site_url() . "action/uservalidationbyemail/delete/?user_guids[]=$user->guid", 'text' => elgg_echo('uservalidationbyemail:admin:delete') )); diff --git a/mod/zaudio/views/default/file/specialcontent/audio/mp3.php b/mod/zaudio/views/default/file/specialcontent/audio/mp3.php index f13a9a0d4..080cb8f20 100644 --- a/mod/zaudio/views/default/file/specialcontent/audio/mp3.php +++ b/mod/zaudio/views/default/file/specialcontent/audio/mp3.php @@ -10,10 +10,10 @@ ?> <!-- include the audioplayer js code --> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/zaudio/audioplayer/audio-player.js"></script> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/zaudio/audioplayer/audio-player.js"></script> <!-- set up the player --> <script type="text/javascript"> - AudioPlayer.setup("<?php echo $vars['url']; ?>mod/zaudio/audioplayer/player.swf", { + AudioPlayer.setup("<?php echo elgg_get_site_url(); ?>mod/zaudio/audioplayer/player.swf", { width: 290 }); </script> @@ -21,7 +21,7 @@ <div style="margin:10px 0 10px 0;"> <p id="audioplayer_1">Alternative content</p> <script type="text/javascript"> - AudioPlayer.embed("audioplayer_1", {soundFile: "<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>"}); + AudioPlayer.embed("audioplayer_1", {soundFile: "<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>"}); </script> </div>
\ No newline at end of file diff --git a/mod/zaudio/views/default/file/specialcontent/audio/mpeg.php b/mod/zaudio/views/default/file/specialcontent/audio/mpeg.php index ea5eadadf..6cb39f250 100644 --- a/mod/zaudio/views/default/file/specialcontent/audio/mpeg.php +++ b/mod/zaudio/views/default/file/specialcontent/audio/mpeg.php @@ -10,10 +10,10 @@ ?> <!-- include the audioplayer js code --> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/zaudio/audioplayer/audio-player.js"></script> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/zaudio/audioplayer/audio-player.js"></script> <!-- set up the player --> <script type="text/javascript"> - AudioPlayer.setup("<?php echo $vars['url']; ?>mod/zaudio/audioplayer/player.swf", { + AudioPlayer.setup("<?php echo elgg_get_site_url(); ?>mod/zaudio/audioplayer/player.swf", { width: 290 }); </script> @@ -21,6 +21,6 @@ <div style="margin:10px 0 10px 0;"> <p id="audioplayer_1">Alternative content</p> <script type="text/javascript"> - AudioPlayer.embed("audioplayer_1", {soundFile: "<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>"}); + AudioPlayer.embed("audioplayer_1", {soundFile: "<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>"}); </script> </div>
\ No newline at end of file diff --git a/mod/zaudio/views/default/file/specialcontent/audio/mpg.php b/mod/zaudio/views/default/file/specialcontent/audio/mpg.php index ea5eadadf..6cb39f250 100644 --- a/mod/zaudio/views/default/file/specialcontent/audio/mpg.php +++ b/mod/zaudio/views/default/file/specialcontent/audio/mpg.php @@ -10,10 +10,10 @@ ?> <!-- include the audioplayer js code --> -<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/zaudio/audioplayer/audio-player.js"></script> +<script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>mod/zaudio/audioplayer/audio-player.js"></script> <!-- set up the player --> <script type="text/javascript"> - AudioPlayer.setup("<?php echo $vars['url']; ?>mod/zaudio/audioplayer/player.swf", { + AudioPlayer.setup("<?php echo elgg_get_site_url(); ?>mod/zaudio/audioplayer/player.swf", { width: 290 }); </script> @@ -21,6 +21,6 @@ <div style="margin:10px 0 10px 0;"> <p id="audioplayer_1">Alternative content</p> <script type="text/javascript"> - AudioPlayer.embed("audioplayer_1", {soundFile: "<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>"}); + AudioPlayer.embed("audioplayer_1", {soundFile: "<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>"}); </script> </div>
\ No newline at end of file diff --git a/views/default/account/forms/forgotten_password.php b/views/default/account/forms/forgotten_password.php index 6c000bfc6..0d88cf8f7 100644 --- a/views/default/account/forms/forgotten_password.php +++ b/views/default/account/forms/forgotten_password.php @@ -13,7 +13,7 @@ $form_body .= elgg_view('input/captcha'); $form_body .= "<p>" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "</p>"; echo elgg_view('input/form', array( - 'action' => "{$vars['url']}action/user/requestnewpassword", + 'action' => elgg_get_site_url()."action/user/requestnewpassword", 'body' => $form_body, 'class' => "margin_top" )); diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php index 8f3986c4e..ceaaf66d0 100644 --- a/views/default/account/forms/login.php +++ b/views/default/account/forms/login.php @@ -17,12 +17,12 @@ $form_body .= "<div class='persistent_login'><label><input type='checkbox' name= $form_body .= elgg_view('login/extend'); $form_body .= "<p class='loginbox'>"; -$form_body .= $CONFIG->allow_registration ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . '</a> | ' : ''; -$form_body .= "<a href=\"{$vars['url']}pages/account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; +$form_body .= $CONFIG->allow_registration ? "<a href=\"".elgg_get_site_url()."pg/register/\">" . elgg_echo('register') . '</a> | ' : ''; +$form_body .= "<a href=\"".elgg_get_site_url()."pages/account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; -$login_url = $vars['url']; +$login_url = elgg_get_site_url(); if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { - $login_url = str_replace("http", "https", $vars['url']); + $login_url = str_replace("http", "https", elgg_get_site_url()); } ?> diff --git a/views/default/account/forms/login_dropdown.php b/views/default/account/forms/login_dropdown.php index 402e500d5..978507914 100644 --- a/views/default/account/forms/login_dropdown.php +++ b/views/default/account/forms/login_dropdown.php @@ -12,13 +12,13 @@ if (!isloggedin()) { $form_body .= elgg_view('login/extend'); $form_body .= "<p class='loginbox'>"; - $form_body .= $CONFIG->allow_registration ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . '</a> | ' : ''; - $form_body .= "<a href=\"{$vars['url']}pages/account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; + $form_body .= $CONFIG->allow_registration ? "<a href=\"".elgg_get_site_url()."pg/register/\">" . elgg_echo('register') . '</a> | ' : ''; + $form_body .= "<a href=\"".elgg_get_site_url()."pages/account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; $form_body .= "<input type='hidden' name='returntoreferer' value='true' />"; - $login_url = $vars['url']; + $login_url = elgg_get_site_url(); if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { - $login_url = str_replace("http", "https", $vars['url']); + $login_url = str_replace("http", "https", elgg_get_site_url()); } ?> @@ -89,7 +89,7 @@ $(document).ready(function() { } #login_dropdown #signin_button a.signin span { padding:4px 0 6px 12px; - background-image:url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png); + background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); background-position:-150px -51px; background-repeat:no-repeat; } diff --git a/views/default/account/forms/login_walled_garden.php b/views/default/account/forms/login_walled_garden.php index 72af49359..8b5d593bb 100644 --- a/views/default/account/forms/login_walled_garden.php +++ b/views/default/account/forms/login_walled_garden.php @@ -15,13 +15,13 @@ $form_body .= "<div class='remember_me'><label><input type='checkbox' name='pers $register = elgg_echo('register'); $lost_password = elgg_echo('user:password:lost'); $form_body .= '<p class="lost_password">'; -$form_body .= $CONFIG->allow_registration ? "<a class=\"registration_link\" href=\"{$vars['url']}pg/register/\">$register</a> | " : ''; +$form_body .= $CONFIG->allow_registration ? "<a class=\"registration_link\" href=\"".elgg_get_site_url()."pg/register/\">$register</a> | " : ''; $form_body .= "<a class='forgotten_password_link' href=\"{$login_url}pages/account/forgotten_password.php\">$lost_password</a>"; $form_body .= '</p>'; -$login_url = $vars['url']; +$login_url = elgg_get_site_url(); if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { - $login_url = str_replace("http", "https", $vars['url']); + $login_url = str_replace("http", "https", elgg_get_site_url()); } ?> <h2><?php echo elgg_echo('login'); ?></h2> @@ -60,7 +60,7 @@ __HTML; <h2><?php echo elgg_echo('user:password:lost'); ?></h2> <?php echo elgg_view('input/form', array( - 'action' => "{$vars['url']}action/user/requestnewpassword", + 'action' => elgg_get_site_url()."action/user/requestnewpassword", 'body' => $lostpassword_form_body )); ?> diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php index c6b47c82e..9b777ba64 100644 --- a/views/default/account/forms/register.php +++ b/views/default/account/forms/register.php @@ -38,7 +38,7 @@ $form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'v $form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register')); $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>"; -echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body, 'class' => "margin_top")); +echo elgg_view('input/form', array('action' => elgg_get_site_url()."action/register", 'body' => $form_body, 'class' => "margin_top")); ?> <script type="text/javascript"> diff --git a/views/default/account/forms/useradd.php b/views/default/account/forms/useradd.php index 7cab08804..bad1b11df 100644 --- a/views/default/account/forms/useradd.php +++ b/views/default/account/forms/useradd.php @@ -27,5 +27,5 @@ $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value <div class="admin_settings add_user"> <h3><?php echo elgg_echo('adduser'); ?></h3> - <?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/useradd", 'body' => $form_body)) ?> + <?php echo elgg_view('input/form', array('action' => elgg_get_site_url()."action/useradd", 'body' => $form_body)) ?> </div>
\ No newline at end of file diff --git a/views/default/admin/appearance/menu_items.php b/views/default/admin/appearance/menu_items.php index b6177dfd0..e6a40c754 100644 --- a/views/default/admin/appearance/menu_items.php +++ b/views/default/admin/appearance/menu_items.php @@ -82,6 +82,6 @@ $form_body .= elgg_view('input/submit', array('value' => elgg_echo('save'))); echo elgg_view('input/form', array( 'body' => $form_body, - 'action' => "{$vars['url']}action/admin/menu_items" + 'action' => elgg_get_site_url()."action/admin/menu_items" )); echo "</div>";
\ No newline at end of file diff --git a/views/default/admin/components/plugin.php b/views/default/admin/components/plugin.php index 4b26465e6..013f0cd07 100644 --- a/views/default/admin/components/plugin.php +++ b/views/default/admin/components/plugin.php @@ -29,30 +29,30 @@ $active_class = ($active) ? 'active' : 'not_active'; $top_url = $up_url = $down_url = $bottom_url = ''; if ($vars['order'] > 10) { - $top_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=1&__elgg_token=$token&__elgg_ts=$ts"; + $top_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=1&__elgg_token=$token&__elgg_ts=$ts"; $top_link = '<a href="' . elgg_format_url($top_url) . '">' . elgg_echo('top') . '</a>'; $order = $vars['order'] - 11; - $up_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $up_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; $up_link = '<a href="' . elgg_format_url($up_url) . '">' . elgg_echo('up') . '</a>'; } if ($vars['order'] < $vars['maxorder']) { $order = $vars['order'] + 11; - $down_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $down_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; $down_link = '<a href="' . elgg_format_url($down_url) . '">' . elgg_echo('down') . '</a>'; $order = $vars['maxorder'] + 11; - $bottom_url = "{$vars['url']}action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; + $bottom_url = elgg_get_site_url()."action/admin/plugins/reorder?plugin={$plugin}&order=$order&__elgg_token=$token&__elgg_ts=$ts"; $bottom_link = '<a href="' . elgg_format_url($bottom_url) . '">' . elgg_echo('bottom') . '</a>'; } if ($active) { - $url = "{$vars['url']}action/admin/plugins/disable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; + $url = elgg_get_site_url()."action/admin/plugins/disable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; $enable_disable = '<a class="cancel_button" href="' . elgg_format_url($url) . '">' . elgg_echo('disable') . '</a>'; } else { - $url = "{$vars['url']}action/admin/plugins/enable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; + $url = elgg_get_site_url()."action/admin/plugins/enable?plugin=$plugin&__elgg_token=$token&__elgg_ts=$ts"; $enable_disable = '<a class="submit_button" href="' . elgg_format_url($url) . '">' . elgg_echo('enable') . '</a>'; } @@ -60,7 +60,7 @@ if ($active) { $categories_list = ''; if ($manifest['category']) { $categories_arr = array(); - $base_url = "{$vars['url']}pg/admin/plugins?category="; + $base_url = elgg_get_site_url()."pg/admin/plugins?category="; foreach($manifest['category'] as $category) { $url = $base_url . urlencode($category); @@ -72,7 +72,7 @@ if ($manifest['category']) { $screenshots = ''; if ($manifest['screenshot']) { - $base_url = "{$vars['url']}mod/"; + $base_url = elgg_get_site_url()."mod/"; $limit = 4; foreach ($manifest['screenshot'] as $screenshot) { @@ -98,7 +98,7 @@ if ($manifest['screenshot']) { <?php if (elgg_view_exists("settings/{$plugin}/edit")) { - $link = "{$vars['url']}pg/admin/plugin_settings/$plugin"; + $link = elgg_get_site_url()."pg/admin/plugin_settings/$plugin"; $settings_link = "<a class='plugin_settings small link' href='$link'>[". elgg_echo('settings') ."]</a>"; } ?> diff --git a/views/default/admin/components/plugin_settings.php b/views/default/admin/components/plugin_settings.php index 05623ffbb..13e962634 100644 --- a/views/default/admin/components/plugin_settings.php +++ b/views/default/admin/components/plugin_settings.php @@ -16,4 +16,4 @@ $form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'cla echo elgg_view_title($plugin_info['name']); -echo elgg_view('input/form', array('body' => $form_body, 'internalid' => 'plugin_settings', 'action' => "{$vars['url']}action/plugins/settings/save"));
\ No newline at end of file +echo elgg_view('input/form', array('body' => $form_body, 'internalid' => 'plugin_settings', 'action' => elgg_get_site_url()."action/plugins/settings/save"));
\ No newline at end of file diff --git a/views/default/admin/plugins/simple.php b/views/default/admin/plugins/simple.php index 0d1987d05..3baa00caf 100644 --- a/views/default/admin/plugins/simple.php +++ b/views/default/admin/plugins/simple.php @@ -57,7 +57,7 @@ foreach ($plugin_list as $name => $info) { } if (elgg_view_exists("settings/{$info['installed_name']}/edit")) { - $settings_href = "{$vars['url']}pg/admin/plugin_settings/{$info['installed_name']}"; + $settings_href = elgg_get_site_url()."pg/admin/plugin_settings/{$info['installed_name']}"; $settings = " | <a class='plugin_settings link' href='$settings_href'>". elgg_echo('settings') ."</a>"; } @@ -88,7 +88,7 @@ $form_body .= elgg_view('input/submit', array('value' => elgg_echo('save'))); $form_body .= elgg_view('input/reset', array('value' => elgg_echo('reset'), 'class' => 'action_button disabled')); echo elgg_view('input/form', array( - 'action' => "{$vars['url']}action/admin/plugins/simple_update_states", + 'action' => elgg_get_site_url()."action/admin/plugins/simple_update_states", 'body' => $form_body, 'class' => 'admin_plugins_simpleview' ));
\ No newline at end of file diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php index 5b9c62840..464ffb8c5 100644 --- a/views/default/annotation/generic_comment.php +++ b/views/default/annotation/generic_comment.php @@ -24,7 +24,7 @@ $owner = get_user($vars['annotation']->owner_guid); ?> <span class="delete_button"> <?php echo elgg_view("output/confirmlink",array( - 'href' => $vars['url'] . "action/comments/delete?annotation_id=" . $vars['annotation']->id, + 'href' => elgg_get_site_url() . "action/comments/delete?annotation_id=" . $vars['annotation']->id, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm') )); diff --git a/views/default/annotation/latest_comments.php b/views/default/annotation/latest_comments.php index 79a50fea1..43f44f43b 100644 --- a/views/default/annotation/latest_comments.php +++ b/views/default/annotation/latest_comments.php @@ -29,7 +29,7 @@ if($vars['comments']){ } echo "<div class='generic_comment latest clearfloat'><span class='generic_comment_icon'>" . elgg_view("profile/icon",array('entity' => $comment_owner, 'size' => 'tiny')) . "</span>"; - echo "<div class='generic_comment_details'><span class='entity_subtext'><a href=\"{$vars['url']}pg/profile/{$comment_owner->username}\">{$comment_owner->name}</a> " . elgg_echo('on') . " <span class='entity_title'>{$url_display}</span> ({$friendlytime})</span></div>"; + echo "<div class='generic_comment_details'><span class='entity_subtext'><a href=\"".elgg_get_site_url()."pg/profile/{$comment_owner->username}\">{$comment_owner->name}</a> " . elgg_echo('on') . " <span class='entity_title'>{$url_display}</span> ({$friendlytime})</span></div>"; echo "</div>"; } diff --git a/views/default/annotation/likes.php b/views/default/annotation/likes.php index cb7424f7d..ecd109978 100644 --- a/views/default/annotation/likes.php +++ b/views/default/annotation/likes.php @@ -23,7 +23,7 @@ $owner = get_user($vars['annotation']->owner_guid); ?> <div class="entity_metadata"><span class="delete_button"> <?php echo elgg_view("output/confirmlink",array( - 'href' => $vars['url'] . "action/likes/delete?annotation_id=" . $vars['annotation']->id, + 'href' => elgg_get_site_url() . "action/likes/delete?annotation_id=" . $vars['annotation']->id, 'text' => elgg_echo('remove'), 'confirm' => elgg_echo('deleteconfirm') )); diff --git a/views/default/canvas/layouts/administration.php b/views/default/canvas/layouts/administration.php index 6df6d5edd..335fb55e5 100644 --- a/views/default/canvas/layouts/administration.php +++ b/views/default/canvas/layouts/administration.php @@ -413,7 +413,7 @@ table.mceLayout { text-decoration:none; border: 1px solid #0054A7; background-color:#0054A7; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; -webkit-border-radius: 5px; @@ -430,7 +430,7 @@ table.mceLayout { border-color: #333333; text-decoration:none; background-color:#333333; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; } @@ -447,7 +447,7 @@ table.mceLayout { text-decoration:none; border: 1px solid #0054A7; background-color:#0054A7; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; -webkit-border-radius: 5px; @@ -465,7 +465,7 @@ table.mceLayout { border-color: #333333; text-decoration:none; background-color:#333333; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; } @@ -475,7 +475,7 @@ table.mceLayout { text-decoration:none; color: #333333; background-color:#dddddd; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; border: 1px solid #999999; @@ -501,7 +501,7 @@ table.mceLayout { -webkit-border-radius: 5px; -moz-border-radius: 5px; background-color:#cccccc; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_background.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif); background-repeat: repeat-x; background-position: 0 0; border:1px solid #999999; @@ -520,7 +520,7 @@ table.mceLayout { .admin_area input.action_button:focus, .admin_area a.action_button:focus { background-position:0 -15px; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_background.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif); background-repeat: repeat-x; color:#111111; text-decoration: none; @@ -876,9 +876,9 @@ ul.admin_plugins { <div id="admin_header"> <span class="network_title"><h2> - <a href="<?php echo $vars['url']; ?>"> + <a href="<?php echo elgg_get_site_url(); ?>"> <?php echo $vars['config']->sitename; echo " ".elgg_echo('admin'); ?></a> - <a class="return_to_network" href="<?php echo $vars['url']; ?>"><< Return to network</a> + <a class="return_to_network" href="<?php echo elgg_get_site_url(); ?>"><< Return to network</a> </h2></span> </div> diff --git a/views/default/canvas/layouts/widgets.php b/views/default/canvas/layouts/widgets.php index 001755932..45eff55c6 100644 --- a/views/default/canvas/layouts/widgets.php +++ b/views/default/canvas/layouts/widgets.php @@ -61,8 +61,8 @@ </h3> </td> <td width="17px" align="right"></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -130,8 +130,8 @@ if(get_context() != "profile"){ /* on groups */ </h3> </td> <td width="17px" align="right"></td> - <td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> - <td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> + <td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> + <td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -175,8 +175,8 @@ if(get_context() != "profile"){ /* on groups */ </h3> </td> <td width="17px" align="right"></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -216,8 +216,8 @@ if(get_context() != "profile"){ /* on groups */ </h3> </td> <td width="17px" align="right"></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> -<td width="17px" align="right"><a href="#"><img src="<?php echo $vars['url']; ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="14" height="14" class="more_info" /></a></td> +<td width="17px" align="right"><a href="#"><img src="<?php echo elgg_get_site_url(); ?>_graphics/spacer.gif" width="15" height="15" class="drag_handle" /></a></td> </tr></table> <?php @@ -239,7 +239,7 @@ if(get_context() != "profile"){ /* on groups */ </div><!-- /#customise_page_view --> -<form action="<?php echo $vars['url']; ?>action/widgets/reorder" method="post"> +<form action="<?php echo elgg_get_site_url(); ?>action/widgets/reorder" method="post"> <?php echo elgg_view('input/securitytoken'); ?> <textarea type="textarea" value="Left widgets" style="display:none" name="debugField1" id="debugField1" /><?php echo $leftcolumn_widgets; ?></textarea> <textarea type="textarea" value="Middle widgets" style="display:none" name="debugField2" id="debugField2" /><?php echo $middlecolumn_widgets; ?></textarea> diff --git a/views/default/comments/forms/edit.php b/views/default/comments/forms/edit.php index 0717daf64..4e2e23a6f 100644 --- a/views/default/comments/forms/edit.php +++ b/views/default/comments/forms/edit.php @@ -13,7 +13,7 @@ $form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID())); $form_body .= elgg_view('input/submit', array('value' => elgg_echo("generic_comments:post"))) . "</div>"; - echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/comments/add")); + echo elgg_view('input/form', array('body' => $form_body, 'action' => elgg_get_site_url()."action/comments/add")); } diff --git a/views/default/css.php b/views/default/css.php index d48f31442..b4d88e7d9 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -230,13 +230,13 @@ h2 { width:14px; height:14px; float:right; - background-image:url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png); + background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); background-repeat: no-repeat; background-position: -250px top; text-indent: -1000em; } .tags { - background-image:url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png); + background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); background-repeat: no-repeat; background-position: left -196px; padding:1px 0 0 14px; @@ -247,7 +247,7 @@ h2 { } .ajax_loader { background-color: white; - background-image: url(<?php echo $vars['url']; ?>_graphics/ajax_loader_bw.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/ajax_loader_bw.gif); background-repeat: no-repeat; background-position: center center; min-height:33px; @@ -267,7 +267,7 @@ h2 { PAGE LAYOUT - MAIN BLOCKS POSITIONING *************************************** */ #elgg_topbar { - background:#333333 url(<?php echo $vars['url']; ?>_graphics/toptoolbar_background.gif) repeat-x top left; + background:#333333 url(<?php echo elgg_get_site_url(); ?>_graphics/toptoolbar_background.gif) repeat-x top left; color:#eeeeee; border-bottom:1px solid #000000; min-width:998px; @@ -282,7 +282,7 @@ h2 { width: 100%; height:90px; background-color: #4690D6; - background-image: url(<?php echo $vars['url']; ?>_graphics/header_shadow.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/header_shadow.png); background-repeat: repeat-x; background-position: bottom left; } @@ -315,7 +315,7 @@ h2 { min-height:400px; } #elgg_content.sidebar { /* class on #elgg_content div to give a full-height sidebar background */ - background-image:url(<?php echo $vars['url']; ?>_graphics/sidebar_background.gif); + background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/sidebar_background.gif); background-repeat:repeat-y; background-position: right top; } @@ -397,7 +397,7 @@ h2 { color:#71cbff; } #elgg_topbar_contents a.myfriends { - background:transparent url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat left -297px; + background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat left -297px; margin-right:30px; text-indent: -900em; width:36px; @@ -406,19 +406,19 @@ h2 { background-position: left -337px; } #elgg_topbar_contents a.settings { - background:transparent url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -300px -41px; + background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -300px -41px; padding-left:20px !important; float:right; margin-right:30px; } #elgg_topbar_contents a.admin { - background:transparent url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -300px -41px; + background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -300px -41px; padding-left:20px !important; float:right; margin-right:30px; } #elgg_topbar_contents a.help { - background:transparent url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat -300px -133px; + background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -300px -133px; padding-left:18px !important; float:right; margin-right:30px; @@ -449,7 +449,7 @@ h2 { margin:0; padding:2px 4px 2px 26px; width:198px; - background-image: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); background-position: 2px -220px; background-repeat: no-repeat; } @@ -542,7 +542,7 @@ li.navigation_more:hover a { -moz-box-shadow: 2px -1px 1px rgba(0, 0, 0, 0.25); } li.navigation_more a.subnav span { - background-image: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); background-repeat: no-repeat; background-position: -150px -56px; padding-left: 12px; @@ -1162,7 +1162,7 @@ a.longtext_control { text-decoration:none; border: 1px solid #4690d6; background-color:#4690d6; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; -webkit-border-radius: 5px; @@ -1179,7 +1179,7 @@ a.longtext_control { border-color: #0054a7; text-decoration:none; background-color:#0054a7; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; } @@ -1206,7 +1206,7 @@ input[type="submit"] { text-decoration:none; border: 1px solid #4690d6; background-color:#4690d6; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; -webkit-border-radius: 5px; @@ -1224,7 +1224,7 @@ input[type="submit"]:hover { border-color: #0054a7; text-decoration:none; background-color:#0054a7; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; } @@ -1234,7 +1234,7 @@ input[type="submit"]:hover { text-decoration:none; color: #333333; background-color:#dddddd; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; border: 1px solid #999999; @@ -1256,7 +1256,7 @@ a.action_button { -webkit-border-radius: 5px; -moz-border-radius: 5px; background-color:#cccccc; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_background.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif); background-repeat: repeat-x; background-position: 0 0; border:1px solid #999999; @@ -1275,7 +1275,7 @@ a.action_button:hover, input.action_button:focus, a.action_button:focus { background-position:0 -15px; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_background.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif); background-repeat: repeat-x; color:#111111; text-decoration: none; @@ -1336,7 +1336,7 @@ a.action_button:focus { cursor: pointer; width:14px; height:14px; - background: url("<?php echo $vars['url']; ?>_graphics/elgg_sprites.png") no-repeat -200px top; + background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat -200px top; text-indent: -9000px; text-align: left; } @@ -1458,16 +1458,16 @@ a.action_button:focus { z-index:1; } .friends_picker_navigation_l { - background: url("<?php echo $vars['url']; ?>_graphics/elgg_sprites.png") no-repeat left top; + background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat left top; } .friends_picker_navigation_r { - background: url("<?php echo $vars['url']; ?>_graphics/elgg_sprites.png") no-repeat -60px top; + background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat -60px top; } .friends_picker_navigation_l:hover { - background: url("<?php echo $vars['url']; ?>_graphics/elgg_sprites.png") no-repeat left -44px; + background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat left -44px; } .friends_picker_navigation_r:hover { - background: url("<?php echo $vars['url']; ?>_graphics/elgg_sprites.png") no-repeat -60px -44px; + background: url("<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png") no-repeat -60px -44px; } .friendspicker_savebuttons .submit_button, .friendspicker_savebuttons .cancel_button { @@ -1491,7 +1491,7 @@ a.action_button:focus { } .likes_list_holder a.user_like { cursor:pointer; - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat left -101px; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat left -101px; text-indent: -9000em; text-align: left; display:block; @@ -1506,7 +1506,7 @@ a.action_button:focus { .likes_list_holder .likes_list_button.link { float:left; text-align: left; - background: url(<?php echo $vars['url']; ?>_graphics/elgg_sprites.png) no-repeat left -131px; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat left -131px; padding-left:21px; height:20px; } diff --git a/views/default/dashboard/blurb.php b/views/default/dashboard/blurb.php index c400dc2b9..40b5b70a4 100644 --- a/views/default/dashboard/blurb.php +++ b/views/default/dashboard/blurb.php @@ -17,6 +17,6 @@ ?> </p> <p> - <a href="<?php echo $vars['url']; ?>pages/dashboard/latest.php"><?php echo elgg_echo('content:latest:blurb'); ?></a> + <a href="<?php echo elgg_get_site_url(); ?>pages/dashboard/latest.php"><?php echo elgg_echo('content:latest:blurb'); ?></a> </p> </div>
\ No newline at end of file diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php index 5262d3494..636d2ab5c 100644 --- a/views/default/friends/collection.php +++ b/views/default/friends/collection.php @@ -25,7 +25,7 @@ echo "<li><h2>"; if ($coll->owner_guid == get_loggedin_userid()) { echo "<div class=\"friends_collections_controls\">"; echo elgg_view('output/confirmlink', array( - 'href' => $vars['url'] . 'action/friends/deletecollection?collection=' . $coll->id, + 'href' => elgg_get_site_url() . 'action/friends/deletecollection?collection=' . $coll->id, 'class' => 'delete_collection' )); echo "</div>"; @@ -43,7 +43,7 @@ if ($friends = $vars['collection']->entities) { <script type="text/javascript"> $(document).ready(function () { - $('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo $vars['url']; ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>'); + $('#friends_picker_placeholder<?php echo $vars['friendspicker']; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $vars['collection']->id; ?>'); }); </script> diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php index 0030536da..f191f2c58 100644 --- a/views/default/friends/collectiontabs.php +++ b/views/default/friends/collectiontabs.php @@ -30,7 +30,7 @@ $(document).ready(function () { $('a.collectionmembers<?php echo $friendspicker; ?>').click(function () { // load collection members pane - $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); + $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=list&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); // remove selected state from previous tab $(this).parent().parent().find("li.selected").removeClass("selected"); @@ -42,7 +42,7 @@ $(document).ready(function () { $('a.editmembers<?php echo $friendspicker; ?>').click(function () { // load friends picker pane - $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); + $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo elgg_get_site_url(); ?>pages/friends/pickercallback.php?username=<?php echo get_loggedin_user()->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>'); // remove selected state from previous tab $(this).parent().parent().find("li.selected").removeClass("selected"); diff --git a/views/default/friends/forms/edit.php b/views/default/friends/forms/edit.php index df1188fe1..09a16c9ae 100644 --- a/views/default/friends/forms/edit.php +++ b/views/default/friends/forms/edit.php @@ -50,4 +50,4 @@ if (isset($vars['collection'])) { $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); $form_body .= "</p></div>"; -echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/$action"));
\ No newline at end of file +echo elgg_view('input/form', array('body' => $form_body, 'action' => elgg_get_site_url()."action/$action"));
\ No newline at end of file diff --git a/views/default/group/search/finishblurb.php b/views/default/group/search/finishblurb.php index f802282e7..a21f95881 100644 --- a/views/default/group/search/finishblurb.php +++ b/views/default/group/search/finishblurb.php @@ -9,7 +9,7 @@ elgg_deprecated_notice('view groups/search/finishblurb was deprecated.', 1.7); if ($vars['count'] > $vars['threshold']) { ?> -<div class="contentWrapper"><a href="<?php echo $vars['url']; ?>pg/search/groups/?tag=<?php echo urlencode($vars['tag']); ?>"> +<div class="contentWrapper"><a href="<?php echo elgg_get_site_url(); ?>pg/search/groups/?tag=<?php echo urlencode($vars['tag']); ?>"> <?php echo elgg_echo("group:search:finishblurb"); ?></a> diff --git a/views/default/input/autocomplete.php b/views/default/input/autocomplete.php index 28e0cf6a7..67d01c0c7 100644 --- a/views/default/input/autocomplete.php +++ b/views/default/input/autocomplete.php @@ -32,7 +32,7 @@ $ac_url_params = http_build_query(array( 'match_on' => $vars['match_on'], 'match_owner' => $vars['match_owner'], )); -$ac_url = $vars['url'] . 'pg/autocomplete?' . $ac_url_params; +$ac_url = elgg_get_site_url() . 'pg/autocomplete?' . $ac_url_params; if (!isset($autocomplete_js_loaded)) { $autocomplete_js_loaded = false; @@ -49,7 +49,7 @@ if (!$autocomplete_js_loaded) { ?> <!-- include autocomplete --> - <script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.autocomplete.min.js"></script> + <script language="javascript" type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.autocomplete.min.js"></script> <script type="text/javascript"> function bindAutocomplete() { $('input[type=text].autocomplete').autocomplete("<?php echo $ac_url; ?>", { diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index f51f9f484..fb98afc97 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -59,10 +59,10 @@ $json_values = json_encode($values); if (!$user_picker_js_sent) { ?> <!-- User picker JS --> -<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.autocomplete.min.js"></script> +<script language="javascript" type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.autocomplete.min.js"></script> <script type="text/javascript"> // set up a few required variables -userPickerURL = '<?php echo $vars['url'] ?>pg/livesearch'; +userPickerURL = '<?php echo elgg_get_site_url() ?>pg/livesearch'; userList = <?php echo $json_values ?>; function userPickerBindEvents() { diff --git a/views/default/likes/forms/edit.php b/views/default/likes/forms/edit.php index 508b2ad82..d438ff3be 100644 --- a/views/default/likes/forms/edit.php +++ b/views/default/likes/forms/edit.php @@ -9,7 +9,7 @@ if (isset($vars['entity']) && isloggedin()) { $guid = $vars['entity']->getGuid(); - $url = elgg_add_action_tokens_to_url($vars['url'] . "action/likes/add?guid={$guid}"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/likes/add?guid={$guid}"); echo "<span class='likes_list_holder'>"; //check to see if the user has already liked diff --git a/views/default/likes/forms/link.php b/views/default/likes/forms/link.php index 34c2848d3..4e52224e2 100644 --- a/views/default/likes/forms/link.php +++ b/views/default/likes/forms/link.php @@ -9,7 +9,7 @@ if (isset($vars['entity']) && isloggedin()) { $guid = $vars['entity']->getGuid(); - $url = elgg_add_action_tokens_to_url($vars['url'] . "action/likes/add?guid={$guid}"); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/likes/add?guid={$guid}"); //check to see if the user has already liked if (!elgg_annotation_exists($guid, 'likes') ) { echo "<span class='river_link_divider'> | </span><a class='river_user_like_button link' href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a>"; diff --git a/views/default/object/default.php b/views/default/object/default.php index 7ef563e91..6975804c3 100644 --- a/views/default/object/default.php +++ b/views/default/object/default.php @@ -29,7 +29,7 @@ if ($vars['full']) { $controls = ""; if ($vars['entity']->canEdit()) { $delete = elgg_view('output/confirm_link', array( - 'href' => "{$vars['url']}action/entities/delete?guid={$vars['entity']->guid}", + 'href' => elgg_get_site_url()."action/entities/delete?guid={$vars['entity']->guid}", 'text' => elgg_echo('delete') )); $controls .= " ($delete)"; diff --git a/views/default/object/plugin.php b/views/default/object/plugin.php index 7b1e7d2df..bef709d7d 100644 --- a/views/default/object/plugin.php +++ b/views/default/object/plugin.php @@ -15,5 +15,5 @@ $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'plugin' ?> <div> - <?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/plugins/{$prefix}settings/save")); ?> + <?php echo elgg_view('input/form', array('body' => $form_body, 'action' => elgg_get_site_url()."action/plugins/{$prefix}settings/save")); ?> </div>
\ No newline at end of file diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php index a4ecb72da..7270cd5ea 100644 --- a/views/default/output/tagcloud.php +++ b/views/default/output/tagcloud.php @@ -57,7 +57,7 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { if ($size < 100) { $size = 100; } - $url = "{$vars['url']}pg/search/?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype"; + $url = elgg_get_site_url()."pg/search/?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype"; $list .= "<a href=\"$url\" style=\"font-size: $size%\" title=\"".addslashes($tag->tag)." ($tag->total)\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>"; } @@ -65,7 +65,7 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { if ($context != 'tags') { $cloud .= '<p class="tags">'; - $cloud .= "<a href=\"{$vars['url']}pg/tags\">All site tags</a>"; + $cloud .= "<a href=\"".elgg_get_site_url()."pg/tags\">All site tags</a>"; $cloud .= '</p>'; } diff --git a/views/default/output/tags.php b/views/default/output/tags.php index 99c898de6..6c8115d54 100644 --- a/views/default/output/tags.php +++ b/views/default/output/tags.php @@ -43,7 +43,7 @@ if (!empty($vars['tags'])) { $type = ""; } if (is_string($tag)) { - $tagstr .= "<a rel=\"tag\" href=\"{$vars['url']}pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>"; + $tagstr .= "<a rel=\"tag\" href=\"".elgg_get_site_url()."pg/search/?q=".urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}\">" . htmlentities($tag, ENT_QUOTES, 'UTF-8') . "</a>"; } } echo $tagstr; diff --git a/views/default/page_elements/content_header.php b/views/default/page_elements/content_header.php index 6ae5849ae..3704e9a49 100644 --- a/views/default/page_elements/content_header.php +++ b/views/default/page_elements/content_header.php @@ -38,17 +38,17 @@ $new_button = ''; $default_tabs = array( 'all' => array( 'title' => elgg_echo('all'), - 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "{$vars['url']}mod/$type/all.php", + 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : elgg_get_site_url()."mod/$type/all.php", 'selected' => ($filter_context == 'everyone'), ), 'mine' => array( 'title' => elgg_echo('mine'), - 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "{$vars['url']}pg/$type/$username", + 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : elgg_get_site_url()."pg/$type/$username", 'selected' => ($filter_context == 'mine'), ), 'friend' => array( 'title' => elgg_echo('friends'), - 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "{$vars['url']}pg/$type/$username/friends", + 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : elgg_get_site_url()."pg/$type/$username/friends", 'selected' => ($filter_context == 'friends'), ), ); diff --git a/views/default/page_elements/elgg_footer.php b/views/default/page_elements/elgg_footer.php index 62ec5a110..6d6fd8965 100644 --- a/views/default/page_elements/elgg_footer.php +++ b/views/default/page_elements/elgg_footer.php @@ -13,7 +13,7 @@ <div id="elgg_footer_contents" class="clearfloat"> <?php echo elgg_view('footer/links'); ?> <a href="http://www.elgg.org" class="powered_by_elgg_badge"> - <img src="<?php echo $vars['url']; ?>_graphics/powered_by_elgg_badge_drk_bckgnd.gif" alt="Powered by Elgg" /> + <img src="<?php echo elgg_get_site_url(); ?>_graphics/powered_by_elgg_badge_drk_bckgnd.gif" alt="Powered by Elgg" /> </a> </div> </div> diff --git a/views/default/page_elements/elgg_header_logo.php b/views/default/page_elements/elgg_header_logo.php index 4449c9644..1e5e5269d 100644 --- a/views/default/page_elements/elgg_header_logo.php +++ b/views/default/page_elements/elgg_header_logo.php @@ -5,6 +5,6 @@ **/ ?> -<h1><a href="<?php echo $vars['url']; ?>"> +<h1><a href="<?php echo elgg_get_site_url(); ?>"> <span class='network_title'><?php echo $vars['config']->sitename; ?></span> </a></h1> diff --git a/views/default/page_elements/elgg_topbar.php b/views/default/page_elements/elgg_topbar.php index e88cb0fac..4908625e4 100644 --- a/views/default/page_elements/elgg_topbar.php +++ b/views/default/page_elements/elgg_topbar.php @@ -11,7 +11,7 @@ if (($user instanceof ElggUser) && ($user->guid > 0)) { // Elgg logo echo '<a href="http://www.elgg.org">'; - echo "<img class=\"site_logo\" src=\"{$vars['url']}_graphics/elgg_toolbar_logo.gif\" alt=\"Elgg logo\" />"; + echo "<img class=\"site_logo\" src=\"".elgg_get_site_url()."_graphics/elgg_toolbar_logo.gif\" alt=\"Elgg logo\" />"; echo '</a>'; // avatar @@ -31,12 +31,12 @@ if (($user instanceof ElggUser) && ($user->guid > 0)) { // user settings $settings = elgg_echo('settings'); - echo "<a href=\"{$vars['url']}pg/settings\" class=\"settings\">$settings</a>"; + echo "<a href=\"".elgg_get_site_url()."pg/settings\" class=\"settings\">$settings</a>"; // The administration link is for admin or site admin users only if ($user->isAdmin()) { $admin = elgg_echo("admin"); - echo "<a href=\"{$vars['url']}pg/admin\" class=\"admin\">$admin</a>"; + echo "<a href=\"".elgg_get_site_url()."pg/admin\" class=\"admin\">$admin</a>"; } echo '</div>'; diff --git a/views/default/page_elements/elgg_topbar_logout.php b/views/default/page_elements/elgg_topbar_logout.php index d37c5f126..ca3d16707 100644 --- a/views/default/page_elements/elgg_topbar_logout.php +++ b/views/default/page_elements/elgg_topbar_logout.php @@ -7,7 +7,7 @@ echo '<div class="log_out">'; echo elgg_view('output/url', array( - 'href' => "{$vars['url']}action/logout", + 'href' => elgg_get_site_url()."action/logout", 'text' => elgg_echo('logout'), 'is_action' => TRUE )); diff --git a/views/default/page_elements/html_begin.php b/views/default/page_elements/html_begin.php index 7b1204c18..37a9999f0 100644 --- a/views/default/page_elements/html_begin.php +++ b/views/default/page_elements/html_begin.php @@ -48,12 +48,12 @@ $release = get_version(true); <meta name="ElggRelease" content="<?php echo $release; ?>" /> <meta name="ElggVersion" content="<?php echo $version; ?>" /> <title><?php echo $title; ?></title> - <link rel="SHORTCUT ICON" href="<?php echo $vars['url']; ?>_graphics/favicon.ico" /> + <link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" /> - <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.4.2.min.js"></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-ui-1.7.2.min.js"></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.form.js"></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=initialise_elgg&viewtype=<?php echo $vars['view']; ?>"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.4.2.min.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-ui-1.7.2.min.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.form.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=initialise_elgg&viewtype=<?php echo $vars['view']; ?>"></script> <?php echo $feedref; @@ -65,20 +65,20 @@ $release = get_version(true); if (isset($pickerinuse) && $pickerinuse == true) { ?> <!-- only needed on pages where we have friends collections and/or the friends picker --> - <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.easing.1.3.packed.js"></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=friendsPickerv1&viewtype=<?php echo $vars['view']; ?>"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.easing.1.3.packed.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=friendsPickerv1&viewtype=<?php echo $vars['view']; ?>"></script> <?php } ?> <!-- include the default css file --> - <link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css?lastcache=<?php echo $vars['config']->lastcache; ?>&viewtype=<?php echo $vars['view']; ?>" type="text/css" /> + <link rel="stylesheet" href="<?php echo elgg_get_site_url(); ?>_css/css.css?lastcache=<?php echo $vars['config']->lastcache; ?>&viewtype=<?php echo $vars['view']; ?>" type="text/css" /> <!--[if IE 6]> - <link rel="stylesheet" type="text/css" href="<?php echo $vars['url']; ?>views/default/css_ie6.php" /> + <link rel="stylesheet" type="text/css" href="<?php echo elgg_get_site_url(); ?>views/default/css_ie6.php" /> <![endif]--> <!--[if gt IE 6]> - <link rel="stylesheet" type="text/css" href="<?php echo $vars['url']; ?>views/default/css_ie.php" /> + <link rel="stylesheet" type="text/css" href="<?php echo elgg_get_site_url(); ?>views/default/css_ie.php" /> <![endif]--> <?php echo elgg_view('metatags', $vars); diff --git a/views/default/page_elements/html_begin_admin.php b/views/default/page_elements/html_begin_admin.php index a35cafb3f..34a70b60e 100644 --- a/views/default/page_elements/html_begin_admin.php +++ b/views/default/page_elements/html_begin_admin.php @@ -17,12 +17,12 @@ $release = get_version(true); <meta name="ElggRelease" content="<?php echo $release; ?>" /> <meta name="ElggVersion" content="<?php echo $version; ?>" /> <title><?php echo $vars['config']->sitename; echo " ".elgg_echo('admin'); ?></title> - <link rel="shortcut icon" href="<?php echo $vars['url']; ?>_graphics/favicon.ico" /> + <link rel="shortcut icon" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" /> - <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.4.2.min.js"></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-ui-1.7.2.min.js"></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.form.js"></script> - <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=initialise_elgg&viewtype=<?php echo $vars['view']; ?>"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-1.4.2.min.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery-ui-1.7.2.min.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>vendors/jquery/jquery.form.js"></script> + <script type="text/javascript" src="<?php echo elgg_get_site_url(); ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=initialise_elgg&viewtype=<?php echo $vars['view']; ?>"></script> <?php echo $feedref; @@ -31,7 +31,7 @@ $release = get_version(true); } ?> <!-- include the admin css file - <link rel="stylesheet" href="<?php echo $vars['url']; ?>views/default/css_admin.php" type="text/css" />--> + <link rel="stylesheet" href="<?php echo elgg_get_site_url(); ?>views/default/css_admin.php" type="text/css" />--> </head> <body> diff --git a/views/default/page_shells/walled_garden.php b/views/default/page_shells/walled_garden.php index cb5d1b671..4f88501d9 100644 --- a/views/default/page_shells/walled_garden.php +++ b/views/default/page_shells/walled_garden.php @@ -29,7 +29,7 @@ body {background: white;} position:relative; padding:0; width:563px; - background: url(<?php echo $vars['url']; ?>_graphics/walled_garden_background_extend.gif) repeat-y left top; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_background_extend.gif) repeat-y left top; text-align: left; word-wrap:break-word; } @@ -38,11 +38,11 @@ body {background: white;} padding:0; width:563px; min-height:230px; - background: url(<?php echo $vars['url']; ?>_graphics/walled_garden_background_top.gif) no-repeat left top; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_background_top.gif) no-repeat left top; } #walledgarden_bottom { margin:0 auto; - background: url(<?php echo $vars['url']; ?>_graphics/walled_garden_background_bottom.gif) no-repeat left bottom; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_background_bottom.gif) no-repeat left bottom; width:563px; height:54px; /* position: relative; */ @@ -154,7 +154,7 @@ body {background: white;} text-decoration:none; border: 1px solid #4690d6; background-color:#4690d6; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; -webkit-border-radius: 5px; @@ -171,7 +171,7 @@ body {background: white;} border-color: #0054a7; text-decoration:none; background-color:#0054a7; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_graduation.png); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_graduation.png); background-repeat: repeat-x; background-position: left 10px; } @@ -179,7 +179,7 @@ body {background: white;} -webkit-border-radius: 5px; -moz-border-radius: 5px; background-color:#cccccc; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_background.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif); background-repeat: repeat-x; background-position: 0 0; border:1px solid #999999; @@ -196,7 +196,7 @@ body {background: white;} .walledgardenlogin input.action_button:hover, .walledgardenlogin input.action_button:focus { background-position:0 -15px; - background-image: url(<?php echo $vars['url']; ?>_graphics/button_background.gif); + background-image: url(<?php echo elgg_get_site_url(); ?>_graphics/button_background.gif); background-repeat: repeat-x; color:#111111; text-decoration: none; @@ -234,7 +234,7 @@ body {background: white;} width:260px; background-color: white; padding:0; - background: url(<?php echo $vars['url']; ?>_graphics/walled_garden_backgroundfull_top.gif) no-repeat left top; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_backgroundfull_top.gif) no-repeat left top; height:auto; } #hiddenform_body { @@ -243,7 +243,7 @@ body {background: white;} } #hiddenform_bottom { margin:0 auto; - background: url(<?php echo $vars['url']; ?>_graphics/walled_garden_backgroundfull_bottom.gif) no-repeat left bottom; + background: url(<?php echo elgg_get_site_url(); ?>_graphics/walled_garden_backgroundfull_bottom.gif) no-repeat left bottom; width:563px; height:54px; position: relative; diff --git a/views/default/settings/system.php b/views/default/settings/system.php index 3b3aaf808..7371ac71f 100644 --- a/views/default/settings/system.php +++ b/views/default/settings/system.php @@ -11,7 +11,7 @@ // Set action appropriately if (!isset($vars['action'])) { - $action = $vars['url'] . "action/systemsettings/save"; + $action = elgg_get_site_url() . "action/systemsettings/save"; } else { $action = $vars['action']; } diff --git a/views/default/settings/upgrading.php b/views/default/settings/upgrading.php index 9f13e4c3f..19bc13879 100644 --- a/views/default/settings/upgrading.php +++ b/views/default/settings/upgrading.php @@ -8,13 +8,13 @@ <html> <head> <title><?php echo elgg_echo('upgrading'); ?></title> - <meta http-equiv="refresh" content="1;url=<?php echo $vars['url']; ?>upgrade.php?upgrade=upgrade"/> + <meta http-equiv="refresh" content="1;url=<?php echo elgg_get_site_url(); ?>upgrade.php?upgrade=upgrade"/> </head> <body bgcolor="white"> <table width="100%" height="100%" border="0" style="margin: 0px; padding: 0px"> <tr> <td width="100%" height="100%" valign="middle" align="center"> - <img src="<?php echo $vars['url']; ?>_graphics/ajax_loader_bw.gif" /> + <img src="<?php echo elgg_get_site_url(); ?>_graphics/ajax_loader_bw.gif" /> </td> </tr> </table> diff --git a/views/default/user/search/finishblurb.php b/views/default/user/search/finishblurb.php index 9c4b1d79d..1e48d6145 100644 --- a/views/default/user/search/finishblurb.php +++ b/views/default/user/search/finishblurb.php @@ -10,7 +10,7 @@ elgg_deprecated_notice('view user/search/finishblurb was deprecated.', 1.7); if ($vars['count'] > $vars['threshold']) { ?> -<a href="<?php echo $vars['url']; ?>pg/search/users/?tag=<?php echo urlencode($vars['tag']); ?>"><?php +<a href="<?php echo elgg_get_site_url(); ?>pg/search/users/?tag=<?php echo urlencode($vars['tag']); ?>"><?php echo elgg_echo("user:search:finishblurb"); ?></a> <?php diff --git a/views/default/usersettings/form.php b/views/default/usersettings/form.php index 4bce6b228..02ccbc795 100644 --- a/views/default/usersettings/form.php +++ b/views/default/usersettings/form.php @@ -7,4 +7,4 @@ $form_body = elgg_view("usersettings/user"); $form_body .= "<div class='divider'></div>".elgg_view('input/submit', array('value' => elgg_echo('save'), 'class' => 'submit_button usersettings_save')); -echo elgg_view('input/form', array('action' => "{$vars['url']}action/usersettings/save", 'body' => $form_body));
\ No newline at end of file +echo elgg_view('input/form', array('action' => elgg_get_site_url()."action/usersettings/save", 'body' => $form_body));
\ No newline at end of file diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php index 572624034..5be2df9d4 100644 --- a/views/default/widgets/editwrapper.php +++ b/views/default/widgets/editwrapper.php @@ -12,7 +12,7 @@ $form_body = $vars['body']; $form_body .= "<p><label>" . elgg_echo('access') . ": " . elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $vars['entity']->access_id)) . "</label></p>"; $form_body .= "<p>" . elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $guid)) . elgg_view('input/hidden', array('internalname' => 'noforward', 'value' => 'true')) . elgg_view('input/submit', array('internalname' => "submit$guid", 'value' => elgg_echo('save'))) . "</p>"; -echo elgg_view('input/form', array('internalid' => "widgetform$guid", 'body' => $form_body, 'action' => "{$vars['url']}action/widgets/save")) +echo elgg_view('input/form', array('internalid' => "widgetform$guid", 'body' => $form_body, 'action' => elgg_get_site_url()."action/widgets/save")) ?> <script type="text/javascript"> $(document).ready(function() { @@ -28,7 +28,7 @@ $(document).ready(function() { $.post($("#widgetform<?php echo $guid; ?>").attr("action"),variables,function() { $("#submit<?php echo $guid; ?>").attr("disabled",""); $("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("save"); ?>"); - $("#widgetcontent<?php echo $guid; ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $guid; ?>?shell=no&username=<?php echo elgg_get_page_owner()->username; ?>&context=<?php echo get_context(); ?>&callback=true"); + $("#widgetcontent<?php echo $guid; ?>").load("<?php echo elgg_get_site_url(); ?>pg/view/<?php echo $guid; ?>?shell=no&username=<?php echo elgg_get_page_owner()->username; ?>&context=<?php echo get_context(); ?>&callback=true"); }); return false; diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index d66563858..c89a878ca 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -87,7 +87,7 @@ if ($callback != "true") { <script type="text/javascript"> $(document).ready(function() { - $("#widgetcontent<?php echo $vars['entity']->getGUID(); ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $vars['entity']->getGUID(); ?>?shell=no&username=<?php echo elgg_get_page_owner()->username; ?>&context=widget&callback=true"); + $("#widgetcontent<?php echo $vars['entity']->getGUID(); ?>").load("<?php echo elgg_get_site_url(); ?>pg/view/<?php echo $vars['entity']->getGUID(); ?>?shell=no&username=<?php echo elgg_get_page_owner()->username; ?>&context=widget&callback=true"); // run function to check for widgets collapsed/expanded state var forWidget = "widget<?php echo $vars['entity']->getGUID(); ?>"; diff --git a/views/foaf/page_shells/default.php b/views/foaf/page_shells/default.php index bf8d0b564..7bd69b875 100644 --- a/views/foaf/page_shells/default.php +++ b/views/foaf/page_shells/default.php @@ -40,7 +40,7 @@ if (!$owner = elgg_get_page_owner()) { <foaf:name><?php echo $owner->name; ?></foaf:name> <foaf:homepage rdf:resource="<?php echo $owner->getURL(); ?>" /> <foaf:depiction rdf:resource="<?php echo elgg_format_url($owner->getIcon('large')); ?>" /> - <foaf:weblog rdf:resource="<?php echo $vars['url']; ?>pg/blog/<?php echo $owner->username; ?>" /> + <foaf:weblog rdf:resource="<?php echo elgg_get_site_url(); ?>pg/blog/<?php echo $owner->username; ?>" /> <?php echo $vars['body']; ?> diff --git a/views/foaf/user/default.php b/views/foaf/user/default.php index b2da08f29..3be763a73 100644 --- a/views/foaf/user/default.php +++ b/views/foaf/user/default.php @@ -15,7 +15,7 @@ foreach ($friends as $friend) { <foaf:Person> <foaf:nick><?php echo $friend->username; ?></foaf:nick> <foaf:name><?php echo $friend->name; ?></foaf:name> - <rdfs:seeAlso rdf:resource="<?php echo $vars['url'] . "pg/profile/" . $friend->username . "?view=foaf" ?>" /> + <rdfs:seeAlso rdf:resource="<?php echo elgg_get_site_url() . "pg/profile/" . $friend->username . "?view=foaf" ?>" /> </foaf:Person> </foaf:knows> diff --git a/views/installation/install/header.php b/views/installation/install/header.php index 896884da1..8c18dbffd 100644 --- a/views/installation/install/header.php +++ b/views/installation/install/header.php @@ -3,6 +3,6 @@ * Install header */ -$url = "{$vars['url']}_graphics/elgg_logo.png"; +$url = elgg_get_site_url()."_graphics/elgg_logo.png"; ?> <img src="<?php echo $url; ?>" alt="Elgg" /> diff --git a/views/installation/install/nav.php b/views/installation/install/nav.php index ca4b8a87b..0758653a4 100644 --- a/views/installation/install/nav.php +++ b/views/installation/install/nav.php @@ -18,7 +18,7 @@ if (isset($vars['refresh']) && $vars['refresh']) { // create next button and selectively disable $next_text = elgg_echo('next'); -$next_link = "{$vars['url']}install.php?step={$vars['next_step']}"; +$next_link = elgg_get_site_url()."install.php?step={$vars['next_step']}"; $next = "<a href=\"$next_link\">$next_text</a>"; if (isset($vars['advance']) && !$vars['advance']) { // disable the next button diff --git a/views/installation/install/pages/complete.php b/views/installation/install/pages/complete.php index 681db644e..a63f86330 100644 --- a/views/installation/install/pages/complete.php +++ b/views/installation/install/pages/complete.php @@ -9,7 +9,7 @@ echo autop(elgg_echo('install:complete:instructions')); <div class="install_nav"> <?php - $url = $vars['url'] . $vars['destination']; + $url = elgg_get_site_url() . $vars['destination']; $text = elgg_echo('install:complete:gotosite'); echo "<a href=\"$url\">$text</a>"; ?> diff --git a/views/installation/page_shells/default.php b/views/installation/page_shells/default.php index 3e9b45160..62bb0a5b3 100644 --- a/views/installation/page_shells/default.php +++ b/views/installation/page_shells/default.php @@ -27,8 +27,8 @@ header('Expires: Fri, 05 Feb 1982 00:00:00 -0500', TRUE); <head> <title><?php echo $title; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="SHORTCUT ICON" href="<?php echo $vars['url']; ?>_graphics/favicon.ico" /> - <link rel="stylesheet" href="<?php echo $vars['url']; ?>install/css/install.css" type="text/css" /> + <link rel="SHORTCUT ICON" href="<?php echo elgg_get_site_url(); ?>_graphics/favicon.ico" /> + <link rel="stylesheet" href="<?php echo elgg_get_site_url(); ?>install/css/install.css" type="text/css" /> </head> <body> <div id="elgg_wrapper"> |