drupal_directory_page
- Versions
- 4.6
drupal_directory_page($sort = 'name')
Formats a list of all sites indexed in the directory.
This function may be called from a custom page on sites that are Drupal directory servers.
Code
modules/drupal.module, line 106
<?php
function drupal_directory_page($sort = 'name') {
$result = db_query('SELECT * FROM {directory} ORDER BY '. $sort);
// Note: All fields except the mission are treated as plain-text.
// The mission is stripped of any HTML tags to keep the output simple and consistent.
while ($site = db_fetch_object($result)) {
$output .= '<a href="'. check_url($site->link) .'">'. check_plain($site->name) .'</a> - '. check_plain($site->slogan) .'<div style="padding-left: 20px;">'. strip_tags($site->mission) .'</div><br />';
}
return $output;
}
?>Login or register to post comments 