Jump to content

stuffradio

Members
  • Posts

    253
  • Joined

  • Last visited

Everything posted by stuffradio

  1. Learn how to not be a "n00b" and use a database. http://www.tizag.com/mysqlTutorial/
  2. I'm not asking for a framework to use, I'm trying to make a framework or a CMS type thing for the sole purpose of Web games.
  3. Right, if I get a bigger project, I always start with small things first and work to the ultimate end goal. It's less productive to work on everything at once
  4. I am trying to make a framework that would make it fun for people to create Browser based games. So I'm just trying to think of the best way to lay it out and separate all the code for it to make it easier for those who don't generally know how to program anything. I'm going to be syntax cautious. So ultimately I want to have classes accessible everywhere (Maybe the decorator or factory pattern for this), and make classes with names that would make it easy for people to learn. Example maybe for the game class, I could have it so it would be something like this: <?php $game->baseview("folder/startingfile.php"); // This is the initial base file. This will show up when you load up the index.php $game->config(array('enabled' => TRUE, 'blah' => 'value')); // Maybe this can be an array of different config options? $game->start(); Like I said, I'm just trying to figure out the best way to lay this out right now.
  5. Do people want well organized frameworks, or just something that has a nice admin panel that is not heavily based on MVC like Wordpress. CodeIgniter is semi-popular, but Wordpress is hugely popular and it doesn't have a big OOP framework assisting it. What do people look for in terms of usability in a system? I'm trying to find ways to maybe take elements from both CodeIgniter and Wordpress for a system to assist in making Browser based games. Thoughts?
  6. I know you can scroll text left right and up or down... so I figure, why can't you automatically scroll table rows? What I want to do is, when the page loads... have the table rows except for the first one to start scrolling up. The table rows would go underneath the first table row and it would just keep doing this. Any ideas on what I can use to do this?
  7. Hah! Could be, I didn't code the layout... lol.
  8. I am working on a wordpress site for someone. When I view it in IE 7, the border is a bit messed up. If you go here: http://tucsonseosolutions.com/newtucson/ and look at the right side you can see what I'm talking about. Also, in IE when you move the mouse under the home page... you can see links that are not even supposed to be there show up. If anyone knows how to fix these CSS issues that would be great!
  9. I'm writing a framework for a panel that will make it easy for those who like to run Browser based games. I want to get some opinions on the first bit of code I've written. <?php /** * This is the file that loads everything up. * * @author Carl Wuensche * @Version 0.0.1 * @package CIWG * @Date December 31, 2008 */ /** * Define the path to your installation. * If you have it in the root directory, leave it at default */ define("ROOT_FOLDER", $_SERVER['DOCUMENT_ROOT'] . "./ciwg/"); /** * Folder for all config files * Config files store settings for different areas of the site. */ define("CONFIG_FOLDER", ROOT_FOLDER . "config/"); require(CONFIG_FOLDER . "config.php"); /** * Folder for modules. * */ define("MODULE_FOLDER", ROOT_FOLDER . "modules/"); require(MODULE_FOLDER . "module.php"); /** * Include the URI file so we can control url settings all the time. */ include_once("uri.php"); Thoughts?
  10. Ok, I've been thinking about this too long and I need to pick someones brain on this topic. Here is my code and I'll explain (Btw this is for Wordpress): <?php global $wpdb; include_once('../../../wp-load.php'); include_once('../../../wp-includes/rss.php'); $feeds = $wpdb->prefix . "feeds"; $blogs = $wpdb->prefix . "blogentries"; $users = $wpdb->prefix . "users"; $feed_list = $wpdb->get_results("SELECT * FROM $feeds"); $blog_list = $wpdb->get_results("SELECT * FROM $blogs"); $random_hash = md5(date('r', time())); $headers = "From: noreply@uddyb.com\r\nReply-To: noreply@uddyb.com"; $headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\""; $subject = "Your hourly updated feed results"; ob_start(); foreach ($feed_list as $feedlist): /* Start foreach */ $getUser = $wpdb->get_var("SELECT user_email From $users WHERE user_login='$feedlist->feedUsers'"); ?> --PHP-alt-<?php echo $random_hash; ?> Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit <?php $email_message = "Dear $feedlist->feedUsers, in the last hour here are the latest updates from your feeds:\n"; $rss = fetch_rss($feedlist->feedUrl); $maxitems = 10; $items = array_slice($rss->items, 0, $maxitems); foreach($items as $rsss): $rss_update .= "<a href='$rsss[link]'>$rsss[title]</a>\n"; $rss_update .= "<br />"; endforeach; ?> <?php echo $email_message . $rss_update; ?> --PHP-alt-<?php echo $random_hash; ?>-- <?php $message = ob_get_clean(); endforeach; /*End Foreach */ mail ($getUser, $subject, $message . $rss_update, $headers); ?> I'm trying to have it mail multiple people, the people who are in the wp_feeds table. I have it setup to select all the rows in wp_feeds, then list all rss updates and then email it. I can get it to email sometimes, but sometimes that doesn't work either. Right now when it emails, it emails everyone, but the $email_message shows up for each entry in wp_feeds.
  11. I need to mail 446 people because I'm changing a way the script hashes the password, so I need to find a way to efficiently mail all 446 of them and do it so the host doesn't think I'm spamming. I hear I might need to have some sort of unsubscribe link in the footer to have it considered not spam... but what do you guys think? Do I need to do that and are there any scripts to mail them without bogging the server down while the mailing happens?
  12. I've been using it for a while now and have experience. I just haven't used ZF... so I wanted to know what it's like.
  13. 448191 how is it compared to CodeIgniter?
  14. I also give a +1 to using CodeIgniter
  15. I haven't created anything with Cake... but Smarty is just a template engine. It's not a framework itself. CI has something similar to Smarty built in to the framework. So I'd say just go with CI.
  16. Templating is where you can easily have some designers make a template for your website. For example if you have a variable called header, they would just go like "{header}" in the template, and it would display that info from the website. MVC means Model View Controller. It's a design pattern for frameworks, the way the framework is coupled together and that's how it processes things. The model is like an abstract class or whatever that can handle any databasing needs. The view handles your web pages, the looks of it. Controller controls what the page does. It can load the view, or the model and you can put information from the model in to the view. Yes, CodeIgniter does suffice. There is a template engine inside of CodeIgniter. I hope I answered all your questions well enough
  17. Is there a space after '?>' or is there a blank line after it?
  18. We don't know without any code.
  19. If you want to know what he's trying to do, he's trying to copy the structure of CodeIgniter. (I know because I use it)
  20. I will be looking over some things... I guess the question really is, is using something like the MVC pattern too much for making a simple discussion board? Should I just be using different design patterns for different aspects of the website?
  21. I'm starting a forum from scratch. I want to make it lightweight, and easily extensible. Can you tell me which Design pattern you'd use to make a pattern and why? I'm not making this for anything else, just a forum. I was going to help modify an old forum project that is now dead... but looking at the code it's very sloppy, very much procedural and hard to modify because you have to do a bunch of stuff in each page. This defeats the purpose IMO of a nice open source forum because you need to learn its structure line by line before being able to add or remove to the code.
  22. ..? You just go echo $a . $b . $c; That would output the values for a,b,c Unless I'm not following you here..
  23. Not sure if this works: How to get folder size? Here is an answer. =========================================== function foldersize($path) { $total_size = 0; $files = scandir($path); foreach($files as $t) { if (is_dir($t)) { // In case of folder if ($t<>"." && $t<>"..") { // Exclude self and parent folder $size = foldersize($path . "/" . $t); // print("Dir - $path/$t = $size<br>\n"); $total_size += $size; } } else { // In case of file $size = filesize($path . "/" . $t); // print("File - $path/$t = $size<br>\n"); $total_size += $size; } } return $total_size; } Taken from php.net: http://ca3.php.net/manual/en/function.filesize.php#77900 http://ca3.php.net/filesize
×
×
  • 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.