Gossamer Forum
Home : Products : Gossamer Links : Discussions :

full_name question

Quote Reply
full_name question
hello

Is it possible to get entries of full_name to the
detail page. I want use this words as keywords like:

Cat, Cat2, Cat3

Knubbel

Quote Reply
Re: [Knubbel] full_name question In reply to
Hi,

Are you links in single categories, or more than one?

This will decide how this can be done =)

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] full_name question In reply to
The links are in one category.
Quote Reply
Re: [Knubbel] full_name question In reply to
Hi,

Try tihs global.

get_category_details
Code:
sub {

my $link_id = $_[0];

my $cat_id = $DB->table('CatLinks')->select( ['CategoryID'], { LinkID => $link_id } )->fetchrow;
my $cat_name = $DB->table('Category')->select( ['Full_Name'], { ID => $cat_id } )->fetchrow;

my $cat_url = $CFG->{build_root_url} . '/' . $DB->table('Category')->as_url( $cat_name ) . '/' . $CFG->{build_index};

return { CategoryName => $cat_name, CategoryURL => $cat_url }

}

Call with:

Code:
<%get_category_details($ID)%>
In category: <a href="<%CategoryURL%>"><%CategoryName%></a>

Untested, but should do the trick =)

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] full_name question In reply to
Thank it works very fine,
but I belive we have a mistake.

I want only get the words in full_name.

I want use them as keywords in:
<meta name="keywords" content="Cat1, Cat2, Cat3" />


Knubbel.



Last edited by:

Knubbel: Aug 14, 2008, 5:53 AM
Quote Reply
Re: [Knubbel] full_name question In reply to
Ah ok - try this:

get_cat_keywords
Code:
sub {

my $link_id = $_[0];

my $cat_id = $DB->table('CatLinks')->select( ['CategoryID'], { LinkID => $link_id } )->fetchrow;
my @cat_name_split = split /\//, $DB->table('Category')->select( ['Full_Name'], { ID => $cat_id } )->fetchrow;

return { CategoryName => join(',',@cat_name_split) }

}

Call with:

Code:
<meta name="keywords" content="<%get_cat_keywords($ID)%>" />

That should do it =)

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

Last edited by:

Andy: Aug 14, 2008, 6:01 AM
Quote Reply
Re: [Andy] full_name question In reply to
Sorry for the mistake.

I tried the new code and got this:

Unable to compile 'get_cat_keywords': Global symbol "$cat_url" requires explicit package name at (eval 39) line 8.
Quote Reply
Re: [Knubbel] full_name question In reply to
Oops .. please try the modified version above :D

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] full_name question In reply to
now it shows nothing...
Quote Reply
Re: [Knubbel] full_name question In reply to
Sorry, please change:

Code:
return { CategoryName => join(',',@cat_name_split) }

..to:

Code:
return join(',',@cat_name_split)

That will fix it Smile

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] full_name question In reply to
Thanks for spending your time.
It works great.


Knubbel