Jump to content

falkencreative

Advanced Member
  • Posts

    4,419
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by falkencreative

  1. I'm not exactly sure what you are asking -- or more specifically, why you need what you are trying to do. But maybe this might help? http://uk.answers.yahoo.com/question/index?qid=20110518140500AAiQ6i9
  2. Yes, that's pretty standard practice. A .php file doesn't always contain just PHP code. A .php file doesn't necessarily contain just .php code. It can also contain HTML, CSS, Javascript, etc, and non PHP code will be displayed by the browser just fine. Basically, just use the .php file ending for whichever files run PHP code. Hard to say what is going on without more details. I imagine it is some sort of issue regarding the way your server is set up. Can you view regular .html files on the server?
  3. Hey there. You're right, the current ordering doesn't make sense. I think it started as roughly ordered by difficulty/skill level, but it hasn't totally followed that pattern. I'll have to update the list. Here's the order I'd suggest following, ordered roughly from beginner level information to advanced topics. Times listed are roughly the amount of time it takes to watch each video in the series straight through, not necessarily the amount of time it will take you to follow along and code alongside while you watch the video. Beginner: -- Beginner PHP (about 5 hours) -- Misc PHP Videos (2ish hours) -- PHP & MySQL (2ish hours) -- Object Oriented PHP Discussion (1ish hours) Intermediate: -- PHP Tag Cloud (1 hour) -- Form Validation with PHP & Javascript (1 hour) -- Advanced MySQL (2.5 hours) -- PHP CRUD videos (1.5 hours) -- PHP Login (about 3 hours) -- PHP Login using OOP & MVC (2 hours) Advanced: -- Build a Content Management System (about 8 hours) -- PHP Shopping Cart with PayPal, OOP, MVC (6 hours) -- Advanced PHP (3.5 hours) Hope that helps?
  4. Only one jquery.js file is needed -- more than that, and you'll probably run into Javascript errors. I'm not sure if there is a best location... as long as the jquery.js file is included before you add any jquery code. As far as I understand it, best practices usually say to include javascript files in the footer before the closing </body>, so they don't slow down page load.
  5. Try this URL instead? http://www.killersites.com/community/index.php?/rss/forums/2-recent-posts/
  6. I'd suggest looking here -- you'll need to do this with Javascript, since that's client side, rather than PHP which is server side and would require a page refresh to take effect. http://stackoverflow.com/questions/10498036/enable-input-fields-if-radio-buttons-is-checked-with-jquery
  7. Thanks for the comments -- I'll pass this along to the team. Sorry about the trouble.
  8. First thing I would do: I would check your database and make sure that the column that is storing the content is the correct type. It should have the "Text" type.
  9. You have some weird stuff at the end of your file -- it appears you are repeating the Modernizr js file and some additional Javascript? Using jquery code without first loading the jQuery library is sure to cause errors. <script src="js/modernizr.js"></script> <script> (function($){ //cache nav var nav = $("#topNav"); //add indicators and hovers to submenu parents nav.find("li").each(function() { if ($(this).find("ul").length > 0) { $("<span>").text("^").appendTo($(this).children(":first")); //show subnav on hover $(this).mouseenter(function() { $(this).find("ul").stop(true, true).slideDown(); }); //hide submenus on exit $(this).mouseleave(function() { $(this).find("ul").stop(true, true).slideUp(); }); } }); })(jQuery); </script> </section> </section> <script src="js/jquery.js"></script> <script src="js/modernizr.js"></script> <script> (function($){ //cache nav var nav = $("#topNav"); //add indicators and hovers to submenu parents nav.find("li").each(function() { if ($(this).find("ul").length > 0) { $("<span>").text("^").appendTo($(this).children(":first")); //show subnav on hover $(this).mouseenter(function() { $(this).find("ul").stop(true, true).slideDown(); }); //hide submenus on exit $(this).mouseleave(function() { $(this).find("ul").stop(true, true).slideUp(); }); } }); })(jQuery); </script> To be honest, I'd personally try to fix the errors first rather than trying a new slideshow script. I'm not actually seeing any code that would cause a slideshow -- did you remove it? The standard one I use is the Cycle plugin though (http://jquery.malsup.com/cycle/) or the lite version if you need a smaller number of features (http://malsup.com/jquery/cycle/lite/)
  10. This would actually need to be done with Javascript, not PHP. I'll see if I can take a look later today.
  11. Sorry, which video are you following? A link to it would be helpful, so I can know exactly which tutorial you are following and how best to help you.
  12. Take this example: <?php class person { var $name; function __construct($persons_name) { $this->name = $persons_name; } function set_name($new_name) { $this->name = $new_name; } function get_name() { return $this->name; } } ?> When the object is first created, with these lines: $object = new person('Ben'); the constructor ("__construct()") is called automatically. It will take the text that you provided ("Ben"), and set the $name property (referred to as $this->name, since it's part of the object) to the string that you specified. A constructor is most often used to set up the properties that the object needs to function. Hope that helps?
  13. $new_name is a parameter inside the method (another name for a "function" within an object: see step 4 on http://killerphp.com/tutorials/object-oriented-php/php-objects-page-1.php). A parameter is a variable that is used within a function/method, so that a programmer can send the function some information for the function/method to use. For example: <?php function add($x,$y) { $total=$x+$y; return $total; } echo "1 + 16 = " . add(1,16); ?> $x and $y are parameters. When "add(1, 16)" is called, $x contains 1 and $y contains 16. The function uses those variables to perform calculation, then returns the results at the end of the function. More info on functions/parameters: http://www.w3schools.com/php/php_functions.asp and http://www.tizag.com/phpT/phpfunctions.php
  14. I'm not completely sure what you are asking... but since you are supposedly calling a function within your alerts(), I would expect that you would need to call card1.getValue() and card2.getValue() (note the parenthesis). Does that help?
  15. That probably won't be very easy, since the entire concept that I built the CMS on is the idea that its purpose is to make it easy to convert a static HTML/CSS site to a dynamic site where an admin user can enter content. Can it be done though? Yes. You'd need to switch over to a system where the CMS loads a default index page when the site is first loaded, or loads a specific page depending on the URL. You could probably use a modified version of the current system, but use template for each page type rather than a separate page for each page in the site. Obviously you'd need a full backend to manage pages, and would need to figure out how to deal with parent and child pages (if you need that). Realistically though... Why not use Wordpress, or some other system that's prebuilt? Maybe Pixie (http://www.getpixie.co.uk/), MojoMotor (http://mojomotor.com/) or Perch (http://grabaperch.com/)? Personally, knowing how much time writing that functionality would take, a < $50 licensing fee is relatively inexpensive (personally) compared to the amount of time involved to custom develop that.
  16. The CMS is built to easily work with existing HTML/CSS pages. You'd just need to duplicate the main index.php page and make any changes you need to link things up or change the structure of the page. As long as you have the couple <?php pieces in the code, like the include at the top of the page, the $this->FP->head() (I can't remember offhand, but I believe it was something like that) and the code that creates each of the content blocks, you should be fine. This is on the front-end only, right? That the visitor gets to choose which style they view the site in? If so, that shouldn't involve the CMS at all -- you'd just follow a tutorial that discusses how to make a style sheet switcher.
  17. See http://www.w3schools.com/cssref/pr_pos_overflow.asp In this case, setting an overflow property allows that container div to properly enclose floated elements.
  18. Hello, welcome to the forum.
  19. One other thing I often do: If you have a containing div that is getting collapsed, adding "overflow:hidden" usually fixes that. I'd say that works about 90% of the time -- the only time it doesn't work is if you have an element within that div that is relatively or absolutely positioned outside the container, and using overflow:hidden would hide that element.
  20. You've checked the Wordpress reference for the_date(), right? http://codex.wordpress.org/Function_Reference/the_date One thing that immediately comes to mind: do you have this section of code within a Wordpress loop? (http://codex.wordpress.org/The_Loop) Is it getting other post information fine (the post title, for example), and just not displaying the date?
  21. If it's something simple you'll use once, then I'd use spans with inline CSS, or standard tags for bold, italic, etc. If it's something you'll use multiple times throughout the site, then I'd use a span with a CSS class, and then style the class in your stylesheet. And yes, <u> has been depreciated. You'd be better off doing underline with CSS using "text-decoration: underline". See http://stackoverflow.com/questions/2110779/is-use-of-uunderline-u-deprecated-and-non-validated
  22. Personally, I wouldn't try to write this yourself -- I'd take a look at http://users.tpg.com.au/j_birch/plugins/superfish/#sample3 which should be able to do what you want. The only thing you'd need to implement is the background color change when a nav item is hovered over.
  23. As far as I know, the <ul> isn't depreciated. I think either you can safely ignore that (your editor is wrong) or something else is going on?
  24. There's nothing really wrong with the CSS method, it just doesn't use Javascript, which would add additional effects (for example, maybe fading or sliding down the dropdown rather than simply having it appear. I would go back to whatever tutorial you are following and double check the instructions.
  25. Not exactly... What tutorial are you following? Here's what's going on... Modernizr doesn't create dropdown menus (see http://modernizr.com/). You should have an additional script in your page for the Javascript dropdown -- probably an extra .js file and a <script></script> section. The reason it works when you have the "no-js" class in your page is because you have CSS set up as a fallback, creating the dropdown using CSS rather than Javascript. The dropdown script is supposed to add the "no-js" class to the page if Javascript isn't enabled, so the navigation will work even if Javascript isn't enabled. Hope that makes sense?
×
×
  • Create New...