Gossamer Forum
Quote Reply
Editor tag replacement
Note:
---------------------------------------------------------------------------------------------------Ok, my aim is NOT to repost threads, but I just want to isolate this one aspect from the suggested Editor Monitor Pluging, since this is essentially not monitor but a replacement/enhancement to the existing <%editors%> tag place on pages which have editors assigned to them.

See Editor Monitor Plugin at: http://www.gossamer-threads.com/...orum.cgi?post=195385
---------------------------------------------------------------------------------------------------

I think the way the editors are presented at the bottom of each page could be improved upon. Example from DMOZ:

Category editors: andylehrer, artson, dlugan, funk, inge, indianpipe, tania


I'd like to kick this one off, please feel free to join in and help if you are also interested in this (or you just want to helpWink).

The best thing I think, is just to make a new tag to replace the <%editors%> tag to produce the above output.

1. Finding which editor belongs to this category

I guess the tag needs to know somehow which category is being built at that instant... how I dont know. Lets say it is equal to $category_id. Just use SQL to search the editors table for all the editors where (CategoryID = $category_id) and add it to an array @editors. (push, pop I am not sure).

2. Hyperlinking

I keep my editors profiles in mysite.com/editors/profiles/editoralias.html so the hyperlink could automatically be produced: buildpath/editors/profiles/[Username].html. Just go through the array @editors and produce the hyperlink from this.

Simple??

Of course, the ultimate would be to have dynamically produced profile pages... but the above would be a great start. Maybe this could be my 2nd plugin attempt (with your helpWink), but I think the above could be solved with a simple global.



Code:


#I have a condition on <%editors%> at them moment, where if there are no editors
# I have a hyperlink "Become an Editor" which goes to my signup form.
# So i don't think this tag needs to take this into account


my $i;
my $output = "Editors: ";

for ($i = 0; $i< scaler @editors; $i++) {
if ($i>0) {$output .= qq~,~; } #add a comma
$output .= qq~<a href="$CFG->{build_root_url}"/editors/profiles/$editor.html">$editor</a>~;
}
Its a start.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

sooke: May 16, 2002, 4:07 PM
Subject Author Views Date
Thread Editor tag replacement Ian 8336 May 16, 2002, 3:10 PM
Post Re: [sooke] Editor tag replacement
Ian 8098 May 16, 2002, 5:23 PM
Thread Re: [sooke] Editor tag replacement
Ian 8128 May 18, 2002, 8:37 PM
Post Re: [sooke] Editor tag replacement
webmaster33 8061 May 20, 2002, 2:37 AM
Thread Re: [sooke] Editor tag replacement
Andy 8152 May 20, 2002, 3:52 AM
Thread Re: [Andy.] Editor tag replacement
Ian 8109 May 20, 2002, 8:03 AM
Thread Re: [sooke] Editor tag replacement
Andy 8115 May 20, 2002, 8:32 AM
Thread Re: [Andy.] Editor tag replacement
Ian 8056 May 20, 2002, 9:28 AM
Post Re: [sooke] Editor tag replacement
Andy 8083 May 20, 2002, 9:56 AM
Thread Re: [sooke] Editor tag replacement
Ian 8042 May 20, 2002, 10:30 AM
Thread Re: [Ian] Editor tag replacement
Ian 8006 May 20, 2002, 6:40 PM
Post Re: [Ian] Editor tag replacement
Ian 8031 May 20, 2002, 8:23 PM
Post Re: [sooke] Editor tag replacement
Ian 8073 May 20, 2002, 1:01 PM