Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Customising email-add.txt to inlcude deep link

Quote Reply
Customising email-add.txt to inlcude deep link
I am pretty close to having it set up so that I can include a deep link to the category that the site was submitted to.

I have added this:

<a href="http://www.site.com/<%Category%>/"><%category_short%></a>

The <%category_short%> produces an Unknown Tag: 'category_short as does <%Name%>

Is there a secret tag that I can use to just get the bottom level category name :)
Cheers

Last edited by:

ukseo: Dec 8, 2004, 2:39 AM
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
Try this global call at the top of the email-add.txt file...

<%load_links_catname($ID)%>

...and then create a new global called load_links_catname, with the following code;

Code:
sub {
my $catID = $DB->table('CatLinks')->select( ['CategoryID'], { LinkID => $_[0] } )->fetchrow;
my $table = $DB->table('Category');
my $cat_details = $table->select( { ID => $catID } )->fetchrow_hashref;
my $name = $cat_details->{Full_Name};
my $sname = $cat_details->{Name};
my $url = $CFG->{build_root_url} . "/" . $table->as_url($name);
return qq{<a href="$url">$sname</a>};
}

Untested, but should 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

Last edited by:

Andy: Dec 9, 2004, 1:53 AM
Quote Reply
Re: [Andy] Customising email-add.txt to inlcude deep link In reply to
that just produces the root URL :)

But it has promise :)
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
Hows it work now? 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] Customising email-add.txt to inlcude deep link In reply to
It just prints the root URL as an active link

http://www.url.com
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
How about now? Unsure

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] Customising email-add.txt to inlcude deep link In reply to
The first time i did not know you changed it Blush

The second one throws an error on validation. problem with fetchrow array

Cheers
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
heheh <G>

What was the exact error message?

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] Customising email-add.txt to inlcude deep link In reply to
A fatal error has occured:
GT::SQL (2352): Unknown method 'as_url' called at (eval 39) line 1.

Please enable debugging in setup for more details.GT::SQL (2352): Unknown method 'as_url' called at (eval 39) line 1.
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
Ah, ok. Try changing;

$DB->as_url($name);

to;

$table->as_url($name);

...as I had before I changed it to $DB <G>

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] Customising email-add.txt to inlcude deep link In reply to
thanks once again Andy

That works nicely.

I still dont get the actual category name though, As if you were viewing the bottom level breadcrumb for example. Do that make sense?

Cheers
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
Glad it works :)

I've modified it for you above, so that it should now produce;

<a href="URL_TO_CATEGORY">NAME</a>

Hope that helps :)

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] Customising email-add.txt to inlcude deep link In reply to
not really sure what to say. Thanks for your time and effort
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
No prob. Glad it worked :)

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] Customising email-add.txt to inlcude deep link In reply to
A fatal error has occured:
GT::SQL (2804): Unknown method 'as_url' called at (eval 39) line 1.

Please enable debugging in setup for more details.GT::SQL (2804): Unknown method 'as_url' called at (eval 39) line 1. Any idea, i hate perl, or whatever the subs are made with :)
Quote Reply
Re: [ukseo] Customising email-add.txt to inlcude deep link In reply to
Sorry, should be fixed now. I forgot to change the $DB to $table Frown

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