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

Global to make each entry searchable

Quote Reply
Global to make each entry searchable
Hi:

I have had a couple requests to add some addoitional functionality to BCDB, and I am not quite sure where to start.

Here is the problem. I have a list of people who worked on a cartoon... let's say Voice Actors. It has been requested I make EACH voice actor name "clickable" to see the whole body of work they have done.

I see an easy, cheesy way to do this... and then I can imagine a very complicated way, that is well beyound my knowledge to even know HOW to do.

The easy, cheesy way is to make a global to take a while cast list list- something like: Clarence Nash (Donald Duck), Pinto Colvig (Goofy), Florence Gill (Clara Cluck), Fred Mertz

and seperate by both commas and ", (", extrace the names, put a search href around them, and spit out the global. Now that I think about that, it really would NOT be all that easy, would it?

The other idea I had was to create a table and index with all the names- but I have no idea how to do that, or if it would work...

So I figured I would throw this out, and see if anyone had any ideas how to maybe get this going!

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Global to make each entry searchable In reply to
Not something like this?

<%cartoon_author_others($LinkOwner)%>

Code:
sub {

my $author = shift;

my $table = $DB->table('Links');
my $sth = $table->select( { LinkOwner => $author } );

if ($sth) {
while (my $hit = $sth->fetchrow_hashref) {
#... do stuff here to show the link. Either
# with Links::SiteHTML or just basic HTML....
}
} else {
return "No other stuff found...";
}
}

This code isn't tested, and will not work as present (you need to add some code in where the comments are, so that it will return something if it finds any other links).

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] Global to make each entry searchable In reply to
Hi Andy:

That works- I was thinking of using search, but I see your idea is much better- I could custom-format that!

No, the real problem as I see it is to take the existing entry- in your case, "authors" and split that long list of names, put an individual href tag around EACH name, and then assemble the whole thing back again...
dave

Big Cartoon DataBase
Big Comic Book DataBase