| www.simball.de | Links mods | Plebiusvista Mod | 

Gossamer-Threads - Links 2.0 mod

Plebiusvista Mod v.1.0 - for templates only

This mod allows you to use the Altavista search without LWP, it uses IO::Socket.

See it in action: here. Instructions in a text file: follow this.


1. File: plebiusvista.pl

Download the Plebiusvista-Script Version: 1.3 from Plebius.org.
Note: That script is not freeware.

Place the Plebiusvista-Script plebiusvista.pl in your cgi-bin or where your other Links files like add.cgi or search.cgi are located.


2. File: search.cgi

Note: Change www.your.server to your location.

2.1.

In search.cgi under:

code:


my $nh   = $in{'nh'}   || 1;
Add:

code:


# AV
if ($in{'nh'} <= 1) {
($in{'location'} eq "both") and &av;
}
$location = $in{'location'};

# Automatic Redirection

# URL to the plebiusvista.pl
$engine = "http://www.your.server/cgi-bin/plebiusvista.pl?q=";
$redir = $in{'query'};

# Convert spaces to plus
$redir =~ s/\ /+/g;
if ($location eq "av") {
print "Location: $engine$redir\n\n" ;
}
2.2.

Add the following sub to search.cgi:

code:

2.3.

Then Add the following sub to search.cgi:

code:


3. File: site_html_templates.pl

3.1.

In site_html_templates.pl in sub site_html_search_results below:

code:


print &load_template ('search_results.html', {
Add:

code:


link_results2 => $link_results2, # AV
3.2.

In site_html_templates.pl in sub site_html_search_failure below:

code:


print &load_template ('search_error.html', {
Add:

code:


link_results2 => $link_results2, # AV

4. Files: Templates

4.1.

In search.html template in the search form add:

code:


<p>Search:&nbsp;
<select name="location">
   <option value="dir"> In YOUR-DIRECTORY&nbsp;
   <option value="av"> In the Web
   <option value="both"> In Both
</select>
4.2.

In search_results.html AND search_error.html templates add:

code:


<%if link_results2%>
<%link_results2%>
<%endif%>

That's it. Enjoy it. For installation of modifications please visit the webservices.


AnzeigemyShopping.de - Der Einkaufsführer im Internet!

Problems with installing or questions, visit the Gossamer-Threads Support Forum.


| Top