Gossamer Forum
Home : Products : Links 2.0 : Customization :

Computer & Internet

Quote Reply
Computer & Internet
How can I add (Computer & Internet) This type of category to
my category list.

Quote Reply
Re: Computer & Internet In reply to
Read the following Threads:

http://www.gossamer-threads.com/...=&vc=1#Post30512

http://www.gossamer-threads.com/...=25&Old=allposts

Hope these help.

Regards,

Eliot Lee
Quote Reply
Re: Computer & Internet In reply to
I have read this thred
http://www.gossamer-threads.com/perl/forum/showthreaded.pl?Cat=&Board=L2Cust&Number=30512&page=0&view=&sb=&part=&vc=1

And I have edited following

Category => [4, 'alpha', 0, 150, 1, '', '^[\w\d,&'@/_-]',

and canot find
sub build_check_dir:

$chrs = quotemeta (",&'@/_-");



Quote Reply
Re: Computer & Internet In reply to
In Reply To:
sub build_check_dir
Look in your nph-build.cgi OR db_utils.pl file...

Regards,



Eliot Lee
Quote Reply
Re: Computer & Internet In reply to
I have done that But it gives me this
CGI ERROR
==========================================
Error Message : fatal error: Bad name after alpha' at /web/sites/155/laksearch/www.laksearch.f2s.com/cgi-bin/admin/links.def line 28.

Script Location : admin.cgi
Perl Version : 5.00503


So can you please check my files (links.def),(nph-build.txt)
http//:www.laksearch.f2s.com/links.txt

http//:www.laksearch.f2s.com/nph-build.txt

Quote Reply
Re: Computer & Internet In reply to
You need to change your Name field definition to the following:

Code:

Name => [2, 'alpha', 0, 150, 1, '', '^[\w\d,&'@/_-],


in the CATEGORY.DEF file, NOT in the links.def file.

The categories.db file is where the categories are stored. And the fields for the categories.db file are defined in the category.def as mentioned in the first thread I linked for you.

Wink

Regards,

Eliot Lee
Quote Reply
Re: Computer & Internet In reply to
I have added This to categary.def But stil getting error...

# Database Definition: CATEGORIES
# --------------------------------------------------------
# Definition of your database file.
Û_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [2, 'alpha', 0, 150, 1, '', '^[\w\d,&'@/_-]'],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Description' => [4, 'alpha', 40, 75, 0, '', ''],
'Meta Keywords' => [5, 'alpha', 40, 75, 0, '', ''],
Header => [6, 'alpha', 40, 75, 0, '', ''],
Footer => [7, 'alpha', 40, 75, 0, '', '']
);
====================================================


CGI ERROR
==========================================
Error Message : fatal error: Bad name after alpha' at /web/sites/155/laksearch/www.laksearch.f2s.com/cgi-bin/admin/category.def line 25.

Script Location : admin.cgi
Perl Version : 5.00503



Quote Reply
Re: Computer & Internet In reply to
Uh you did NOT copy the codes I gave you....

Look again...

Here are the codes I provided:

Code:

Name => [2, 'alpha', 0, 150, 1, '', '^[\w\d,&'@/_-],


And here are the codes you added:

Code:

Name => [2, 'alpha', 0, 150, 1, '', '^[\w\d,&'@/_-]'],


See the difference? Wink

Regards,

Eliot Lee
Quote Reply
Re: Computer & Internet In reply to
I have corrected that one but
# Database Definition: CATEGORIES
# --------------------------------------------------------
# Definition of your database file.
Û_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],


Name => [1, 'alpha', 0, 150, 1, '', '^[\w\d,&'@/_-],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Description' => [4, 'alpha', 40, 75, 0, '', ''],
'Meta Keywords' => [5, 'alpha', 40, 75, 0, '', ''],
Header => [6, 'alpha', 40, 75, 0, '', ''],
Footer => [7, 'alpha', 40, 75, 0, '', '']
);



========================================

CGI ERROR
==========================================
Error Message : fatal error: syntax error at /web/sites/155/laksearch/www.laksearch.f2s.com/cgi-bin/admin/category.def line 26, near "'^[\w\d,&'@/"

Script Location : admin.cgi
Perl Version : 5.00503



Quote Reply
Re: Computer & Internet In reply to
Try the following codes:

Code:

Name => [2, 'alpha', 0, 150, 1, '', '^[\w\d/_\&-]'],


If this does not work...the other solution is to use the Non-English Mod that allows accented characters, &, and other characters to appear in category names printed in the web pages.

This Mod is linked in the Resource Center.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: Computer & Internet In reply to
Your code is working
But when page bulding I get this error How can I avoid the error?

CGI ERROR
==========================================
Error Message : Invalid characters in category name: /Computer & Internet. Must contain only letters, numbers, _, / and -.
Script Location : nph-build.cgi
Perl Version : 5.00503



Quote Reply
Re: Computer & Internet In reply to
Change the following codes in the sub build_check_dir routine in the nph-build.cgi file:

Code:

if ($dir !~ m,^[\w\d$chrs]+$,) {


to the following codes:

Code:

if ($dir !~ m,^[\w\d/_\&/$chrs]+$,) {


Hope this works.

Regards,

Eliot Lee
Quote Reply
Re: Computer & Internet In reply to
I am getting same error message
I have put the code line

sub build_check_dir {
# --------------------------------------------------------
# Checks the directory before we create it to make sure there
# are no funncy characters in it.

my ($root, $dir) = @_;
my $chrs = quotemeta (",&'@/_-");

if (! -e $root) {
&cgierr ("Root directory: $root does not exist!");
}
if ($dir !~ m,^[\w\d/_\&/$chrs]+$,) {
&cgierr ("Invalid characters in category name: $dir. Must contain only letters, numbers, _, / and -.");
}
return $input;
}

1;













=====================================

CGI ERROR
==========================================
Error Message : Invalid characters in category name: /Computer & Internet. Must contain only letters, numbers, _, / and -.
Script Location : nph-build.cgi


Quote Reply
Re: Computer & Internet In reply to
Thank you very much for your support
I have corrected the error

I have deleted "^"
if ($dir !~ m,[\w\d/_\&/$chrs]+$,) {

Now it is working fine.

Thanks.



Quote Reply
Re: Computer & Internet In reply to
Now I have new error when I go to add site It desplaying this message. please help me.

Category: error building select field: no select fields specified in config for field 'Category'!

Quote Reply
Re: Computer & Internet In reply to
 

I Have done ...... Thanks for Helping me

Quote Reply
Re: Computer & Internet In reply to
You're welcome.

Regards,

Eliot Lee
Quote Reply
Re: Computer & Internet In reply to
PLEASE TELL ME WHAT YOU DID!!!!!