Jump to content

surefire

Members
  • Posts

    1,008
  • Joined

  • Last visited

Everything posted by surefire

  1. I'm not sure I understand your question, gemini. The only part I could make sense of was: Regardless of the layout of a page, the html is linear, reads top to bottom just like a recipe. So you can include many different things, header, footer, sides, other php files, other scripts, snippets of code, almost anything. I'd be happy to help you but as Jerry Maguire said "Help me help you." I need to see your php code and a url to the page that's giving you problems.
  2. Anyone interested in the exact script that I personally use, can get it by going here: http://www.surefirewebdesign.com/mail/ This is a BETA stage program I created for printing out ready-to-use script that you can upload right to your site and start using immediately. Although I tested it successfully on my own site... I emphasize that this is a BETA version and might need revisions. Directions: 1- Go to the link 2- Input your site name 3- Input your contact email address 4- Submit the form 5-Copy and paste the code into a php file. 6-Put the file in a NEW folder in your public folders. 7-Change one of your current forms so the html tells it to post to the php file 8-Create a thankyou page and name it thanks.php 9-Put the thanks.php page in your main public folder (public root) 10-The thanks.php file can be normal html but must be named thanks.php unless you want to change the code in the script
  3. At the risk of overstepping my bounds... I'd like to put in my two cents to answer the question that other TCH members must be asking: "What do I do now that my FormMail doesn't work?" 1- Go to Hot Scripts and find a mail script that you can use in place of FormMail.cgi (.pl) 2- Do NOT call it FormMail 3- If at all possible, don't put it in your cgi bin folder I recommend a PHP script for the following reasons: >It's free, open source >It's fast >It's relatively easy to learn (but not required most times) If you want a list of PHP form processing scripts to use in place of FormMail, then try this link: http://www.hotscripts.com/PHP/Scripts_and_...orm_Processors/
  4. Thanks, man... Feelin' loved. On a serious note... There are plenty of FormMail scripts, one of which I mentioned in the thread above. With the current FormMail issues, you might want to check it out.
  5. I can't address every question in your post but I will give you my two cents about a few items. Now that the security patch is in place, it should only be possible for forms to be processed if the forms reside on your site. So even if a spammer found the location of your FormMail script, it probably wouldn't do them any good. They'd have to fake the IP, and I doubt that's possible. My point is that just because someone accesses a script doesn't mean that it's actually working for them. That's what the security patch is supposed to fix. I wouldn't recommend changing the code. You were wise to report the issue and hopefully you will receive a response soon.
  6. I don't think all of this is necessary. I rechecked my server logs and it doesn't indicate any problems with included file pointing to images with relative urls.
  7. I was recently looking for a solution to a scripting headache and found my answer at my old favorite, DevShed. If you want some insight into writing SQL statements or want to clean up your code, then these articles are great: http://www.devshed.com/Server_Side/MySQL/Speak Both articles found at this link.
  8. I'm not sure what 'incorrect' information DSDemmin was referring to... but he knows TCH's formmail offerings better than I do. I would say that if there was a server issue, then it would most likely affect lots of aspects of your website, not just your form processing script. That leads me to believe that it doesn't have anything to do with the server. (But I have no way of knowing) Based on what you have said, I would suspect that the security modifications to the FormMail script or something in your html isn't working. I don't use this particular script... so my usefulnes on this topic ends right here.
  9. 16k files... holy @#$% If there was ever an example of why someone might want to use PHP, SSI or ASP to make site-wide alterations by just changing two files instead of uploading a whole site... this is it. But you didn't ask about that... Unfortunately, I don't know if you can unzip files after they've been uploaded. I haven't been able to make that work in the past. I had to remark on this post just out of amazement at the number of files.
  10. Tough to diagnose without seeing your code, but my best guess is that something in your script is pointing to a file that doesn't exist, or is located in a different part of your directory. Perhaps you have a redirect that is using a relative url to point to a thankyou page or to the form processing script itself (FormMail?) If you have relative urls in your script, you might want to try replacing it with a static url and seeing if that fixes it. Relative url example: "/path/to/cgibin/FormMail.cgi" Static or absolute url example: "http://www.yoursite.com/path/to/cgibin/FormMail.cgi"
  11. By the way, I should mention that the quotation I posted at the start of this thread shouldn't be taken as 'gospel'. Just one person's best interpretation of recent changes at Google. I have watched several forums on SEO over the past months and many people are reporting 'strange' results and changes. Other threads have indicated that Google admits to changing their algo... but I have not verified this independently. What I have seen suggests to me that 'something' new is going on... but what exactly is yet to be determined. If true... timing couldn't be worse... but I guess it gives me time to work on backward links.
  12. Do you know this because your images aren't showing up, or because your error logs tell you this is the case, or is everything working okay but you think that this is happening? I ask because I don't seem to have problems with relative urls pointing to img folder/files. But perhaps I haven't inspected my server logs closely enough. So, I'd be interested to know why you ask... maybe something for me to learn here that I've overlooked. However, the answer, I believe, would be your choice of the following: 1- Static url (http://www.yoursite.com/images/pic.jpg) 2- Use $_SERVER['DOCUMENT_ROOT'] . "/path/to/images/pic.jpg" 3- Define 'root' and use ROOT . "path/to/images/pic.jpg" Any three of these should point the server to the exact location of your files in your file directory... regardless of where the php code resides. I dislike the first method... it would seem that the server wouldn't know that this is an internal file, and therefore would take a split second longer... but don't quote me on that. My favoriate choice would be #2... but.... Again, I'm not convinced that any of this is necessary. I'd be happy to admit I'm wrong... just hasn't been my experience that these extra steps are necessary. PS - For anyone reading this post who is knew to programming, the whole business of /path/to/whatever is not meant to be literal. If you type this verbatim, it won't work. This is just the best why I know to give instructions to someone with a web directory architecture that is totally unknown to me. You are to replace /path/to/whatever with the actual path directory information that points the server to the location of your file.
  13. This is my own research and I am a member, not a moderator at this forum or a support rep... although I'm available if Bill needs the help. You can find the Acceptable Use Policy at http://www.totalchoicehosting.com/web-hosting-aup.html Here is my personal interpretation : If your list is truly opt-in... then you should have no problems. If you are operating in a manner that's honest... you should have no problem. If you give recipients a way to remove themselves from ALL future mailings... you should have no problem. And basically, you should avoid actions/business tactics that would cause you embarrassment if the details of your actions were made public in this forum, the newspaper, to your clients, etc... Please don't take that last comment as preaching... that's acutally a good acid test that has served me well over the years. In practice, I have a site with a rapidly growing subscriber base. Every now and then I'll send out information that is relevant, fresh, and mostly non-commercial. I don't think anyone has a problem with opt-in. The problem arises when several complaints are directed to TCH that indicate a member is sending email to folks that do not want to receive the information. Hope this helps clarify. I'm also hoping that by giving you a response, that this topic will get a bump and get some more replies. PS - It is not a requirement to use mailman. I have my own mysql powered mailing list. To the best of my knowledge, TCH doesn't care what scripts you install on your site, as long as they are safe, and within the confines of the AUP.
  14. Critical mass, I dig your site, very easy to navigate. I assume you're using OScommerce (think that's what it's called). I also see that you've managed to remove those pesky dynamic urls from your site... nice job. That probably took quite a bit of programming. If you did that yourself then I'd say you know your share of php. On another note... The php function header() is very similar to doing a meta refresh/redirect in html. The code on page A tells the server to immediately serve up page B. URL changes completely as you are redirected to page B.
  15. Found this posted by the moderator of an SEO forum I watch: After tracking threads on several different forums, it seems that something very different is going on at Google.
  16. That's a redirect you're doing here. Any visitors accessing this page where you've got the php code listed above are being redirected to 3Cannons.htm I assumed that's what you wanted to do. This is not an include... it's a redirect you're doing. If I've missed the purpose of your code or your intentions, then my apologies. Your //comments leads me to believe that your include file is 3Cannons.htm (although I'd probably encourage you to change it to a php file... not the issue here) If you're trying to include the file, then you need to replace the 'header' function with an 'include' function. I think the 'slow' speed is a result of the redirect... you're sending visitors to a new page as soon as they land on the first one. That's an extra server request, and requires accessing the file and displaying in the browser (you already knew that, of course). If you indeed were trying to do a redirect then there's not enough information posted for me to tell you what's going on.
  17. Can you post your code? I can't imagine why it wouldn't work. Using a subdomain shouldn't have any adverse effect on the location of the included library files. Here's the info I was talking about before. From: http://us4.php.net/manual/en/function.include.php
  18. I second Jimuni's sage advice: give users a low(er) tech option.
  19. Good job, D Scott
  20. If you give me the url, I'll take a look. If you have time to post the code too... all the better. But if you don't have time... I understand. I was thinking about this thread while driving home and thought that maybe the easiest way to describe this process is taking a working page... splitting it up into three pieces... and reassembling them a split second before they're displayed to your visitor. a)header b)content c)footer Just before the page is shown, header written, then content, then footer. So, if the page you start with has issues, then so will your reassembled product. You have to start with a fully functioning web page. Javascript isn't tough, but it can add one more wrinkle to work with. Anyhow, I promise you that when your PHP book arrives, it will suddenly become crystal clear.
  21. Jim, The reason I use is so that the correct url is formed regardless of the position of the webpage in the site directory. Here's what I used to do... before discovering this trick at php.net: I'd write a "template" php file like But the url to my header.php file would be wrong for files located at various points in my site directory. Exampe: www.mysite.com/path/to/file.php file.php starting off with includes would be referencing the header.php file with a bad relative url. Without even intending to... I came across the $_SERVER['DOCUMENT ROOT']. blurb in a comment from php.net Basically, it's similar to writing your include like an absolute url: include("http://www.site.com/path/to/header.php"); but my understanding is that the server understands it's not an external url. Point is... Looking through my log files, before I found this trick, I noticed that somehow the server was finding the right header.php file but in the meantime I was racking up errors. Not the worst crime in the world... but presented with a solution, I'll take it. So there you have it. There are other great pointers at php.net under 'include()' As to your question on subdomains... I don't know the answer to that one. I do know that you can accomplish the same thing by declaring constants for your subdomain site urls and then using those in your code. I got that idea also from user comments at php.net under 'include()' I'd visit it for more info and to find tricks and solutions that fit your need.
  22. Natimage, Not to be picky... but what I have described here is extremely different from the code you originally posted. I only say that so you'll read over the details closely... not so that you'll feel bad. You are trying something new and you're going to learn a ton from your efforts. Please read over my two posts very closely. Easy to skip or change the order of steps because of overconfidence. In a nutshell: Your code used php to incorrectly bring javascript into your html. The rewrite provided removes EVERYTHING from your pages except your content and puts the redundant sections into 2 separate php files that are included. Remember: Step One: Create a fully functional html page. If you want js in your page then this has to function correctly too. Step Two: Cut and paste everything except your content into one of two php files. Step Three: Your basic php file for the rest of your site pages is: Easy.
  23. Copy everything above and including the <body> tag and put it in a file that ends with .php (you could also use .inc put just use .php... it's safer). In this example... we'll call it header.php and the contents will be: See how the script line for javascript is written in there just like a regular html document??? Nothing crazy, difficult, or confusing here. Now we need a footer. Let's say you want a copyright at the bottom of every page. Here's footer.php See how the footer.php file closes out the tags we opened in the header.php file??? So now we have header.php and footer.php... what next? Let's create our first 'real' php page that visitors will see. index.php will look like this: Notice how everything between the header and footer is html???? It should be... header.php has opening html tags, and footer.php has closing html tags. Load header.php and footer.php to inc folder. Load index.php to your main folder (www.yoursite.com.index.php) Point your browser to www.yoursite.com/index.php and it should work. View the source code and what do you see? HTML... just like you should If you get an error, cut and paste the error in your reply to this post and one of us will help you out.
  24. Cool... thanks for posting the code. That makes it easy to help you. By the way... thanks for giving it a try. It's easier to help, teach, etc, when the other person can see the outcome of the code. Okay. Here's the process to make this work well: 1- Create a fully functional html/javascript/whatever else page and save it with .htm or .html extension 2- FTP it to your site and verify that it "works" the way you want it to 3- Once you get your page to the point that you are thinking "Now I'd like to create a kind of template out of this page so I don't have to retype header, footer, nav, etc...." you're ready to use php include() function Looking at your code, what you've attempted to do is to include some sort of js file... that's not what we're trying to do here. We need to back up and explain something about js (of which I'm not an expert). There are two ways to work your javascript into your page... writing the code in the <head> section and then using it in your <body> or having an external .js file, linking to it in the <head>, and using it in the <body>. Most will recommend the second method... external .js file. Alright. So all of your javascript code needs to be in a file that ends with .js It looks like you've called it parent.js I'd rewrite your page like this: All I did here was take out the php code. Does your code work? I don't know. It will if 1-Your .js file exists and is placed where you have indicated (inc folder) 2- Your js code is well written 3- the rest of your html document is error free. At this point, if your file doesn't work... it's not php... it's js or html problem. You have to have a working html page before going any further... done? Next step is to take all the repetitive stuff out and put it into files we can include. This is as simple as cutting and pasting. Here we go... See next post...
  25. You don't have to have the bulletin board 'wrap' and leave the header and footer static for the site to have an integrated feel. Look at this page at TCH bulletin board. Despite the fact that you see the invision power board logo... there is an integrated feel to the site. I am 99.9999% sure that this bulletin board script uses php include() function to put the headers and footers here. If you want to create the same effect you see on this board... then use PHP include. If you want the screen scrolling features of frames... then nothing, to my knowledge, will divide your screen into separate panels EXCEPT frames. Unfortunately, frames has major drawbacks. You mentioned you are thinking of postNuke. That works fine... but doesn't use frames either. Like all options, Nuke and postNuke have strengths and weaknesses. Since I posted these in one of your other threads, I won't repeat it here. It's as simple as this.... If you want the header and footer (or some other window of your page) to stay put while the user scrolls and navigates through your page, then FRAMES is what you are looking for. As others have already said, there are "better" ways to give every page of your site a constant look and feel rather than frames.... but whatever works for you.
×
×
  • Create New...