Look of pages is not final. We'll change it in near future.
You can experiment with any slice. Users defined in LDAP are from user1 to user500, most of them has password puserx, where x is user number (user54 - puser54).
Please, send me any bugs you find. I will try to correct it.
Ask me for whatever you want.
We do not know exactly what will be the difference between Action Alerts, Press releases lists, Event lists and so on. As I think about it, it seems to me that the only difference is in database field names (somewhere I can call fulltext as Full text of item, somewhere News text, somewhere Event description) and database fields appearance (I don't need for example image in Press releases application, so I hide Image URL, Image width and Image height fields from itemedit form).
Sorry for my English.
The editor window (index.php) is the main
place, where authors and editors will control his items. The slice, which is
edited is specified by parameter slice_id within URL (link like
href="/apc-aa/admin/index.php?slice_id=763e546ba2f36efb00abc346ce8af03c"
).
If no slice_id is specified, the first slice, in which given user has any permission, is displayed.
There are three tables (the look of this page should be changed, but the idea of three tables remains):
Number of shown items depends on permission - author can see only his items, editor and above can see all items.
The headline of each column in the table is clickable - item are sorted by this column, then.
There are filter field on the bottom of each
table.
Example 1:
Write word Sun in headline column filter and submit. You will see only item with word Sun in
the headline.
Example 2:
Write >3/6/1999 in post date
column. You will see only items written after 3/6/1999.
If slice has any category defined, category column is displayed. If category is shown in red, item is in category not defined for this slice (it could happen if item is feeded from other slice or given category was removed from this slice).
Icons before headline means:
Item editing page itemedit.php is accessible from main editor page index.php. This is the place, where authors, editors and other stuff can write or edit his items.
Appearance of each edit field is controlled from Main slice settings - Field page (see below).
If you edit feeded item, you can't edit fulltext - fulltext goes always from original item.
Needed fields are shown with "!" after field name.
Here is the meaning of each field:
Headline | headline (always needed) |
Summary | summary (probably use in compact view of items (depends on slice administrator settings in Design - Compact page) |
Formatting | switches, if fulltext is in plain text (any html tags are ignored), or in html code (HTML tags in fulltext are processed) |
full text | full text of item |
Highlight | Author can specify, that item is important. Main use of this flag is, that you can select from database only highlighted items. Best example is "Example slice", where highlighted is used to mark items shown on Home page (see Incorporating slice into web part of this text). In each category page you can then show more items (highlighted and not highlighted). |
External link checkbox | If checked, headline of item in compact view do not points to fulltext, but points to External link URL. Fulltext is inaccessible then. (More precisely I should not say headline of item, but _HL_HREF alias (see Design - Compact part of this text)) |
Place | Place, where item raised (like London, California, Prague ...) |
Source | Company, where item raised (like APC, Reuters, Greenpeace, CNN, ...) |
Source URL | www link to source (like www.apc.org, www.cnn.com ...) |
Status | Bin (or table), where this item appears (approved bin, holding bin, trash bin) |
Language | Language of this item |
Encoding | Used in HTML header meta tag in order to display correctly special national characters:<meta
http-equiv="Content-Type" content="text/html; charset=windows-1250"> |
Category | Assigns item to specified category |
Image URL | Link to any image, you want show with item (Images are not stored in database, in database is just link) |
Image width | Width of image, which can be used in <IMG width=... > tag |
Image height | Height of image, which can be used in <IMG height=... > tag |
Posted by | Author's name |
Author's e-mail | |
Publish date | Before specified publish date the item is not shown on website even if is in Approved bin |
Expiry date | After specified expiry date the item is not shown on website even if is in Approved bin |
Editor's note | There could be any editor's notes, probably not shown on web. Notes like "I corrected spelling errors" from editor, which edit given item. |
Headline | - slice name - shown as headline in slice.php (slice view) |
Short name | - should be short slice name used in slice-selection boxes etc. |
Slice URL | - URL of main slice page (homepage of this slice - probably page with slice.php include). It is used in calling slice view from buttons inside editor page (index.php) |
Deleted | Deleted slices are not shown in any select boxes, they are not searched - they looks like deleted, but they
are still in the database. The access to it has only superuser, who can undelete it (uncheck this deleted
checkbox).
(not implemented yet) |
Listing length | - How many items is shown in compact view at the same time |
Follows default values for new items setting. These are the values, which is shown to user (author) in itemedit.php window as default values, when he want to add new item. Meaning of each field is described in itemedit.php part of this text.
Hint: There you can specify the fixed values, which is
common to all items in your slice, too.
For example: if you
want all included images in slice have the same size 150x120 pixels, you can
write number 150 in Image width input box and number 120 in Image
height input box and then remove Image width and Image height
input boxes from itemedit.php page (can be done on slice
administration page Fields - see below).
All changes are valid after click on Update
button, but I think it is clear enough.
There are two listboxes on this page. In the left one you can see categories used in all slices in the database or the selected slice only. You can use these categories by clicking the arrow between listboxes, or you can made your own categories, by clicking the New button.
The advantage of using foreign categories is simplier feeding of items from other slices, that uses the same categories (see feeding part of this text). The category name can be renamed by clicking Rename button, but I will restrict this possibility in near future. Drawback of present approach is, that any user of given category can change name of category, but the change is applied to all slices that uses this category. It is bad, I think.
You can also remove category from slice with Delete button (removes just from this slice, not from database).
If you don't want to use categories in this slice, left the right listbox free.
Again, all changes are valid after click on Update button.
There is list of fields, which may be shown in itemedit page, on this page. There are two checkboxes for every field - show and needed.
If show is checked for given field, the field is shown in itemedit page and author of item can edit it. Failing which the field is hidden from author, and author can't change it (this field is filled with present default value specified in Main slice settings - Slice (see hint in Main slice settings - Slice part)).
The needed checkbox tells, if given field is liable, so author can't leave it unfilled (this field is shown with exclamation point in itemedit page and blank state of this item is checked then).
On search form setting page you can set a properties of search form, which can be shown on web page within slice.php (see bigsrch in slice incorporating). There you can specify, which search fields are shown to user including fields where to search, and default settings for where to search fields.
A few words as an introduction:
The Permission system is
based on LDAP. This comes from a long debate across APC, and this is the result.
The idea is that permission system is common for all APC members, and it is
shared by other applications, not just AA. However, all LDAP dependent functions
are grouped in one file - perm_ldap.php, so it is very easy updatable for any
type of authentication (like SQL database etc.), but it is important to
developers, not users. For users is important, that we set up four different
roles, with different permissions.
Role | Permission |
Author | write new item edit his own items |
Editor | Author + edit foreign items move items between bins (approved, holding, trash) |
Administrator | Editor + managing his slice (they can access slice administration pages - slice settings, category settings ...) |
Super | Administrator of all slices in database |
From developers point of view, all permissions are made separately and roles are just aliases for different sets of
permissions. It comes to this, that it is very easy to redefine roles (to add or take off any permission to any
role). Maybe I'll make additional page, where superusers can set specific permissions to given user (not just a
role) in future.
There are list of users (or groups of users), who has any permission to this slice (it means any change permission
as is authors permission to write item, not the permission to view slice, which belongs to anybody).
You can
change role for given user,
but there are some constraints.
You can also delete user from this slice, which means cut-off his permission to this slice, not from permission system of course.
The listing below is a part of permission library file - perm_ldap.php
# permission types for aa object
define("PS_ADD", "A"); // permission to add slice
define("PS_MANAGE_ALL_SLICES", "M"); // permission to edit all slices
# permission types for slice object
define("PS_DELETE_ITEMS", "B"); // permission to delete items
define("PS_CATEGORY", "C"); // permission to change slice categories
define("PS_FEEDING", "D"); // permission to change properties
define("PS_EDIT", "E"); // permission to set slice properties
define("PS_FIELDS", "F"); // permission to edit fields defaults
define("PS_ADD_USER", "I"); // permission to add existing user to slice
define("PS_EDIT_SELF_ITEMS", "L"); // permission to change self-written items
define("PS_NEW_USER", "N"); // permission to create new user
define("PS_COMPACT", "O"); // permission to change slice compact view
define("PS_ITEMS2ACT", "P"); // permission to move item to approved bin
define("PS_ITEMS2HOLD", "Q"); // permission to move item to holding bin
define("PS_ITEMS2TRASH", "R"); // permission to move item to trash bin
define("PS_SEARCH", "S"); // permission to change search form settings
define("PS_EDIT_ALL_ITEMS", "T"); // permission to change all items
define("PS_USERS", "U"); // permission to manage users
define("PS_FULLTEXT", "X"); // permission to change item fulltext view
// numbers 1,2,... is in LDAP permission record (objectclass apcacl attribute apcaci)
// on resolving permissions are this numbers replaced by real permissions defined in $perms_roles_perms
$perms_roles_id = array("AUTHOR"=>"1", // can write items and edit his items
"EDITOR"=>"2", // AUTHOR + can edit and manage all items
"ADMINISTRATOR"=>"3", // EDITOR + can change slice properties
"SUPER"=>"4"); // ADMINISTRATOR + can set any properties for any slice
$perms_roles_perms = array("AUTHOR"=>PS_EDIT_SELF_ITEMS,
"EDITOR"=>PS_EDIT_SELF_ITEMS.
PS_ITEMS2ACT.
PS_ITEMS2HOLD.
PS_ITEMS2TRASH.
PS_EDIT_ALL_ITEMS,
"ADMINISTRATOR"=>PS_EDIT.
PS_CATEGORY.
PS_FIELDS.
PS_SEARCH.
PS_USERS.
PS_COMPACT.
PS_FULLTEXT.
PS_FEEDING.
PS_ADD_USER.
PS_DELETE_ITEMS.
PS_ITEMS2ACT.
PS_ITEMS2HOLD.
PS_ITEMS2TRASH.
PS_EDIT_SELF_ITEMS.
PS_EDIT_ALL_ITEMS,
"SUPER"=>PS_EDIT.
PS_ADD.
PS_CATEGORY.
PS_FIELDS.
PS_SEARCH.
PS_USERS.
PS_COMPACT.
PS_FULLTEXT.
PS_FEEDING.
PS_ADD_USER.
PS_DELETE_ITEMS.
PS_ITEMS2ACT.
PS_ITEMS2HOLD.
PS_ITEMS2TRASH.
PS_EDIT_SELF_ITEMS.
PS_EDIT_ALL_ITEMS.
PS_NEW_USER.
PS_MANAGE_ALL_SLICES);
You can assign a permission role for existing user or group. First you must seek for user (or group) and then you can add them to permission system of this slice. Listing is limited to five users (or group) in order to prevent to listing of all users of Econnect (for example).
From listing are cut-off all current slice users. Organization select list
allows to change LDAP server, where to search for user. It means, that user can
be selected from other APC member organization as well. The authentication is
then done on appropriate LDAP server. Groups are implemented in LDAP too, all
functions support it, but there are no interface, how to assign user (or group)
to any group, yet. The groups of groups of groups of ... are implemented too,
the maximum depth of nesting is 16 (different number can be set very easy in
perm_ldap.php
- just redefine constant). The depth constant is necessary to as defence to cyclic nesting in group definition.
You can create new user in LDAP (which means the new user of this APC node) - so the permission to belongs only to
superuser. Important is login name and e-mails, by which the user can authenticate himself, then.
This is very important page. There you can completely change the HTML code for slice compact view.
Example:
slice.shtml: |
||||||
<html> <head> ... </head> <body> <h1>Slice title</h1> ... |
||||||
|
||||||
|
||||||
Result on HTML Page: |
||||||
<table> |
As you can see, web designer just write HTML code and on place, where he want to have some text from database, he put just an alias (or shortcut or how we can call it). Each alias corresponds with one database field filled on itemedit page.
We use the alias _HL_HREF twice in example above. Yes, it is possible.
Except substitution of aliases program do one more thing
with given format string. If program detects, that URL alias (like _HL_HREF) is
empty in the database, whole <a> tag (if any) is removed.
Example:
Odd rows | Some HTML code <a href="_HL_HREF">_HEADLINE</a> and HTML code continues |
Database contents |
_HL_HREF = "" |
Result HTML code | Some HTML code Item title and HTML code continues |
Different even - odd row formatting is possible to define on this page too. The best example is in Press.cz slice, where this possibility is used to alternate item background.
If items are sorted by category in compact view (see Sort items by category checkbox), you can analogicaly specify the HTML code for category title.
Note: I plan to change aliases names in near future in order to quicker text substitution (it should be names with equal length).
Known bug : In this very strong formatting approach is not easy to remove redundant characters from final HTML code. For example, to remove braces in case database field is empty:
Format string | <P>_HEADLINE<BR>(_SOURCE)</P> |
Output, in case _SOURCE = "" | <P>Item title<BR>()</P> |
However, I will try to find any solution.
There are no differences between compact view formatting and fulltext view formatting, so see above.
Feeding in slice context means copying one item from given slice to another slice. In Feeding Import & Export page you can specify, who can feed items from your slice and from what slice you want to import items.
The top part of the page is used to permit exporting items to other slices (not implemented yet!!! - anybody can feed from his slice). If there are no slices in right listbox and Enable export to any slice is unchecked nobody can feed any item from your slice.
In the bottom part of page you can specify, from which slice you will feed. After that, you should go to Feeding - Filters page.
On Feeding - Filters page you can:
define, from which category of given slice you want to feed.
into which category you want to feed (altogether or separately for each category)
specify, if you want to feed right into approved bin (approved
checked) or into holding bin approved unchecked)
There are two possibilities, how to create web site with slice.
You can view slice as is with no additional texts and graphics. It's done on URL like this:
http://yourhost/apc-aa/slice.php?slice_id=7a4812e153a0106931c888778daf446f
More popular version of slice view should be
the encapsulated one. The slice is included into shtml page by SSI commands. The
advantage of this approach is, that webdesigner can define additional graphics
and text around slice - slice is just part of the page. The best example of
encapsulated slice is Example slice, I think. Here is listing of source
code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<!-- saved from url=(0044)https://test.example.com/aauser/example/slice.shtml
-->
<HTML>
<HEAD>
<TITLE>Example NGO's
Slice</TITLE>
<META content="text/html; charset=windows-1250"
http-equiv=Content-Type>
<META content="Example of NGO's slice"
http-equiv=description>
<LINK href="Example NGO's
Slice_soubory/example.css" rel=
stylesheet ><BR></HEAD>
<BODY aLink=#ffd700
background="Example NGO's Slice_soubory/back.gif">
<!-- Left
column -->
<TABLE
width=150>
<TR>
<TD>
<A href="https://test.example.com/aauser/example/slice.shtml?highlight=1">
Home </A>
<BR>Shows highlighted items
only</TD>
</TR>
<TR>
<TD> </TD></TR>
<TR>
<TD>
<FORM action=slice.shtml
method=get>
<INPUT name=search[keyword]
size=10>
<INPUT alt=Search border= 0height=18 name="" src="Example NGO's
Slice_soubory/go2.gif" type=image width=20>
<INPUT name=s_col[0] type=hidden value=headline>
<INPUT name=s_col[1] type=hidden value=abstract>
<INPUT name=s_col[2]
type=hidden value=full_text>
<INPUT
name=srch type=hidden
value=1>
<A href="https://test.example.com/aauser/example/slice.shtml?bigsrch=1">
Full Search </A>
</FORM>< BR> </TD><
BR>
</TR>
<TR>
<TD> </TD></TR>
<TR>
<TD>Categories:</TD></TR>
<TR>
<TD> <A
href=" https://test.example.com/aauser/example/slice.shtml?cat_name= "Solar">
Solar
energy</A></TD></TR>
<TR>
<TD> <A
href="https://test.example.com/aauser/example/slice.shtml?cat_name= "Ocean
">Ocean</A></TD></TR>
<TR>
<TD> <A
href=" https://test.example.com/aauser/example/slice.shtml?cat_name=
"Forests">Forests</A></TD></TR>
<TR>
<TD> <A
href=" https://test.example.com/aauser/example/slice.shtml?cat_name=
"Genetic">Genetic</A></TD></TR>
</TABLE>
<!--
Main column -->
<TABLE width=440>
<TR>
<TD>
<H1>Example NGO's Slice</H1></TD></TR>
<TR>
<TD>
<!--#include virtual="/apc-aa/slice.php?encap=true&slice_id=e2f6b2bf9c1687de7acccdb0f570209e"-->
</TD>
</TR>
</TABLE><BR>
</BODY>
</HTML>
Parameter | Appearance | Description | Example |
slice_id | required | determines, which slice to use | slice_id=e2f6b2bf9c1687de7acccdb0f570209e |
encap | required | if slice is encapsulated, this parameter must be set to 1 (or true) | encap=1 |
sh_itm | optional | if specified - item with selected id is shown as fulltext | sh_itm=45636afe6373ce836e566e890ab03418 |
srch | optional | true if this script have to show search results In this case, additional variables may be filled:
|
srch=1 |
highlight | optional | if true, shows only items with highlighted flag set (in compact view) - highlighted may by used as items shown on homepage - it could be from any category | highlight=1 |
bigsrch | optional | true, if this script have to show big search form | bigsrch=1 |
cat_id | optional | if true, shows only items belongs to specified category (in compact view) | cat_id=a54bc8937eef4d210d9ae7a64e6f9c0b |
cat_name | optional | if true, shows only items belongs to category in which name is specified phrase(in compact view) | cat_name=Solar |