Changeset 447

Show
Ignore:
Timestamp:
07/14/06 02:59:55 (2 years ago)
Author:
sven
Message:

replace a load of $url=url vars with $CFG->wwwroot

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_files/rss2.php

    r296 r447  
    2626 
    2727    if ($info = get_record('users','ident',$page_owner)) { 
    28         $url = url; 
    29         $name = (stripslashes($info->name)); 
    30         $username = (stripslashes($info->username)); 
    31         $mainurl = (url . $username . "/files/"); 
     28        $name = stripslashes($info->name); 
     29        $username = stripslashes($info->username); 
     30        $mainurl = $CFG->wwwroot . $username . "/files/"; 
    3231        $rssurl = $mainurl . "rss/" . urlencode($tag); 
    3332        $rssdescription = sprintf(gettext("Files for %s, hosted on %s."),$name,$sitename); 
  • devel/content/mainindex/content_main_privacy.php

    r269 r447  
    22 
    33    $sitename = sitename; 
    4     $url = url; 
    54    $email = email; 
    65    $run_result .= <<< END 
     
    109<p><b>What This Privacy Policy Covers</b></p> 
    1110<ul> 
    12 <li>This privacy policy relates to use of the $sitename web site at $url</li> 
     11<li>This privacy policy relates to use of the {$sitename} web site at {$CFG->wwwroot}</li> 
    1312<li>This privacy policy covers how $sitename (hereafter named 'we') will treat personal information that we collect. Personal information is <b>your</b> information and includes identifiers like your name, address, email address, phone number.</li> 
    1413<li>We must stress that we will not give out or sell any of your information to third parties. The information we do collect from you will only be used for statistical purposes.</li> 
  • devel/help/mainindex/blogs_help_page.php

    r269 r447  
    11<?php 
     2global $CFG; 
    23$sitename = sitename; 
    3 $url = url; 
    44$run_result .= <<< END 
    55 
     
    1616<h5>How to do it?</h5> 
    1717<h4>>> Select 'Post a new entry'</h4> 
    18 <img src="{$url}help/images/blog_start.jpg" alt="Post a blog entry" title="Post a blog entry" width="369" height="99" border="0" /> 
     18<img src="{$CFG->wwwroot}help/images/blog_start.jpg" alt="Post a blog entry" title="Post a blog entry" width="369" height="99" border="0" /> 
    1919<p><b>Step one:</b> Now you will see the 'Add a new post' page. First you give your blog post a title then fill in some content.</p> 
    20 <img src="{$url}help/images/blog_two.jpg" alt="Title and content" title="Title and content" width="437" height="147" border="0" /> 
     20<img src="{$CFG->wwwroot}help/images/blog_two.jpg" alt="Title and content" title="Title and content" width="437" height="147" border="0" /> 
    2121<p><b>Step two:</b> <i>(optional)</i> Once you finished writing the content - you might want to add some keywords (tags). These keywords can be individual words or phrase - <b>separated by a comma</b>.</p> 
    22 <img src="{$url}help/images/blog_three.jpg" alt="Title and content" title="Title and content" width="424" height="126" border="0" /> 
     22<img src="{$CFG->wwwroot}help/images/blog_three.jpg" alt="Title and content" title="Title and content" width="424" height="126" border="0" /> 
    2323<p><b>Step three:</b> <i>(optional - default is public)</i> Like all things in <b>your</b> landscape you can control who gets to read your blog post. Use the 'Access Restrictions' to do this.</p> 
    24 <img src="{$url}help/images/blog_four.jpg" alt="Access" title="Access" width="163" height="102" border="0" /> 
     24<img src="{$CFG->wwwroot}help/images/blog_four.jpg" alt="Access" title="Access" width="163" height="102" border="0" /> 
    2525<p><i>Note: You can create your own access restrictions at 'Your Network' - 'Access controls'</i></p> 
    2626<p><b>Step four:</b> <i>(optional)</i> If you would like to embed a file into you blog post use the 'Embed a file..' option. Images less than 400pixel by 400 pixel will display in the blog post, all other files will be linked to.</p> 
    27 <img src="{$url}help/images/blog_five.jpg" alt="Embed an image" title="Embed an image" width="485" height="67" border="0" /> 
     27<img src="{$CFG->wwwroot}help/images/blog_five.jpg" alt="Embed an image" title="Embed an image" width="485" height="67" border="0" /> 
    2828<p><b>Step five:</b> Now just press 'Post' and you have created your first blog post!</p> 
    2929<h3>Other functions</h3> 
  • devel/help/mainindex/calendar_help_page.php

    r269 r447  
    11<?php 
     2global $CFG; 
    23$sitename = sitename; 
    34$run_result .= <<< END 
     
    78    <h5>How to create an event</h5> 
    89    <p><b>>> Select 'Post a new event'</b></p> 
    9     <img src="/help/images/event_start.jpg" alt="Post an event" title="Post an event" border="0"
     10    <img src="{$CFG->wwwroot}help/images/event_start.jpg" alt="Post an event" title="Post an event" border="0" /
    1011    <p><b>Step one:</b> Now you will see the 'Add a new event' page. First you give your event a title.</p> 
    11     <img src="/help/images/event_one.jpg" alt="Title" title="Title" border="0"
     12    <img src="{$CFG->wwwroot}help/images/event_one.jpg" alt="Title" title="Title" border="0" /
    1213    <p><b>Step two:</b> Now select the start and end date for the event.</p> 
    13     <img src="/help/images/event_two.jpg" alt="Start and End Date" title="Start and End Date" border="0"
     14    <img src="{$CFG->wwwroot}help/images/event_two.jpg" alt="Start and End Date" title="Start and End Date" border="0" /
    1415    <p><b>Step three:</b> <i>(optional)</i> Enter a location for the event.</p> 
    15     <img src="/help/images/event_three.jpg" alt="Location" title="Location" border="0"
     16    <img src="{$CFG->wwwroot}help/images/event_three.jpg" alt="Location" title="Location" border="0" /
    1617    <p><b>Step four:</b> <i>(optional)</i> Enter a description for the event.</p> 
    17     <img src="/help/images/event_four.jpg" alt="Description" title="Description" border="0"
     18    <img src="{$CFG->wwwroot}help/images/event_four.jpg" alt="Description" title="Description" border="0" /
    1819    <p><b>Step five:</b> <i>(optional)</i> You might want to add some keywords (tags). These keywords can be individual words or phrase - <b>separated by a comma</b>.</p> 
    19     <img src="/help/images/event_five.jpg" alt="Keywords" title="Keywords" border="0"
     20    <img src="{$CFG->wwwroot}help/images/event_five.jpg" alt="Keywords" title="Keywords" border="0" /
    2021    <p><b>Step six:</b> <i>(optional - default is public)</i> Like all things in <b>your</b> landscape you can control who gets to read your blog post. Use the 'Access Restrictions' to do this.</p> 
    21     <img src="/help/images/event_six.jpg" alt="Access" title="Access" border="0"
     22    <img src="{$CFG->wwwroot}help/images/event_six.jpg" alt="Access" title="Access" border="0" /
    2223    <p><i>Note: You can create your own access restrictions at 'Your Network' - 'Access controls'</i></p> 
    2324    <p><b>Step seven:</b> Now just press 'Save Event' and you have created your first event!</p> 
  • devel/help/mainindex/file_help_page.php

    r269 r447  
    11<?php 
    22 
     3    global $CFG; 
    34    $sitename = sitename; 
    4     $url = url; 
    55    $run_result .= <<< END 
    66 
     
    1616<h3>How to do it?</h3> 
    1717<h4>>> Select 'Add a file or a folder'</h4> 
    18 <img src="{$url}help/images/files_one.jpg" alt="Start" title="Start" width="365" height="95" border="0" /> 
     18<img src="{$CFG->wwwroot}help/images/files_one.jpg" alt="Start" title="Start" width="365" height="95" border="0" /> 
    1919 
    2020<p><b>Step one:</b> Now you will be in the root directory of your file repository. If you like you can upload all your files here. First you need to browse for the file you want to upload using the first part of the form.</p> 
    21 <img src="{$url}help/images/files_two.jpg" alt="Browse for file" title="Browse for file" width="419" height="72" border="0" /> 
     21<img src="{$CFG->wwwroot}help/images/files_two.jpg" alt="Browse for file" title="Browse for file" width="419" height="72" border="0" /> 
    2222<p><b>Step two:</b> Now enter a title <i>(recommended)</i> and short description <i>(optional)</i>.</p> 
    23 <img src="{$url}help/images/files_three.jpg" alt="Add a title and description" title="Add a title and description" width="380" height="92" border="0" /> 
     23<img src="{$CFG->wwwroot}help/images/files_three.jpg" alt="Add a title and description" title="Add a title and description" width="380" height="92" border="0" /> 
    2424<p><b>Step 3:</b> <i>(optional - default is public)</i> You can now set the 'Access Restriction' you want for this file.</p> 
    25 <img src="{$url}help/images/files_four.jpg" alt="Access" title="Access" width="350" height="80" border="0" /> 
     25<img src="{$CFG->wwwroot}help/images/files_four.jpg" alt="Access" title="Access" width="350" height="80" border="0" /> 
    2626<p><b>Step 4:</b> <i>(optional)</i> Now you might want to add some keywords (tags).</p> 
    27 <img src="{$url}help/images/files_six.jpg" alt="Keywords" title="Keywords" width="453" height="89" border="0" /> 
     27<img src="{$CFG->wwwroot}help/images/files_six.jpg" alt="Keywords" title="Keywords" width="453" height="89" border="0" /> 
    2828<p><b>Step 5:</b> Make sure you check the disclaimer which says you acknowledge you have the right to upload the particular file.</p> 
    29 <img src="{$url}help/images/files_five.jpg" alt="disclaimer" title="disclaimer" width="455" height="43" border="0" /> 
     29<img src="{$CFG->wwwroot}help/images/files_five.jpg" alt="disclaimer" title="disclaimer" width="455" height="43" border="0" /> 
    3030<p><b>Step 6:</b> Click Upload and you are done!</p> 
    3131<h5>Want to create a folder?</h5> 
    3232<p><b>>> Select 'Add a file or a folder'</b></p> 
    33 <img src="{$url}help/images/files_one.jpg" alt="Start" title="Start" width="365" height="95" border="0" /> 
     33<img src="{$CFG->wwwroot}help/images/files_one.jpg" alt="Start" title="Start" width="365" height="95" border="0" /> 
    3434<p><b>Step one:</b> You need to give the folder a name - then set the Access restrictions and finally, if you want, put in some keywords (remember to separate with a comma!)</p> 
    35 <img src="{$url}help/images/files_seven.jpg" alt="disclaimer" title="disclaimer" width="500" height="200" border="0" /> 
     35<img src="{$CFG->wwwroot}help/images/files_seven.jpg" alt="disclaimer" title="disclaimer" width="500" height="200" border="0" /> 
    3636 
    3737<p><i>Note: you can create as may sub-directories as you want - just click on the folder for which you want to create a sub-directory in and then follow the instructions to 'Create a folder' above.</i></p> 
  • devel/help/mainindex/network_help_page.php

    r269 r447  
    11<?php 
    22 
     3    global $CFG; 
    34    $sitename = sitename; 
    4     $url = url; 
    55    $email = email; 
    66    $run_result .= <<< END 
     
    2020<h4>>> Here's how:</h4> 
    2121<p><b>Step 1:</b> You need to give the community a name as well as a username.</p> 
    22 <img src="{$url}help/images/community_one.jpg" alt="Create a community" title="Create a community" width="336" height="120" border="0" /> 
     22<img src="{$CFG->wwwroot}help/images/community_one.jpg" alt="Create a community" title="Create a community" width="336" height="120" border="0" /> 
    2323<p><b>Step 2:</b> Click '<b>create</b>' and that is it! You have now created a new comunity.</p> 
    2424<h3>Friends:</h3> 
  • devel/help/mainindex/profile_help_page.php

    r269 r447  
    11<?php 
    22 
     3    global $CFG; 
    34    $sitename = sitename; 
    4     $url = url; 
    55    $run_result .= <<< END 
    66<div class="helpfiles"> 
     
    1616 
    1717<h4>>> Select 'Edit this profile'</h4> 
    18 <img src="{$url}help/images/profile_to_do.jpg" alt="How to do it?" title="How to do it?" width="369" height="104" border="0" /> 
     18<img src="{$CFG->wwwroot}help/images/profile_to_do.jpg" alt="How to do it?" title="How to do it?" width="369" height="104" border="0" /> 
    1919 
    2020<p>Fill in the fields that you want, don't worry about information you don't want others to see, you can control this.</p>  
    21 <img src="{$url}help/images/profile_field.jpg" alt="Example Profile field" title="Example Profile field" width="450" height="131" border="0" /> 
     21<img src="{$CFG->wwwroot}help/images/profile_field.jpg" alt="Example Profile field" title="Example Profile field" width="450" height="131" border="0" /> 
    2222 
    2323<p>Beside each field you will see an option that says "Access level" and it has a dropdown list of choices: Public, Logged in users, Private. 
    2424This controls who can see your profile items.</p> 
    25 <img src="{$url}help/images/profile_access.jpg" alt="Profile access options" title="Profile access options" width="450" height="170" border="0" /> 
     25<img src="{$CFG->wwwroot}help/images/profile_access.jpg" alt="Profile access options" title="Profile access options" width="450" height="170" border="0" /> 
    2626<p>For example, if you don't want anyone to see your address set the 'Access Restriction' to Private and so on. (You can create your own access levels by going to 'Your Network' - 'Access controls')</p> 
    2727 
     
    2929 
    3030<p><i>Note: The profile field 'Brief description' is used to populate your sidebar profile - see image below.</i></p> 
    31 <img src="{$url}help/images/sidebar_profile.jpg" alt="Sidebar Profile" width="302" height="206" border="0" /> 
     31<img src="{$CFG->wwwroot}help/images/sidebar_profile.jpg" alt="Sidebar Profile" width="302" height="206" border="0" /> 
    3232<p>Remember to scroll to the end and click on <b>Save your profile</b>!</p> 
    33 <img src="{$url}help/images/save.jpg" alt="Save your profile" title="Save your profile" width="249" height="48" border="0" /> 
     33<img src="{$CFG->wwwroot}help/images/save.jpg" alt="Save your profile" title="Save your profile" width="249" height="48" border="0" /> 
    3434 
    3535</div> 
  • devel/lib/templates.php

    r356 r447  
    4747<!-- elgg banner and logo --> 
    4848<div id="container"><!-- start container --> 
    49        <div id="statusbar"><!-- start statusbar --> 
    50                <div id="welcome"><!-- start welcome --> 
    51                        <p>$welcome {{userfullname}}</p> 
    52                </div><!-- end welcome --> 
    53                {{topmenu}} 
    54        </div><!-- end statusbar --> 
    55        <div id="header"><!-- start header --> 
    56                <h1>$sitename</h1> 
    57                        <h2>Community learning space</h2> 
    58                        <ul id="navigation"> 
    59                                {{menu}} 
    60                        </ul> 
    61        </div><!-- end header --> 
    62        <div id="content_holder"><!-- start contentholder --> 
    63                <div id="maincontent_container"><!-- start main content --> 
    64                        {{messageshell}} 
    65                        {{mainbody}} 
    66                </div><!-- end main content --> 
    67                <div id="sidebar_container"> 
    68                        <div id="sidebar"><!-- start sidebar --> 
    69                                <ul><!-- open sidebar lists --> 
    70                                {{sidebar}} 
    71                                </ul> 
    72                        </div><!-- end sidebar --> 
    73                </div><!-- end sidebar_container --> 
    74        </div><!-- end contentholder --> 
    75        <div class="clearall" /> 
    76        <div id="footer"><!-- start footer --> 
    77                <a href="http://elgg.net"><img src="{$url}_templates/elgg_powered.png" alt="Powered by Elgg" title="Powered by Elgg" border="0" /></a> 
    78        </div><!-- end footer --> 
     49    <div id="statusbar"><!-- start statusbar --> 
     50        <div id="welcome"><!-- start welcome --> 
     51            <p>$welcome {{userfullname}}</p> 
     52        </div><!-- end welcome --> 
     53        {{topmenu}} 
     54    </div><!-- end statusbar --> 
     55    <div id="header"><!-- start header --> 
     56        <h1>$sitename</h1> 
     57            <h2>Community learning space</h2> 
     58            <ul id="navigation"> 
     59                {{menu}} 
     60            </ul> 
     61    </div><!-- end header --> 
     62    <div id="content_holder"><!-- start contentholder --> 
     63        <div id="maincontent_container"><!-- start main content --> 
     64            {{messageshell}} 
     65            {{mainbody}} 
     66        </div><!-- end main content --> 
     67        <div id="sidebar_container"> 
     68            <div id="sidebar"><!-- start sidebar --> 
     69                <ul><!-- open sidebar lists --> 
     70                {{sidebar}} 
     71                </ul> 
     72            </div><!-- end sidebar --> 
     73        </div><!-- end sidebar_container --> 
     74    </div><!-- end contentholder --> 
     75    <div class="clearall" /> 
     76    <div id="footer"><!-- start footer --> 
     77        <a href="http://elgg.net/"><img src="{$CFG->wwwroot}_templates/elgg_powered.png" alt="Powered by Elgg" title="Powered by Elgg" border="0" /></a> 
     78    </div><!-- end footer --> 
    7979</div><!-- end container --> 
    8080</body> 
  • devel/profile/profile.class.php

    r420 r447  
    4040        global $page_owner; 
    4141        global $data; 
    42  
    43         $url = url; 
    44      
     42        global $CFG; 
     43 
    4544        $run_result = ''; 
    4645 
     
    5251                 
    5352                <p> 
    54                 <a href="{$url}profile/edit.php?profile_id=$page_owner">$editMsg</a> 
     53                <a href="{$CFG->wwwroot}profile/edit.php?profile_id=$page_owner">$editMsg</a> 
    5554                </p> 
    5655END; 
     
    356355        global $data,$CFG; 
    357356     
    358         $url = url; 
    359357        $handle = 0; 
    360358        $run_result = ''; 
     
    401399                        <td align="center"> 
    402400                        <p> 
    403                         <a href="{$url}{$friends_username}/"> 
    404                         <img src="{$url}{$friends_username}/icons/{$info->icon}/w/{$width}" alt="{$friends_name}" border="0" /></a><br /> 
     401                        <a href="{$CFG->wwwroot}{$friends_username}/"> 
     402                        <img src="{$CFG->wwwroot}{$friends_username}/icons/{$info->icon}/w/{$width}" alt="{$friends_name}" border="0" /></a><br /> 
    405403                        <span class="userdetails"> 
    406404                        {$friends_name} 
     
    889887        global $page_owner; 
    890888        if ($object === "profile" && $page_owner == $_SESSION['userid']) { 
    891                 return true; 
     889            return true; 
    892890        } 
    893891        return false; 
  • devel/profile/rss2.php

    r296 r447  
    2626     
    2727    if ($info = get_record('users','ident',$page_owner)) { 
    28         $name = (stripslashes($info->name)); 
    29         $username = (stripslashes($info->username)); 
    30         $mainurl = (url . $username . "/")
     28        $name = stripslashes($info->name); 
     29        $username = stripslashes($info->username); 
     30        $mainurl = url . $username . "/"
    3131        $rssurl = $mainurl . "rss/" . urlencode(trim($tag)); 
    32         $url = url; 
    3332        $rssdescription = sprintf(gettext("Activity for %s, hosted on %s."),$name,$sitename); 
    3433        $output .= <<< END 
     
    7473    } 
    7574} 
     75?> 
  • devel/units/communities/communities_edit.php

    r287 r447  
    22global $CFG; 
    33// Given a user ID as a parameter, will display a list of communities 
    4  
    5 $url = url; 
    64 
    75if (isset($parameter[0])) { 
     
    3432                <td> 
    3533                    <p> 
    36                     <a href="{$url}{$friends_username}/"> 
    37                     <img src="{$url}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
     34                    <a href="{$CFG->wwwroot}{$friends_username}/"> 
     35                    <img src="{$CFG->wwwroot}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
    3836                    <span class="userdetails"> 
    3937                        {$friends_name} 
  • devel/units/communities/communities_members.php

    r287 r447  
    33 
    44// Given a user ID as a parameter, will display a list of communities 
    5  
    6 $url = url; 
    75 
    86if (isset($parameter[0])) { 
     
    3432                <td> 
    3533                    <p> 
    36                     <a href="{$url}{$friends_username}/"> 
    37                     <img src="{$url}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
     34                    <a href="{$CFG->wwwroot}{$friends_username}/"> 
     35                    <img src="{$CFG->wwwroot}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
    3836                    <span class="userdetails"> 
    3937                        {$friends_name} 
  • devel/units/communities/communities_moderator_of.php

    r287 r447  
    33// Given a user ID as a parameter, will display a list of communities 
    44 
    5 $url = url
     5global $CFG
    66 
    77if (isset($parameter[0])) { 
     
    3131        <td> 
    3232            <p> 
    33             <a href="{$url}{$friends_username}/"> 
    34             <img src="{$url}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
     33            <a href="{$CFG->wwwroot}{$friends_username}/"> 
     34            <img src="{$CFG->wwwroot}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
    3535            <span class="userdetails"> 
    3636                {$friends_name} 
  • devel/units/communities/profile_edit_link.php

    r269 r447  
    22 
    33    global $page_owner; 
    4     $url=url
     4    global $CFG
    55 
    66    if (run("users:type:get",$page_owner) == 'community') { 
     
    1414             
    1515            <p> 
    16                 <a href="{$url}_icons/?profile_id={$page_owner}">$uploadandEdit </a> 
     16                <a href="{$CFG->wwwroot}_icons/?profile_id={$page_owner}">$uploadandEdit </a> 
    1717            </p> 
    1818             
     
    2828             
    2929            <p> 
    30                 <a href="{$url}_userdetails/?profile_id={$page_owner}">$changeName</a> 
     30                <a href="{$CFG->wwwroot}_userdetails/?profile_id={$page_owner}">$changeName</a> 
    3131            </p> 
    3232             
  • devel/units/files/edit_file.php

    r269 r447  
    33global $folder; 
    44global $page_owner; 
    5  
    6 $url = url; 
    75 
    86$file_id = optional_param('edit_file_id',0,PARAM_INT); 
     
    1917        $fileLabel = gettext("File title:"); // gettext variable 
    2018        $body = <<< END 
    21             <form action="{$url}_files/action_redirection.php" method="post"> 
     19            <form action="{$CFG->wwwroot}_files/action_redirection.php" method="post"> 
    2220            <div id="edit_files"> 
    2321            <table width="80%"> 
  • devel/units/files/files_user_info_menu.php

    r269 r447  
    11<?php 
    22global $USER; 
     3global $CFG; 
    34global $page_owner; 
    45$profile_id = $page_owner; 
    5 $url = url; 
    66 
    77if ($page_owner != -1 && $page_owner != $USER->ident) { 
     
    2424    $body = <<< END 
    2525        <ul> 
    26             <li><a href="{$url}{$weblog_username}/files/">$fileStorage</a> ($filesstring)</li> 
    27             <li>(<a href="{$url}{$weblog_username}/files/rss/">RSS</a>)</li> 
     26            <li><a href="{$CFG->wwwroot}{$weblog_username}/files/">$fileStorage</a> ($filesstring)</li> 
     27            <li>(<a href="{$CFG->wwwroot}{$weblog_username}/files/rss/">RSS</a>)</li> 
    2828        </ul> 
    2929END; 
  • devel/units/files/folder_edit.php

    r269 r447  
    33global $folder; 
    44global $page_owner; 
    5  
    6 $url = url; 
    75 
    86if ($folder != -1) { 
     
    162160$run_result .= <<< END 
    163161    </form><br /> 
    164     <form action="{$url}_files/action_redirection.php" method="post" enctype="multipart/form-data"> 
     162    <form action="{$CFG->wwwroot}_files/action_redirection.php" method="post" enctype="multipart/form-data"> 
    165163END; 
    166164 
  • devel/units/files/folder_view.php

    r420 r447  
    66 */ 
    77 
    8 $url = url; 
    9      
    108// If a folder has been specified, convert it to integer; 
    119// otherwise assume we're in the root 
     
    7674                $delete = gettext("Delete"); // gettext variable 
    7775                $foldermenu = <<< END 
    78     [<a href="{$url}_files/action_redirection.php?action=delete_folder&amp;delete_folder_id={$folder_details->ident}" onclick="return confirm('$areyouSure')">$delete</a>] 
     76    [<a href="{$CFG->wwwroot}_files/action_redirection.php?action=delete_folder&amp;delete_folder_id={$folder_details->ident}" onclick="return confirm('$areyouSure')">$delete</a>] 
    7977END; 
    8078            } else { 
     
    8886                                          'context' => 'folder', 
    8987                                          'username' => $username, 
    90                                           'url' => $url . "$username/files/$ident", 
     88                                          'url' => $CFG->wwwroot . "$username/files/$ident", 
    9189                                          'ident' => $ident, 
    9290                                          'name' => $name, 
    9391                                          'menu' => $foldermenu, 
    94                                           'icon' => $url . "_files/folder.png", 
     92                                          'icon' => $CFG->wwwroot . "_files/folder.png", 
    9593                                          'keywords' => $keywords 
    9694                                          ) 
     
    115113            $originalname = stripslashes($file->originalname); 
    116114            $filemenu = round(($file->size / 1000000),4) . "Mb "; 
    117             $icon = $url . "_files/icon.php?id=" . $file->ident; 
    118             $filepath = $url . "$username/files/$folder/$ident/$originalname"; 
     115            $icon = $CFG->wwwroot . "_files/icon.php?id=" . $file->ident; 
     116            $filepath = $CFG->wwwroot . "$username/files/$folder/$ident/$originalname"; 
    119117            require_once($CFG->dirroot.'lib/filelib.php'); 
    120118            $mimetype = mimeinfo('type',$file->originalname); 
     
    138136                $edit = gettext("Edit"); // gettext variable 
    139137                $filemenu .= <<< END 
    140     [<a href="{$url}_files/edit_file.php?edit_file_id={$file->ident}&amp;owner=$page_owner">$edit</a>] 
    141     [<a href="{$url}_files/action_redirection.php?action=delete_file&amp;delete_file_id={$file->ident}" onclick="return confirm('$areyouSure')">$delete</a>] 
     138    [<a href="{$CFG->wwwroot}_files/edit_file.php?edit_file_id={$file->ident}&amp;owner=$page_owner">$edit</a>] 
     139    [<a href="{$CFG->wwwroot}_files/action_redirection.php?action=delete_file&amp;delete_file_id={$file->ident}" onclick="return confirm('$areyouSure')">$delete</a>] 
    142140END; 
    143141            } else { 
  • devel/units/files/function_rss_publish.php

    r429 r447  
    3636             
    3737            $info = get_record('users','ident',$userid); 
    38             $name = (stripslashes($info->name)); 
    39             $username = (stripslashes($info->username)); 
    40             $mainurl = (url . $username . "/files/")
     38            $name = stripslashes($info->name); 
     39            $username = stripslashes($info->username); 
     40            $mainurl = $CFG->wwwroot . $username . "/files/"
    4141            $rssurl = $mainurl . "rss/"; 
    42             $url = url; 
    4342            $rssdescription = sprintf(gettext("Files for %s, hosted on %s."),$name,$sitename); 
    4443            $output .= <<< END 
  • devel/units/files/function_search.php

    r287 r447  
    22global $CFG,$USER; 
    33global $search_exclusions; 
    4 $url = url; 
    54 
    65if (isset($parameter) && $parameter[0] == "file") { 
     
    120119        <td align="center"> 
    121120            <p> 
    122             <a href="{$url}search/index.php?file={$link_keyword}&amp;owner={$friends_userid}"> 
    123             <img src="{$url}{$info->username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
     121            <a href="{$CFG->wwwroot}search/index.php?file={$link_keyword}&amp;owner={$friends_userid}"> 
     122            <img src="{$CFG->wwwroot}{$info->username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
    124123            <span class="userdetails"> 
    125124                {$friends_name} 
  • devel/units/files/function_search_ecl.php

    r269 r447  
    99     
    1010    $sitename = sitename; 
    11     $url = url; 
    1211     
    1312    // Not sure if we still need addslashes after the magic_quotes workaround in lib/setup.php 
  • devel/units/friends/friends_edit.php

    r287 r447  
    22global $CFG; 
    33// Given a user ID as a parameter, will display a list of friends 
    4  
    5 $url = url; 
    64 
    75if (isset($parameter[0])) { 
     
    3331        <td> 
    3432            <p> 
    35             <a href="{$url}{$friends_username}/"> 
    36             <img src="{$url}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
     33            <a href="{$CFG->wwwroot}{$friends_username}/"> 
     34            <img src="{$CFG->wwwroot}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
    3735            <span class="userdetails"> 
    3836                {$friends_name} 
  • devel/units/friends/friends_of_edit.php

    r287 r447  
    22global $CFG; 
    33// Given a user ID as a parameter, will display a list of friends 
    4  
    5 $url = url; 
    64 
    75if (isset($parameter[0])) { 
     
    3432        <td> 
    3533            <p> 
    36             <a href="{$url}{$friends_username}/"> 
    37             <img src="{$url}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
     34            <a href="{$CFG->wwwroot}{$friends_username}/"> 
     35            <img src="{$CFG->wwwroot}{$friends_username}/icons/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br /> 
    3836            <span class="userdetails"> 
    3937                {$friends_name} 
  • devel/units/friends/generate_foaf.php

    r269 r447  
    55 
    66if ($user = get_record('users','ident',$user_id)) { 
    7     $url = url; 
    87    $adminmail = email; 
    9     $personalurl = url . $user->username . "/"; 
     8    $personalurl = $CFG->wwwroot . $user->username . "/"; 
    109    $username = htmlspecialchars(stripslashes($user->username), ENT_COMPAT, 'utf-8'); 
    1110    $name = htmlspecialchars(stripslashes($user->name), ENT_COMPAT, 'utf-8'); 
     
    1312     
    1413    if ($user->icon != -1) { 
    15         $iconstring = "<foaf:depiction rdf:resource=\"". url . $user->username."/icons/".$user->icon."\" />"; 
     14        $iconstring = "<foaf:depiction rdf:resource=\"". $CFG->wwwroot . $user->username."/icons/".$user->icon."\" />"; 
    1615    } else { 
    1716        $iconstring = ""; 
     
    3332        <foaf:maker rdf:nodeID="elgg{$user->ident}"/> 
    3433        <foaf:primaryTopic rdf:nodeID="elgg{$user->ident}"/> 
    35         <admin:generatorAgent rdf:resource="{$url}"/> 
     34        <admin:generatorAgent rdf:resource="{$CFG->wwwroot}"/> 
    3635        <admin:errorReportsTo rdf:resource="{$adminmail}"/> 
    3736    </foaf:PersonalProfileDocument> 
  • devel/units/icons/function_edit_icons.php

    r418 r447  
    11<?php 
     2global $CFG; 
    23global $USER; 
    34// Display icons and allow user to edit their names or delete some 
     
    56global $page_owner; 
    67$page_username = run("users:id_to_name", $page_owner); 
    7  
    8 $url = url; 
    98 
    109// Get all icons associated with a user 
     
    4746        $defaulticon = htmlspecialchars(stripslashes($icon->description), ENT_COMPAT, 'utf-8'); 
    4847        $column1 = <<< END 
    49                         <img alt="{$defaulticon}" src="{$url}{$page_username}/icons/{$icon->ident}" /> 
     48                        <img alt="{$defaulticon}" src="{$CFG->wwwroot}{$page_username}/icons/{$icon->ident}" /> 
    5049END; 
    5150        if ($icon->filename == $currenticon) { 
    52             $checked = "checked=\"checked\""
     51            $checked = 'checked="checked"'
    5352        } else { 
    5453            $checked = ""; 
     
    5857        $column2 = <<< END 
    5958                        <label>$nameLabel 
    60                             <input    type="text" name="description[{$icon->ident}]"  
    61                                     value="{$defaulticon}" /> 
     59                            <input type="text" name="description[{$icon->ident}]" value="{$defaulticon}" /> 
    6260                        </label><br /> 
    6361                        <label>$default <input type="radio" name="defaulticon" value="{$icon->ident}" {$checked} /></label> 
  • devel/units/invite/invite_join.php

    r269 r447  
    11<?php 
    22 
     3global $CFG; 
    34// Join 
    45         
    56$sitename = sitename; 
    6 $url = url; 
    77$textlib = textlib_get_instance(); 
    88 
     
    2626        } 
    2727         
    28         $invite_id = (int) ($details->ident)
     28        $invite_id = (int) $details->ident
    2929        $thankYou = sprintf(gettext("Thank you for registering for an account with %s! Registration is completely free, but before you confirm your details, please take a moment to read the following documents:"), $sitename); 
    3030        $terms = gettext("terms and conditions"); // gettext variable 
     
    3737    </p> 
    3838    <ul> 
    39         <li><a href="{$url}content/terms.php" target="_blank">$sitename $terms</a></li> 
    40         <li><a href="{$url}content/privacy.php" target="_blank">$privacy</a></li> 
     39        <li><a href="{$CFG->wwwroot}content/terms.php" target="_blank">$sitename $terms</a></li> 
     40        <li><a href="{$CFG->wwwroot}content/privacy.php" target="_blank">$privacy</a></li> 
    4141    </ul> 
    4242    <p> 
  • devel/units/invite/join_noinvite.php

    r269 r447  
    11<?php 
    22 
     3    global $CFG; 
    34    // Join 
    45         
     
    67