Results 1 to 3 of 3

Thread: Addon Demo for beginners

  1. #1
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,360

    Default Addon Demo for beginners

    ############################
    ##### ADDONDEMO ADDON ######
    ############################

    #. What is this Addon:
    ----------------------
    This Addon is for a very first contact with an Addon - it is for beginners.
    Basically this Addon is just a demonstration for SOME of what you can do with an Addon.
    Don't expect too much... this is a VERY simple demonstration!!!
    But the possibilities are endless! Use your imagination!

    In Control Panel:
    - If ADMIN is logged, it will show a link to the ADMIN page.
    - If NOT ADMIN is logged, it will show a link to the NOT ADMIN page.
    For that pages you can insert the code you want.

    This Addon demonstrate the use of a personalized lang file.

    To see the Addon in action at frontend, you will need to add the tag {addon_addondemo_link}
    in one of your template files (or use the Page Editor and insert it at "About Us" page, for
    example).
    Doing so, you will see a possible use of the variables "$jscript" and "$jscript_last" with
    an Addon (look the top and the bottom of that page).


    #. Recomendation:
    -----------------
    Read the DOCS!!! (http://wiki.open-realty.org/index.ph..._Documentation) - there you
    will find more to test. Read also the comments at addon.inc.php.
    Download the sample Framework Addon to use as an example of a correctly formatted Addon
    and play with it. I bet you will learn a lot.


    #. IMPORTANT:
    -------------
    Test this with a non-production site!!!


    #. Installation:
    ----------------
    Unpack the file addondemo.zip inside your addon directory - it will create a new
    directory named "addondemo" with the following dirs/files:

    /addons/addondemo/
    addon.inc.php
    index.php (blank file to stop directory browsing)
    install.txt
    javascript.js
    javascript_last.js
    /addons/addondemo/language/en/
    lang.inc.php

    LOGIN IN ADMIN CONTROL PANEL AND THE ADDON WILL BE AUTOMATICALLY INSTALLED.
    Modify the files and make your own experiences!

    This Addon were tested with a clean installation of Open-Realty version 2.3.4


    #. Unninstall:
    --------------
    - delete all content of the directory "addondemo"
    - in your MySQL database, table "addons": delete the columm where is 'addondemo'

    Good luck and have fun!

    Eduardo.
    Attached Files
    Open-Realty® v.3.x DOCs

    Man aspires to be immortal and to this end he defends ephemeral principles.
    One day he will inexorably find that to be immortal he must defend Absolute Principles.
    On that day he will die to the flesh, ephemeral, and will live to the Spirit, Eternal. He will be Immortal.
    Author: Celso Charuri


    http://www.eduardomarques.com

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

    Default Re: Addon Demo for beginners

    There is a small "bug" at addon.inc.php:

    at lines 205 and 206 replace:
    Code:
    $jscript =                   TO: $jscript .=
    $jscript_last =             TO: $jscript_last .=
    There is a missing "dot" before the "equal" sign.

    Thanks,
    Eduardo.
    Open-Realty® v.3.x DOCs

    Man aspires to be immortal and to this end he defends ephemeral principles.
    One day he will inexorably find that to be immortal he must defend Absolute Principles.
    On that day he will die to the flesh, ephemeral, and will live to the Spirit, Eternal. He will be Immortal.
    Author: Celso Charuri


    http://www.eduardomarques.com

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

    Default Re: Addon Demo for beginners

    There is another bug at addon.inc.php.
    Where you read (already fixed the previous bug):
    PHP Code:
    $jscript .= '<script type="text/javascript" src="' $config['basepath'] . '/addons/addondemo/javascript.js"></script>';
    $jscript_last .= '<script type="text/javascript" src="' $config['basepath'] . '/addons/addondemo/javascript_last.js"></script>'
    Please modify to:
    PHP Code:
    $jscript .= '<script type="text/javascript" src="' $config['baseurl'] . '/addons/addondemo/javascript.js"></script>';
    $jscript_last .= '<script type="text/javascript" src="' $config['baseurl'] . '/addons/addondemo/javascript_last.js"></script>'
    Eduardo
    Open-Realty® v.3.x DOCs

    Man aspires to be immortal and to this end he defends ephemeral principles.
    One day he will inexorably find that to be immortal he must defend Absolute Principles.
    On that day he will die to the flesh, ephemeral, and will live to the Spirit, Eternal. He will be Immortal.
    Author: Celso Charuri


    http://www.eduardomarques.com

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