Gossamer Forum
Home : Products : Links 2.0 : Discussions :

changing auto-email subject line????

(Page 2 of 2)
> >
Quote Reply
Re: @search_fields = (1,2,5,6,7); =no change In reply to
Are you sure that you setup a new field for keywords?

See the following mod http://sport.kc.ru/Links/3sh.htm skip the first and second step and in third step skip modifications with "isBest".

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: search results line up??? In reply to
this has something to do with my old systems policy.
"First come, first serve".
There was no search function for that database, just searching via categories.
I thought that is fair to those who find my Search Engine first and in the new system it shouldn't matter to much because most people are to lazy anyway to go through the categories but rather just type in a search term and off they go.
So, if there is an option to list new additions on the bottom of the according category instead on the top, i would like to change it if possible.
Rudolf

Quote Reply
Re: misunderstanding In reply to
i don't need non english characters???
I need to know if i can simply delete -say
main category
ART
and have the subcategories -say
ART/webdesign
ART/fine_arts
and so on still working
because when i installed the categories i thought i have to install first a main category alone
before i can put in the subcategories.
But i saw in you Search Engine that you do not have those single naked main categories but right away the subcategories.
Hope that didn't sound to confusing
Rudolf

Quote Reply
Re: @search_fields = (1,2,5,6,7); =no change In reply to
yes, i did add the number 7, just as is in the header here (actually copy and paste out of modified script)
The "mod" on that website i checked out and that's one of the overwhelming difficult things i am afraid to lay my hands on with the minimal knowledge that i have at this time, but there inside under Third Step, links.def i found this interesting:
$db_category = 4; $db_modified = 3; $db_url = 2;
$db_hits = 8; $db_isnew = 9; $db_ispop = 10;
$db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
$db_votes = 12; $db_rating = 11; $db_mail = 13;
$db_isbest=15;
is this some kind of list for what to display as found links?
He used a 14 in @search_fields = (1,2,5,14);
what's the difference?

Quote Reply
Re: search result display In reply to
http://www.geocities.com/useroo/screenshot.html
i have quickly installed the above webpage to visually show you what my next question is.

I've just finished the template that desides the looks of the search results (serach_results.html)
and i am not happy with the way to wide spaces between every link/in category listing.
I guess it's the <p>....</p> type of display they use in most of these templates which i would simply have to change into <BR> instead.
BUT WHERE????
Certain to me is only i can't do this in search_results.html, there i have only the
<%if link_results%>


<%link_results%>

<%endif%>
that displays the right links there.
Where do i need to change the "p" into "BR" or whatever decides about the space between each link displayed????
Rudolf

Quote Reply
Re: yes, it';s the dam <p>'s In reply to
i just went to check the source and saw it is indeed the <P> tag that's used to divide each link found.
I need to replace this with the <BR> and i also want to change something with those <LI> and such dot's, could you please tell me where???

Something i just realised with another test:
It looks like the script is returning matches with the URL too (instead of keywords) and that brings some results that make not much sense to the searcher (meaning neither title nor describtion have anything to do with the search term, just something in the URL has but that might not be relevant at all.
If i don't want that URL be a search term, do i simply need to delete the number 2 in
# Field names you want to allow visitors to search on:
@search_fields = (1,2,5,6,7); ????

A most accurate return of results is probably the best reference a search engine can have, that is why i weight this issue particularly important.
I would like to get my search engine to return links by
A: Title
B: Describtion
C: keywords
Anything else is nonsense.
How can i do this?
And, can Links2 only find keywords if submitters get a further box on the Add URL page where they can fill in keywords, or should it find them anyway inside the meta tags?
Or does Links2 not actually scan any META TAGS in the pages at all but just return what submitters put in under TITLE, DESCRIBTION and the URL itself?????

Rudolf, slowly getting to the bottom of this

Quote Reply
found something.. In reply to
..regarding the change of those <P> tags i may -MAY- have found the file????
Is it site_html.pl where there is this:
sub site_html_link {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like. It's a little complex looking just because we have to
# check for blank entries..

my (%rec) = @_;

$build_detailed ?
($output = qq~<ul><li><a class="link" href="$build_detail_url/$rec{$db_key}$build_extension">$rec{'Title'}</a>~) :
($output = qq~<ul><li><a class="link" href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title'}</a>~);

if ($rec{'Description'}) { $output .= qq~ <span class="descript">- $rec{'Description'}</span>\n~; }
if ($rec{'isNew'} eq "Yes") { $output .= qq~ <small><sup class="new">new</sup></small>~; }
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <small><sup class="pop">pop</sup></small>~; }

$output .= qq~ <small class="date">(Added: $rec{'Date'} Hits: $rec{'Hits'} Rating: $rec{'Rating'} Votes: $rec{'Votes'}) <a href="$build_rate_url?ID=$rec{'ID'}">Rate It</a></small>
</ul>
~;

return $output;
}
Here i see the <LI> and <UL> tag, but i am not sure about the <P>, is it the "qq"?
($output = qq~<ul><li>
And if i have at all the right spot, how/with what would i have to replace the qq to change the display space from <P> to <BR> ?

Quote Reply
Re: search results line up??? In reply to
This maybe is my last help because I need to finish my project in hurry within one week.
In db_utils.pl try change the following:

From:
sub build_sorthit {
# --------------------------------------------------------
# This function sorts a list of links. It has been modified to sort
# new links first, then cool links, then the rest alphabetically. By modifying
# the sort function below, you can sort the links however you like (by date,
# or random, etc.).
#
my (@unsorted) = @_;
my ($num) = ($#unsorted+1) / ($#db_cols+1);
my (%sortby, %isnew, %iscool, $hit, $i, @sorted);
for ($i = 0; $i < $num; $i++) {
$sortby{$i} = $unsorted[$db_sort_links + ($i * ($#db_cols+1))];
($unsorted[$db_isnew + ($i * ($#db_cols+1))] eq "Yes") and ($isnew{$i} = 1);
($unsorted[$db_ispop + ($i * ($#db_cols+1))] eq "Yes") and ($iscool{$i} = 1);
}
foreach $hit (sort {
($isnew{$b} and !$isnew{$a}) and return 1;
($isnew{$a} and !$isnew{$b}) and return -1;
($iscool{$b} and !$iscool{$a}) and return 1;
($iscool{$a} and !$iscool{$b}) and return -1;
($isnew{$a} and $isnew{$b}) and return $sortby{$b} <=> $sortby{$a};
($iscool{$a} and $iscool{$b}) and return $sortby{$b} <=> $sortby{$a};
$sortby{$b} <=> $sortby{$a};
} (keys %sortby)) {
$first = ($hit * $#db_cols) + $hit;
$last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sorted, @unsorted[$first .. $last]);
}
return @sorted;
}

To:
sub build_sorthit {
# --------------------------------------------------------
# This function sorts a list of links. It has been modified to sort
# new links first, then cool links, then the rest alphabetically. By modifying
# the sort function below, you can sort the links however you like (by date,
# or random, etc.).
#
my (@unsorted) = @_;
my ($num) = ($#unsorted+1) / ($#db_cols+1);
my (%sortby, $hit, $i, %isnew, %iscool, @sorted);
for ($i = 0; $i < $num; $i++) {
$sortby{$i} = $unsorted[$db_sort_links + ($i * ($#db_cols+1))];
($unsorted[$db_isnew + ($i * ($#db_cols+1))] eq "Yes") and ($isnew{$i} = 1);
($unsorted[$db_ispop + ($i * ($#db_cols+1))] eq "Yes") and ($iscool{$i} = 1);
}
foreach $hit (sort {
($isnew{$b} and !$isnew{$a}) and return 1;
($isnew{$a} and !$isnew{$b}) and return -1;
($iscool{$b} and !$iscool{$a}) and return 1;
($iscool{$a} and !$iscool{$b}) and return -1;
($isnew{$a} and $isnew{$b}) and return $sortby{$b} <=> $sortby{$a};
($iscool{$a} and $iscool{$b}) and return $sortby{$b} <=> $sortby{$a};
$sortby{$b} <=> $sortby{$a};
} (keys %sortby)) {
$first = ($hit * $#db_cols) + $hit;
$last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sorted, @unsorted[$first .. $last]);
}
return @sorted;
}

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: misunderstanding In reply to
Better no, I think you better rename the main category name, and rename the path in subcategories, but be aware that if you delete the main category ART, the directory ART will not be automatically deleted.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: @search_fields = (1,2,5,6,7); =no change In reply to
In Reply To:
He used a 14 in @search_fields = (1,2,5,14);
what's the difference?
14 is his number of keywords field.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: search result display In reply to
This has been discussed many times in this forum, you need to try using the search function in this forum before posting duplicate threads.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: yes, it';s the dam <p>'s In reply to
See category.html & link.html.
For the search results, try by yourself first and if you have new questions post a new thread because this thread is going too long with different questions.
If you have a new question, post a new thread, more people will help you!

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: found something.. In reply to
qq~ cannot be deleted because qq~ is a perl code, you add new codes after qq~.
If you delete qq~ might got 500 error.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
last question In reply to
i have used a forum for the first time in my life!
So my last question to you would be a silly one;
HOW DO I CHANGE "treaths"????

And some info i got from Alex himself:
Links 2 can only find what submitters put in, ergo URL Title and Describtion ergo it would indeed need
an extra field for keywords and the entire system would have to be set up for it. Complicated thing.

What i would really need to find out soon is how to change the distance between each link displayed.

Thanks for your help
Rudolf

> >