Results 1 to 4 of 4

Thread: The way to create a addon is the same in O.R. 2.5.6?

  1. #1
    Join Date
    Aug 2004
    Location
    Săo Paulo - Brasil.
    Age
    39
    Posts
    151

    Default The way to create a addon is the same in O.R. 2.5.6?

    Olá.

    The way to create a addon is the same in O.R. 2.5.6? or has been changed ? Because this code not work in 2.5.6.

    PHP Code:
    function test_install_addon() {

    //***********************************************************************************
    $current_version "1.0";
    global 
    $conn$config;
    require_once(
    $config['basepath'].'/include/misc.inc.php');
    $misc = new Misc();
    //Check Current Installed Version
    //$sql = 'SELECT addons_version FROM '.$config['table_prefix_no_lang'].'addons WHERE addons_name = \'name\'';
    $sql 'SELECT addons_version FROM '.$config['table_prefix_no_lang'].'addons WHERE addons_name = \'test\'';
    $recordSet $conn->Execute($sql);
    $version $recordSet->fields[0];

    if (
    $version == '')  {
        
    // Preform a new install. Create any needed databases etc, and insert version number into addon table.
        
    $sql 'INSERT INTO '.$config['table_prefix_no_lang'].'addons (addons_version, addons_name) VALUES (\'1.0\',\'test\')';
        
    $recordSet $conn->Execute($sql);
        
        
    $sql2 'CREATE TABLE '.$config['table_prefix'] . 'test (
                        player_id int(11) NOT NULL auto_increment,
                        player_name varchar(255) NOT NULL,
                        player_url text NOT NULL,
                        player_desc text NOT NULL,
                        player_img_file varchar(100) NOT NULL,
                        PRIMARY KEY  (`player_id`))'
    ;
            
    $recordSet2 $conn->Execute($sql2);                
            return 
    TRUE;
    }
        
    elseif (
    $version != $current_version) {
    //Preform Updates to database based on previous installed version.
    switch($version)
    {
    case 
    '0';
    break;
    // switch
    return TRUE;
    }
    return 
    FALSE;

    Tnks.
    []´s
    Renato.

    ...a blind padawan...

  2. #2
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: The way to create a addon is the same in O.R. 2.5.6?

    Renato,

    No, we had no changes at v.2.5.6 (but we will have at v.2.5.7).
    I have just tested with v.2.5.6 and that function is working as supposed.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  3. #3
    Join Date
    May 2007
    Posts
    172

    Default Re: The way to create a addon is the same in O.R. 2.5.6?

    And how do I do that? I want to install the youtube addon but the documentation cant be read!

  4. #4
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default Re: The way to create a addon is the same in O.R. 2.5.6?

    Quote Originally Posted by qsch View Post
    And how do I do that? I want to install the youtube addon but the documentation cant be read!

    Please do not hijack the OP's thread with an unrelated problem.
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

Similar Threads

  1. How to create new configuration values in an addon
    By gisjohn in forum Addon help, ideas and discussion (CLOSED)
    Replies: 2
    Last Post: 06-11-2008, 05:28 PM
  2. How to use addon to create icon that goes to other program
    By encodeme in forum Addon help, ideas and discussion (CLOSED)
    Replies: 4
    Last Post: 06-01-2008, 08:55 AM
  3. want to create Save_Search addon
    By xavier in forum General Help (CLOSED)
    Replies: 3
    Last Post: 01-25-2007, 12:41 PM
  4. Addon to create more accurate counts
    By setfire in forum Addon help, ideas and discussion (CLOSED)
    Replies: 0
    Last Post: 04-12-2006, 12:17 AM
  5. How to create a new template for addon?
    By erenger in forum Addon help, ideas and discussion (CLOSED)
    Replies: 2
    Last Post: 09-09-2005, 06:59 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
  •