Enrique Vega wrote:

> > We will allways welcome contributions of snippets or examples for the
> > manual.
> > Getting either of these to do something useful without knowing anything
> > about
> > PHP is likely to be stretching Midgards' abilities, though. Personally,
> > I think Midgard is an enabling technology. It may not be a end-user tool
> > for everyone.
> 
> This is kind of sad to hear Emile. Maybe something like what you just said
> should be added to the about midgard page so folks who are not programmers
> will not be mesmerized into using midgard.

Possibly. You could certainly do Midgard-sans-PHP, but it'd probably be
either
a lot of work, or there would need to be functions that made decisions
for
you about the layout. For me personally, that would never be an option.
Note
that all this is strictly my own viewpoint; I'm absolutely more of a
developer
than a site builder. Others may have other opinions on this issue.

In any case, the possibilities for something like what you want are
there,
technically -- using either snippets or run-of-the-mill includable PHP
libraries. I am just having trouble envisioning a system within
Midgards'
framework that would be both easy to use and flexible.

> I tend to disagree. If the basic php functions to return pages, topics, etc.
> were commented, so a user could understand them, then not only could the
> user use them to start creating a basic dynamic web site, but they would
> also be learning the basics of building a dynamic web site using midgard.

If what your saying is that the manual needs to be clearer and needs
more
examples, no contest from me. None.

> Emile, I'm not talking about the be all custom layout for a web site. I'm
> saying that if there was standard code for navigation available in the
> midgard distribution, that it would be a great help for users that are just
> starting out to use midgard. Even with the user interface nadmin has, a set
> of standard navigation snippets will still be needed for most of the web
> developers currently on the internet to use midgard applications.

Gleaning code? Oh, that's very much doable. I thought you were thinking
of
a stick-in-this-directive-voila-you-have-a-site.

> I did, and I'm sorry but I don't understand. Maybe you could show me in the
> following code?

In your case I'd either use Davids tree coding, or use a recursive
function:

  function showtopic($id)
  {
    $topic = mgd_list_topic($id);

    if (!$topic) { return; }

    print "<UL>";
    while ($topic && $topic->fetch()) {
      print "<LI>"; showtopic($topic->id); print "</LI>";
    }
    print "</UL>"; 
  }

  showtopic(0);

This can be made a lot prettier -- which is exactly my point. This was
short and easy
but it's almost certainly not what you want in the looks department.

And yes, I know this touches on what is very probably past Programming
101 -- recursion. You _could_ do it with loops, but it'd be hell on
memory
and very hard to read. I'm the worst judge in the world on these issues
since I've been doing this trick for so long it comes more natural than
my native tongue :/ I lost my worst-teacher-in-the-known-universe[0]
certificate a while ago, or I'd show you the JPEG.

> I would be happy to help work on the manual, and intend to do so as I work
> through the steep learning curve. This is why my initial request from the
> midgard community is to create a standard set of navigation tools. This
> would not only help the web developer get started, but it would also help
> them get an understanding of how midgard works.

OK, in that case the first order of bussiness is to get a solid spec on
the table
for what these controls are supposed to do, and roughly how. Purely from
your
point of view. We'll work out the technicalities later.

> I know there is a lot on your shoulders,
> and you have always been there for us when we get stuck!

The same thing goes for me, of course. Doing this work would have
exactly zero
point if it weren't for people investing their valuable time.

Emile

[0] Not kidding. Bet you didn't expect that. Courtesy of some
appreciating students,
    I presume. But I was younger then, And Besides, The Wench Is Dead[1]
[1] Spot the reference and win an all-expenses paid trip to the nearest
keyboard[2]
[2] As you read this, of course. You didn't really expect otherwise, did
you?[3]
[3] Gratuitous footnotes! We haven't had those in a while!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to