Results 1 to 4 of 4

Thread: Gloabls in user-defined funcitons?

  1. #1
    Join Date
    Jan 2009
    Posts
    34

    Default Gloabls in user-defined funcitons?

    I'm writing an addon, of course, though I haven't been messing with OR for a while. The thing is, I need to use the $misc class for the DB functions inside my user-defined functions.

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: Gloabls in user-defined funcitons?

    Add this to your function:

    global $conn, $lang, $config;
    require_once($config['basepath'].'/include/misc.inc.php');
    $misc = new misc();

  3. #3
    Join Date
    Jan 2009
    Posts
    34

    Default Re: Gloabls in user-defined funcitons?

    Is that required for each user-defined function?

  4. #4
    Join Date
    Jul 2003
    Location
    California
    Age
    42
    Posts
    4,229

    Default Re: Gloabls in user-defined funcitons?

    if you plan to use any of the Open-Realty globals then yes, and I would recommend that.
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

Similar Threads

  1. Where are the {template tags} defined?
    By mydimension in forum Templates - Help/Ideas/Discussion (CLOSED)
    Replies: 9
    Last Post: 03-23-2009, 02:01 PM
  2. Pre-defined Search pages with extra text
    By cipher in forum General Help (CLOSED)
    Replies: 3
    Last Post: 08-09-2007, 09:10 AM
  3. Cant find where it's defined << >> please help
    By oavs in forum General Help (CLOSED)
    Replies: 2
    Last Post: 06-05-2006, 10:38 PM
  4. Can't update user info in admin area - user manager problem
    By popolare in forum General Help (CLOSED)
    Replies: 6
    Last Post: 04-27-2006, 06:04 AM
  5. User defined drop down list
    By qigong in forum HELP (CLOSED)
    Replies: 1
    Last Post: 08-05-2003, 01:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •