Hi,

From: <[EMAIL PROTECTED]>
> I've noticed that, very often, it is necessary to provide an index or
listing
> of articles.
>
> Perhaps it would be useful if someone whipped up a set of utility
functions
> for this purpose.
>
> Suggested prototypes:
>
> mgd_render_list(topic, number, base_url, prefix, suffix, [type]) - Would
> produce a list of the first [number] of articles from topic [topic] with,
>  optionally, type [type], producing a string for each of the form:
[prefix]
> <a href = "[base_url]/[id_of_article]">[article-title]</a> [suffix]. If
> base_url is empty, then don't print out the <a> tag stuff. Provides some
> sprintf style replacement things for the pre and suf -fix things,
something
> like %a for abstract, %c for last modified date, %A for author name...
etc.
>
> mgd_render_list_calendar(topic,base_url, prefix,suffix, startstamp,
endstamp,
>  [type]) - see mgd_render_list, this shows everything between startstamp
> + endstamp (which are unix timestamps).
>
> mgd_render_topic_list(topic,base_url, prefix, suffix) - list the
subtopics.
> Otherwise the same as mgd_render_list
>
<snip>
> mgd_render_login(login_url, backcolor, forecolor, caption, setcookie,
links)
> - print out a nice html login form suitable for putting on a nav bar,
similar
> to the ETP login box, which would automatically log the user into midgard
> + set the midgard cookie.

IMHO, these functions could be implemented in PHP (and placed into the
code-global page element), because it depends too much on what exactly you
want to do, and how you want to render the different lists.
For example, I never use ids in url, I always use names and topic path under
an active page, so the mgd_render functions should take one more argument in
my case. But imagine someone else want to have another extension to the url
(.txt instead of .html), let's add another argument, and one other want to
add a title in the A tag, and an ID, and a CLASS, and so on with each user
cases... This would end with an (almost) infinite list of arguments that
would never be used at 100%, what a waste of time/ressources...
And I don't talk about the login box... ;-)

Different opinions, comments ?

Best regards,
[EMAIL PROTECTED]


--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to