From: happyman <hap...@co...> - 2003-05-26 04:23:15
|
Hi all, =20 About comments, I think that's due to some perl regular expressions. = It occurs when guests' input contains some special chars.. currently, I just edit = logs/comments.txt when it happens. BTW, when your comments exceeds 500, what I suggest is 1). add a cache feature to commentviewer.cgi, OR 2). create a page views in commentviewer.cgi I had implemented "page views" in http://photos.happyman.idv.tw/, = also found=20 it's not hard to add "cache feature" to ids. for example: you can add code to the beginning of commentviewer.cgi =3D-=3D-=3D-=3D-=3D- my $cache=3D"output.cache"; if ( -e $cache) { my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev, $size,$atime,$mtime,$ctime) = =3D stat($cache); my $cachemtime=3D$mtime; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev, = $size,$atime,$mtime,$ctime)=3Dstat("$logDir/comments.txt"); if ($cachemtime > $mtime) { if ( open(CACHE,$cache) ) { while(<CACHE>) { print $_; } # print "Output from CACHE"; close(CACHE); exit; } } } ...... renderPage($cache); =3D-=3D-=3D-=3D and modify renderPage() in idsShared.pm =3D-=3D-=3D-=3D- sub renderPage { my ($cache)=3D@_; ..... ## happyman if ($cache) { if (open(CACHE,"> $cache")) { print CACHE $query->header(-type=3D>'text/html; = charset=3Dbig5', -expires=3D>'now', -cookie=3D>$cookie); print CACHE $pageContent; close(CACHE); } } ..... However, the above code doesn't handle the "cgi get/post/cookies" output = caching. How about adding cache feature to ids? regs happyman ----- Original Message -----=20 From: "Douglas E. Morris" <do...@ke...> To: <ids...@li...> Sent: Monday, May 26, 2003 10:14 AM Subject: [Ids-devel] Error in processing comments Ok all, I have another error for you. I noticed one user who posted a comment, and when you would go to the = show=20 all comments link from the main IDS page it would show his name, = address,=20 etc. but the comment field was blank. I clicked on the picture and the full comment was shown there. I then=20 checked out the comments.txt file for signs of problems and after much=20 trial and error came to find out that this problem is caused by having = ()=20 show in up a username. The user in question entered his username as max (krome) once I removed the ( ) from around krome the comment appeared with no=20 problems. Not a serious problem, but one I wanted to bring to your=20 attention. As a side note, and I think I mentioned this in my previous e-mail, the = one=20 big feature I see missing with IDS is the lack of ability to delete an=20 album through the Admin interface, as it stands now i have to go to a=20 shell, delete the album files, delete the previews, delete the = album-data=20 stuff.. Just kind of a hassle. Take care all, and keep up the good work. Doug |