Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. http://www.sitepoint.com/forums/showthread.php?t=476591
  2. Post your code, maybe we can help you work out your sorting. If not, perhaps describe exactly what you want to do, maybe someone can offer a good solution to your issues.
  3. 1. State save the text in some way. 2. Echo it out into the text area, and show button below it. 3. When button is clicked, call another file and access the state saved text data. Use this to generate the downloadable file, and pass proper headers for download. http://www.tizag.com/phpT/filecreate.php
  4. http://www.yiiframework.com/ Just ran across this, from this link: http://www.phpframeworks.com/top-10-php-frameworks/ To be honest, I was totally stunned that some Framework I had never of had rated above cake/CI. Anyone ever use this framework, or have any personal feedback on it. What are your thoughts (if you have) on this framework as opposed to CI? Me personally, I am a CI person. I like Code Igniter so far more than I like any other framework (including cake) but this new framework looks interesting.
  5. Nevermind, I got a good breakdown. <?php $diff = $seconds; $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); $hours = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24)/ (60*60)); $minuts = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24 - $hours*60*60)/ 60); $seconds = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24 - $hours*60*60 - $minuts*60)); echo $years . ' Years, ' . $months . ' Months, ' . $days . ' Days, ' . $hours . ' Hours, ' . $minuts . ' Minutes, and ' . $seconds . ' Seconds.</p>'; ?>
  6. Getting the difference in seconds between two timestamps is easy. Taking the seconds and doing a breakdown of time frames is also easy. <?php echo '<p>There are a total of ' . round($seconds) . ' seconds between Timestamp 1 and Timestamp 2.</p>'; echo '<p>There are a total of ' . round($seconds / 60) . ' minutes between Timestamp 1 and Timestamp 2.</p>'; echo '<p>There are a total of ' . round(($seconds / 60) / 1440) . ' days between Timestamp 1 and Timestamp 2.</p>'; echo '<p>There are a total of ' . round((($seconds / 60) / 1440) / 7) . ' weeks between Timestamp 1 and Timestamp 2.</p>'; echo '<p>There are a total of ' . round((((($seconds / 60) / 1440) / 7) / 30)) . ' months between Timestamp 1 and Timestamp 2.</p>'; echo '<p>The total breakdown of time from Timestamp 1 to Timestamp 2 is .</p>'; ?> What I am trying to figure out, is get a collective amount as well.... X years X months X weeks X days X minutes and X seconds. Does anyone have any good algorithm for handling that, or have any feedback on where to start to handle this type of math.
  7. Thanks for the additional ideas. I am implementing a few of them now. I may end up doing all of these ideas. Ideas seem to be in short supply lately. Thanks for all the ideas and feedback.
  8. I don't really see anything wrong with CMS systems. At the start of EVERY "New" project (new meaning something I am building from the ground up) I always perform a little check down mentally. Before I go into details about my Checkdown, I want to mention that I enjoy all standard frameworks. The "Main" one I use is codeigniter, but sometimes I use another just for some variation. I have never taken the time to build myself more than a basic framework. They are fun to build, but it would take me a long time to build something as powerful as CI or Cake, so I don't really spend the time doing that when I am happy with the ones that exist. Here is the checkdown I perform. 1. Should I do it custom. 2. Should I use a third party system (Wordpress, Drupal, Joomla (strangely I have never decided to use Joomla), or some other third party system. Then I just decide. If it's a basic CMS system, sometimes I use Drupal/Wordpress. A lot of it depends on if the site can function out of the box, or easy to configure with the CMS. I also go by whether or not the project would be fun to build custom. To me I enjoy doing custom projects, but I also enjoy sometimes using third party systems when it fits what is needed. Sometimes it's easier to do custom. Sometimes I do custom just because that seems like the funnest thing to do at the time. I wouldn't necessarily always rule out the third party systems. Drupal and Wordpress especially are very large, heavy community systems and there is nothing wrong with using them on a deployment for a large site. Some very large sites, that are very successful were build off of Drupal/Wordpress. Generally about 75% of the time I decide to do custom, the other 25% would be a third party system depending on the requirements, and what my thoughts are at the time.
  9. Gives me some ideas. I am going to try to make a tool as a competitor. See if I can do it better. Thanks for the link, gives me some general ideas. Want to try to build my own from scratch and see if I can do better.
  10. Nevermind, I see what you mean. have a text box for header, text box for footer, and text box for sidebar, then perform automatic CSS variants on them. Not a bad idea. Might play around with that some. OK guys, thanks again. I should have enough ideas here to keep me busy awhile. I am going to play around with some of these. If anyone else has any random ideas they come up with, it's appreciated. Thanks again.
  11. I have read all the comments here, and I am not knocking anyones comments at all...there was a lot of really good advice, but overall I feel that Ignace may have hit the nail directly on the head. From reading your original post, reading all the posts that came after + your follow up posts it seems he's dead on. So perhaps varying your routine for your projects would help you a lot. I think he had a lot of words of wisdom in there.
  12. You could be right. I haven't done a lot with IP's. I generally just grab the remote and use that to do whatever I need. I just ran across that link. Didn't look into it much, but was worth posting.
  13. Just some additional feedback. I would advise not relying solely on IP addresses either. However, they tend to be a nice addition to your other security protocols. So here is another bit of feedback, one way that a person can hide their IP address is by using a proxy. I did some basic Google Searches and found out, it might be possible to get someones IP even if they are behind a proxy. http://www.teachmejoomla.net/code/php/remote-ip-detection-with-php.html Not sure if this is going to help you make the system a little more secure, but it's something worth looking into.
  14. I am actually in the process of implementing 3-4 of these ideas. The one that was also interesting was the CSS layout generator. Can you give me more feedback on how you would envision that. I mean someone would upload a HTML file. Would have to validate correct XHTML, if not do some correction on it (perhaps running Tidy on the file or something) and then go through and do some CSS applying. Generating CSS for a specific XHTML structure, for a specific purpose would be easy..that hard part will be figuring out the myriad of different things someone can want. So what was some more of your feedback on the CSS layout generation.
  15. Thanks for the link. I might buy that and see what kinds of contracts it has to offer. Even if it doesn't have anything in there I can outright use, the book itself should teach me enough about contracts to be able to make them myself.
  16. Frameworks still use pure PHP code. The purpose of a framework, whether it's third party (CakePHP, Codeigniter, Symphony, Zend) or custom build, is to try and make development faster. Even when I am building basic xhtml/css websites with little programming I end up using a framework regardless. If I am not developing something in Drupal, Wordpress or another system then I am generally using a framework. My favorite currently is Codeigniter. Even if I am doing a straight xhtml/css website I do a basic Codeigniter install, and do the coding inside a display class to make things easier to keep up with. Frameworks just make things cleaner, faster, and easier to get around. Generally they provide a slew of useful functions to help make some things faster. Like CI just added the cart class not to many version ago. This makes doing a custom shopping cart a lot faster and more efficient. Little things like that which speed up development. That, coupled with the benefits of MVC, make development a lot faster, more affective, and easier to maintain/update later on down the road.
  17. I have reviewed 3-4 templates online. None of them seem that good. Do any of you have any standard project contracts that you re-use on a regular basis. Ones that you wouldn't mind sharing. Just looking for something to base a contract off of. One that covers standard stuff (the work being done, the time frames for completion) and basic stuff like that. I know that one contract can't fit all situations, but I am pretty sure you can get a standard contract template that covers 90% of the issues (just replacing the to do items, and dates). I just figured some of you developers use contracts all the time (I don't always, and when I do it's normally the clients version of a contract). So thought maybe some of you would have some cool contract you had formulated over the years.
  18. Not a bad idea. Then I could give them a variety of misc options they can choose regarding their styles. I might PM you about that for some additional feedback once I get started on it. I know that the phpfreaks community would help with this. I had been spinning my heels on this. I did a basic contact form generator, which is continuing development..I had a lot of ideas for one of those. Also did a basic pig latin generator, which I am going to make better. Was looking for some extra ideas. You guys have given me a lot of feedback for my next 3-4 tools. Thanks again.
  19. There we go, now I am getting some ideas I can work with. Been sitting for weeks trying to think of something. I am going to work up some stuff based off of those ideas. I will try to get a few of them together. If anyone has more ideas, feel free to throw them out there too. Going to see what all I can create with the API's, and try a the random string generator idea, and see what I can form with the other ideas you threw out there. Thanks again by the way.
  20. I just mean random tools (pig latin generator, contact form generator, mobile directions). Just random ideas for small tools. The ideas you gave me might work. Might play around with some of them.
  21. I love being a programmer. It's what I live for. I do a lot of other stuff (coding, design, seo, writing, and some other stuff) but my main thing will always be programming. Yes, it can get boring sometimes..but very rarely. If your bored, then in your spare time start working up some new programming languages. Try some high level languages, try Desktop programming, or programming mods for a game. It's only boring if you do the same thing all the time. Try doing wordpress plugins, or drupal themes. Try learning a new system.
  22. No, that was an example of what I tried. That throws a syntax error.
  23. Is there any way to use ONE alias, along with the standard wildcard. In theory I would think 'products.product_id_number AS product_id, *' That should get the product_id as product_id_number as product_id, then get the rest of them like normal. Is there any way/syntax to perform this action?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.