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

Active categories

(Page 2 of 2)
> >
Quote Reply
Re: [Matthias70] Sorting In reply to
Hi Andy,
can you tell me how to include an title tag and an alt tag into the global.
something like this
$cat->{URL} = $category->as_url($cat->{Full_Name} title='<%category_name)%>' alt=='<%category_name)%>'. "/$CFG->{build_index}";

The output should look like this
<a href="http://www.test.de" title='topcategory/subcategory' alt='topcategory/subcategory'>Test</a>
just like the title tag in the meta description

Thanks
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Sorting In reply to
Hi,

Just do it in the template =)

Change:

Code:
<a href="<%URL%>"><%Name%></a>

...to:

Code:
<a href="<%URL%>" title="<%Full_Name%>" alt="<%Full_Name%>"><%Name%></a>

Not sure why you want both alt and title though?

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] Sorting In reply to
Andy wrote:

Not sure why you want both alt and title though?

Cheers

Hi Andy,
I knew that the 'alt tag' is not working in Firefox and I thought the 'title tag' does not work in IE.
But I was wrong. The title tag is enough.
Thanks for your help. Works perfect
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Sorting In reply to
Hi Matthias,

Im reading this thread and trying to understand the concept of using tags with GLinks (which I'll love to do it), and have a question for you. I'm seeing this page:

http://www.gpaed.de/g-tags

and I notice that you've 4 times the tag sport linking to a different pages on your website, dont you think will be nicer and better to have exclusive tags per url?

I'll like to understand better how to use and make a plan for the cloud tag to my website. I was thinking to use tags per category or probably tags per common search term, where size will vary depends on the link count or quantity of links per category. How are you currently using the the different size structure for your website? What are you using to define it?

Thanks in advance and hope you dont mind sharing with me some information,

Jesus
Quote Reply
Re: [Jesus] Sorting In reply to
Hi Jesus,
at the moment the "tag cloud global" picks up every category name. I have four different sport categories on my page and the global shows them all. To have different names for each global would mean to rename the categories, so I tried to give some information by the title/alt-tag.
Maybe there is a way to show the full_name for each cat in the tag cloud, but that's to much text I think...

That's the global I'm using:
Code:
sub {
my $category = $DB->table('Category');
$category->select_options('ORDER BY Name');
my $sth = $category->select( ['Has_New_Links','Number_of_Links','Name','Full_Name'] );
my @cats;
while (my $cat = $sth->fetchrow_hashref) {
$cat->{URL} = $category->as_url($cat->{Full_Name}) . "/$CFG->{build_index}";
push @cats, $cat;
}
return { new_categories => \@cats };
}

That's the html in my tag.html
Code:
<%tags%>
<%loop new_categories%>
<%if Number_of_Links > 200%>
<big><big><b>
<a href="<%URL%>" title="<%Full_Name%>"><%Name%></a>
</big></big></b> -
<%elseif Number_of_Links > 100 eq < 200%>
<b><big>
<a href="<%URL%>" title="<%Full_Name%>"><%Name%></a>
</big></b> -
<%elseif Number_of_Links > 50 eq < 100%>
<b>
<a href="<%URL%>" title="<%Full_Name%>"><%Name%></a>
</b> -
<%elseif Number_of_Links > 25 eq < 50%>
<a href="<%URL%>" title="<%Full_Name%>"><%Name%></a>
-
<%else%>
<small>
<a href="<%URL%>" title="<%Full_Name%>"><%Name%></a>
</small> -
<%endif%>
It's far away from perfect but working for me ;-)

Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Sorting In reply to
Thank you so much Matthias or the info,

I'll give this a try tomorrow to see how it works, I hope we can test and try to make of this an incredible useful idea for everybody. At least I know most of people like the tags system works ;)
Quote Reply
Re: [Matthias70] Sorting In reply to
Hi Andy,
below is the global I'm using for the category tag cloud.
Is there a easy way to exclude "top level categories" in the output and show only subcats???

Code:
sub {
my $category = $DB->table('Category');
$category->select_options('ORDER BY Name');
my $sth = $category->select( ['Has_New_Links','Number_of_Links','Name','Full_Name'] );
my @cats;
while (my $cat = $sth->fetchrow_hashref) {
$cat->{URL} = $category->as_url($cat->{Full_Name}) . "/$CFG->{build_index}";
push @cats, $cat;
}
return { new_categories => \@cats };
}


Thanks

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Sorting In reply to
Try this:

Code:
sub {
my $category = $DB->table('Category');
$category->select_options('ORDER BY Name');
my $sth = $category->select( ['Has_New_Links','Number_of_Links','Name','Full_Name'], GT::SQL::Condition->new('FatherID','>','0','CatDepth','=','1') );
my @cats;
while (my $cat = $sth->fetchrow_hashref) {
$cat->{URL} = $category->as_url($cat->{Full_Name}) . "/$CFG->{build_index}";
push @cats, $cat;
}
return { new_categories => \@cats };
}

Hope that helps.

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!

Last edited by:

Andy: Apr 13, 2008, 1:28 PM
Quote Reply
Re: [Andy] Sorting In reply to
Andy wrote:


Hope that helps.

Thanks Andy,
that helps a lot ;-)

Can you exclude Subsubcategories as well?
Would be great if the global shows only first level subcats and not the subcats of the subcat.
Do you understand what I mean?

Thanks
Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Sorting In reply to
Hi,

Adding

'CatDepth','=','1'

..should work (try the modified global above)

Hope that helps.

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] Sorting In reply to
Hi Andy,
works fine for me, thanks for your help.
It's quiet in gtforum these days.
No new plugins. Are you running out of new ideas Cool

I must admit, at the moment I have no new ideas, but I'm working on it...

Thanks

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] Sorting In reply to
Hi,

Quote:
works fine for me, thanks for your help.

NP =)

Quote:
It's quiet in gtforum these days.
No new plugins. Are you running out of new ideas Cool

haha, kinda =) I've been working on a couple of large projects, and a few small ones - so havn't have much time to really think about new plugins recently =) If anyone has plugin ideas though, post them here - and I'll see if I can come up with something when I do get some free time =)

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!
> >