Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

List of public bookmark folders

Quote Reply
List of public bookmark folders
Hi Andy,
here is my second idea for bookmarks.
At the moment we can only show a userlist with their bookmarks.
Would be great if we can show just a list of all public folders...

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] List of public bookmark folders In reply to
Sure, thats pretty much the same as the other global (just a couple of tweaks)

get_public_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 { public_bookmark_folders_loop => \@loop };

}

and call with:

Code:
<%get_public_folders%>
<%loop public_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%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] List of public bookmark folders In reply to
Cool, thanks Andy, it's working.
I'm just trying to include the bookmark_nav.html in my template. It works only when I call it with <%config.db_cgi_url%>/bookmark.cgi?action=
But then the global does not work ;-)

The global works when I call it with <%config.db_root_url%>
Do you know how to include the bookmark_nav.html into a normal template file?

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] List of public bookmark folders In reply to
Hi,

I think this is what you want:

Code:
<%~set secondarynav = "bookmark_nav.html"%>

Put that at the top of the template, and should then show the bookmark menu :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] List of public bookmark folders In reply to
Great, that's it.
Thanks Andy

Matthias
gpaed.de
Quote Reply
Re: [Andy] List of public bookmark folders In reply to
Hi Andy,
is it possible to show the title AND the desrciption of a bookmark folder?

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] List of public bookmark folders In reply to
It was easy. Just added <%my_folder_description%> ;-)

Matthias
gpaed.de