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

Three Wanted Mods

Quote Reply
Three Wanted Mods
Hello everyone!

Does anyone know if the following three mods are availiable or could be done?

1) Yahoo Sub-Categories (does the Links 2.0 version work?)

2) How to edit the way the category title looks in the search results page. I've searched around DBSQL.pm, etc. and can't find where to edit it (I just want to make the font normal with the rest of the site).

3) Add a bottom frame to jump.cgi (I've looked at it and with my basic CGI knowledge, I couldn't figure out to put the URL the visitor wants to visits into the top frame and a nice little frame at the bottom that has "Rate This Link", "Close Frame", "Back to Your Search", and a partner button.

I can explain more into this these if needed. God bless!


<><------------><>
Daniel
http://www.christian-search.net
<><------------><>
Quote Reply
Re: Three Wanted Mods In reply to
In Reply To:
1) Yahoo Sub-Categories (does the Links 2.0 version work?)
Widgetz wrote a Modification for Links SQL v.1.0, but it does not work with v1.11 and above. Search this forum for Subcategories Yahoo and you will find the Thread where the codes are posted.

In Reply To:
2) How to edit the way the category title looks in the search results page. I've searched around DBSQL.pm, etc. and can't find where to edit it (I just want to make the font normal with the rest of the site).
Look in the DB_Utils.pm or Search.pm files.

In Reply To:
3) Add a bottom frame to jump.cgi (I've looked at it and with my basic CGI knowledge, I couldn't figure out to put the URL the visitor wants to visits into the top frame and a nice little frame at the bottom that has "Rate This Link", "Close Frame", "Back to Your Search", and a partner button.
Search this forum for frameset...I provided codes that will work with Links SQL...basically a slight modification of the codes provided by Widgetz for Links 2.0 in the Links 2.0 Customization Forum.




Regards,

Eliot Lee
Quote Reply
Re: Three Wanted Mods In reply to
Thank you for your help and your quick reply!

Another mod: I love what Links SQL does with the header.txt and footer.txt and I want to combine that with WebAdverts to make it call a banner. WebAdverts provides a subroutine (below) and I placed it in HTML_Templates.pm at the bottom and then put a variable for it in the Globals so I could use it on every page. I went to build it and it gave me a Software Error saying:

HTML_Templates.pm: Compilation failed in require at nph-build.cgi line 33. BEGIN failed--compilation aborted at nph-build.cgi line 33.

here is the subroutine
sub insertadvert {
require "/full/path/to/ads_display.pl";
$adverts_dir = "/full/path/to/ads";
$display_cgi = "http://foo.com/ads/ads.pl";
$advertzone = "";
$ADVUseLocking = 1;
$ADVLogIP = 0;
$DefaultBanner = "";
$ADVNoPrint = 1;
$ADVQuery = "";
&ADVsetup;
}


thanks and God bless!

<><------------><>
Daniel
http://www.christian-search.net
<><------------><>
Quote Reply
Re: Three Wanted Mods In reply to
Just a guess, since I hit this early on (last summer) and worked around it by getting rid of the 'require' lines.

require "/full/path/to/ads_display.pl";

tells the compiler to go out, get the ads_display.pl file and parse/tokenize it and execute it right at that point. In retrospect, it might be that ads_display.pl is simply not compatible with use strict. Otherwise, the overall syntax of the file is not compatible with use strict.

You need to move to all programs to use strict/mod_perl compatible before they can be included or used within links.

The best thing to do is actually include that file in the subroutine, and modify it to work with use strict.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Three Wanted Mods In reply to
I used the same codes as I did for Links 2.0 with the WebAdverts code hack...and simply added a global value in the %GLOBALS hash:

Code:

banner => &insertadvert,


NOTE: If this is the last value in the HASH, then you do not need the comma.

Then I simply use:

Code:

<%banner%>


in my CGI generated template files (e.g., add.html, add_error.html, etc.).

Regards,

Eliot Lee
Quote Reply
Re: Three Wanted Mods In reply to
Ok, you've gone past my CGI knowledge.

So I do somethine like

include "/full/path/to/ads.pl";

and how to I make it use strict compatible?

thanks and God bless!

<><------------><>
Daniel
http://www.christian-search.net
<><------------><>
Quote Reply
Re: Three Wanted Mods In reply to
Basically strict means that you have to localize all variables in your scripts...

meaning that you have to add my in front of variables:

EXAMPLES:

my $variable = "something";

OR if you use the variable often in your scripts, then use the following codes:

Code:

my ($variable1, $variable2, $variable3);


There is definitely more to this, but this is the simple stuff that you must use in the Links SQL scripts and modules.

Regards,

Eliot Lee
Quote Reply
Re: Three Wanted Mods In reply to
Actually INCLUDE the code for the other_program.pl into the subroutine, and spiff it up for use strict.

This is a problem. It has to do with lexical scope, package spaces, name spaces, and all sorts of other things.

simple require file.pl lines don't seem to work. Any file 'required' still has to play by all the new rules.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ