When I add a new category with "&" ampersand symbol, I got invalid... Please help
I've asked my self the same question about two months ago, then spent few hours trying to make it possible, but gave it up.
I guess, it's just UNIX system does not allow you to have this option. May be it's possible on Windows 95/98 servers, but I'm not sure.
Regards,
Pasha
------------------
webmaster@find.virtualave.net
http://find.virtualave.net
I guess, it's just UNIX system does not allow you to have this option. May be it's possible on Windows 95/98 servers, but I'm not sure.
Regards,
Pasha
------------------
webmaster@find.virtualave.net
http://find.virtualave.net
Mar 10, 1999, 4:14 PM
Novice (39 posts)
Mar 10, 1999, 4:14 PM
Post #4 of 19
Views: 6634
After I modified to
---------------------------------
my $chrs = quotemeta ("/_&-");
---------------------------------
I still get this message:
Error: Unable to Add Category
There were problems with the following fields:
Name (Invalid format)
Please fix any errors and submit the record again.
[This message has been edited by sitedex (edited March 10, 1999).]
---------------------------------
my $chrs = quotemeta ("/_&-");
---------------------------------
I still get this message:
Error: Unable to Add Category
There were problems with the following fields:
Name (Invalid format)
Please fix any errors and submit the record again.
[This message has been edited by sitedex (edited March 10, 1999).]
Mar 11, 1999, 8:09 PM
Veteran / Moderator (3111 posts)
Mar 11, 1999, 8:09 PM
Post #6 of 19
Views: 6639
Mar 12, 1999, 1:06 PM
User (124 posts)
Mar 12, 1999, 1:06 PM
Post #8 of 19
Views: 6670
I Cant FINE The LINE YOU said there... I m using Version 1.11
=============
This is what I have
=============
$path .= "/$dir";
&build_check_dir ("$build_root_path$path");
if (! (-e "$build_root_path$path")) {
print "\tMaking Directory ($build_dir_per): '$build_root_path$path' ...";
if (mkdir ("$build_root_path$path", "$build_dir_per")) {;
print "Made. CHMOD $build_dir_per ...";
if (chmod ("$build_dir_per", "$build_root_path$path")) {;
print "Done.";
}
else { print "CHMOD $build_dir_per failed! Reason: $!."; }
}
else { print "mkdir failed! Reason: $!."; }
print "\n";
}
}
return "$build_root_path$path";
============================
I dont see anything about (\_) Somethign like that...
Help me! Thanks
------------------
WebKing
WebKing@trisoft.net
http://www.trisoft.net
My ICQ # 25356171
=============
This is what I have
=============
$path .= "/$dir";
&build_check_dir ("$build_root_path$path");
if (! (-e "$build_root_path$path")) {
print "\tMaking Directory ($build_dir_per): '$build_root_path$path' ...";
if (mkdir ("$build_root_path$path", "$build_dir_per")) {;
print "Made. CHMOD $build_dir_per ...";
if (chmod ("$build_dir_per", "$build_root_path$path")) {;
print "Done.";
}
else { print "CHMOD $build_dir_per failed! Reason: $!."; }
}
else { print "mkdir failed! Reason: $!."; }
print "\n";
}
}
return "$build_root_path$path";
============================
I dont see anything about (\_) Somethign like that...
Help me! Thanks
------------------
WebKing
WebKing@trisoft.net
http://www.trisoft.net
My ICQ # 25356171
Mar 12, 1999, 1:34 PM
Enthusiast (832 posts)
Mar 12, 1999, 1:34 PM
Post #9 of 19
Views: 6643
Webking,
It is at the very bottom. Here is the code. I haven't tested it yet, need to try and if it works now.
Thank You, CE GLobe
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;
It is at the very bottom. Here is the code. I haven't tested it yet, need to try and if it works now.
Thank You, CE GLobe
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;
Mar 12, 1999, 7:11 PM
User (124 posts)
Mar 12, 1999, 7:11 PM
Post #14 of 19
Views: 6637
By the way, GREAT SITE!
humm. What else can I say??
CE Globe : How did you make those Main Categories with BOLD and LARGER TEXT ??
And How DID you eliminate Those words NEW and NUMBER of links on the main page??
Please Show me how thanks
mine is at http://www.trisoft.net/cgi-bin/search/
Thanks again!
------------------
WebKing
WebKing@trisoft.net
http://www.trisoft.net
My ICQ # 25356171
humm. What else can I say??
CE Globe : How did you make those Main Categories with BOLD and LARGER TEXT ??
And How DID you eliminate Those words NEW and NUMBER of links on the main page??
Please Show me how thanks
mine is at http://www.trisoft.net/cgi-bin/search/
Thanks again!
------------------
WebKing
WebKing@trisoft.net
http://www.trisoft.net
My ICQ # 25356171
Mar 12, 1999, 7:20 PM
User (124 posts)
Mar 12, 1999, 7:20 PM
Post #15 of 19
Views: 6681
IT S NOT WORKING YO!
DELETE THOSE LAST LINES and REPLaCed to yours!
GOT BUNCH OF ERRORS!
What can I DO?? I REPLACED the OLD ONES!
NO MORE Errors w/ the one ones hehehe
Let me ask JOHN MURPHY!
www.yahoosuck.com
HE Has it running
heh later
------------------
WebKing
WebKing@trisoft.net
http://www.trisoft.net
My ICQ # 25356171
DELETE THOSE LAST LINES and REPLaCed to yours!
GOT BUNCH OF ERRORS!
What can I DO?? I REPLACED the OLD ONES!
NO MORE Errors w/ the one ones hehehe
Let me ask JOHN MURPHY!
www.yahoosuck.com
HE Has it running
heh later
------------------
WebKing
WebKing@trisoft.net
http://www.trisoft.net
My ICQ # 25356171
Mar 13, 1999, 7:59 AM
Novice (39 posts)
Mar 13, 1999, 7:59 AM
Post #16 of 19
Views: 6638
Pasha, socrates, and WebKing
Here is the solution:
Version: Links 2.0
1. Open Category.def
2. Edit
---------------------------------
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
---------------------------------
to
---------------------------------
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_&-]+$'],
---------------------------------
3. Edit nph-build.cgi
---------------------------------
my $chrs = quotemeta ("/_-");
---------------------------------
to
---------------------------------
my $chrs = quotemeta ("/_&-");
---------------------------------
Let me know if it still doesn't work.
Sitedex
[This message has been edited by sitedex (edited March 13, 1999).]
[This message has been edited by sitedex (edited March 13, 1999).]
Here is the solution:
Version: Links 2.0
1. Open Category.def
2. Edit
---------------------------------
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
---------------------------------
to
---------------------------------
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_&-]+$'],
---------------------------------
3. Edit nph-build.cgi
---------------------------------
my $chrs = quotemeta ("/_-");
---------------------------------
to
---------------------------------
my $chrs = quotemeta ("/_&-");
---------------------------------
Let me know if it still doesn't work.
Sitedex
[This message has been edited by sitedex (edited March 13, 1999).]
[This message has been edited by sitedex (edited March 13, 1999).]
Mar 13, 1999, 10:00 AM
User (187 posts)
Mar 13, 1999, 10:00 AM
Post #17 of 19
Views: 6665
Socrates, I think you are right. I guess I just forgot about that.
Webking, to get the category links on the home page to look different, open up site_html.pl and copy sub site_html_print_cat. Make sub site_html_print_cat2
Then simply remove the $numlinks stuff and new stuff, and make it look like you want. Then open up nph-build.cgi and go to sub build_home_page. change:
$category = &site_html_print_cat (@rootcat) if ($#rootcat >= 0);
to
$category = &site_html_print_cat2 (@rootcat) if ($#rootcat >= 0);
------------------
Webking, to get the category links on the home page to look different, open up site_html.pl and copy sub site_html_print_cat. Make sub site_html_print_cat2
Then simply remove the $numlinks stuff and new stuff, and make it look like you want. Then open up nph-build.cgi and go to sub build_home_page. change:
$category = &site_html_print_cat (@rootcat) if ($#rootcat >= 0);
to
$category = &site_html_print_cat2 (@rootcat) if ($#rootcat >= 0);
------------------
Mar 13, 1999, 10:34 AM
Enthusiast (832 posts)
Mar 13, 1999, 10:34 AM
Post #18 of 19
Views: 6637
OK, it works now. Follow the changes above stated by Sitedex (Thanks Buddy).
Webking,
If you do not want to mess around with the site_html_template.pl for making the front page, without number of links and new and cool icons, then just create a "seperate html page" and name it home.html and link to individual categories and subcategories in the database.
Webking,
If you do not want to mess around with the site_html_template.pl for making the front page, without number of links and new and cool icons, then just create a "seperate html page" and name it home.html and link to individual categories and subcategories in the database.
Mar 13, 1999, 11:10 PM
Veteran / Moderator (3111 posts)
Mar 13, 1999, 11:10 PM
Post #19 of 19
Views: 6650
WebKing,
To add characters that are allowable for categories under Links v1, see the FAQ at http://www.gossamer-threads.com/...oduct=Links&ww=1 .
To add characters that are allowable for categories under Links v1, see the FAQ at http://www.gossamer-threads.com/...oduct=Links&ww=1 .