Search results

  1. C

    What's the point of abstract classes?

    It helps ensure consistency in related child classes. As an example, say for instance you wanted a application to support several databases. So you want a wrapper class for all the DB methods you need. You write a wrapper for MySQL, and ones for MSSql. Using an abstract you can ensure that...
  2. C

    Is there a way to use objects in templates?

    Alright thanks for clarifying. This is one of those nagging questions I've had that I figured I'd finally figure out the answer to. I guess I'll continue the way I have, and perhaps convert some to use ArrayAccess where I can. Thanks again
  3. C

    Is there a way to use objects in templates?

    I've been searching for the better part of two hours now and haven't been able to find anything in either the forum or the code to answer this question. Is there a way to use a class object in a template? The only way I've figured to deal with it so far is either convert the object to an...
  4. C

    Boolean usage of conditionals in XenForo?

    Huh? The only thing in my statement that was inaccurate was "string will be true if set", I didn't mean it as a set/unset as much as not empty ("0" having slipped my mind). But PHP doesn't need these explicitly cast as a boolean, it does that conversion itself. And I've never seen it give any...
  5. C

    Boolean usage of conditionals in XenForo?

    I can't see that giving a warning (or even a notice). Any type of data should have a valid result. Strings will be true if set, arrays true if they have any elements, integers if their value is >= 1. Even if the "logoLink" property didn't exist in the $options Object, it would still just...
  6. C

    [Guide] Override default XenForo routes (using hooks)

    I made a post for this in another thread about renaming the "members" route to something else, and was asked to create a new thread about it. That is to say instead of "http://yoursite.com/xenforo/members/username.id" you can make it "http://yoursite.com/xenforo/users/username.id". In theory...
  7. C

    Renaming directories?

    Sure can, but I'm going to wait a little longer to see how well it works out. I just made the change last night, and my board isn't live yet. I'll probably notice if someone is wrong while work on other modifications over the next couple days
  8. C

    Renaming directories?

    I had to tackle this one tonight. It didn't require any edits to XF code, although keep in mind I still haven't tested everything out to make sure this was problem free... But here's how I did it: *I'll assume you had a working directory for mod files* 1) I created a file...
Top