Jump to content

SFB

Members
  • Posts

    282
  • Joined

  • Last visited

Posts posted by SFB

  1. Another possibility might be just a homepage admin center like SFB is thinking about. A password-protected place to set up polls, page counters, etc. The features would need to be thought out.
    o goodie i have a second brain now. it knows what i am thinking. basically i am creating a bunch of stuff i have thought about adding to my snowforts website but decided not to because it doesnt seem to fit the theme anymore. eventually i will sort of connect them together and make a website in a box sort of thing. I should learn some stuff about sql but dcole may or maynot have that set up yet. I havent tried it. just about any of my things could easily be converted from using txt files to using a databse.
  2. I see. Well, at least make sure that the filename is a legal filename. Other than that, I would say to turn on errors so that you know what is going on. It's a little silly to develop on a server without errors on. You can use ini_set to set display_errors to 1 on your page.
    i am 99% sure that test.php would be a legal filename. i even tried /test.php and a real location but it didnt work. i cant figure out what is up. i just entered in a filename in qoutes in the actual code for testing so i knew it wasnt the form. i took this part of the script directly from the login page then modified the location and the error message. it should work. i tested it without the if statement to see it the if was causing it to not create the file but it didnt work. i should check the permissions on the directory... i bet that is it. I cant use ini_set... it doesnt work. get an account at dcole.ath.cx and see. dan doesnt want to go throught the extra work of figuring out how to do it so if i want it i have to explin how it is done and then hope that he does it corectly and if he doesnt then i have to try and figure out what went wrong. i was the one who had to figure out how dan could host multiple domains.Edit: yep it was the permissions on both the file and the folder. for some reason it only had write on the user and not on group. i fixed it.
  3. O um yeah i dont know why i was thinking that that would well it doesn't thanks for pointing that out. for the fopen the filename shouldn exist. i wanted to create the file. i thought that the 'w' in the fopen ment open for wrighting if doesent exsist try and create it.

  4. ok here is the code to create a poll but i cant seem to get the fopen to work.

    <html><head><title>Create-A-Poll</title></head><body><?phpif (!isset($_POST['question'])) {  echo "<form action='index.php' method='post'>Name of file: <input type='text' name='file' /><br />Question: <input type='text' name='question' /><br />";  for ($i = 1; $i <= 10; $i++) {    echo "answer".$i.": <input type='text' name='answer".$i."' /><br />";  }  echo "<input type='submit' value='submit' /></form><br /><div>Leave extra fields blank</div>";}else{  $question = $_POST['question'];  $filename = $_POST['file'];  $str = "<" . "?php\n";  $str .= "\$answers = array(answer, votes);\n";  $str .= "\$answers['answer'] = array();\n";  $str .= "\$answers['votes'] = array();\n";  $str .= "\$question = \"" . $question . "\";\n";  for ($i = 1; $i <= 10; $i++) {    if (isset($_POST["answer$i"])) {      $input = $_POST["answer$i"];      $votes = 0;      $str .= "\$answers['answer'][] = \"" . $input . "\";\n";      $str .= "\$answers['votes'][] = \"" . $votes . "\";\n";    }  }$str .= "?" . ">";if (!$handle = fopen($filename, "w")) {  echo "We are sorry please go back and try again.  If this problem occurs again please contact the administrator<!--001(fopen)-->";  exit;}if (fwrite($handle, $str) === FALSE) {  echo "We are sorry please go back and try again.  If this problem occurs again please contact the administrator<!--002(fwrite)-->";  exit;}fclose($handle);}?></body></html>

    it always gives me my error message.

  5. Um, this isnt hard to do, I made a quick poll for my site. Well, I took it from zend.com's beginner tut lol. But I already had an admin center and I just stuck it in that page :).
    This is why i am hesitating to add my own. many people alredy have some sort of admin center.
    if you are developing some kind of "application" to distribute online will be better with a backoffice.Imagine that a kid wants use your poll but he doesn't know nothing about html/php. will be easier with a page to configure the poll options.don't worry about security. make online a page to setup de database values for poll options.
    I dont think of this as an application as much as an add-on to someone's website so then they should at least have general html knowlage. security should always be an issue, the world isnt perfect. eventually somone will figure out the location of the admin center. i will make a simple admin page just to create polls but it can be disabled, the user will have to change something in the file like $disable = 'FALSE'; to $disable = 'TRUE';
  6. My feeder gold fish is 4 years old. (the type that's supposed to feed the larger fish and live for 3 weeks) :) I have another one that's 2 years old. My 6 year old died a couple weeks ago :)
    I have about 4 year old fish (plural) i got out of my grandparents pond. we didnt even think that they would make it home.
  7. ok so basically i have the poll made but i was wondering if you the reader of this post was downloading my poll to use on your site, would you want an admin pannel or would you rather do the editing of questions and answers in the code yourself. An admin pannel would be lots of extra work and would require a way to make it secure so that other users cant create polls that you may not want.

  8. The pallete for a GIF image has a maximum of 256 colors, so that's why it is granular. JPEG, on the other hand, and PNG, are both 8 bits per channel, with 3 channels for R, G, B. So there are 256 colors per channel, or 16,777,216 colors total.
    so are you saying i should stick with my jpg images or a png version?wow thats interesting. you wrote 1 6 , 7 7 7 , 2 1 6 (withouth the spaces) but the forum rounded it off to 16.7 million. I just noticed it when i went to reply. humm i wonder 12,345,678EDIT: justsomeguy, did you edit it to the exact number? now it is showing the exact number
  9. I switched to gifs but i shouldnt have... got to switch back or to png. the gifs i got look like someone colored sand and made an image with it. way less quality and more filesize. mabey i converted them wrong i dont know. if you look in the next probably 5-10 minnutes you will see the poor quality gifs on my home page. EDIT: I left the first image as a gif for now or untill i figure out why my gifs turn out like granular snow at mount kato

  10. the images are resized. now everyone can be happy :):) i didnt see any significant change in loading time though
    yes i got done what needed to be done. paint is a bad choice. microsoft photo editor is much better for resizing images. one time i opened an image in paint and then saved it about 10 times and it got really blury. I wish i had photoshop.
  11. why use html to resize the images...that method has been depreciated.
    I heard that if you dont spesify the size of the image it actually takes longer to load even if the size you are telling it is the same size the image is. I will get to resizing those images if someone can tell me a way to resize them that will bring the filesize down more significantly as well.
  12. opera, you are so funny :) . ok so i cusimized opera. i removed the wand and those doubble forward/backward arrows. well anyways slowly (over a month) changes like undid themselves. then i decided to try out what i had removed from the browser and now i like those buttons. at first i didnt know what the wand was so it got removed but now i use it all the time on sites that don't hold valuble information (like finantial info) i use the doubble arrows for forward and back all the time too. good thing opera decided that i wanted them after all :) .

  13. HijackThis itself doesn't solve anything, it just tells you what it finds on your system. Most of the time it's still up to you to track it down and delete it. You can remove the entries that HijackThis finds with the program, but 99% of the time the program that made them will remake them.
    I used hijack this and ctrl-alt-delete to solve my problems. i just wrote down all the running proccesses (when i was experiencing the virus/malware thing) then looked them all up. found out i had two evil processes and then that website told me what to do then i found the root of all the evil on my computer and deleted it. then when i was sure it was gone i made a new restore point so it wouldnt come back if i had to restore my pc. all is good now
  14. One problem is that you are using the original images as thumbnails and resizing them in the img tag. That means you have a 61kb thumbnail on your page. You should resize the images in an image editing program and save the smaller thumbnails, an image that size only needs to be 5k, not 61. You can still link to the larger image, but if you use the full-size image for the thumbnail, you are just wasting bandwidth.
    lol that was a thumbnail of the original image. that was 10% of the original size. i think the full image that i put on the web was about 60% of the original image. ok so does anyone know of a good free program to edit images. i was using microsoft photo editor but that seems to make a low quality image at a large file size. i have flash and google's pisca but those dont seem to do me much good. mabey i am going about this in all the wrong way. how would anyone decrease the filesize. i only want the image to decrease in size (height , width) no more than 50% but i want the filesize to decrease 90% i think, well the final size about 10% of the original(5k not 61)

    HELP

    SFB made a very nice one with the GD library, he has a thread in this forum about it.
    here is where you can test & download it. http://php-scripts.ath.cx/captchaI think it is well commented and somewhat customizeable. you do have to get your own fonts though, but thats easy. just take them from your computer. I left them out because i didnt know if i could have them in there when all the fonts are coppywrighted. if somone can clear that up for me and prove that i wont get in trouble for including them in the download i will add them back in.
  15. Yes, Your images. Original sizes are little bigger than showing. Plus in my opinion, file sizes are big too.dorothy
    lol the problem is fixed now and it wasnt my images. normaly my site loads in under 3 seconds (for me). i have removed the images from the home page a while ago but they have returned by request of my visitors. i suppose that i could consider making the actual image smaller.
  16. I have it installed but I never use it...
    i installed the ie tabs but didnt find a use for them except for those wierd ie only sites that would work on any other browser. i also installed an extension that allows you to use any browser in firefox. i should try using opera in firefox. lol that would be like awsome, the custome things i like from firefox but with the speed of opera.
×
×
  • Create New...