Jump to content

falkencreative

Advanced Member
  • Posts

    4,419
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by falkencreative

  1. As far as the directory goes, perhaps you should look for preexisting code to save you time? For example: http://www.phplinkdirectory.com/articlescript/ It does cost between $25 and $75, but it may save you a lot of time. (Just to clarify, I haven't used this -- just found it doing a quick Google search -- so I can't vouch for it, but it looks reasonable and looks like there are a good amount of support/customization options).
  2. Welcome to the Killersites forums! I think the challenge here is this: Realistically, are you going to be able to convince these "mom and pop" type businesses that they need a website, especially in a rural area? Perhaps you should specify: how rural is "rural"? "I still use a dial up modem" rural? If so, it might be more of a challenge. Sounds like you don't have to depend on money from this to make ends meet though -- a situation that I'm sure some would be jealous of!
  3. Looks good overall... Coding looks good, with the exception of a couple missing alt attributes and a h1 tag that is inside a span... Design looks pretty good as well -- I have no problem with the current colors / fonts. What I'd suggest changing: -- The three boxes (one stop permitting, location gallery, falmouth production guide) appear on all pages... perhaps they should only appear on the home page? Also, I find the film border a bit distracting in the header on those three boxes. If the white dashed border (the filmstrip edges) were thinner, the text would stand out more. -- Not a big fan of the rollover navigation (specifically, the way the text jumps and gets larger). Maybe a simple color change and/or an addition of a slight gradient behind the selected nav item would look better? -- On the home page, the fact that some of the text is left justified and some of it is centered is a little odd -- I'd suggest being consistent. -- Also on the home page, perhaps you could add "[PDF]" or some other sort of notification that the user will be downloading a PDF rather than just looking at a new page? -- Perhaps the large graphic at the top of the page just above the navigation could change depending on which section the visitor was viewing? Might add some interest.
  4. I haven't heard anything about sessions being unsafe, although there probably are ways to make it unsafe if it isn't well written. I know you don't store data that needs to be secure in cookies, but I believe sessions should be fine.
  5. About 16 hours for me... Have a full day of work ahead of me still.
  6. Alternately, you may have some other program that you are running that uses port 80 that is giving you issues... Skype, another server, some antivirus programs... This has a bit more detail on that: http://forum.phpvideotutorials.com/showthread.php?t=2571
  7. For your sanity's sake, I'd suggest working with a free text editor such as Notepad++ or PSPad -- they'll have useful features like tabs and color highlighting that will make your life easier. As Wickham said though, Notepad works too -- just follow his instructions.
  8. This might help: http://www.daniweb.com/forums/thread101678.html Are you by any chance running IIS at the same time as WAMP, or have them installed at the same time? If so, that may be what your problem is...
  9. After downloading WAMP, you installed it, correct? And you ran the program and made sure your server was on before you typed in http://127.0...etc, correct? Stefan has two videos that cover installing WAMP and getting it set up: http://idea22.com/video/details/id/200708285941765250 (part 1) http://idea22.com/video/details/id/2007082810695178710 (part 2)
  10. Here's what I eventually settled on... based mostly on a code sample from http://abeautifulsite.net/notebook.php?article=75 -- Caches the tweets, refreshes the cache every 10 minutes (reduces load on Twitter.com, which only allows 100 calls per hour) -- parses URLs properly, and if the tweet includes a URL, adds the link -- Includes the time the tweet was posted, in a "two minutes ago" or "two hours ago" type format, rather than an exact time -- Includes basic error checking The object gets accessed like this: $gettwitter = new twitter('twitterid#here'); echo $gettwitter->getStatus(); Class: class twitter{ const CACHE_FNAME = 'resources/twitter.status'; function __construct($id,$addAnchors=true) { $this->id = $id; $this->addAnchors = $addAnchors; $this->status = $this->load(); } private function load() { $ret = ''; $life = (time() - filectime(self::CACHE_FNAME)); if($life 0) $ret = trim(file_get_contents(self::CACHE_FNAME)); return $ret; } private function save() { file_put_contents(self::CACHE_FNAME,$this->status); } function getStatus() { // fetch new status if(!strlen($this->status)){ $this->status = $this->fetch(); $this->save(); } return $this->status; } // http://twitter.pbwiki.com/RelativeTimeScripts function get_elapsedtime($time) { $gap = time() - $time; if ($gap return 'less than 5 seconds ago'; } else if ($gap return 'less than 10 seconds ago'; } else if ($gap return 'less than 20 seconds ago'; } else if ($gap return 'half a minute ago'; } else if ($gap return 'less than a minute ago'; } $gap = round($gap / 60); if ($gap return $gap.' minute'.($gap > 1 ? 's' : '').' ago'; } $gap = round($gap / 60); if ($gap return 'about '.$gap.' hour'.($gap > 1 ? 's' : '').' ago'; } return date('h:i A F d, Y', $time); } private function fetch() { // init $c = curl_init(); curl_setopt($c,CURLOPT_URL,"http://twitter.com/statuses/user_timeline/$this->id.xml"); curl_setopt($c,CURLOPT_RETURNTRANSFER,1); // exec $src = curl_exec($c); curl_close($c); preg_match('/(.*)/',$src,$m); $status = @htmlentities($m[1]); // check for errors, in case request is over 100 request limit if(!$status) { return "Error: Error connecting to Twitter!"; } // add anchors? if($this->addAnchors) $status = ereg_replace("[[:alpha:]]+://[^[:space:]]+[[:alnum:]/]","\\0",$status); // get time preg_match('/(.*)/',$src,$m); $created_at = $this->get_elapsedtime(strtotime($m[1])); return $status . " " . $created_at; } } ?>
  11. OK, so I've been working on a simple script that pulls my twitter status/time posted from twitter.com and displays it in my website. Here is the code that I have so far: // http://twitter.pbwiki.com/RelativeTimeScripts function get_elapsedtime($time) { $gap = time() - $time; if ($gap return 'less than 5 seconds ago'; } else if ($gap return 'less than 10 seconds ago'; } else if ($gap return 'less than 20 seconds ago'; } else if ($gap return 'half a minute ago'; } else if ($gap return 'less than a minute ago'; } $gap = round($gap / 60); if ($gap return $gap.' minute'.($gap > 1 ? 's' : '').' ago'; } $gap = round($gap / 60); if ($gap return 'about '.$gap.' hour'.($gap > 1 ? 's' : '').' ago'; } return date('h:i A F d, Y', $time); } function twitter_status($username) { $twitter_url = "http://twitter.com/statuses/user_timeline/$username.xml?count=1"; $buffer = file_get_contents($twitter_url); $xml = new SimpleXMLElement($buffer); $status_item = $xml -> status; $status = $status_item -> text; $created_at = get_elapsedtime(strtotime($status_item -> created_at)); return "\"$status\" $created_at"; } $twitter = twitter_status("falkencreative"); This works... as long as I can access my Twitter account. It looks like after 100 requests in an hour, the script dies with this PHP error and causes most of my page to stop displaying: Line 67 is this line: "$xml = new SimpleXMLElement($buffer);" Regularly, the XML that should be returned is this: ? Tue Dec 30 21:37:30 +0000 2008 1086676756 OK, just populating my portfolio left... ? twitterrific false false ? 9250782 Benjamin Falk falkencreative Orange County, CA ? Benjamin Falk | student, designer and frontend developer. ? http://s3.amazonaws.com/twitter_production/profile_images/57732233/getavatar_normal.jpeg http://www.falkencreative.com false 16 But when I get the error, this is what I get: /statuses/user_timeline/falkencreative.xml?count=1 ? Rate limit exceeded. Clients may not make more than 100 requests per hour. Is there any way I could add some sort of error checking (perhaps through try/catch?) to catch the error and return an error message, instead of generating the PHP error? I've tried playing around with it myself, but it's going over my head.
  12. Thanks for sending me the files... Basically, you have most things right. Looks like you have a good file structure worked out, and most of your code is correct. Three things though (basically, my comments are exactly what all of the other members above have been saying): -- What editor were you using to save your default.php file? When I previewed it, I got some strange squiggly characters at the top of the page. Resaving it in dreamweaver fixed the issue. -- Secondly, this line is incorrect in two ways: background-image: url(css/dark_pixel.jpg) no-repeat; First off, you need to use "background:" rather than "background-image:". Secondly, keep in mind that your file paths are relative to whichever file you are currently in. So, since the CSS file you are working on is in the CSS folder, there is no need to add "css/" to the beginning of the file name. If you want to access an image file that is in the same folder as the css, just use "dark_pixel.jpg". If you want to access a image file within your images folder, you need to go up one level (moving out of the CSS folder), then into the images folder, and then select your image (so, in this case, "../images/dark_pixel.jpg") So, to recap, in order to get this to work, you need to change line 23 in your css file to this: "background: url(dark_pixel.jpg) no-repeat;" -- Also, at least when I preview the default.php file, I don't get any images to display because there aren't any -- in your css, the only image you are using is associated with the #logo div, and that doesn't appear on the page. Hopefully that helps clear things up. You have some issues with your CSS layout, but I don't want to discuss those until you get the images issue sorted out first.
  13. To do this, you'll need to add some code to the menu... For example, to add a home link, you'll need to: -- add an "a" tag around your Home text like this: Home -- then style the a tag in the CSS so that it takes up the full button (using display:block, and giving it a height and width): #home-header a { display:block; height:20px; width: 190px; } -- then add some minor styling to remove text color change and border: #home-header a:link, #home-header a:visited { color: #7D7D7D; border:0; } #home-header a:hover, #home-header a:active { color: #7D7D7D; border:0; } That should get you started... Try that, and let me know if you run into any issues.
  14. I've seen this one (or variations of it), but I hadn't seen anything else by him. Thanks! My redesigned website uses a design/development related quote on every page, so I was looking for inspiration. http://www.quotesondesign.com was pretty useful too.
  15. Huh, I didn't know that... This is another good place for bad sites: http://commandshift3.com/leaderboard/losers
  16. I ran across this thing of beauty today: http://yvette sbridalform al.com/ Have you seen any other sites that desperately need a redesign?
  17. Oops! Glad to hear you got it sorted out.
  18. I know this is random, but I'll post it anyway... anyone have good design or programming related quotes they like?
  19. Your files should either be HTML strict or XHTML strict... See this post: http://www.killersites.com/forums/topic/62/html-or-xhtml-updated-30-july-06/ In order for the server to be able to understand and display PHP code correctly, it needs to be within the www directory. Usually, I create a new folder within the www directory for each new project I work on, and keep all of my files (php, html, css, etc) within that directory.
  20. It is a bit difficult to help with this, simply because you have to tell us the steps, rather than be able to show us... If we can't figure it out based on your comments, you may want to use Screencast-O-Matic (http://www.screencast-o-matic.com/), a free web service that will allow you to quickly make a screencast showing the steps that you are taking and provide you a place to upload the file. If you do that, you can just provide a link to the screencast, and I can actually see what steps you are taking.
  21. If you have both WAMP and XAMPP installed, I'd suggest deinstalling both and just installing WAMP. I'm not sure, but it may be possible that if you have both installed at once, it can cause issues. Once you have only one of the two installed (I tend to prefer WAMP), perhaps you can step us through the process of running your PHP script? Assume that WAMP is off. What are the steps you are using to start the server? Once the server is started, where are your files located, and how are you accessing them?
  22. The old site was several years old, and the new forum is a bit more up to date and easier to use. The old site has been shut down, but is still available online in case old members need to reference old posts. It is also a useful reference, and hopefully visitors will still find it useful. This is a bit of a tough topic... If your friends don't understand web design themselves, things will be more difficult. Basically, if you are making a static HTML site and they want to update it (and they don't have a HTML editor or know how to do web design) they have to come back to you. Usually, the way I would approach this is to build a Content Management System into the site, such as Wordpress or CMS Made Simple. It will take a bit of your time figuring out how to use the system, but it will make it easy for clients to update the site without HTML knowledge. I highly recommend CMS Made Simple (http://www.cmsmadesimple.org) -- I have found it easy to learn and use. I tend to discourage the use of a web site builder -- I usually find they aren't great quality and generate bad code.
  23. I suppose you could use it like that... it can do a lot more though. If you download the desktop client (it has versions for both Mac/PC) you can organize all of your notes into folders or by tags. You can drag/drop images from your desktop into Evernote, and the premium version (I think it's $50 per year) lets you attach files to your notes and increases your upload capability. The notes then will sync with the online client, and you can have access to them via your desktop software, online, or on your phone (if you have a blackberry/iphone that you can install software on). You can also specify what folders you want anyone to be able to see online, and which folders are private, so it is an easy way to share files too. I have both my personal computer (a Mac) and a PC at work, and I appreciate that I can keep things synced between computers, so no matter which computer I am using, I have access to code snippets, notes, bookmarks, photos, screenshots, etc. In my case, I have a folder set up for all my client details, and a note per client inside that folder that contains contact information, usernames, passwords, etc. It has also been extremely useful for keeping track of design inspiration (photos, screenshots, etc), since I can tag each item so I can easily find it later. I've actually meant to write a blog post or brief article on Evernote, and just haven't gotten around to it yet...
×
×
  • Create New...