CONTENTS:
1. Overview
2. Using ECML on the front pages
- 2.1 [[login_box]]
- 2.2 [[site_stats]]
- 2.3 [[user_list]]
+ 2.1 [loginbox]
+ 2.2 [sitestats]
+ 2.3 [userlist]
1. OVERVIEW
Site Pages supports ECML on the front page and provides the following
ECML keywords:
- [[login_box]] -- A login box. Required on the logged out front page.
- [[site_stats]] -- Simple site statistics.
- [[user_list]] -- A list of users.
+ [loginbox] -- A login box. Required on the logged out front page.
+ [sitestats] -- Simple site statistics.
+ [userlist] -- A list of users.
To learn more about ECML, click the ECML icon below the input fields.
-2.1 [[login_box]]
+2.1 [loginbox]
The Login Box keyword displays a box to let users log in. This view
is required on the logged out front page.
-2.2 [[site_stats]]
+2.2 [sitestats]
The Site Stats keyword doesn't do anything yet.
-2.3 [user_list]]
+2.3 [userlist]
The User List keyword displays a list of users and takes the following
optional arguments (*default if not passed):
only_with_avatars=*true|false -- Only show users who have uploaded an
avatar
- limit=*10 -- Show this many users.
\ No newline at end of file
+ limit=*10 -- Show this many users.
function sitepages_init() {
require_once(dirname(__FILE__) . '/sitepages_functions.php');
global $CONFIG;
-
+
// Extend CSS
elgg_extend_view('css', 'sitepages/css');
// define our own ecml keywords and views
register_plugin_hook('get_keywords', 'ecml', 'sitepages_ecml_keyword_hook');
register_plugin_hook('get_views', 'ecml', 'sitepages_ecml_views_hook');
-
+
// hook into the walled garden pages
register_plugin_hook('public_pages', 'walled_garden', 'sitepages_public_pages');
register_action('settings/sitepages/save', FALSE, "{$CONFIG->pluginspath}sitepages/actions/edit_settings.php");
+
+ elgg_add_admin_submenu_item('sitepages', elgg_echo('sitepages'), 'site');
}
/**
// 'restricted' => array('sitepages/custom_frontpage')
// );
- $return_value['entity'] = array(
+ $return_value['entities'] = array(
'description' => elgg_echo('sitepages:ecml:keywords:entity:desc'),
'usage' => elgg_echo('sitepages:ecml:keywords:entity:usage'),
'restricted' => array('sitepages/custom_frontpage')
$return_value[] = 'pg/sitepages/read/About';
$return_value[] = 'pg/sitepages/read/Terms';
$return_value[] = 'pg/sitepages/read/Privacy';
-
+
return $return_value;
}