$string['addresource'] = 'Add resource';
$string['chooseafile'] = 'Choose or upload a file';
+$string['configdefaulturl'] = 'This value is used to prefill the URL form when creating a new URL-based resource.';
$string['configframesize'] = 'When a web page or an uploaded file is displayed within a frame, this value is the size (in pixels) of the top frame (which contains the navigation).';
$string['configwebsearch'] = 'When adding a URL as a webpage or weblink, this location is offered as a site to help the user search for the URL they want.';
$string['editingaresource'] = 'Editing a resource';
<?php print_string("configwebsearch", "resource") ?>
</td>
</tr>
+<tr valign=top>
+ <td align=right><p>resource_defaulturl:</td>
+ <td>
+ <input name=resource_defaulturl type=text size=30 value="<?php p($CFG->resource_defaulturl) ?>">
+ </td>
+ <td>
+ <?php print_string("configdefaulturl", "resource") ?>
+ </td>
+</tr>
<tr>
<td colspan=3 align=center>
<input type="submit" value="<?php print_string("savechanges") ?>"></td>
case WEBPAGE:
$strexampleurl = get_string("exampleurl", "resource");
$strsearch = get_string("search");
+ if (empty($form->reference)) {
+ $form->reference = $CFG->resource_defaulturl;
+ }
?>
<tr valign="top">
<td align="right" nowrap>
$strnewwindowopen = get_string("newwindowopen", "resource");
$strsearch = get_string("search");
+ if (empty($form->reference)) {
+ $form->reference = $CFG->resource_defaulturl;
+ }
+
foreach ($RESOURCE_WINDOW_OPTIONS as $optionname) {
$stringname = "str$optionname";
$$stringname = get_string("new$optionname", "resource");
set_config("resource_websearch", "http://google.com/");
}
+if (!isset($CFG->resource_defaulturl)) {
+ set_config("resource_defaulturl", "http://");
+}
+
$RESOURCE_WINDOW_OPTIONS = array("resizable", "scrollbars", "directories", "location",
"menubar", "toolbar", "status", "height", "width");