Gossamer Forum
Home : Products : Links 2.0 : Customization :

add_error.html

Quote Reply
add_error.html
where i can find the following item:
Title (Can not be left blank)
URL (Can not be left blank)
Category (Can not be left blank)
Contact Name (Can not be left blank)
Contact Email (Can not be left blank)

I need to traslate it:)

thank u


Quote Reply
Re: add_error.html In reply to
Open db_utils.pl go to sub validate_record and edit the revlevent pieces in that sub (ie. the comments it gives out such as $col (Can not be left blank))


Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: add_error.html In reply to
ok thank u i have found it but can't see :
title
url
category
contact name
...

Always about add_error.html

Quote Reply
Re: add_error.html In reply to
i need to know also how i can traslate the date of new section

Quote Reply
Re: add_error.html In reply to
hi dlc2000,

well the:
title
url
category
contact name

are in the links.def file...

but if you change this you have to change 80-90% of your templates & scripts..

believe me it's a hard work...

ciao
nicky
German Links Version
http://nicky.net/links
Quote Reply
Re: add_error.html In reply to
ok thanks and about the data of new link in the link section?

rgds

Quote Reply
Re: add_error.html In reply to
hi,

open links.cfg:


Code:
sub date_to_unix {

my $date = shift; my $i;
my %months = map { $_ => $i++ } qw!Jan Feb Mar Apr Mai Jun Jul Aug Sep Okt Nov Dez!;
my ($day, $mon, $year) = split(/-/, $date);

exists $months{$mon} or return undef;
$day = int($day); $year = $year - 1900;

require Time::Local;
my $time = 0;
eval {
$time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
};
if ($@) { die "Ungültiges Datum Format: $date - parsed as (day: $day, month: $months{$mon}, year: $year). Grund: $@"; }
return $time;
}

sub unix_to_date {

my $time = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Jan Feb Mar Apr Mai Jun Jul Aug Sep Okt Nov Dez!;
$year = $year + 1900;
return "$day-$months[$mon]-$year";
}

sub long_date {

my $time = shift;
$time = &date_to_unix ($time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Januar Februar Maerz April Mai Juni Juli August September Oktober November Dezember!;
my @days = qw!Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag!;
$year = $year + 1900;
return "$days[$dweek], $day $months[$mon] $year";
}
you will see the german monthname & weekdays..
and it will be set to european date format:
short: dd-mmm-yyy
long: dayname, dd-mmm-yyyy

ciao
nicky
German Links Version
http://nicky.net/links
Quote Reply
Re: add_error.html In reply to
ok ricky i will try but seem to be very hard i not have undestand so good, if u can be more clear...
I must traslate evrithing that i see in english day month or what i must change?

Any idea where is "did not specify link to modify " ??:)

Thank u very much!!

Quote Reply
Re: add_error.html In reply to
hi,

just replace the english months short & longnames to italian language, the same with the day names..

than change

return "$days[$dweek], $months[$mon] $day $year";

to

return "$days[$dweek], $day $months[$mon] $year";

to have european date format.

"did not specify link to modify"
you can find it in modify.cgi at
sub process_form {

greetings from vienna

ciao
nicky
German Links Version
http://nicky.net/links
Quote Reply
Re: add_error.html In reply to
Hi nicky,
i have change the script, but i dont know if all is correct bcs there are a lot of poit that i dont know if can change it, so could u see if evrything i correct?
Thank u

sub date_to_unix {
# --------------------------------------------------------
# This routine must take your date format and return the time a la UNIX time().
# Some things to be careful about..
# timelocal does not like to be in array context, don't do my($time) = timelocal (..)
# int your values just in case to remove spaces, etc.
# catch the fatal error timelocal will generate if you have a bad date..
# don't forget that the month is indexed from 0!
#
my $date = shift; my $i;
my %months = map { $_ => $i++ } qw!Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic!;
my ($gio, $mes, $anno) = split(/-/, $date);

exists $months{$mes} or return undef;
$gio = int($gio); $anno = $anno - 1900;

require Time::Local;
my $time = 0;
eval {
$time = &Time::Local::timelocal(0,0,0, $giorno, $mese{$mes}, $anno);
};
if ($@) { die "invalid date format: $date - parsed as (day: $gio, mese: $months{$mes}, anno: $anno). Reason: $@"; }
return $time;
}

sub unix_to_date {
# --------------------------------------------------------
# This routine must take a unix time and return your date format
# A much simpler routine, just make sure your format isn't so complex that
# you can't get it back into unix time.
#
my $time = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic!;
$year = $year + 1900;
return "$giorno-$mese[$mes]-$anno";
}

sub long_date {
# --------------------------------------------------------
# This routine is for printing a nicer date format on the what's new page. It should
# take in a date in your current format and return a new one.
my $time = shift;
$time = &date_to_unix ($time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Gennaio Febbraio Marzo Aprile Mggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre!;
my @days = qw!Domenica Lunedi Martedi Mercoledi Giovedi Venerdi Sabato!;
$year = $year + 1900;
return "$giorno[$dweek], $mese[$mes] $giorno $anno";

Quote Reply
Re: add_error.html In reply to
hi Claudio,

do not change the variables like "$gio, $mes, $anno"

live it in english language

this is correct
Code:
my %months = map { $_ => $i++ } qw!Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic!;
my @months = qw!Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic!;
my @months = qw!Gennaio Febbraio Marzo Aprile Mggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre!;
my @months = qw!Gennaio Febbraio Marzo Aprile Mggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre!;
all other things revert to the original..

ciao
nicky
German Links Version
http://nicky.net/links
Quote Reply
Re: add_error.html In reply to
i can't find this 4th line (my @months = qw!Gennaio Febbraio Marzo Aprile Mggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre!;) maybe u have write it 2 times, and i have change it with italian days...
And the format of the date seem to be for default on european date, i not have change nothing of this

again thanks

Quote Reply
Re: add_error.html In reply to
All ok about the data, many thanks!!
I would customize the list of the links that will displayed on the site when u click on a catgory, how i can do?

thanks

Quote Reply
Re: add_error.html In reply to
Code:
Edit /templates/link.html
/templates/category.html
Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: add_error.html In reply to
damn this forum is really great!!

thanks to all

Quote Reply
Re: add_error.html In reply to
No worries.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: add_error.html In reply to
Sorry,
i am thinking, with link.html i can change only the section of rate vote hits etc, and if i would change the disposition of the desciprion and of the title of the links (example see http://www.linkworld.ws/Downloads/Antivirus/ ), how i can do?

thanks

Quote Reply
Re: add_error.html In reply to
Sorry I'm not sure what you mean.

To change the title/description you need to edit the links in links.db either using modify.cgi or the admin area.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: add_error.html In reply to
try to see this site:
http://www.linkworld.ws/Downloads/Antivirus/

i would like a similar situation with colours and as u see the rating, hits vote are up and the description is down..

Quote Reply
Re: add_error.html In reply to
I already said - edit link.html

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: add_error.html In reply to
hi Claudio,

make backup of your links.cfg:
and
just replace your date variables with this...

Code:
sub date_to_unix {
# --------------------------------------------------------
# This routine must take your date format and return the time a la UNIX time().
# Some things to be careful about..
# timelocal does not like to be in array context, don't do my($time) = timelocal (..)
# int your values just in case to remove spaces, etc.
# catch the fatal error timelocal will generate if you have a bad date..
# don't forget that the month is indexed from 0!
#
my $date = shift; my $i;
my %months = map { $_ => $i++ } qw!Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic!;
my ($day, $mon, $year) = split(/-/, $date);

exists $months{$mon} or return undef;
$day = int($day); $year = $year - 1900;

require Time::Local;
my $time = 0;
eval {
$time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
};
if ($@) { die "invalid date format: $date - parsed as (day: $day, month: $months{$mon}, year: $year). Reason: $@"; }
return $time;
}

sub unix_to_date {
# --------------------------------------------------------
# This routine must take a unix time and return your date format
# A much simpler routine, just make sure your format isn't so complex that
# you can't get it back into unix time.
#
my $time = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic!;
$year = $year + 1900;
return "$day-$months[$mon]-$year";
}

sub long_date {
# --------------------------------------------------------
# This routine is for printing a nicer date format on the what's new page. It should
# take in a date in your current format and return a new one.
my $time = shift;
$time = &date_to_unix ($time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Gennaio Febbraio Marzo Aprile Mggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre!;
my @days = qw!Domenica Lunedi Martedi Mercoledi Giovedi Venerdi Sabato!;
$year = $year + 1900;
return "$days[$dweek], $day $months[$mon] $year";
}
ciao
nicky
German Links Version
http://nicky.net/links
Quote Reply
Re: add_error.html In reply to
Many thanks nicky but i have done it already:)
I thought... i need the start category in my index.html page but how i can add it in my home page if all category are located in www.namesite.com/category/ ?? When i will build all the system will make always in category directory

thank u in advance

Quote Reply
Re: add_error.html In reply to
Any help for my last post?

thank u