Gossamer Forum
Quote Reply
Random Bookmark Folders
Hi Andy,
do you have an global for an random bookmark folder list.
The global should show maybe 5 random public bookmark folders
Something we have on amazon, to show some list of links...

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Random Bookmark Folders In reply to
I'm assuming you are talking about "public" bookmark folders?

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Random Bookmark Folders In reply to
Andy wrote:
I'm assuming you are talking about "public" bookmark folders?

Cheers

Yes, certainly they should be public :-)

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Random Bookmark Folders In reply to
Untested (and wrote with a bit of a hangover ;)) ... but should work:

get_random_folders
Code:
sub {

my $tbl = $DB->table("Bookmark_Folders");
$tbl->select_options("ORDER BY RAND() LIMIT 5");

my $sth = $tbl->select( { my_folder_public => 1 } ) || die $GT::SQL::error;

my @loop;
while (my $hit = $sth->fetchrow_hashref) {
push @loop, $hit;
}

return { random_bookmark_folders_loop => \@loop };

}

Code:
<%get_random_folders%>
<%loop random_bookmark_folders_loop%>
<a href="<%config.db_cgi_url%>/bookmark.cgi?action=users_links;my_folder_id=<%my_folder_id%>"><%my_folder_name%>, by <%my_folder_user_username_fk%></a>
<%endloop%>


Should hopefullly work.

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Random Bookmark Folders In reply to
Hi Andy,
this one is working as well.
Thanks a lot

Matthias
gpaed.de