Jump to content

Eric_Ryk

Members
  • Posts

    104
  • Joined

  • Last visited

    Never

About Eric_Ryk

  • Birthday 09/25/1990

Contact Methods

  • Website URL
    http://Aerial 9

Profile Information

  • Gender
    Not Telling

Eric_Ryk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeah, you can just do an IP check.
  2. Ok thanks man.. can u told me how can i test ?? whether just copy paste links in browser and see the results ?? Yeah, that's pretty much it. Just go through, click on the links, try the forms. Make sure the CSS renders appropriately and that the Javascript is working.
  3. I know at my work we've tested compatibility with Firefox and Safari on Mac, and both have been fine. We haven't done any testing with Chrome yet though.
  4. I don't want to show this code it's a google analytics code i just want to paste it on every page so that i track my users their visits .... My directions tell you how to do this. You can use either of the options I gave you.
  5. Wrong. You're not setting $i to 0, so why do you believe it is 0? The first time you loop, $i has no value.... PHP creates it and gives it a value of 0, but also puts out a message to let you know that it has fixed an error in your code, namely it puts out a notice saying that $i isn't defined, which is exactly what you're seeing Wrong. Semas is, just in the wrong place. Look at the top of the code. Anyways, you (Semas) need to take a look at variable scope and learn the difference between the global scope and the local scope. The initial declaration of $i is in the global scope, but it can't be accessed in the local function scope unless you explicitly declare it that way. However, since $i is a variable that should be encapsulated in the function, you should probably just move it into the function. Either way, look up variable scope on php.net. As far as it showing up with the new version, Mark Baker is correct.
  6. Use the template files. Probably you'll need to use the main one, index.php Another option is to install a "Custom HTML" module and just set it to display on every page in the control panel.
  7. No, just use something like paypal or authorize.net
  8. The first is aggregation. The second is really just a collection. A true composite allows for an end node to be used equivalently as a collection. Typically, the collection uses the end nodes via aggregation.
  9. Another good thing to look at is PHP frameworks. Not necessarily to use, but to break them down and examine their structure. You can learn quite a bit about application design from doing this. As DarkWater said, read up on design patterns.
  10. Although there is nothing that has "macros" this really could be accomplished through sub-templating, ie: putting a template within a template (or loading a template into a variable and then passing that value to another template, either one accomplishes the same thing).
  11. I'm in agreement with thorpe. Though to add, it's usually like having "template" files that use PHP within them, though only minimally as thorpe stated. ie: <p>Some static stuff... <b>Hi <?php echo $name; ?></b></p> Typically within these files instead of using if and other control statements with brackets i use the alternate structures.
  12. You have to concatenate all of the values into one string. Then outside of the loop return the finished string.
  13. Based upon the loading time it probably is AJAXed in though.
  14. As I said earlier, just because you use objects then it doesn't mean it's OOP. OOP is a different way of thinking than other paradigms so you can't just go step by step and make every page an object and every function within that a method of that object. It just doesn't work that way. OOP is about how objects interact with each other whereas for instance procedural programming is about procedures and the state of the application. Right, and my point was that the two can go hand in hand. Not absolutely everything has to be an object. I realize it doesn't work that way, I never said it worked that way, I said that people try to make it work that way and implied that it fails horribly.
  15. I am aware of what encapsulation is because I use object oriented concepts all the time, though not necessarily with objects. What you've done is taken my summary and found an example that requires multiple steps. However, what if "parsing" was simply counting the number of times the letter "A" appears in a given string? This could easily and properly be put into one function. Now sure, if we are talking about parsing JSON, that's another matter, as that calls for several different algorithms to make up the one collective algorithm. However, at some point you will find code that is best represented as a single algorithm. For example, just recently I wrote a truncate function for strings. There was no need for me to put that in an object, so instead I put it in a common.php file that contains generic functions that have no need for objects. All of them are short algorithms, 10 lines max. Putting these into an object would be wasteful, and would not give me any benefit. Working with Joomla (don't know if you have), several modules are so simple (such as grabbing a value from the database and echoing it) that they don't need objects. If I were to put that into an object, I would simply be instantiating it and calling it on the next line, which wouldn't help me at all. Of course you could say that I should abstract out the way the information is gathered and separate it from the output (model & view). However, I know this system will not change in such a way that the module would break and I know that the data will always be grabbed in this way.
×
×
  • 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.