Plankton has asked for the wisdom of the Perl Monks concerning the following question:

Well I hope this is right place to ask this question. I am trying to use the Everything Engine to make a monkish web site on my system at home. I have put this code ...
[% my $limit; $limit = int($$VARS{newnodes_limit}) if (exists $$VARS{newnodes_limit} +); $limit ||= 15; my $str; my $ref = getNodeWhere({}, "", "createtime DESC", $limit); foreach my $N (@$ref) { $str .= linkNode($N) . "<BR>\n" if $N->hasAccess($USER, 'r'); } $str; %]
... in to the "front page" of my site at home. It spits links to the newest nodes. What I can't figure out is how to create a nodegroup and display the first node of a thread with some of its text. Much like how perlmonks does it :)

Can anyone give me some advice. Maybe someone from pmdev?

Thanks!

Plankton: 1% Evil, 99% Hot Gas.

Replies are listed 'Best First'.
Re: Everthing node questions
by PodMaster (Abbot) on Aug 31, 2004 at 04:14 UTC
    Generally you'll get more help at http://everydevel.com/.

    nodegroup? nodegroup is a node type. To retrieve some of a nodes text, you have to get that node (getNode) or at least select that field from the database.

    Everything does not have "threads" by default, so I don't know what you mean there (but it should all come down to doing a proper sql select ...). If you have ENoteAndPreview installed, look at what that nodeball does to see how to do it yourself.

    This and more in The Everything Bible.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      thanks PodMaster for your reply!

      I did install ENoteAndPreview and I will take a closer look at it as you suggest. But I still can't see how to create nodegroup. I think that's what I meant ... I think that is how perlmonks & javajunkies oragnizes things ... you know ... SoPW is a nodegroup, Meditations is another node group. Is that correct? the everydevel.com site is a great resource but they are short on examples, so it is slow going for me.

      Plankton: 1% Evil, 99% Hot Gas.
        But I still can't see how to create nodegroup. I think that's what I meant ... I think that is how perlmonks & javajunkies oragnizes things ...
        No, they don't use nodegroups (example of a nodegroup is monkpics). The main thing ENoteAndPreview provides you with (besides all the htmlcodes, documentation, display page, etc) is a note nodetype, and shownote, a "htmlcode" used by the "note display page" to show the threaded view.

        At perlmonks, all nodes that are in the Meditations section are of type perlmeditation (extends document).

        To get something like you see when you visit Meditations, you have to write the code yourself. Basically it consists of getting a list of desired nodes and then calling the appropriate nodemethods/htmlcodes/whatever... to format it as desired.

        Yup, ENoteAndPreview is kinda basic, although i'm sure examples can be found somewhere... maybe you can become pmdev, or an edev[*] so you can look around.

        If you're looking for a chatterbox, doulopolis has a good one (its more like the e2 chatterbox).

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.