Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

How do I modify the category table?

Quote Reply
How do I modify the category table?
How do I modify the layout of the table that displays the category links on the home page?

I would like to change the font size, as well as, the display of the links in the table. They appear to be in two columns and crowded together. I want to spread them out more, as there appears to be plenty of space to do so.

Also, is there a way to rearrange the order of the links? If so, details, please.

If my question is very clear, perhaps if you took a look at my category links on page: http://www.kittymother.com/2bawinner, you will see what I'm referring to.

Thank you,
KittyMother

Quote Reply
Re: How do I modify the category table? In reply to
Links builds your homepage categories the same as all the others, so whatever style you have for your category pages is used on your homepage. There has been a mod to change this for this for Links (non-sql) but I'm not sure if its been done for Links SQL.

The easiest way of doing it is to edit the homepage yourself, just link any other HTML page. To do that you'll have to tell links not to rebuild your homepage each time (so your changes are not over-written).

In nph-build.cgi find this section:

sub build_all {
# --------------------------------------------------------
# Rebuilds the entire pages.


Add a hash to the &build_home_page:


sub build_all {
# --------------------------------------------------------
# Rebuilds the entire pages.
#
&build_backup();
&build_update_counters();
&build_update_newpop();
&build_stats();
&build_detailed_view();
# &build_home_page();
&build_new_page();
&build_cool_page();
&build_rate_page();
&build_category_pages();
}

To turn homepage building back on, simply remove the hash.

All the best
Shaun

Quote Reply
Re: How do I modify the category table? In reply to
In Reply To:
How do I modify the layout of the table that displays the category links on the home page?
You edit the subcategory.html template file. Add your own font codes or edit the CSS file.

In Reply To:
Also, is there a way to rearrange the order of the links? If so, details, please.
Yes...Look at the following variable in the Links.pm file:

Code:

# The default sort orders for links.
$LINKS{build_sort_order_category}


Add your own list of fields that you want to sort by. As an example, I have the following:

Code:

$LINKS{build_sort_order_category} = "isNew,Recommendations,Nominations,isPopular,isDetailed,isAward,Title";


Translation ===>

Links are sorted by the following:

1) Most New to least New
2) Most Email Recommendations to Least Email Recommendations
3) Most Nominations to Least Nominations
4) Most Popular to Least Popular
5) Editor Reviews
6) Site of the Month Awards
7) Title (alphabetical - A-Z)

Regards,

Eliot