Elgg  Version 2.3
robots.php
Go to the documentation of this file.
1 <?php
6 if ('/' !== parse_url(elgg_get_site_url(), PHP_URL_PATH)) {
7  $warning = elgg_echo('admin:robots.txt:subdir');
8  echo "<div class=\"elgg-admin-notices\"><p>$warning</p></div>";
9 }
10 
11 if (file_exists(elgg_get_root_path() . 'robots.txt')) {
12  // a physical robots.txt exists, which will take precedent over the any configuration
13  $warning = elgg_echo('admin:robots.txt:physical');
14  echo "<div class=\"elgg-admin-notices\"><p>$warning</p></div>";
15 }
16 
17 echo elgg_view_form('admin/site/set_robots');
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1345
elgg parse_url
Parse a URL into its parts.
Definition: elgglib.js:450
elgg_get_root_path()
Get the root directory path for this installation.
elgg echo
Translates a string.
Definition: languages.js:48
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.