Jump to content


Advanced Member
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by falkencreative

  1. falkencreative


    According to http://laravel.com/docs/installation#server-requirements, in order to run Laravel, you'll need PHP 5.3.7 or newer and the MCrypt PHP extension. If you don't have one of those, you'll need to contact your hosting provider about that.
  2. falkencreative


    Yes and no. If you want to create specific URLs within your application, you need to have a way of telling Laravel what action you want to happen when someone visits that URL. So yes, you need to have a route set up, to tell Laravel that when someone visits "X" URL, it needs to load "X" controller. The controller will then determine what to do and what to show the visitor. So yes, you will be likely creating a route every time you create a new page or piece of functionality... but the majority of the "work" will be done by the controller or view, not by the route file. These articles might be useful for you to get an overview of Laravel and some basics of understanding how things work together: CRUD: (using a database to create, remove, update and delete records) http://scotch.io/tutorials/simple-laravel-crud-with-resource-controllers Building an Instagram type application: part 1: http://code.tutsplus.com/tutorials/building-web-applications-from-scratch-with-laravel--net-25517 part 2: http://code.tutsplus.com/tutorials/build-web-apps-from-scratch-with-laravel-the-eloquent-orm--net-25631 part 3: http://code.tutsplus.com/tutorials/build-web-apps-from-scratch-with-laravel-filters-validations-and-files--net-26058 Source code: https://github.com/nikkobautista/laravel-tutorial
  3. falkencreative


    What article are you following on installing Laravel? I don't remember having to do anything special, as long as you are running a recent version of WAMP/XAMPP/MAMP, I believe you should be fine. I believe this is roughly what I followed: http://code.tutsplus.com/tutorials/how-to-setup-laravel-4--net-28614 with a reference to http://laravel.com/docs/installation
  4. falkencreative


    I think Laravel is the better long term option, especially if you ever try to get a job based on your programming skills. Overall, my impression is that while CodeIgniter is a little easier to learn, learning Laravel will help teach you modern web development practices (working from the command line, using Composer, etc.) If you have questions about getting it set up (it's a little tricky, at least for the first install), feel free to post, and I'll see if I can help. I've personally been reading through the Code Bright book that I've linked to above, and it's a good place to start if you'd prefer a book over video tutorials. I'm not all the way through it yet, but it's written in an interesting way, and seems to cover a lot of what you'll need to get started.
  5. falkencreative


    Which book are you talking about? And no, CI_Controller can't simply be replaced. Where are you trying to use "Controller"? Have you tried using "CI_Controller", in instances where you would use "Controller" based on your book? ...one thing to note though... The future of CodeIgniter is a bit up in the air at the moment (see http://ellislab.com/blog/entry/ellislab-seeking-new-owner-for-codeigniter). Much of the community has switched over to Laravel (http://laravel.com/), so if you are considering learning a PHP framework, that's the one I'd suggest. The learning curve is a little steeper, but give you shorter, better, more manageable code. For some tutorial options (there are a lot of resources out there!), check out: -- Online documentation: http://laravel.com/docs -- Video tutorials (free): http://hub.tutsplus.com/search?utf8=%E2%9C%93&search%5Bkeywords%5D=laravel&button= -- More video tutorials (free:) http://code.tutsplus.com/tutorials/laravel-4-mastery--net-31233 -- Video tutorials ($9/month): https://laracasts.com/ -- Book ($29, you might be able to find places to download it online?) https://leanpub.com/codebright
  6. Bel, sorry you're having trouble with the CRUD videos. From my perspective, as the author, I assumed as I was recording those videos that you would have a pretty solid understanding of PHP -- standard operators, working with functions, that sort of thing. My course wasn't really recorded with the others in mind -- it wasn't necessarily recorded with an idea that it would be part of a specific sequence. Based on what I know of the first three, I would think that those would give you the foundation for understanding my course... but if you have any specific questions, you're welcome to post them and I'll do my best to help.
  7. Your errors indicate you are trying to link to a file that doesn't exist -- either your path is wrong, or the file isn't uploaded to the correct spot. Keep in mind that the path to the include is relative to the document that includes the include() line. Are you sure those include lines should include "MaxAmpsDigital/public_html"? Shouldn't the file that includes these files be within the public_html folder already? I would test the code without that portion: <?php session_cache_limiter('none'); session_start(); ini_set('url_rewriter.tags', ''); include_once "vsadmin/db_conn_open.php"; include_once "vsadmin/inc/languagefile.php"; include_once "vsadmin/includes.php"; include_once "70and100mphclub.php"; include_once "vsadmin/inc/metainfo.php";?>
  8. The simple fact is, you can't. See http://stackoverflow.com/questions/7729700/constructor-overloading-in-php or http://codereview.stackexchange.com/questions/504/workaround-for-overloaded-constructor-in-php for comments/alternatives.
  9. So in the classes above, __construct() in both Person and Employee allows you to set the name of the person or employee when you create the object. The __construct() is automatically called when the object is created. The __construct() doesn't have anything to do with allowing or not allowing access to set_name() or get_name(). It simply allows you to set a name when the object is created.
  10. I did a short introductory series on Bootstrap. Overall, I've found the concept of a framework interesting... but in general I've found it more limiting than I'd like. The more responsive coding I do, the more likely I'd be to start using a framework though.
  11. __contstruct() just allows you a way to perform various actions when the object is first created. Exactly what it does depends on what you need... but it could set various variables, connect to the database and retrieve data, etc. For example, take those two pieces of code: class employee extends person { function __construct($employee_name) { $this->set_name($employee_name); } } class employee extends person { function __construct() { } } The first would allow you to set the name of the employee when the object is first created: $person = new Employee('Their Name'); The second doesn't have that ability, so you'd need to have a set_name() method and call that separately. $person = new Employee(); $person->set_name('Their Name') Hopefully that makes sense? A more "real world" example might be something like this... say you ran a business, and were creating some software that stored information about your employees. For example, you could create an Employee object and pass in the employee ID when that object is first created: $employee = new Employee(1234); if you have a _construct set up, immediately when that object is created, you could run code to access the database and automatically populate information about that person (name, birthday, weekly schedule, etc.). You could do that same thing without __construct... but the code would be cleaner and simpler with __construct. The more simple and concise your code is, the easier it is to maintain and understand.
  12. I imagine you'd need to do this with AJAX -- redirect to a loading page on login, load the data using AJAX (saving the data into a session variable? It depends how much data you need to save?), and only redirect using Javascript once the AJAX request returns the data. You can use header() to redirect to the loading page, but you'd need to redirect using a Javascript method for the second redirect, since header() won't work if something has already been shown in the browser already.
  13. Are you doing this with AJAX or something? Why the long load time? If you're using header() to redirect, that redirect should be instantaneous (thought the page the user gets redirected to may show a blank white page as it loads). ...I think the bigger question here is why your page is taking 20+ seconds to load though. Loading page or not, you actually expect people to wait around for that? I wouldn't.
  14. I'm not quite sure what you are doing here: $cart[$id] = $num && $pronum; That's not really valid code, as far as I can tell. You could do something like this instead? $cart[$id]['num'] = $num; $cart[$id]['pronum'] = $pronum; Basically, that's the way I'd approach it. Currently, the way the system stores item in the cart is within a $cart array, that is then saved to a session variable. The array key represents the id of the product, and the value represents the number of that item in the cart: $cart[key] = value; I'd modify it so that $cart[key] holds an associative array instead, so you can store separate values for the number of that item in the cart, and also the procarb number. This would allow you to have separate procarb numbers per product, rather than one global one that works for all products. This means you'd need to update any place in the cart model that uses $cart[$id] to use $cart[$id]['num'], and then use $cart[$id]['pronum'] anytime you want to store the procarb number related to that product. As for your error messages, they are exactly what they describe: in line 253 in m_cart.php, you are trying to access a variable that doesn't exist. My guess is that you likely are trying to use $procarb, when you should be accessing $pronum instead.
  15. I think it partially depends on where in the process you need the visitor to enter their procarb #. Do they have one number that's used on all products? Can that number change per product? Is that number entered when they first enter the store? When they first view a product? When they first add a product to the cart? If I understand things correctly... this is how I would do it. I'd have a form field in your "add to cart" form that asks the customer for their # when they place a product in the cart. That field would be required, so they can't add an item to the cart without the number. When the form submits, you'd save the number in a session variable, and access that session variable when calculating the price of items in the cart. Perhaps if you wanted to be fancy, you could use some Javascript/jQuery and AJAX to retrieve Once that number is saved in the session variable, you'd automatically want fill out the number field on any other product pages, so they don't have to continually re-enter the number. If they decide to change the number and it no longer matches what has been stored in the session variable, you'd want to update the session variable with the new number. I imagine you'd likely want to do most of the code changing within the m_cart.php model. You'll want to add methods to set, update and retrieve the procarb session variable, update the get_total_cost() method, and of course adjust the views and controllers to allow a visitor to enter their procarb number and save it.
  16. The error is exactly what PHP describes: "Number of elements in type definition string doesn't match number of bind variables in /xxxxx/records.php on line 205" I believe (I haven't checked the line numbers, that this line is the issue: $stmt->bind_param("ssi", $naam, $mp3naam, $links, $linka, $linkt, $linkb, $yt1, $yt2, $bladm, $opm, $id); Note the first parameter, "ssi"? The number of characters needs to match up with the number of perimeters after it. "s" is a string, "i" is an int, etc. So I believe it should be: $stmt->bind_param("ssssssssssi", $naam, $mp3naam, $links, $linka, $linkt, $linkb, $yt1, $yt2, $bladm, $opm, $id); Make sure to fix any other bind_param() lines to match up the number/type of parameters as well.
  17. @Mikejm Assuming you are meaning one custom image that's used on each pager item, yes, you should be able to do this with CSS by setting the <a> element to display:block, setting a fixed height/width, and adding a background image. Cycle2 adds a class to the active pager item, so you can use that class to chance the background image. Hope that helps get you started?
  18. Sorry, I might be a little out of touch with KS related things -- it appears that Stefan has closed KSU in favor of StudioWeb, which has the same course content but a slightly different focus. I'd suggest either buying the course(s) you're interested in from the store (http://killervideostore.com -- it's the same exact content, just without the questions following each video) or emailing Stefan directly (stefan @ killersites.com) and seeing if there's anything he can do.
  19. I can answer your questions, at least to some extent... -- At least for my courses (four of them in the KSU, primarily PHP related), I don't use Dreamweaver. I believe a lot of the courses that Stefan teaches do use Dreamweaver, but in general, unless the course is specifically on Dreamweaver, the course author won't be doing anything that absolutely requires Dreamweaver. In most cases, you'll be seeing hand coding through Dreamweaver's code editor. I definitely agree though -- it's important to be able to understand HTML and CSS without using a WYSIWYG tool like Dreamweaver. -- Overall, the courses are generally focused on coding. There is some courses that KS offers on Photoshop (http://www.killervideostore.com/videos-photoshop.php), but those aren't really appropriate for the KSU. Hope that helps? One thing to keep in mind -- some of the courses that are in the KSU are also available on http://www.killervideostore.com/. Even if you'd prefer to purchase the more interactive format on the KSU, there are some preview videos available there, so you can take a look and get a feel for some of the courses before you make any commitments. Hope that helps?
  20. See http://stackoverflow.com/questions/1341089/using-meta-tags-to-turn-off-caching-in-all-browsers But keep in mind that disabiling caching will mean a slower experience for repeat visitors, since they will need to download fresh images/css/javascript files every time.
  21. If you're using http://wordpress.org/plugins/autonav/, it appears that the plugin also supports outputting the content in lists, rather than tables. By default, that would show one image per line, but with a little bit of CSS, you should be able to customize the list items to form columns (using "float:left" in the CSS)
  22. It is possible, but not with that plugin. Either that plugin would need to be modified to use divs instead of tables, or you'd need to use a different plugin that accomplishes the same thing.
  23. Site 1 is running a custom designed/built Wordpress template. Site 2 isn't Wordpress -- it's a site provided by 22Slides.com. You have two options moving forward: 1. Find a template Which is surprisingly harder than I would have expected. Your best bet is to probably search for "wordpress photo template" and see what you get. Here are a couple to get you started. http://vandelaydesign.com/blog/wordpress/photo-themes/ http://mashable.com/2013/05/07/wordpress-themes-photography/ http://themeforest.net/category/wordpress/creative/photography 2. Custom design/development This one is tricker, and will definitely require solid knowledge of HTML, CSS and at least PHP and Javascript basics. You might check out my course on developing a Wordpress blog -- while it isn't specific to a photo style website, it will provide you with an understanding of a lot of the process and the basics required when working with Wordpress: http://www.killervideostore.com/video-courses/wordpress-themes.php and the demo of what I build: http://www.killervideostore.com/video-courses/live-demos/WORDPRESSFROMSCRATCH/. Treehouse also offers quality content, and their Wordpress section might be worth checking out: http://teamtreehouse.com/library/how-to-build-a-wordpress-theme. You likely won't find a tutorial on building the exact style of site you want to build. But you should be able to find Wordpress tutorials that will teach you about building and customizing Wordpress themes.
  24. You might follow the advice listed here: http://forum.wampserver.com/read.php?2,37167 (or do a search for "wamp www.localhost.com" and see what others have said about the issue?
  25. Have you closed WAMP and restarted? Have you clicked on the icon in the taskbar and ensured that all the services are running correctly? Have you right clicked on the icon and accessed localhost (as opposed to trying to type it in directly -- it should be just "localhost", no "www" or ".com"). Are you running any other programs that might conflict? (Skype? Windows Server?)
  • Create New...