aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/README.txt
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-13 17:46:45 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-13 17:46:45 +0000
commitece80595836be086201629824bceeae05892cd55 (patch)
tree9171c63c657bd4a511f8f1e4474eef96418d71f8 /mod/sitepages/README.txt
parent2ac6d8f4d1738d299dab4fc5ac0cd28f7c3c00b5 (diff)
downloadelgg-ece80595836be086201629824bceeae05892cd55.tar.gz
elgg-ece80595836be086201629824bceeae05892cd55.tar.bz2
Removed ECML from Site Pages.
git-svn-id: http://code.elgg.org/elgg/trunk@5721 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/sitepages/README.txt')
-rw-r--r--mod/sitepages/README.txt114
1 files changed, 24 insertions, 90 deletions
diff --git a/mod/sitepages/README.txt b/mod/sitepages/README.txt
index b2c36c71e..3080db7a0 100644
--- a/mod/sitepages/README.txt
+++ b/mod/sitepages/README.txt
@@ -3,12 +3,10 @@ HTML metatags.
CONTENTS:
1. Overview
- 2. Using Front Page Keywords
- 2.1 Built-in keywords
- 2.2 Entities
- 2.3 Views
- 3. Custom Front Page Keywords
- 4. Hints and Quirks
+ 2. Using ECML on the front pages
+ 2.1 [[login_box]]
+ 2.2 [[site_stats]]
+ 2.3 [[user_list]]
1. OVERVIEW
@@ -17,100 +15,36 @@ CONTENTS:
and Privacy pages, and also allows simple modifications of the logged in
and logged out views, as well as CSS and meta description and tags for SEO.
- The biggest feature of Site Pages is its support for an extensible keyword
- system that allows end-users to quickly add elements to the front page of
- their site.
+2. USING ECML ON THE FRONT PAGES
-2. USING FRONT PAGE KEYWORDS
+ Site Pages supports ECML on the front page and provides the following
+ ECML keywords:
- Keywords are specially formatted strings that can be used on the logged in
- and logged out front pages to include lists of objects, views, or plugin-
- supplied content. All keywords are surrounded by two brackets:
- [[keyword]]. Some keywords, like views and entity lists, take optional
- parameters.
+ [[login_box]] -- A login box. Required on the logged out front page.
+ [[site_stats]] -- Simple site statistics.
+ [[user_list]] -- A list of users.
- When editing the front pages, a list of available keywords appears in the
- sidebar.
+ To learn more about ECML, click the ECML icon below the input fields.
-2.1 BUILT IN KEYWORDS
+2.1 [[login_box]]
+ The Login Box keyword displays a box to let users log in. This view
+ is required on the logged out front page.
- Site Pages includes a few built-in keywords to get you started:
- [[login_box]] - This keyword is required on the logged out page to
- Allow users to log into your site.
- [[site_stats]] - Shows the total members in your site, the currently
- active members, and other fun stuff.
+2.2 [[site_stats]]
+ The Site Stats keyword doesn't do anything yet.
-2.2 Entities
+2.3 [user_list]]
+ The User List keyword displays a list of users and takes the following
+ optional arguments (*default if not passed):
- You can generate a list of entities by using the [[entity]] keyword. This
- keyword takes similar arguments to the elgg_get_entities() function. See
- documentation in that function for a complete list.
+ list_type=*new|online|random -- Show new users, users active in the
+ last 10 minutes, or a random selection.
- Additional / changed parameters supported by keywords:
- * owner: The username owner. (You can still use owner_guid)
+ only_with_avatars=*true|false -- Only show users who have uploaded an
+ avatar
- Example: To generate a list of all blog posts by the user named 'admin':
- [[entities: type=object, subtype=blog, owner=admin]]
-
- Example: To show newest group created:
- [[entities: type=object, subtype=group, limit=1]]
-
-
-2.1 Views
-
- Keywords support outputting arbitrary views with the [[view]] keyword and
- supports passing arguments as name=value pairs.
-
- Example: Output a text input field with a default value:
- [[view: input/text, value=This is a test!]]
-
- NB: Do NOT quote the name or values when passing them. Also, as of 1.8
- using commas or = in the name or value is unsupported.
-
-
-3.0 CUSTOM FRONT PAGE KEYWORDS
-
- Plugins can add their own keywords by replying to the 'get_keywords' hook
- of type 'sitepages.' Each keyword must be bound to a valid view. Almost
- all functionality in custom keywords could be implemented using the 'view'
- keyword, but custom keywords provide a simple way for non-techy users to
- include ready-made views without the fuss of knowing what they're doing.
-
- Custom keywords support arguments in the same format as views and entities.
- These arguments are passed to the custom view via the $vars array. It is
- the responsibility of the custom view to parse these arguments.
-
- The below example creates the 'my_plugin_keyword' keyword that displays the
- view at 'my_plugin/keyword_view.' This is exactly the same as saying
- [[view: my_plugin/keyword_view]] but much simpler for the user.
-
- Example:
- register_plugin_hook('get_keywords', 'sitepages', 'my_plugin_keywords');
-
- function my_plugin_keywords($hook, $type, $value, $params) {
- $value['my_plugin_keyword'] = array(
- 'view' => 'my_plugin/keyword_view',
- 'description' => 'Provides the awesome My Plugin keyword'
- );
-
- return $value;
- }
-
-
-4. HINTS AND QUIRKS
-
- * A custom keyword is slightly more complicated to implement, but is
- much simpler for the end user to use.
-
- * Custom keywords can contain only alphanumeric and the underscore
- character.
-
- * All keywords have limited support for passing arguments but the arguments
- cannot contain '=' or ','. If you need complicated arguments for a custom
- keyword, it's better to split the functionality into multiple keywords and
- views instead of requiring complicated arguments.
-
+ limit=*10 -- Show this many users. \ No newline at end of file