From pl at eskimo.net Mon May 2 12:53:54 2005 From: pl at eskimo.net (Peter Lehrer) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] using server side includes or php Message-ID: <47893.64.152.49.244.1115052834.squirrel@64.152.49.244> Hi, I just want to create a simple document: top.html info.html bottom.html where I repeat the "top" and "bottom" on each document throughout the site. Should I use the php include function or is there an easier way with server side includes? Basically, I just want a template. Regards, Peter From yury at heavenspa.com Mon May 2 13:02:35 2005 From: yury at heavenspa.com (Yury :: heavenspa web services) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] using server side includes or php In-Reply-To: <47893.64.152.49.244.1115052834.squirrel@64.152.49.244> Message-ID: PHP includes are very easy.. SSI i'd say is more cumbersome..my 2 cents. Yes, just call the imcluded file .. etc.. ciao Yury www.motionrush.com -----Original Message----- From: front-end-bounces@lists.nyphp.org [mailto:front-end-bounces@lists.nyphp.org]On Behalf Of Peter Lehrer Sent: Monday, May 02, 2005 11:54 AM To: front-end@lists.nyphp.org Subject: [front-end] using server side includes or php Hi, I just want to create a simple document: top.html info.html bottom.html where I repeat the "top" and "bottom" on each document throughout the site. Should I use the php include function or is there an easier way with server side includes? Basically, I just want a template. Regards, Peter _______________________________________________ New York PHP SIG: Front End Mailing List AMP Technology Supporting Apache, MySQL and PHP http://lists.nyphp.org/mailman/listinfo/front-end http://www.nyphp.org From dmintz at davidmintz.org Mon May 2 13:42:05 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] using server side includes or php In-Reply-To: References: Message-ID: On Mon, 2 May 2005, Yury :: heavenspa web services wrote: > PHP includes are very easy.. SSI i'd say is more cumbersome..my 2 cents. > Yes, just call the imcluded file .. etc.. > ciao > Yury If you know you want to do that every time no matter what, even more convenient is an Apache directive in a .htaccess or in the appropriate context in httpd.conf: php_value auto_prepend_file top.html php_value auto_append_file bottom.html --- David Mintz http://davidmintz.org/ From dmintz at davidmintz.org Mon May 2 13:48:25 2005 From: dmintz at davidmintz.org (David Mintz) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] using server side includes or php In-Reply-To: References: Message-ID: On Mon, 2 May 2005, David Mintz wrote: > > If you know you want to do that every time no matter what, even more > convenient is an Apache directive in a .htaccess or in the appropriate > context in httpd.conf: Or in php.ini, it occurred to him belatedly because he's so used to working on shared hosts and not controlling either httpd.conf or php.ini --- David Mintz http://davidmintz.org/ From pl at eskimo.net Mon May 2 14:04:25 2005 From: pl at eskimo.net (Peter Lehrer) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] using server side includes or php In-Reply-To: References: Message-ID: <58353.64.152.49.244.1115057065.squirrel@64.152.49.244> Thanks. That is pretty cool. Peter > > > On Mon, 2 May 2005, Yury :: heavenspa web services wrote: > >> PHP includes are very easy.. SSI i'd say is more cumbersome..my 2 cents. >> Yes, just call the imcluded file .. etc.. >> ciao >> Yury > > If you know you want to do that every time no matter what, even more > convenient is an Apache directive in a .htaccess or in the appropriate > context in httpd.conf: > > php_value auto_prepend_file top.html > php_value auto_append_file bottom.html > > --- > David Mintz > http://davidmintz.org/ > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > From pl at eskimo.net Tue May 3 18:11:58 2005 From: pl at eskimo.net (Peter Lehrer) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] how to tell the server that i am not using an anchor tag Message-ID: <3429.4.250.72.111.1115158318.squirrel@4.250.72.111> Hi, I am using the href tag:

ELAN-SA International Handbags

However, the server doesn't display this tag at all, I believe since it is interpreting the first "/ad" in the url as the end of the tag. So I changed the tag to:

ELAN-SA International Handbags

with a "\" before each "/ad". Now the server displays the tag fine in the web page, however, when I click on that tag it goes to the URL: http://www.bedc.org//ad//ad_fashion_01.htm#elansa and this does not display that page correctly. You can see this behaviour at: http://www.eskimo.com/~pl/heartfulhandbags/elaine_in_the_news.html Is there anyway I can get this tag displayed and have it work correctly? I hope I've made sense. Regards, Peter Lehrer From pl at eskimo.net Tue May 3 18:15:25 2005 From: pl at eskimo.net (Peter Lehrer) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] how to tell the server that i am not using an anchor tag In-Reply-To: <3429.4.250.72.111.1115158318.squirrel@4.250.72.111> References: <3429.4.250.72.111.1115158318.squirrel@4.250.72.111> Message-ID: <3437.4.250.72.111.1115158525.squirrel@4.250.72.111> I think something was wrong with that last message: The first href that I am having trouble displaying is (without the beginning arrow: a href="http://www.bedc.org/ad/ad_fashion_01.htm#elansa" target="_blank">

ELAN-SA International Handbags

I hope this displays correctly. Peter > Hi, > > I am using the href tag: > target="_blank">

ELAN-SA International Handbags

> > However, the server doesn't display this tag at all, I believe since it is > interpreting the first "/ad" in the url as the end of the tag. So I > changed the tag to: > > target="_blank">

ELAN-SA International Handbags

> > with a "\" before each "/ad". > > Now the server displays the tag fine in the web page, however, when I > click on that tag it goes to the URL: > > http://www.bedc.org//ad//ad_fashion_01.htm#elansa > > and this does not display that page correctly. > > You can see this behaviour at: > http://www.eskimo.com/~pl/heartfulhandbags/elaine_in_the_news.html > > Is there anyway I can get this tag displayed and have it work correctly? > > I hope I've made sense. > > Regards, > > Peter Lehrer > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > From tom at supertom.com Thu May 26 14:57:46 2005 From: tom at supertom.com (Tom Melendez) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? Message-ID: <42961C2A.30306@supertom.com> Hey folks, Anyone have any JS code they'd like to share or point me to that enables/disables fields and works in all current browsers (FF, IE, Safari, etc)? Thanks, Tom http://www.liphp.org From codebowl at gmail.com Thu May 26 15:04:09 2005 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: <42961C2A.30306@supertom.com> References: <42961C2A.30306@supertom.com> Message-ID: <8d9a42800505261204264367eb@mail.gmail.com> i would like to see this too ;) On 5/26/05, Tom Melendez wrote: > > Hey folks, > > Anyone have any JS code they'd like to share or point me to that > enables/disables fields and works in all current browsers (FF, IE, > Safari, etc)? > > Thanks, > > Tom > > http://www.liphp.org > > > > > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > -- Joseph Crawford Jr. Codebowl Solutions codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20050526/553017eb/attachment.html From devrieda at gmail.com Thu May 26 15:24:47 2005 From: devrieda at gmail.com (Derek DeVries) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: <8d9a42800505261204264367eb@mail.gmail.com> References: <42961C2A.30306@supertom.com> <8d9a42800505261204264367eb@mail.gmail.com> Message-ID: <7bdec58705052612244a7876c9@mail.gmail.com> disable enable On 5/26/05, Joseph Crawford wrote: > i would like to see this too ;) > > > On 5/26/05, Tom Melendez wrote: > > Hey folks, > > > > Anyone have any JS code they'd like to share or point me to that > > enables/disables fields and works in all current browsers (FF, IE, > > Safari, etc)? > > > > Thanks, > > > > Tom > > > > http://www.liphp.org > > > > > > > > > > _______________________________________________ > > New York PHP SIG: Front End Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/front-end > > http://www.nyphp.org > > > > > > -- > Joseph Crawford Jr. > Codebowl Solutions > codebowl@gmail.com > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > > > From drydell at att.net Thu May 26 15:32:55 2005 From: drydell at att.net (drydell@att.net) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? Message-ID: <052620051932.28952.42962466000C3E7700007118216028074104040A0B979D0B@att.net> or if you'd prefer not reloading the page: disable enable -------------- Original message ---------------------- From: Derek DeVries > > disable > enable > > On 5/26/05, Joseph Crawford wrote: > > i would like to see this too ;) > > > > > > On 5/26/05, Tom Melendez wrote: > > > Hey folks, > > > > > > Anyone have any JS code they'd like to share or point me to that > > > enables/disables fields and works in all current browsers (FF, IE, > > > Safari, etc)? > > > > > > Thanks, > > > > > > Tom > > > > > > http://www.liphp.org > > > > > > > > > > > > > > > _______________________________________________ > > > New York PHP SIG: Front End Mailing List > > > AMP Technology > > > Supporting Apache, MySQL and PHP > > > http://lists.nyphp.org/mailman/listinfo/front-end > > > http://www.nyphp.org > > > > > > > > > > > -- > > Joseph Crawford Jr. > > Codebowl Solutions > > codebowl@gmail.com > > _______________________________________________ > > New York PHP SIG: Front End Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/front-end > > http://www.nyphp.org > > > > > > > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org From krook at us.ibm.com Thu May 26 15:40:48 2005 From: krook at us.ibm.com (Daniel Krook) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: <052620051932.28952.42962466000C3E7700007118216028074104040A0B979D0B@att.net> Message-ID: Or you can even shorten the HTML part by putting the logic somewhere else with the rest of the JS. switch Where you have defined this earlier or in another file: function toggle (id) { if (document.getElementById(id).disabled) { document.getElementById(id).disabled = false; } else { document.getElementById(id).disabled = true; } } front-end-bounces@lists.nyphp.org wrote on 05/26/2005 03:32:55 PM: > or if you'd prefer not reloading the page: > > > disable > enable > > -------------- Original message ---------------------- > From: Derek DeVries > > > > disable > > enable > > > > On 5/26/05, Joseph Crawford wrote: > > > i would like to see this too ;) > > > > > > > > > On 5/26/05, Tom Melendez wrote: > > > > Hey folks, > > > > > > > > Anyone have any JS code they'd like to share or point me to that > > > > enables/disables fields and works in all current browsers (FF, IE, > > > > Safari, etc)? > > > > > > > > Thanks, > > > > > > > > Tom > > > > > > > > http://www.liphp.org > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > New York PHP SIG: Front End Mailing List > > > > AMP Technology > > > > Supporting Apache, MySQL and PHP > > > > http://lists.nyphp.org/mailman/listinfo/front-end > > > > http://www.nyphp.org > > > > > > > > > > > > > > > > -- > > > Joseph Crawford Jr. > > > Codebowl Solutions > > > codebowl@gmail.com > > > _______________________________________________ > > > New York PHP SIG: Front End Mailing List > > > AMP Technology > > > Supporting Apache, MySQL and PHP > > > http://lists.nyphp.org/mailman/listinfo/front-end > > > http://www.nyphp.org > > > > > > > > > > > _______________________________________________ > > New York PHP SIG: Front End Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/front-end > > http://www.nyphp.org > > > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org From drydell at att.net Thu May 26 15:59:19 2005 From: drydell at att.net (drydell@att.net) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? Message-ID: <052620051959.24275.42962A97000553FC00005ED3216028074104040A0B979D0B@att.net> or even shorten the js function: function toggle (id) { document.getElementById(id).disabled = (!document.getElementById(id).disabled); } From krook at us.ibm.com Thu May 26 16:51:59 2005 From: krook at us.ibm.com (Daniel Krook) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: <052620051959.24275.42962A97000553FC00005ED3216028074104040A0B979D0B@att.net> Message-ID: > or even shorten the js function: > > function toggle (id) { > document.getElementById(id).disabled = (!document. > getElementById(id).disabled); > } I think this thread also fits well into the "cookbook" idea from NYPHP Talk. :) > There is so much valuable knowledge (and entertainment) to be gained by > watching a mob of developers optimize code. If this were all compiled > into a book or wiki, I would read it all day long. From tom at supertom.com Thu May 26 17:04:39 2005 From: tom at supertom.com (Tom Melendez) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: <052620051959.24275.42962A97000553FC00005ED3216028074104040A0B979D0B@att.net> References: <052620051959.24275.42962A97000553FC00005ED3216028074104040A0B979D0B@att.net> Message-ID: <429639E7.50904@supertom.com> Awesome! These all work great, in all browsers I tested. My one request would be the browsers actually gray out the fields if they are disabled. Firefox grays them out, but the other browsers seem to dull the text, but not actually gray out the field. I guess I could put some code in there to change the bgcolor of the field, right? Tom http://www.liphp.org drydell@att.net wrote: >or even shorten the js function: > >function toggle (id) { > document.getElementById(id).disabled = (!document.getElementById(id).disabled); >} >_______________________________________________ >New York PHP SIG: Front End Mailing List >AMP Technology >Supporting Apache, MySQL and PHP >http://lists.nyphp.org/mailman/listinfo/front-end >http://www.nyphp.org > > > From krook at us.ibm.com Thu May 26 17:12:58 2005 From: krook at us.ibm.com (Daniel Krook) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: <429639E7.50904@supertom.com> Message-ID: > Awesome! These all work great, in all browsers I tested. My one > request would be the browsers actually gray out the fields if they are > disabled. Firefox grays them out, but the other browsers seem to dull > the text, but not actually gray out the field. I guess I could put some > code in there to change the bgcolor of the field, right? There are a few options for this that you might want to follow up on, maybe even setting the visibility property to hidden on the form input, or encasing it in a block element and hiding that. One caveat that you should be aware of with disabling form elements is that when the form is posted, that element no longer shows up in the $_POST array. As opposed to being empty or null. This may seem like an obvious minor detail, but if you have a checkbox that was checked (or had been prepopulated as checked), then disable it, you now never know if the user rechecked it or what it's previous value was. This seems to be a common source of subtle bugs so beware. Daniel Krook, Advisory IT Specialist Application Development, Production Services - Tools, ibm.com Personal: http://info.krook.org/ BluePages: http://bluepages.redirect.webahead.ibm.com/ BlogPages: http://blogpages.redirect.webahead.ibm.com/ From travis at treevis.com Thu May 26 17:21:32 2005 From: travis at treevis.com (Travis Forden) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: References: Message-ID: <42963DDC.6080700@treevis.com> Daniel Krook wrote: > > One caveat that you should be aware of with disabling form elements is > that when the form is posted, that element no longer shows up in the > $_POST array. As opposed to being empty or null. This may seem like an > obvious minor detail, but if you have a checkbox that was checked (or had > been prepopulated as checked), then disable it, you now never know if the > user rechecked it or what it's previous value was. This seems to be a > common source of subtle bugs so beware. The option to get around this loss of data from the form data is to use 'readonly' attribute on the INPUT and TEXTAREA. Explanation of the two differences is here: http://www.w3.org/TR/html4/interact/forms.html#h-17.12 -- travis forden aim: tlforden tel: 202.577.4403 http://treevis.com From devrieda at gmail.com Thu May 26 17:31:39 2005 From: devrieda at gmail.com (Derek DeVries) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? In-Reply-To: <42963DDC.6080700@treevis.com> References: <42963DDC.6080700@treevis.com> Message-ID: <7bdec587050526143162c08fd3@mail.gmail.com> toggle for readonly, simply replace 'disabled' with 'readonly. On 5/26/05, Travis Forden wrote: > Daniel Krook wrote: > > > > One caveat that you should be aware of with disabling form elements is > > that when the form is posted, that element no longer shows up in the > > $_POST array. As opposed to being empty or null. This may seem like an > > obvious minor detail, but if you have a checkbox that was checked (or had > > been prepopulated as checked), then disable it, you now never know if the > > user rechecked it or what it's previous value was. This seems to be a > > common source of subtle bugs so beware. > > The option to get around this loss of data from the form data is to use > 'readonly' attribute on the INPUT and TEXTAREA. > > Explanation of the two differences is here: > http://www.w3.org/TR/html4/interact/forms.html#h-17.12 > > > -- > travis forden aim: tlforden tel: 202.577.4403 http://treevis.com > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > From drydell at att.net Thu May 26 17:41:50 2005 From: drydell at att.net (drydell@att.net) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] enable/disable fields for all browsers? Message-ID: <052620052141.2790.4296429E0004864C00000AE6216028074104040A0B979D0B@att.net> Derek beat me by about 30 seconds... so sorry about the redundency.. toggle 2 things I'd like to point out in terms of my style: 1 - calling a function once instead of several times, hence the obj variable 2 - using one if statement if I'm doing multple things in response to a condition -------------- Original message ---------------------- From: Derek DeVries > > > > toggle > > for readonly, simply replace 'disabled' with 'readonly. > > On 5/26/05, Travis Forden wrote: > > Daniel Krook wrote: > > > > > > One caveat that you should be aware of with disabling form elements is > > > that when the form is posted, that element no longer shows up in the > > > $_POST array. As opposed to being empty or null. This may seem like an > > > obvious minor detail, but if you have a checkbox that was checked (or had > > > been prepopulated as checked), then disable it, you now never know if the > > > user rechecked it or what it's previous value was. This seems to be a > > > common source of subtle bugs so beware. > > > > The option to get around this loss of data from the form data is to use > > 'readonly' attribute on the INPUT and TEXTAREA. > > > > Explanation of the two differences is here: > > http://www.w3.org/TR/html4/interact/forms.html#h-17.12 > > > > > > -- > > travis forden aim: tlforden tel: 202.577.4403 http://treevis.com > > _______________________________________________ > > New York PHP SIG: Front End Mailing List > > AMP Technology > > Supporting Apache, MySQL and PHP > > http://lists.nyphp.org/mailman/listinfo/front-end > > http://www.nyphp.org > > > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org From hans at cyberxdesigns.com Thu May 26 17:42:22 2005 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Re: proposing NYPHP Cookbook (aka Re: [nyphp-talk] $$ question) In-Reply-To: <42962FF7.4060803@omnistep.com> References: <25386-38589@sneakemail.com> <42962FF7.4060803@omnistep.com> Message-ID: <429642BE.1030907@cyberxdesigns.com> Rolan Yang wrote: > David Mintz wrote: > >> On Thu, 26 May 2005, inforequest wrote >> >> >> which brings me to an idea that's related, if not quite the same >> thing as >> the above. I propose: let's create an NYPHP Cookbook. There are several >> fine Cookbooks that we all know and love. >> >> Finally, make this an online publication; let each recipe-submitter >> upload >> a brief bio and optional JPEG of h(er|im)self and thus get a little >> exposure. Of course, we could also consider whether it would be >> cost-effective to try to print and sell it as hardcopy and raise some >> $$$ >> for nyphp. >> >> Who's up for cookbook.nyphp.org? I'll volunteer to be part of the >> editorial team. >> >> Didn't we recently start a project similar to this? I think it was the code archive project? I think that project is living in suspended animation. Not to poo-poo on the parade but I think we should pick up the code archive project and add a couple of fields that cover the submitter and beta it. I know there was a lot of talk about the code archive project, I think there were a couple of meetings and even some documents written. Who knows the current status of the code archive project? Are any of you ready to take up the gauntlet and work with the core NYPHP people to get this thing done? I imagine that we could spin the basic set of scripts fairly quickly so that we could start taking submissions and compiling a database of NYPHP Tasty Morsels. I would like to see community involvement on this project. I know for a fact that the core NYPHP people are currently working on a new frame work for the entire NYPHP web site, so if any of you out there would like to join us and help us finish the code archive project and make a new home for the tasty bits of code we all love to read about, contact me. If the scripts are kept fairly straight forward and we attempt to solve just this problem, I think we have a chance of making the project work. This is a great opportunity to get involved, if you are not an uber coder or you have some fear about getting involved, just come and give it a shot. You will learn a bunch, get to know some really cool people and end up with a dog, a beautiful spouse and a white picket fence. Plus, we could use the help. Anyone interested please contact me. Also, anyone with information about the whereabouts of the code archive, please email me. Hans K -- Hans C. Kaspersetz Co-founder Cyber X Designs hans@cyberxdesigns.com http://www.cyberxdesigns.com Operations Guy and Presentations Lacky New York PHP