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

HELP With Link SQL - yahoo

Quote Reply
HELP With Link SQL - yahoo
Please someone tell me how can I use Yahoo template with Link SQL?

I am getting lots of Unknow Tags!!

Thank you so much in advance for your help!!!!!
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
What tags are "unknown"?

Did you configure the database correctly?

The site_html_templates.pl has to be incorporated into the HTML_templates.pl file.

Quote Reply
Re: HELP With Link SQL - yahoo In reply to
I transfered
site_html_templates.pl-->HTML_Templates.pm

and

templates.cfg-->Links.pm and it works fine!!

Thanks!!
This is the first changes that I made and it's just a great stuff!! By the way I know nothing about Perl!! Smile)) and great ha?

Thanks Alex Smile)
Cheerrrrrrrrrrsssssssss!!!!
Have a good day!!
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
I have a similar problem with Yahoo templates. Where there are unknown tags, big blue boxes in the border and unknown tags there also.

Does the above fix imply just copying and pasting templates.cfg into Links.pm? If so, does it matter where it gets copied to, top or bottom of Links.pm file?

Same question on copying site_html_templates.pl apply the same way, a copy and paste? Top or bottom of HTML_Templates.pm or deosn't matter in both cases?

Thanks,

Dave
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
You need to take the %globals array you have
in your site_templates_html file and copy them to the %GLOBALS array at the top of the HTML_Templates.pm file.

You _ALSO_ need to copy any variable definitions to the file ABOVE the %GLOBALS array, and define each of them with 'my'

That defines the variables, then makes them available in the %GLOBAL array (note the case change).

It's a fairly simple thing.

site_templates_html was replaced by the HTML_Templates.pm file, so you just define the variables there, and add them to the array.

Because of use strict, you just can't include them in a file... you need to put them in the file.
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
Pugdog,

Thanks, I'm not much of a programmer yet. I know it's wrong below because if previewing the templates I get too many errors in HTML_Templates.pm. What did I do wrong, please?

Thanks, Dave


# ==============================================================
# -------------
# Links SQL
# -------------
# Links Manager
#
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 1.1
#
# COPYRIGHT NOTICE:
#
# Copyright 1999 Gossamer Threads Inc. All Rights Reserved.
# No redistribution of this script may be made without prior
# written consent.
#
# By using this program you agree to indemnify Gossamer Threads
# Inc. from any liability.
#
# Please see the README for full license details.
#
# ==============================================================

package Links::HTML_Templates;
# -------------
# Links
# -------------
# Links Template Manager
#
# File: templates.cfg
# Description: Contains all the setup variables.
# Author: Nicholas Clark
# Email: ceglobe@ceglobe.com
# Web: http://www.ceglobe.com/
# Version: 2.0b5
#
# Uses Links 2.0 by,
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Stuff that will change the look of all the pages

$build_site_title = 'my''PA SEEK';

# Originally a teal color
$color1 = 'my''#a0b8c8';

# Originally a yellow color. Seen on home page.
$color2 = 'my''#ffffcc';

# Originally a gray color. Background for news and features on home page.
$color3 = 'my''#dcdcdc';

# Originally a light gray color. Used as background for the Site Menu on the pages except home.
$color4 = 'my''#EEEEEE';

# Originally a dark gray color. Border around the site menu.
$color5 = 'my''#808080';

# Originally a semi-light gray color. Border around the special links table.
$color6 = 'my''#cccc99';

# Originally a khaki color. Right on top of the special links table.
$color7 = 'my''#cccccc';

# Goes on the right of every page but home page. Links to special pages on your site

$special1 = 'my''PA Events Add yours Free';
$special_url1 = 'my''http://www.pavisnet.com/guestcal';

$special2 = 'my''Pennsylvania Weather';
$special_url2 = 'my''http://iwin.nws.noaa.gov/iwin/pa/pa.html';

$special3 = 'my''Pennsylvania Historical and Museums';
$special_url3 = 'my''http://www.state.pa.us/PA_Exec/Historical_Museum/';

$special4 = 'my''Pennsylvania Law and Government';
$special_url4 = 'my''http://www.lawresearch.com/v2/cspa.htm';

# Logos - Logob is on the homepage, logos is the small logo on the top left of every other page

#$logob = 'my''http://205.146.26.179/pages/ECW6.gif';
$logos = 'my''http://www.paseek.com/pages/paseek.gif';

# Near the bottom on all the pages but the home page

$event = 'my''Top HOT Links';
$event_desc = 'my''Top Rated Links!';
$event_url = 'my''http://www.paseek.com/Ratings/index.html';

# Goes on the bottom of all pages

$copyright = 'my''Copyright © 1999 Business Ad Net, Inc.!';

# Right Column on the Home Page - Marketplace

$news1 = 'my''Highland Country Farms';
$news_url1 = 'my''http://www.highlandcountryfarms.com';

$news2 = 'my''Factory Supply Company';
$news_url2 = 'my''http://www.factorysupplycompany.com';

$news3 = 'my''';
$news_url3 = 'my''';

$news4 = 'my''';
$news_url4 = 'my''';


# Right Column on the Home Page - Featured Links

$feature1 = 'my''CENTURY 21 Krall Real Estate';
$feature_url1 = 'my''http://www.c21krall.com';
$feature_desc1 = 'my'' - Lebanon Valley, Properties Online, Lots and Land, Commercial & Apartments';

$feature2 = 'my''East Coast Web';
$feature_url2 = 'my''http://www.eastcoastweb.com';
$feature_desc2 = 'my'' - Web Site Design, Virtual Hosting, CGI Scripts, Server Collocation & Administration';

$feature3 = 'my''Pennsylvania Visitors Network';
$feature_url3 = 'my''http://www.pavisnet.com';
$feature_desc3 = 'my'' - The states largest site focused on travel, tourism and recreation in Pennsylvania';

$feature4 = 'my''';
$feature_url4 = 'my''';
$feature_desc4 = 'my'' - ';

#$feature_more = 'my''more...';
#$feature_more_url = 'my''';

#Top of Home Page

$highlight1 = 'my''Pennsylvania Web Site';
$highlight_url1 = 'my''http://www.state.pa.us';
$highlight_desc1 = 'my''Visit us Often';

$highlight2 = 'my''Made In PA';
$highlight_url2 = 'my''http://www.madeinpa.com';
$highlight_desc2 = 'my''Explore the wealth of products made right here in Pennsylvania';

1;

[snipped]


[This message has been edited by Alex (edited December 09, 1999).]
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
I think I have them in the correct place in the HTML_Templates.pm file now, but still get compilation errors as follows.

Software error:
[Thu Dec 9 20:38:17 1999] HTML_Templates.pm: [Thu Dec 9 20:38:17 1999] HTML_Templates.pm: admin/Links/HTML_Templates.pm has too many errors. BEGIN failed--compilation aborted at /usr/u1/dave/paseek/cgi-bin/search/page.cgi line 34.

Any clues?

Thanks,

Dave
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
I snipped out the main chunk of it, but you need to preface all the new variables you added with my(). So instead of:

# Originally a teal color
$color1 = 'my''#a0b8c8';

use:

# Originally a teal color
my $color1 = 'my''#a0b8c8';

That should do the trick,

Cheers,

Alex
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
Alex,

That didn't do it.

Does the 2nd 'my' in my cfg belong there or not?

Software error:
[Thu Dec 9 22:17:56 1999] HTML_Templates.pm: [Thu Dec 9 22:17:56 1999] HTML_Templates.pm: admin/Links/HTML_Templates.pm has too many errors. BEGIN failed--compilation aborted at /usr/u1/dave/paseek/cgi-bin/search/page.cgi line 34.

Thanks,

Dave
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
For what it's worth, here is the part of the HTML_Templates.pm file that matters.

Dave


package Links::HTML_Templates;
# ===============================================================
use strict;
use vars qw(%GLOBALS %USERS @EXPORT @ISA);
use Carp;
use lib '..';
use Links;
use Links: B_Utils;
use Exporter ();
@ISA = qw(Exporter);
@EXPORT = qw/&site_html_link &site_html_home &site_html_new &site_html_cool &site_html_detailed &site_html_category &site_html_ratings
&site_html_add_form &site_html_add_success &site_html_add_failure &site_html_modify_form &site_html_modify_success &site_html_modify_failure
&site_html_search_results &site_html_search_failure &site_html_search_form
&site_html_mailing &site_html_mailing_error
&site_html_rate_form &site_html_rate_success &site_html_rate_failure
&site_html_login_form &site_html_login_success
&site_html_signup_form &site_html_signup_success
&site_html_validate_form &site_html_validate_success
&site_html_error &site_html_maintainer &site_html_print_cat
%USERS %GLOBALS/;

#Original Templates.cfg stuff below
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Stuff that will change the look of all the pages

my $build_site_title = 'my''PA SEEK';

# Originally a teal color
my $color1 = 'my''#a0b8c8';

# Originally a yellow color. Seen on home page.
my $color2 = 'my''#ffffcc';

# Originally a gray color. Background for news and features on home page.
my $color3 = 'my''#dcdcdc';

# Originally a light gray color. Used as background for the Site Menu on the pages except home.
my $color4 = 'my''#EEEEEE';

# Originally a dark gray color. Border around the site menu.
my $color5 = 'my''#808080';

# Originally a semi-light gray color. Border around the special links table.
my $color6 = 'my''#cccc99';

# Originally a khaki color. Right on top of the special links table.
my $color7 = 'my''#cccccc';

# Goes on the right of every page but home page. Links to special pages on your site

my $special1 = 'my''PA Events Add yours Free';
my $special_url1 = 'my''http://www.pavisnet.com/guestcal';

my $special2 = 'my''Pennsylvania Weather';
my $special_url2 = 'my''http://iwin.nws.noaa.gov/iwin/pa/pa.html';

my $special3 = 'my''Pennsylvania Historical and Museums';
my $special_url3 = 'my''http://www.state.pa.us/PA_Exec/Historical_Museum/';

my $special4 = 'my''Pennsylvania Law and Government';
my $special_url4 = 'my''http://www.lawresearch.com/v2/cspa.htm';

# Logos - Logob is on the homepage, logos is the small logo on the top left of every other page

my $logob = 'my''';
my $logos = 'my''http://www.paseek.com/pages/paseek.gif';

# Near the bottom on all the pages but the home page

my $event = 'my''Top HOT Links';
my $event_desc = 'my''Top Rated Links!';
my $event_url = 'my''http://www.paseek.com/Ratings/index.html';

# Goes on the bottom of all pages

my $copyright = 'my''Copyright © 1999 Business Ad Net, Inc.!';

# Right Column on the Home Page - Marketplace

my $news1 = 'my''Highland Country Farms';
my $news_url1 = 'my''http://www.highlandcountryfarms.com';

my $news2 = 'my''Factory Supply Company';
my $news_url2 = 'my''http://www.factorysupplycompany.com';

my $news3 = 'my''';
my $news_url3 = 'my''';

my $news4 = 'my''';
my $news_url4 = 'my''';


# Right Column on the Home Page - Featured Links

my $feature1 = 'my''CENTURY 21 Krall Real Estate';
my $feature_url1 = 'my''http://www.c21krall.com';
my $feature_desc1 = 'my'' - Lebanon Valley, Properties Online, Lots and Land, Commercial & Apartments';

my $feature2 = 'my''East Coast Web';
my $feature_url2 = 'my''http://www.eastcoastweb.com';
my $feature_desc2 = 'my'' - Web Site Design, Virtual Hosting, CGI Scripts, Server Collocation & Administration';

my $feature3 = 'my''Pennsylvania Visitors Network';
my $feature_url3 = 'my''http://www.pavisnet.com';
my $feature_desc3 = 'my'' - The states largest site focused on travel, tourism and recreation in Pennsylvania';

my $feature4 = 'my''';
my $feature_url4 = 'my''';
my $feature_desc4 = 'my'' - ';

my $feature_more = 'my''more...';
my $feature_more_url = 'my''';

#Top of Home Page

my $highlight1 = 'my''Pennsylvania Web Site';
my $highlight_url1 = 'my''http://www.state.pa.us';
my $highlight_desc1 = 'my''Visit us Often';

my $highlight2 = 'my''Made In PA';
my $highlight_url2 = 'my''http://www.madeinpa.com';
my $highlight_desc2 = 'my''Explore the wealth of products made right here in Pennsylvania';

1;

# ----------------------------------------------------------------------
# The HTML in this file and the style sheet (links.css) have been authored
# by Chris Croome of webarchitects.
#
# Email: chris@atomism.demon.co.uk
# Web: http://www.webarchitects.co.uk/
# ----------------------------------------------------------------------

# You can put variables here that you would like to use in any
# of your templates.

%GLOBALS = (
date => \&Links: BSQL::get_date,
time => \&Links: BSQL::get_time,
db_cgi_url => $LINKS{db_cgi_url},
build_root_url => $LINKS{build_root_url},
site_title => $LINKS{build_site_title},
css => $LINKS{build_css_url},
banner => ''
color1 => $color1,
color2 => $color2,
color3 => $color3,
color4 => $color4,
color5 => $color5,
color6 => $color6,
color7 => $color7,

special1 => $special1,
special2 => $special2,
special3 => $special3,
special4 => $special4,
special_url1 => $special_url1,
special_url2 => $special_url2,
special_url3 => $special_url3,
special_url4 => $special_url4,

logob => $logob,
logos => $logos,

event => $event,
event_url => $event_url,
event_desc => $event_desc,

copyright => $copyright,

feature1 => $feature1,
feature2 => $feature2,
feature3 => $feature3,
feature4 => $feature4,
feature_desc1 => $feature_desc1,
feature_desc2 => $feature_desc2,
feature_desc3 => $feature_desc3,
feature_desc4 => $feature_desc4,
feature_url1 => $feature_url1,
feature_url2 => $feature_url2,
feature_url3 => $feature_url3,
feature_url4 => $feature_url4,
feature_more => $feature_more,
feature_more_url => $feature_more_url,

news1 => $news1,
news2 => $news2,
news3 => $news3,
news4 => $news4,
news_url1 => $news_url1,
news_url2 => $news_url2,
news_url3 => $news_url3,
news_url4 => $news_url4,
news_more => $news_more,
news_more_url => $news_more_url,

highlight1 => $highlight1,
highlight2 => $highlight2,
highlight_url1 => $highlight_url1,
highlight_url2 => $highlight_url2,
highlight_desc1=> $highlight_desc1,
highlight_desc2=> $highlight_desc2
);


sub site_html_link {

# --------------------------------------------------------
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
Removed 2nd 'my'

New error:

Software error:
[Thu Dec 9 22:58:43 1999] HTML_Templates.pm: syntax error at admin/Links/HTML_Templates.pm line 171, near "color1" BEGIN failed--compilation aborted at /usr/u1/dave/paseek/cgi-bin/search/page.cgi line 34.

Doesn't like color1 for some reasom. Doesn't like me either. Smile

Thanks,

Dave

Quote Reply
Re: HELP With Link SQL - yahoo In reply to
Code:
my $news1 = 'my''Highland Country Farms';
my $news_url1 = 'my''http://www.highlandcountryfarms.com';

my $news2 = 'my''Factory Supply Company';
my $news_url2 = 'my''http://www.factorysupplycompany.com';

my $news3 = 'my''';
my $news_url3 = 'my''';

my $news4 = 'my''';
my $news_url4 = 'my''';

The only place you put 'my' is in front of the $variable name, on the LEFT side of the equal sign. Don't put it on the right!!

Code:
my $news1 = 'Highland Country Farms';
my $news_url1 = 'http://www.highlandcountryfarms.com';

my $news2 = 'Factory Supply Company';
my $news_url2 = 'http://www.factorysupplycompany.com';

my $news3 = '';
my $news_url3 = '';

my $news4 = '';
my $news_url4 = '';

Also, the 1; line is unnecessary, and should be removed.



[This message has been edited by pugdog (edited December 09, 1999).]
Quote Reply
Re: HELP With Link SQL - yahoo In reply to
Pugdog,

Here is the latest file. I don't see the error that is being caused.

Error:
Software error:
[Thu Dec 9 23:23:27 1999] HTML_Templates.pm: Compilation failed in require at /usr/u1/dave/paseek/cgi-bin/search/page.cgi line 34. BEGIN failed--compilation aborted at /usr/u1/dave/paseek/cgi-bin/search/page.cgi line 34.

Dave

#Original Templates.cfg stuff below
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Stuff that will change the look of all the pages

my $build_site_title = 'PA SEEK';

# Originally a teal color
my $color1 = '#a0b8c8';

# Originally a yellow color. Seen on home page.
my $color2 = '#ffffcc';

# Originally a gray color. Background for news and features on home page.
my $color3 = '#dcdcdc';

# Originally a light gray color. Used as background for the Site Menu on the pages except home.
my $color4 = '#EEEEEE';

# Originally a dark gray color. Border around the site menu.
my $color5 = '#808080';

# Originally a semi-light gray color. Border around the special links table.
my $color6 = '#cccc99';

# Originally a khaki color. Right on top of the special links table.
my $color7 = '#cccccc';

# Goes on the right of every page but home page. Links to special pages on your site

my $special1 = 'PA Events Add yours Free';
my $special_url1 = 'http://www.pavisnet.com/guestcal';

my $special2 = 'Pennsylvania Weather';
my $special_url2 = 'http://iwin.nws.noaa.gov/iwin/pa/pa.html';

my $special3 = 'Pennsylvania Historical and Museums';
my $special_url3 = 'http://www.state.pa.us/PA_Exec/Historical_Museum/';

my $special4 = 'Pennsylvania Law and Government';
my $special_url4 = 'http://www.lawresearch.com/v2/cspa.htm';

# Logos - Logob is on the homepage, logos is the small logo on the top left of every other page

my $logob = '';
my $logos = 'http://www.paseek.com/pages/paseek.gif';

# Near the bottom on all the pages but the home page

my $event = 'Top HOT Links';
my $event_desc = 'Top Rated Links!';
my $event_url = 'http://www.paseek.com/Ratings/index.html';

# Goes on the bottom of all pages

my $copyright = 'Copyright © 1999 Business Ad Net, Inc.!';

# Right Column on the Home Page - Marketplace

my $news1 = 'Highland Country Farms';
my $news_url1 = 'http://www.highlandcountryfarms.com';

my $news2 = 'Factory Supply Company';
my $news_url2 = 'http://www.factorysupplycompany.com';

my $news3 = '';
my $news_url3 = '';

my $news4 = '';
my $news_url4 = '';

my $news_more = '';
my $mews_more_url = '';


# Right Column on the Home Page - Featured Links

my $feature1 = 'CENTURY 21 Krall Real Estate';
my $feature_url1 = 'http://www.c21krall.com';
my $feature_desc1 = ' - Lebanon Valley, Properties Online, Lots and Land, Commercial & Apartments';

my $feature2 = 'East Coast Web';
my $feature_url2 = 'http://www.eastcoastweb.com';
my $feature_desc2 = ' - Web Site Design, Virtual Hosting, CGI Scripts, Server Collocation & Administration';

my $feature3 = 'Pennsylvania Visitors Network';
my $feature_url3 = 'http://www.pavisnet.com';
my $feature_desc3 = ' - The states largest site focused on travel, tourism and recreation in Pennsylvania';

my $feature4 = '';
my $feature_url4 = '';
my $feature_desc4 = ' - ';

my $feature_more = 'more...';
my $feature_more_url = '';

#Top of Home Page

my $highlight1 = 'Pennsylvania Web Site';
my $highlight_url1 = 'http://www.state.pa.us';
my $highlight_desc1 = 'Visit us Often';

my $highlight2 = 'Made In PA';
my $highlight_url2 = 'http://www.madeinpa.com';
my $highlight_desc2 = 'Explore the wealth of products made right here in Pennsylvania';


# ----------------------------------------------------------------------
# The HTML in this file and the style sheet (links.css) have been authored
# by Chris Croome of webarchitects.
#
# Email: chris@atomism.demon.co.uk
# Web: http://www.webarchitects.co.uk/
# ----------------------------------------------------------------------

# You can put variables here that you would like to use in any
# of your templates.

%GLOBALS = (
date => \&Links: BSQL::get_date,
time => \&Links: BSQL::get_time,
db_cgi_url => $LINKS{db_cgi_url},
build_root_url => $LINKS{build_root_url},
site_title => $LINKS{build_site_title},
css => $LINKS{build_css_url},
banner => '',

color1 => $color1,
color2 => $color2,
color3 => $color3,
color4 => $color4,
color5 => $color5,
color6 => $color6,
color7 => $color7,

special1 => $special1,
special2 => $special2,
special3 => $special3,
special4 => $special4,
special_url1 => $special_url1,
special_url2 => $special_url2,
special_url3 => $special_url3,
special_url4 => $special_url4,

logob => $logob,
logos => $logos,

event => $event,
event_url => $event_url,
event_desc => $event_desc,

copyright => $copyright,

feature1 => $feature1,
feature2 => $feature2,
feature3 => $feature3,
feature4 => $feature4,
feature_desc1 => $feature_desc1,
feature_desc2 => $feature_desc2,
feature_desc3 => $feature_desc3,
feature_desc4 => $feature_desc4,
feature_url1 => $feature_url1,
feature_url2 => $feature_url2,
feature_url3 => $feature_url3,
feature_url4 => $feature_url4,
feature_more => $feature_more,
feature_more_url => $feature_more_url,

news1 => $news1,
news2 => $news2,
news3 => $news3,
news4 => $news4,
news_url1 => $news_url1,
news_url2 => $news_url2,
news_url3 => $news_url3,
news_url4 => $news_url4,
news_more => $news_more,
news_more_url => $news_more_url,

highlight1 => $highlight1,
highlight2 => $highlight2,
highlight_url1 => $highlight_url1,
highlight_url2 => $highlight_url2,
highlight_desc1=> $highlight_desc1,
highlight_desc2=> $highlight_desc2
);


sub site_html_link {

# --------------------------------------------------------


Quote Reply
Re: HELP With Link SQL - yahoo In reply to
Thanks all,

I found it.

news_more was mews_more m instead of n

Geeesss & good grief. Smile

Thanks again and if I can get the graphics in I should be set. Until next problem occurs. Smile

Dave