[% 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) . ":" . $N->{type_nodetype} . "
\n" if $N->hasAccess($USER, 'r'); } $str; %] #### TEST_FRONT_PAGE:23 Re: Welcome to Everything!:286 Re: Welcome to Everything!:286 does not exist yet:6 root needs to add the chatterbox for you:6 dogface:27 good dim sum duck!:6 ENoteAndPreview:15 shownote:8 parsetimestamp:8 note display page:9 parsecodeonlydoc display page:9 parselinksinfield:19 insert:19 displaynote:19 #### Re: Welcome to Everything!:286 Re: Welcome to Everything!:286 #### my $ref = getNodeWhere( "type_nodetype != 286" , "", "createtime DESC", $limit); #### my $ref = getNodeWhere({}, "", "createtime DESC", $limit); foreach my $N (@$ref) { my $isNote = 0; next if getNodeWhere( "$N->node_id = note_id", "notes" ); $str .= linkNode($N) . ":" . $N->{type_nodetype} . "
\n" if $N->hasAccess($USER, 'r'); } ##
## mysql> desc node; +--------------------------+-----------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------------------+-----------+------+-----+---------------------+----------------+ | node_id | int(11) | | PRI | NULL | auto_increment | | type_nodetype | int(11) | | MUL | 0 | | | title | char(240) | | MUL | | | | author_user | int(11) | | MUL | 0 | | | createtime | datetime | | | 0000-00-00 00:00:00 | | | modified | datetime | | | 0000-00-00 00:00:00 | | | hits | int(11) | YES | | 0 | | | loc_location | int(11) | YES | | 0 | | | reputation | int(11) | | | 0 | | | lockedby_user | int(11) | | | 0 | | | locktime | datetime | | | 0000-00-00 00:00:00 | | | authoraccess | char(4) | | | iiii | | | groupaccess | char(5) | | | iiiii | | | otheraccess | char(5) | | | iiiii | | | guestaccess | char(5) | | | iiiii | | | dynamicauthor_permission | int(11) | | | -1 | | | dynamicgroup_permission | int(11) | | | -1 | | | dynamicother_permission | int(11) | | | -1 | | | dynamicguest_permission | int(11) | | | -1 | | | group_usergroup | int(11) | | | -1 | | +--------------------------+-----------+------+-----+---------------------+----------------+ 20 rows in set (0.01 sec)