Gossamer Forum
Home : Products : Links 2.0 : Discussions :

without category

Quote Reply
without category
I have only about 200 links to add. But I don't want to divide according to several categories. I want to place all links on a page without category.

For exemeple, when I click home.html in the admin.cgi, normally the first view is category. But i want that the first view show all links with their description.

Shortly speaking, how can show all links in the first view without category?

Thank you so much for your help.
Quote Reply
Re: without category In reply to
Look at the Link Tree Mod in the Resource Center. You can edit this Mod to only include links rather than Categories and Links.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: without category In reply to
Thank you Eliot for reply. I have downloaded nph-build.cgi file from the resource. But What I have to change and how can I use it? Please help me. Thanks.
Quote Reply
Re: without category In reply to
Delete the following codes:

Code:
$links .= qq~\n<p><$font_subtitle><strong><a href="$build_root_url/$cat/">$title</a></strong></font>\n<ul>~;

in the build_tree_page sub-routine.

You will have to edit the codes some more to get a logical listing of the links based on alphabetical listing...but do this code hack first.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: without category In reply to
Thanks a lot!! Is it possible to have a listing according to from High Rated record to low rated and no rated record? as cgi-resource.
Quote Reply
Re: without category In reply to
Eliot, I have deleted the code. After what I have to do?
Quote Reply
Re: without category In reply to
Here are a couple things that you can do:

1) Add the following line of codes:

Code:
@{$links{$cat}} = &build_sorthit (@{$links{$cat}});

BEFORE the following codes:

Code:
$links .= &site_html_link (%tmp);

This will give a listing of links in the following manner within the "invisible" category (because links are actually created from categories, but by deleting the category line I had you delete before, the categories will not appear, but the links will appear in order of the categories they are associated with):

NEW
POPULAR
ALPHABETICAL

2) Add the following sub-routine to your db_utils.pl file:

Code:
sub build_tree_sort {
# --------------------------------------------------------
# Alphabetical sorting routine.

my (@unsorted) = @_;
my ($num) = ($#unsorted+1) / ($#db_cols+1);
my (%sortby, $hit, $i, @sorted);
for ($i = 0; $i < $num; $i++) {
$sortby{$i} = $unsorted[$db_sort_links + ($i * ($#db_cols+1))];
}
foreach $hit (sort {
return lc($sortby{$a}) cmp lc($sortby{$b});
} (keys %sortby)) {
$first = ($hit * $#db_cols) + $hit;
$last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sorted, @unsorted[$first .. $last]);
}
return @sorted;

}

Then in the nph-build.cgi file in the sub build_tree_page routine, add the following codes:

Code:
@{$links{$cat}} = &build_tree_sort (@{$links{$cat}});

BEFORE the following codes:

Code:
$links .= &site_html_link (%tmp);

The links will appear in alphabetical order between the "invisible" categories.

I know this must be terribly confusing...but this is all I can come up with for now.

Best of luck!

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums


[This message has been edited by AnthroRules (edited March 20, 2000).]
Quote Reply
Re: without category In reply to
Thank you so much for your help and for your time.

Result:
1. But the first view give still categories.
2. But in the links, alphabetical index is GOOD works.

Problem: first view give still categories.
My question: in the links index, Rated index is possible? For exemple, from 10 rated record.....until 1 rated record, no rated record

Thank you!
Quote Reply
Re: without category In reply to
Hi Eliot,

I think that the categories index question can be solved. If i delete the link home.html and make a link to go directly links index associated with the category, users can view only links index.

Because users don't add their links, only I add their links.

My question is now how index records from hight Rated record to low rated record. Is it possible?
Quote Reply
Re: without category In reply to
I have provided all the suggestions I can at this time...and I am leaving for a Conference and will not be back until next week...so you are on your own until then...may be someone else will have some ideas.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: without category In reply to
Thanks Eliot, Have a good time!!!