You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(18) |
May
(53) |
Jun
(76) |
Jul
(13) |
Aug
(11) |
Sep
(3) |
Oct
(26) |
Nov
(12) |
Dec
(14) |
2002 |
Jan
(5) |
Feb
(21) |
Mar
(34) |
Apr
(34) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
(58) |
Sep
(50) |
Oct
(32) |
Nov
(56) |
Dec
(3) |
2003 |
Jan
(7) |
Feb
(21) |
Mar
(9) |
Apr
(2) |
May
(2) |
Jun
(29) |
Jul
(7) |
Aug
(5) |
Sep
(15) |
Oct
(18) |
Nov
(6) |
Dec
(10) |
2004 |
Jan
(14) |
Feb
(6) |
Mar
(17) |
Apr
(33) |
May
(13) |
Jun
(9) |
Jul
(22) |
Aug
(15) |
Sep
(9) |
Oct
(7) |
Nov
(19) |
Dec
(7) |
2005 |
Jan
(2) |
Feb
(4) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(10) |
Dec
|
2006 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(4) |
Jul
(10) |
Aug
(1) |
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(16) |
Sep
(6) |
Oct
(2) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Boris Z. <bz...@2b...> - 2004-04-20 14:27:04
|
Am Dienstag, 20. April 2004 16:28 schrieb Boris Zentner: > Am Dienstag, 20. April 2004 16:06 schrieb Net Drifter: > > However, I did notice that it appears 'crypt' is not > > returning consistent results. =A0More in a bit. > > That remebers me on a bug in perl in conjunction with perl! I try if I = find > the version. I think it was 5.8.1. It is in 5.8.0. What did you use? --=20 Boris |
From: Boris Z. <bz...@2b...> - 2004-04-20 14:21:29
|
Am Dienstag, 20. April 2004 16:06 schrieb Net Drifter: > However, I did notice that it appears 'crypt' is not > returning consistent results. =A0More in a bit. That remebers me on a bug in perl in conjunction with perl! I try if I fi= nd=20 the version. I think it was 5.8.1. --=20 Boris |
From: Net D. <net...@ya...> - 2004-04-20 14:06:40
|
On Monday, Apr 19, 2004, at 19:47 US/Eastern, Boris Zentner wrote: > Hmm, is your secret_md5 var in > Common.pm the same on both servers? > > does perl -MDigest::MD5 -e 'print > Digest::MD5::md5_hex("Hi There")' show > the same output on both servers? > > The correct answer is > > 5b49b515f3173e4540b7d39bb57a4482 Answer is yes to both of those questions - I'm using my exact same code files on both servers. My md5 result matches yours on both machines. > Does it work if you write: > > # in pkit_auth_credential > > my $hash = > Digest::MD5::md5_hex('Digest::MD5', join > ':', ${ __PACKAGE__ . '::secret_md5' }, > $user_id, $epasswd); > > # and in pkit_auth_session_key > > $new_hash = > Digest::MD5::md5_hex('Digest::MD5', join > ':', ${__PACKAGE__ . '::secret_md5' }, > $user_id, crypt($passwd, 'cm')) I see no difference when I try this, except in my error log, I see new messages: &Digest::MD5::md5_hex function probably called as class method at ... However, I did notice that it appears 'crypt' is not returning consistent results. More in a bit. David __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
From: Net D. <net...@ya...> - 2004-04-20 13:44:49
|
On Monday, Apr 19, 2004, at 18:38 US/Eastern, ben ausden wrote: > Just a thought, have you checked that > your session store is set up OK?. I > once had a similar problem when session > setup was bizarrely failing silently > due to incorrect permissions on the > sessions table. Thanks for the tip - I did double check this and permissons on that table are just fine. __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
From: Boris Z. <bz...@2b...> - 2004-04-20 00:42:23
|
Hi, Am Montag, 19. April 2004 23:49 schrieb Net Drifter: > $new_hash = Digest::MD5::md5_hex(join ':', > ${__PACKAGE__ . '::secret_md5' }, $user_id, > crypt($passwd, 'cm')); Does it work if you write: # in pkit_auth_credential my $hash = Digest::MD5::md5_hex('Digest::MD5', join ':', ${ __PACKAGE__ . '::secret_md5' }, $user_id, $epasswd); # and in pkit_auth_session_key $new_hash = Digest::MD5::md5_hex('Digest::MD5', join ':', ${__PACKAGE__ . '::secret_md5' }, $user_id, crypt($passwd, 'cm')) -- Boris |
From: Boris Z. <bz...@2b...> - 2004-04-19 23:40:57
|
Am Montag, 19. April 2004 23:57 schrieb Net Drifter: > Another difference is the system where PageKit 1.09 is > running, it's using Digest::MD5 version 2.20 where the > system where PageKit 1.13 is running, it's using > Digest::MD5 version 2.33. Hmm, is your secret_md5 var in Common.pm the same on both servers? does perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex("Hi There")' show the same output on both servers? The correct answer is 5b49b515f3173e4540b7d39bb57a4482 -- Boris |
From: ben a. <su...@sn...> - 2004-04-19 22:39:44
|
Hi, >=20 > I figured out that the problem does not have to do > with cookies not being set. Cookies are set just fine > in my browser. However, in > Common::pkit_auth_session_key(), the two MD5 hashes > are not matching. Haven't figured out why yet. Just a thought, have you checked that your session store is set up OK?. = I once had a similar problem when session setup was bizarrely failing = silently due to incorrect permissions on the sessions table. S |
From: ben a. <su...@sn...> - 2004-04-19 22:39:44
|
Hi, >=20 > I figured out that the problem does not have to do > with cookies not being set. Cookies are set just fine > in my browser. However, in > Common::pkit_auth_session_key(), the two MD5 hashes > are not matching. Haven't figured out why yet. Just a thought, have you checked that your session store is set up OK?. = I once had a similar problem when session setup was bizarrely failing = silently due to incorrect permissions on the sessions table. S |
From: ben a. <su...@sn...> - 2004-04-19 22:39:08
|
Hi, >=20 > I figured out that the problem does not have to do > with cookies not being set. Cookies are set just fine > in my browser. However, in > Common::pkit_auth_session_key(), the two MD5 hashes > are not matching. Haven't figured out why yet. Just a thought, have you checked that your session store is set up OK?. = I once had a similar problem when session setup was bizarrely failing = silently due to incorrect permissions on the sessions table. S |
From: Net D. <net...@ya...> - 2004-04-19 21:57:36
|
Another difference is the system where PageKit 1.09 is running, it's using Digest::MD5 version 2.20 where the system where PageKit 1.13 is running, it's using Digest::MD5 version 2.33. __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
From: Net D. <net...@ya...> - 2004-04-19 21:49:04
|
Boris, I figured out that the problem does not have to do with cookies not being set. Cookies are set just fine in my browser. However, in Common::pkit_auth_session_key(), the two MD5 hashes are not matching. Haven't figured out why yet. Here's the code I have been using for a long time that works with pkit 1.09: sub pkit_auth_session_key { my ($model, $ses_key) = @_; my $dbh = $model->dbh; warn 'Common::pkit_auth_session_key() $ses_key is ' . Dumper($ses_key); my $user_id = $ses_key->{user_id}; my $sql = q[SELECT uname, password FROM users WHERE uid = ?]; my ($login, $passwd) = $dbh->selectrow_array($sql, {}, $user_id); my $new_hash; { no strict 'refs'; $new_hash = Digest::MD5::md5_hex(join ':', ${__PACKAGE__ . '::secret_md5' }, $user_id, crypt($passwd, 'cm')); } warn "And this is the \$new_hash from that: [$new_hash]"; return unless $new_hash eq $ses_key->{'hash'}; $model->output(pkit_user => $user_id); $model->output(pkit_login => $login); return ($user_id, $user_id); } Sorry for the extraneous print statements - obviously I am debugging. :) Anyway, the $new_hash does not at all equal the $ses_key->{'hash'} under 1.13. (Not saying this is 1.13, but could be anything...Apache::Session for example.) Note that when I go from 1.09 to 1.13, it's with the exact same code, no changes there. Thanks David __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
From: Boris Z. <bz...@2b...> - 2004-04-19 15:58:24
|
Hi again, Am Montag, 19. April 2004 16:55 schrieb Net Drifter: > [Mon Apr 19 14:43:50 2004] [info] (2)No such file or > directory: make_sock: for address 127.0.0.1 port 8529, > setsockopt: (SO_ACCEPTFILTER) Just for the option, I have that not compiled in. As far as I know it is controlled by 'AcceptFilter off' in your httpd.conf. Also it is only of use for FreeBSD I think. -- Boris |
From: Boris Z. <bz...@2b...> - 2004-04-19 15:28:50
|
Hi, Am Montag, 19. April 2004 16:55 schrieb Net Drifter: > Hi, Boris - > > It looks like the cookies are slightly different > between 1.09 and 1.13, as the following output from > Lynx shows: > > 1.09 => > cookie: pkit=user_id&1&hash&dbd8e7b38111d > Looks like this is a cookie for a user that is logged in. > 1.13 => > cookie: pkit=hash&f17f05ab3514a68107fe030 > This is a cookie for a anon user. > Do I need to change something in my Common.pm like > pkit_auth_credential, pkit_auth_session_key or > something to handle this? > No, I suspect, that it is tested differently. No action is needed on your side. > Here is the output you requested: > > $ HEAD > http://localhost:8529/customize?link_color=%23ff993 > 200 OK > Connection: close > Date: Mon, 19 Apr 2004 14:47:04 GMT > Server: Apache/1.3.29 (Unix) mod_perl/1.28 > Content-Type: text/plain > Expires: -1 > Client-Date: Mon, 19 Apr 2004 14:47:04 GMT > Client-Peer: 127.0.0.1:8529 > Client-Response-Num: 1 > Set-Cookie: > pkit_session_id=788088502fdd0247e51a9153d33a39b0; > path=/; expires=Tue, 19-Apr-2005 14:47:04 GMT > looks good. > > The directories under /tmp are all 777. > > Everything you asked me to do seems to work, except I > cannot connect to the server on 8529 from another > machine even though firewall allows this. thats easy, just call it with another servername. The default is localhost ./t/TEST -start-httpd -servername your.real.servername > > I noticed that when I do the -start-httpd, the > following appears in the error_log: > > [Mon Apr 19 14:43:50 2004] [info] (2)No such file or > directory: make_sock: for address 127.0.0.1 port 8529, > setsockopt: (SO_ACCEPTFILTER) > > That doesn't seem to prevent your instructions to me > from working, but it makes me wonder. Also, I cannot > figure out how to change the test port from 8529 to > something else. like the servername ;-) ./t/TEST -start-httpd -servername xx.yy.com -port 9876 -- Boris |
From: Net D. <net...@ya...> - 2004-04-19 14:55:16
|
Hi, Boris - It looks like the cookies are slightly different between 1.09 and 1.13, as the following output from Lynx shows: 1.09 => cookie: pkit=user_id&1&hash&dbd8e7b38111d 1.13 => cookie: pkit=hash&f17f05ab3514a68107fe030 Do I need to change something in my Common.pm like pkit_auth_credential, pkit_auth_session_key or something to handle this? Here is the output you requested: $ HEAD http://localhost:8529/customize?link_color=%23ff993 200 OK Connection: close Date: Mon, 19 Apr 2004 14:47:04 GMT Server: Apache/1.3.29 (Unix) mod_perl/1.28 Content-Type: text/plain Expires: -1 Client-Date: Mon, 19 Apr 2004 14:47:04 GMT Client-Peer: 127.0.0.1:8529 Client-Response-Num: 1 Set-Cookie: pkit_session_id=788088502fdd0247e51a9153d33a39b0; path=/; expires=Tue, 19-Apr-2005 14:47:04 GMT The directories under /tmp are all 777. Everything you asked me to do seems to work, except I cannot connect to the server on 8529 from another machine even though firewall allows this. I noticed that when I do the -start-httpd, the following appears in the error_log: [Mon Apr 19 14:43:50 2004] [info] (2)No such file or directory: make_sock: for address 127.0.0.1 port 8529, setsockopt: (SO_ACCEPTFILTER) That doesn't seem to prevent your instructions to me from working, but it makes me wonder. Also, I cannot figure out how to change the test port from 8529 to something else. Thanks David __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |
From: Boris Z. <bz...@2b...> - 2004-04-19 14:05:13
|
Hi, http://eg.2bz.de/Apache-PageKit-2.14_03.tar.gz is available now. The changes from Apache-PageKit-2.14_01 are: - Little change for the DBD::SQLite handling. - mod_perl >= 1.9913 is required now. - ht_time is used for static files. Former we used format_time. That is no longer part of the mp2 API. - Apache-PageKit-2 honors Apache2 at startup, so you can install Apache-PageKit-1 and Apache-PageKit-2 within the same perl. Reported by Henry Kilmer. For correct cookies, use libapreq2 from CVS. The current version on CPAN ( libapreq2-2.02_02-dev ) calculates the expire time wrong. Since the CVS version has build trouble currently, here is a working version. http://eg.2bz.de/httpd-apreq-2-19042004.tar.gz To install that use: wget http://eg.2bz.de/httpd-apreq-2-19042004.tar.gz tar zxplvf httpd-apreq-2-19042004.tar.gz cd httpd-apreq-2 ./buildconf perl Makefile.PL --with-apache2-apxs=/path/to/apache2/bin/apxs make make test make install -- Boris |
From: Boris Z. <bz...@2b...> - 2004-04-16 22:28:12
|
Am Samstag, 17. April 2004 00:03 schrieb Boris Zentner: sorry, I mean > Hi David, > wget wget http://search.cpan.org/CPAN/authors/id/B/BO/BORISZ/Apache-PageKit-1.13.tar.gz -- Boris |
From: Boris Z. <bz...@2b...> - 2004-04-16 21:57:01
|
Hi David, Am Freitag, 16. April 2004 18:43 schrieb Net Drifter: > I'm actually using this version of Apache, with > Apache::libapreq version 1.3 > > $ /usr/local/sbin/httpd -V > Server version: Apache/1.3.29 (Unix) [...] Please try this, it does not affect you installation until you do a make install. So avoid that. Be sure that your browser accept cookies. In my boroewser I can deny cookies from some domain. Then the pkit cookie is ignored by your browser! Please verify that. make sure that the directories /tmp/csvdb /tmp/pkit_sessions /tmp/pkit_sessions_lock are readable and writable by the user that starts the testserver. Make sure that your PATH environment variable includes the path to your httpd binary. mkdir temp cd temp wget tar zxplvf Apache-PageKit-1.13.tar.gz cd Apache-PageKit-1.13 perl Makefile.PL make make test ./t/TEST -start-httpd now open a browser http://localhost:8529/ can you see the example site? At the bottom of the page is a text Your session ID is [Session not set]. Now goto the customize page: http://localhost:8529/customize and select Black/Orange this sets a session for you. To verify this go to this page http://localhost:8529/ again, but not with the back button. Now the text should be changed to something like Your session ID is 739857398453987563876538adsajdada98537598. if you have LWP install, you can also send me the output from HEAD http://localhost:8529/customize?link_color=%23ff993 this should respond something like this: 200 OK Connection: close Date: Fri, 16 Apr 2004 22:02:44 GMT Server: Apache/2.0.48 (Unix) mod_perl/1.99_12 Perl/v5.8.1 DAV/2 Content-Type: text/html Expires: -1 Client-Date: Fri, 16 Apr 2004 22:02:45 GMT Client-Peer: 127.0.0.1:8529 Client-Response-Num: 1 Set-Cookie: pkit_session_id=25fe636f995e5c46ff1b8e92d0e46085; path=/; expires=Fri, 16-Apr-2005 22:03:16 GMT then type ./t/TEST -stop-httpd to stop the server. -- Boris |
From: Net D. <net...@ya...> - 2004-04-16 16:43:25
|
I'm actually using this version of Apache, with Apache::libapreq version 1.3 $ /usr/local/sbin/httpd -V Server version: Apache/1.3.29 (Unix) Server built: Jan 30 2004 21:06:09 Server's Module Magic Number: 19990320:15 Server compiled with.... -D HAVE_MMAP -D USE_MMAP_SCOREBOARD -D USE_MMAP_FILES -D HAVE_FLOCK_SERIALIZED_ACCEPT -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D DYNAMIC_MODULE_LIMIT=64 -D HARD_SERVER_LIMIT=512 -D SO_ACCEPTFILTER -D ACCEPT_FILTER_NAME="httpready" -D HTTPD_ROOT="/usr/local" -D SUEXEC_BIN="/usr/local/sbin/suexec" -D DEFAULT_PIDLOG="/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="/var/run/httpd.scoreboard" -D DEFAULT_LOCKFILE="/var/run/httpd.lock" -D DEFAULT_ERRORLOG="/var/log/httpd-error.log" -D TYPES_CONFIG_FILE="etc/apache/mime.types" -D SERVER_CONFIG_FILE="etc/apache/httpd.conf" -D ACCESS_CONFIG_FILE="etc/apache/access.conf" -D RESOURCE_CONFIG_FILE="etc/apache/srm.conf" Thanks David __________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html |
From: Boris Z. <bz...@2b...> - 2004-04-16 16:16:42
|
Hi David, are you using Apache2 or Apache1? The cookies work fine in 1.13 as far as I know. But I know with Apache2 thee is a error int libapreq2 that let expire the cookies 1000x to early. So if you are with AP2 rebuild libapreq2 from cvs. there is a fix. Am Freitag, 16. April 2004 18:02 schrieb Net Drifter: > Hmm... I just attempted to upgrade PageKit from 1.10 > to 1.13, and all of the sudden, I get "Cookies must be > enabled in your browser". This happens when I enter > my username and password trying to log on. > > That's strange, they always have been enabled. Looks > like PageKit is no longer setting or reading them. My > browser alerts me when cookies are set, and with 1.13 > I don't get this alert. > > The operating system is FreeBSD 4.9. I really am at a > loss as to what happened. I hope there is a quick fix > because I really want to upgrade to 1.13. On the old > version I am using Perl 5.6.1 and on the new version I > am using Perl 5.8.2. > > Any help would be appreciated. Let me know what I can > provide to help diagnose. > > Thanks > David > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Tax Center - File online by April 15th > http://taxes.yahoo.com/filing.html > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Pagekit-users mailing list > Pag...@li... > https://lists.sourceforge.net/lists/listinfo/pagekit-users -- Boris |
From: Net D. <net...@ya...> - 2004-04-16 16:02:16
|
Hmm... I just attempted to upgrade PageKit from 1.10 to 1.13, and all of the sudden, I get "Cookies must be enabled in your browser". This happens when I enter my username and password trying to log on. That's strange, they always have been enabled. Looks like PageKit is no longer setting or reading them. My browser alerts me when cookies are set, and with 1.13 I don't get this alert. The operating system is FreeBSD 4.9. I really am at a loss as to what happened. I hope there is a quick fix because I really want to upgrade to 1.13. On the old version I am using Perl 5.6.1 and on the new version I am using Perl 5.8.2. Any help would be appreciated. Let me know what I can provide to help diagnose. Thanks David __________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html |
From: Boris Z. <bz...@2b...> - 2004-04-11 13:45:09
|
Hi Bill, Am Freitag, 9. April 2004 22:34 schrieb Bill Karwin: > Hi, I apologize sincerely for the partial email I sent a moment ago. I > accidentally sent the email before I was done writing. Here's the full > question: > > I would like to write conditional template code based on PKIT_MACRO > values supplied to a component. > > The idea is to make a component for a toolbar, on which some input > elements are to be hidden on some screens that include the toolbar, but > shown on other screens. I could make a model var to control whether to > show or hide the elements, but that seems like mixing model logic with > view logic. I'd like to control is completely within component syntax > if possible. This might be usefull and it is faster, since it is removed from the componet code insted of removed on request if a model_var is used. > > For example, the top-level template might include a component template > as follows: > > <PKIT_COMPONENT NAME="myToolbar" SHOW_LOCATION_DROPDOWN="1" > SHOW_TYPE_DROPDOWN="1" SHOW_REFRESH_DROPDOWN="0"> > > Then in myToolbar.tmpl, include elements as follows: > > <TABLE> > <TR> > > <PKIT_IF NAME="SHOW_LOCATION_DROPDOWN"> > <TD><SELECT NAME=location>...</SELECT></TD> > </PKIT_IF> > > <PKIT_IF NAME="SHOW_TYPE_DROPDOWN"> > <TD><SELECT NAME=type>...</SELECT></TD> > </PKIT_IF> > > <TD WIDTH="100%"><!-- force the next cell to be all the way to > the right on this table row --></TD> > > <PKIT_IF NAME="SHOW_REFRESH_DROPDOWN"> > <TD><SELECT NAME=refresh>...</SELECT></TD> > </PKIT_IF> > > </TR> > </TABLE> > > Can you think of a way I can accomplish this type of construction? currently you can add PKIT_COMMENT as a macro parameter ;-) But only as a hack. > Currently I have a "myToolbar" and a "myToolbar2" for two different > configurations of the toolbar elements. But I anticipate that there > will be more elements, and therefore more combinations. I don't want to > make a separate toolbar template for each combination. > If we invent something like this, say <PKIT_IF_MACRO NAME="XXX"> then it must end inside the same component. Since this is the livetime of a macro. If others like this future too, I give it a try. Please comment. > Regards, > Bill Karwin > -- Boris |
From: Bill K. <bi...@ka...> - 2004-04-09 20:31:52
|
Hi, I apologize sincerely for the partial email I sent a moment ago. I accidentally sent the email before I was done writing. Here's the full question: I would like to write conditional template code based on PKIT_MACRO values supplied to a component. The idea is to make a component for a toolbar, on which some input elements are to be hidden on some screens that include the toolbar, but shown on other screens. I could make a model var to control whether to show or hide the elements, but that seems like mixing model logic with view logic. I'd like to control is completely within component syntax if possible. For example, the top-level template might include a component template as follows: <PKIT_COMPONENT NAME="myToolbar" SHOW_LOCATION_DROPDOWN="1" SHOW_TYPE_DROPDOWN="1" SHOW_REFRESH_DROPDOWN="0"> Then in myToolbar.tmpl, include elements as follows: <TABLE> <TR> <PKIT_IF NAME="SHOW_LOCATION_DROPDOWN"> <TD><SELECT NAME=location>...</SELECT></TD> </PKIT_IF> <PKIT_IF NAME="SHOW_TYPE_DROPDOWN"> <TD><SELECT NAME=type>...</SELECT></TD> </PKIT_IF> <TD WIDTH="100%"><!-- force the next cell to be all the way to the right on this table row --></TD> <PKIT_IF NAME="SHOW_REFRESH_DROPDOWN"> <TD><SELECT NAME=refresh>...</SELECT></TD> </PKIT_IF> </TR> </TABLE> Can you think of a way I can accomplish this type of construction? Currently I have a "myToolbar" and a "myToolbar2" for two different configurations of the toolbar elements. But I anticipate that there will be more elements, and therefore more combinations. I don't want to make a separate toolbar template for each combination. Regards, Bill Karwin |
From: Bill K. <bi...@ka...> - 2004-04-09 20:23:38
|
Hi, I would like to write conditional template code based on PKIT_MACRO values supplied to a component. For example, the top-level template might include a component template as follows: <PKIT_COMPONENT NAME="myToolbar" SHOW_LOCATION_DROPDOWN="1" SHOW_TYPE_DROPDOWN="1" SHOW_REFRESH_DROPDOWN="0"> Then in myToolbar.tmpl, include elements as follows: <TABLE> <TR> <PKIT_IF NAME="SHOW_LOCATION_DROPDOWN"> <TD><SELECT NAME=location>...</SELECT></TD> </PKIT_IF> |
From: Boris Z. <bz...@2b...> - 2004-04-09 16:22:14
|
Hi Shimon, Am Freitag, 9. April 2004 15:52 schrieb Shimon Rura: > Hi PageKit users, > > Does anyone know if it is possible to use/write custom escape styles for > template VAR tags? For instance, I have an XML view in pagekit that As far as I know, there is no way to do it ( easy ). > generates (duh) XML pages. But when incorporating user-entered data, > <MODEL_VAR foo ESCAPE=HTML> isn't enough for use in XML, because it doesn't > escape certain things like "--" and allows some funny characters (such as > curly quotations). So I'd like to have an ESCAPE=XML option that could do > the extra escaping. Is that possible? Of course, I can do this in the > model, but that violates the separation of model and view. I think you mix some different issues. It is perfectly valid to write <MODEL_VAR ESCAPE="HTML" NAME="foo"/> <MODEL_VAR ESCAPE="URL" NAME="bar"/> <MODEL_VAR ESCAPE=1 foobar> all on the same page. The escaping takes only place for the specific model var. In the example foo is html escaped while bar is URL escaped. This has nothing to do with the view at all. Escaping for the View is the whole page. This can be done as a last step with pkit_output_filter. Or look how output_convert works, it does exactly what you want, but for charsets ;-). And it does it not on a key basis that is something you must add. Another option is to subclass HTML::Template and add your escapings to that. Then use template_class="HTML::Template::ShimonsEscape" in Config.xml. This whould do exactly what you describe. > > I might also like to have an ESCAPE=TeX, or even a TRANSLATE=HTMLtoTeX in > order to escape or convert to TeX/LaTeX. This suggests a general way to > assign a postprocessor in templating, and I think for me it would be > useful. > > thanks, > shimon. > -- Boris |
From: Shimon R. <sh...@ru...> - 2004-04-09 13:53:17
|
Hi PageKit users, Does anyone know if it is possible to use/write custom escape styles for template VAR tags? For instance, I have an XML view in pagekit that generates (duh) XML pages. But when incorporating user-entered data, <MODEL_VAR foo ESCAPE=HTML> isn't enough for use in XML, because it doesn't escape certain things like "--" and allows some funny characters (such as curly quotations). So I'd like to have an ESCAPE=XML option that could do the extra escaping. Is that possible? Of course, I can do this in the model, but that violates the separation of model and view. I might also like to have an ESCAPE=TeX, or even a TRANSLATE=HTMLtoTeX in order to escape or convert to TeX/LaTeX. This suggests a general way to assign a postprocessor in templating, and I think for me it would be useful. thanks, shimon. |