Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Editor Modify Mod -- List of Links?

Quote Reply
Editor Modify Mod -- List of Links?
With the modify/add password mod, when a user logs in, they see a list of links they can edit.

What I'd like to do is make it so that when an editor logs in, they see a list of links they are allowed to edit, with the option to show oldest-modified or most-recently modified first.

I guess the best way would be to expand the log on, so when an editor logs on they see all their categories and sub categories, and when they click one, they get a list of links to modify, rather than being redirected to that category.

It would seem more useful over all, especially when an editor needs to see which links may be getting stale, and/or which links had been recently modified for verification (two different types of editing).

It seems as I'm working on this, I'm creating a generic module that will allow an editor to do many things.

1) view their own links (links of any user)
2) edit their own links
3) edit the links of any user in their categories
4) edit pending links
5) view links category by category (in a click-to-edit format)

Much of this is already in the module, but others are subtle and not so subtle modifications.

Anyone done any of this yet?

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Editor Modify Mod -- List of Links? In reply to
Here's a change to widgetz's maintain.cgi that will show all the categories a user can edit, a-la ODP, rather than just the top. It still links to the category pages, rather than a modify, but it may still get there.

This is actually a simple one.

At the top, change the commented out lines below to the ones that are not commented out. $ROOT has only the top level categories, $AUTH has _all_ the authorized categories.

Code:
#foreach (keys %$ROOT) {
# $USER->{allowed_cat} .= "<li><a href='$LINKS{build_root_url}/" . &build_clean_name ($AUTH->{$_}) . "'>" . $AUTH->{$_} . "</a>";
#}



foreach (sort { lc $AUTH->{$a} cmp lc $AUTH->{$b} } keys %{$AUTH}) {
$USER->{allowed_cat} .= "<li><a href='$LINKS{build_root_url}/" . &build_clean_name ($AUTH->{$_}) . "'>" . $AUTH->{$_} . "</a>";
}
http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Editor Modify Mod -- List of Links? In reply to
I got most of this working.

Part of my problem was I was working with modify.cgi not maintain.cgi.

I've spent the past 24 hours un-doing much of what I put into modify.cgi,
and re-doing the maintain.cgi.

When this is done, add.cgi/modify.cgi will be available for "users", and
editors will use maintain.cgi.

User.cgi will re-direct the user based on whether they are an editor or
not to the modify.cgi welcome screen (with all their categories, pending
links, etc) or back to add.cgi, modify.cgi or the home page.

I don't know if the logic errors I'm hitting in places were things I've
done, others have done (a lot of mods have been used, abused, tossed away,
etc), or are really in the files.

When I'm done, I guess I'll have to release user, add, modify and maintain.cgi
in their current state, along with the extra templates and modifications to
the HTML_Templates.pm and Links.pm file. You also need to add fields to the
validate and links tables, since when an editor edits a link, the link is put
back in the validate database "pending" approval of the Admin. Right now,
this is the version I need. Hopefully, that will be a parameter -- editors can
validate/delete/modify the Links databse, or their work gets put in a "pending"
status waiting for a cheif editor to deal with it.



http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Editor Modify Mod -- List of Links? In reply to
Ok,

I have a basic bare-bones system working.

It uses the basis of Widgetz mod, then takes it a bit further.

I've eliminted editor delete/validate ... but with effort that could be made an option. Right now the "status" system is not very well fleshed out, and it's really better to leave everyone as a user or editor and set up everything else as a flag field in the record.

I've left the 'alternate categories' alone. Only the Admin who finally approves (validates) the link can set them. This _can_ be expanded if someone wants to generalize the base routines more fully.

1) users, editors and "Chief Editors" are all allowed to use user.cgi
2) users get directed to whatever page you want.(I'm not sure the 'to' mod is working)
3) editors get shown a maintain.html that lists:
the categories they can edit
the number of links they have pending Chief_editor approval in their category
the number of links to validate in their category
the list of their categories in clickable access format
4) Cheif editors get to see all the links "pending" approval.
5) if an editor clicks on the category list, they can click to modify a link.
if the link is already pending in the Validate database, that copy is used,
if not, the copy is taken from the Links daabase.
6) When an editor edits a link, a flag is set, notifying the chief_editor to look at it.
7) When the chief editor edits a link, the link is set for Admin approval.

--> This is a 3 step process to allow distributed editing.

I'm _sure_ there are bugs, and the code really needs to be cleaned up, (actually my clean ups need to be cleaned up more).

If anyone wants to try to install this, and see if it works, and where it's not working, let me know.

It requires a line in Links.pm and a line or two in HTML_Admin.pm. It requires the mods to user.cgi and a half dozen routines added to HTML_Templates.pm (if you haven't already modified user.cgi, add.cgi, maintain.cgi and modify.cgi you can just copy them over, and you can just add the routines to HTML_templates.pm)

It requires the addition of about a half dozen templates.

It requires several modifications to the the Links, Users and Validate databases.

At this stage, I would suggest only try this code if you know what you are doing, and are willing to try to clean up some of the problems. (Including the templates which are _bare_)

A number of the routines can be generalized or combined. Also, some steps are redundant, and some can probably be combined. One big one is setting up a $VALDB variable to prevent re-defining $val-> new... every time.

Also, many of the routines use $in->param() rather than assigning and passing to a hash, which creates problems in assigning and adding parameters to the various routines, or overriding them. That needs to be standardardized using something like $rec=&cgi_to_hash($in), largely for code readability and logic.

Also, the error routines seem to use the $USER variable, which is non-standard, and create output problems in the formatting.

All of these and more are sort of cosmetic at this point, but really necessary to turn it into a working user/editor system from a maintainability point of view.

I should have a zip of this today (wednesday).

Again, this is really pre-beta code since I'm the only one who's tried it. It probably has logic/security problems which need to be found and fixed before going public. When it's ready I'll release it here, but unless you are willing to make a lot of changes to make it work, you are better off waiting.







http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Editor Modify Mod -- List of Links? In reply to
Any updates on this mod? Has it been released?

Thanks.

Mark G.

Quote Reply
Re: Editor Modify Mod -- List of Links? In reply to
I believe the Editor Mod is linked in the Links SQL FAQ web site.

Regards,

Eliot Lee
Quote Reply
Re: Editor Modify Mod -- List of Links? In reply to
Yes, it's linked within the FAQ site.

There are some bug fixes I have been meaning to apply, but since I haven't gotten many complaints, or anything, in awhile, I figured it must be easy enough to work out. I think it's on the 3rd release, at this point.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ