Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Why use Addons and what you can do with them

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

    Default Why use Addons and what you can do with them

    Why should you utilize the addon system? What can you do with the addon system? I have seen a few posts as well as gotten a couple of PM's to me recently about problems and complaints regarding upgrading from one version of OR 2.0.x to another version. Many of these problems or complaints could have been prevented by the use of the addon system

    The addon system was well thought out by Ryan during the developement of Open-Realty 2 and given great power and flexibility to site developers to add functionality they desire to Open-Realty without the need to edit the core code of Open-Realty 2.

    Addons don't need to be some large, complex, or spectacular addon. Addons can be as simple as rewriting an existing Open-Realty 2 function to better suit your taste, design or needs. This will save you from having an unsupported codebase of Open-Realty 2 that can't easily be upgraded or requires you to reapply modifications you've made to the core code of Open-Realty 2.

    As an example, the Featured Listings didn't meet the needs of a friend I was designing an Open-Realty 2 site for recently. Instead of modifying the Featured Listings function in Open-Realty 2 and having a software that, if upgraded would lose all the changes I've made I rewrote the featured listings function into an Addon. The new addon function is now called in his templates instead of the default featured listings functions and he has a software that doesn't require jumping through hoops to upgrade to future bug fixes, or new versions of the software.

    Of course, this isn't all that addons are for. Some very large and complex addons are planned and being worked on as well to add additional functionality to Open-Realty 2.

    When a change to something is desired, do stop and think about the possibility of using an addon to do what is required rather than editing the core code of Open-Realty 2. This can save you a lot of time in the long run and make your enjoyment of Open-Realty 2 a lot more fun.

    Mick
    Open-Realty 2 Documentation

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

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

    Default

    I agree 100%.

    The addon system is one of the greatest features of OR 2.

    I wrote my first addon for a new map site while OR was in Aplha 2 and it still works with 2.0.X.

    Since then I have written numerous addons, simple and complex, that allow flawless upgrades to the 'core' without losing the functionality that my clients have needed for their sites.

  3. #3
    Join Date
    May 2004
    Posts
    840

    Default Re: Why use Addons and what you can do with them

    We're told very very often here in this forum

    "Create an addon for that."

    "You can do that with an addon."

    "You need an addon."

    Perhaps there should be a tutorial, section, documentation on:
    What is an addon? and How do you do one?

    I need an addon so that my bills go away! HAHAHA :P

    But seriously, I hope we can develop more info on addons
    for OR users.
    RealEstate

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

    Default Re: Why use Addons and what you can do with them

    Did you try the addon instructions in the OR documentation? Mick has done a good job of explaining each section of the addon file.

  5. #5
    Join Date
    May 2004
    Posts
    840

    Default Re: Why use Addons and what you can do with them

    My bad...I guess I had not seen that.

    You're right Mick did an excellent job.

    For future reference for others in my shoes
    that sometimes "don't read" enough. Some keywords and
    their corresponding links

    Documentation
    Developer guide
    http://wiki.open-realty.org/index.php/Developer_guide

    Addons add-ons addon add-ons instructions installation
    documentation design making developing modifying adding
    http://wiki.open-realty.org/index.ph..._Documentation
    RealEstate

  6. #6
    Join Date
    Mar 2006
    Location
    Thailand
    Posts
    17

    Default Re: Why use Addons and what you can do with them

    Well.. Bing new to addons I must admit is it quite well thought out.

    Not sure if this is the right place to comment because it's not really an extra feature, just a change in the default behaviour - please move it if not.

    It would be nice if the addon functions were checked BEFORE the OR functions so that we could directly override a default function without using a different tag

    For example......

    If i created an addon which had the same function name as....say... the hitcounter, my function could override the default one enabling me to create custom graphical hit counters (as an addon) without changing any of the templates OR any of the core files. Same with log on screens where I could include anti-robot graphics etc and all without changing OR at all.

    Probably been thought about before though and a good reason why not.

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

    Default Re: Why use Addons and what you can do with them

    Ryan and I discussed that back when he was writing 2.0. We decided to go the course we did because if an addon author produced an addon that had 10 different template tags that it used a user may only want the new functionality of 7 of those tags. The user would then be stuck using the other 3 that they didn't want and thus overriding their default functions.

    Also, on some sites, like my wife's. I use an addon for new functions that are similar to the default functions but I still retain the default functions in places as well. Keeping the addons seperate allow much more flexibility to the end user.
    Open-Realty 2 Documentation

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

  8. #8
    Join Date
    Mar 2006
    Location
    Thailand
    Posts
    17

    Default Re: Why use Addons and what you can do with them

    Quote Originally Posted by Mick
    Ryan and I discussed that back when he was writing 2.0. We decided to go the course we did because if an addon author produced an addon that had 10 different template tags that it used a user may only want the new functionality of 7 of those tags. The user would then be stuck using the other 3 that they didn't want and thus overriding their default functions.

    Also, on some sites, like my wife's. I use an addon for new functions that are similar to the default functions but I still retain the default functions in places as well. Keeping the addons seperate allow much more flexibility to the end user.
    Good Point.
    Although the user would still have the option of whether to use the addon or not (hence restoring the original functions) if he deemed it wasn't exactly what he wanted and would be no worse off.

    But of course I'm not considering the other aspect which is that if an addon breaks a default function then you are the guys who will have to investigate it; increasing you workload and diverting focus from developing OR , which - by the way I'm very impressed with .

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

    Default Re: Why use Addons and what you can do with them

    Although the user would still have the option of whether to use the addon or not (hence restoring the original functions) if he deemed it wasn't exactly what he wanted
    The user does have that option but, what if they wanted to use certain functions from the addon and not others. For example let's say you created and addon to replace the add and edit listing functions. Your method would automatically replace the core functions with the addon functions. What if the user only wanted the new edit listings function? They would still be stuck with the new add listing function unless the addon was changed.

    if an addon breaks a default function then you are the guys who will have to investigate it
    If an addon breaks a default function, it is up to the addon creator to fix the problem in the addon. We're not going to rewrite core functions because someone created an addon that doesn't properly interface with the core. If the problem is created by a bug in the core function then we would investigate it. If the problem is caused by the addon, that's the addon developer's problem to deal with.

  10. #10
    Join Date
    Feb 2004
    Posts
    1,085

    Default Re: Why use Addons and what you can do with them

    I want to put a test in the main.html to check the return of a addon then use built in OR if no return. For instance:

    If I had a addon called {addon_some_addon} and put it in the main.html ahead of the OR standard <title>{site_title}</title>. I would like the <title>{site_title}</title> to be skipped if something within the addon was returned.

    The addon would return $display and I see this happen. But then I still see the <title>{site_title}</title> in the source code:

    <?
    if (!$addonreturnvar) {
    ?>
    <title>{site_title}</title>
    <?
    }
    ?>

    any thoughts?

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
  •