Jump to content

velaware

Alpha Developers
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by velaware

  1. After digging through Blesta's code for the past few months I've come up with a sound way to get a user's IP when proxying requests, but since this requires editing the core files too I'd rather not do it myself.

     

    In the Users.login function (in /blesta/app/models/users.php:function login) there's these two lines:

                    if (!isset($vars['ip_address']))
                            $vars['ip_address'] = $this->ifSet($_SERVER['REMOTE_ADDR'], null);
    

    What I propose is making a company-specific option in [settings]->[Company]->General with an option of "Remote Address Header" automatically set to default as REMOTE_ADDR (and a notice saying "if you don't know what this means leave as default" basically).

     

    The reason behind this is not everyone can or wants to modify that header value and instead adds a different one (i.e.: X-Real-IP).

     

    The use case for this is people who have two different web servers installed.  I.e.: I have Nginx installed on my server which serves all static content then just passes all PHP requests to another web service.  However, the other web service listens on a private IP so it only fetches that with the way Blesta is right now.

     

    After this it would just take a simple change to the code above:

                    if (!isset($vars['ip_address']))
                            $vars['ip_address'] = $this->ifSet($_SERVER[Configure::get("Blesta.ip_address_header")], null);
    

    Or similar.

  2. Check this thread: http://www.blesta.com/forums/index.php?/topic/1052-system-status-there-are-one-or-more-cron-tasks-that-have-been-executing-for-more-than-60-minutes/

     

    Specifically this post: http://www.blesta.com/forums/index.php?/topic/1052-system-status-there-are-one-or-more-cron-tasks-that-have-been-executing-for-more-than-60-minutes/?p=8567

     

    I'm not aware of any other way to fix this right now.  But basically for some reason a cron task got stuck.  If you need any further help feel free to ask.

     

    Basically though you need to have a way to run queries on your own (i.e.: by using phpMyAdmin or via the command line itself).

  3. This plugin lets your clients switch between different companies that they are a part of in your Blesta set up.  I've also provided screenshots this time!

     

    Source: https://github.com/anzenehansen/Blesta-Goodies/tree/master/plugins/multi_company_login
    Tarball: https://github.com/anzenehansen/Blesta-Goodies/raw/master/mcl_plugin.tar.gz

     

    INSTALL

    Simply place this in the plugin directory and install it trough the staff panel. :)

     

    CHANGE LOG

    v1.0.0 - 02/01/2014

    • Initial release

     

    post-4-0-94754600-1391306311_thumb.png

    post-4-0-05013500-1391306313_thumb.png

    post-4-0-89414600-1391306313_thumb.png

    post-4-0-50092800-1391306314_thumb.png

  4. As a little bit more info, MariaDB's fork of InnoDB (the engine type Blesta uses for the database) called XtraDB recognizes itself as InnoDB (https://mariadb.com/kb/en/about-xtradb/) but you can also use the original InnoDB as well via plugin.  So, as an outsider looking in it seems like MariaDB could in fact be a suitable replacement for those running Blesta on a low-end server (i.e.: low-end VPS).

  5. Yes and no. No, event listeners only receive and pass data, they do not render anything, like page content, so you cannot insert an intermediary step. However, yes, your event listener could redirect the user to some other URL, but then none of the other plugins that tie into that same event listener would ever execute. So it's best to never redirect from an event listener.

    I realized the flaw in this just now anyways before you posted this, so this just affirms my thoughts, lol.  What I need to do anyways is hook into where invoices are displayed so if that's possible, awesome.  If not then I'll need to create client widgets for it.

  6. MariaDB is a drop-in replacement for MySQL but offers tremendous improvements in performance and speed (based on their website).  As MariaDB is a fork of MySQL I'm curious if Blesta will run on it without any issues?

     

    If no one knows I'd be happy to test this on my dev platform and report my results.

  7. Yes but not here ;)

     

    All clients are created by us.   Our business don't work like that.

     

    We create clients account, that's why I need that, at the first login, the client confirm the billing information we have.

    Alright, lol.  Well since its a special case issue I'll be doing the first login plugin as a separate plugin.  I'll PM you in a few with some details.

  8. Ah man, I remember using R1Soft.

     

    I tried doing something similar in 2.5 when I was working on my own backup service.  Depending how you want it structured is the issue.

     

    For example, I was going to do a charge-by-GB, which pay-as-you-go isn't very friendly in Blesta, at least when I last tried to establish something.  If you're charging a flat rate then it'd be easy, though.

     

    Can you point me to their backup solution?  Their website is making my early-monrning-wake-up brain hurt a lot, and it doesn't seem like they do that anymore.  If they offer a trial or something I'd be happy to see what I can do.

  9. It does it per year.

     

    A customer paid for a year with me and it ordered the year, when someone bought a 2 years SSL, it ordered that, however I'm not using GoGetSSL but I think it's the same.

    GGSSL just resells from other companies (look at their plans, its a dead give away).

  10. Just a quick question:

     

    If I want to sell a one and two year SSL cert, will it give them a 2 year cert if they buy it for 2 years?

     

    I'm worried that it will send them only a one year cert.

     

    Thanks!

    If you purchase a 2 year SSL cert, the expiration on the cert is set for 2 years from the purchase date.  If it does send them a one-year cert I would contact GoGetSSL's support and see what they say.  But this shouldn't happen.

  11. SOLVED.

     

    Thanks secforus and paul; "register_argc_argv".was set on my php file, and ioncube was installed on my server but the php.ini didn't have it running. It was fixed by adjusting the php.ini file correctly

    No problem.

     

    Some server setups will have PHP settings separate for web vs. console/CLI, so its always good to check both. ;)

  12. How would I assign a client to multiple companies?

     

    I have them assigned to one company right now, is there a way though without manually running an SQL query to make them a part of multiple companies?  Or would they need to have two separate logins?

     

    I just bought another company license so I'm not sure how this system works exactly.

  13. The license you define for your plugin is completely up to you, the developer.

    Alright.  I know some will ask about this and it does matter because some licenses are incompatible with each other, so a purist might have some issue with it being "whatever you choose" (just a head's up, not trying to be brash or anything).

  14. Example:

     

    TEST Company 1

    First Name 1

    Last Name 1

    email@domain.com (login)

     

    TEST Company 2

    First Name 1

    Last Name 1

    email@domain.com (login)

     

    That means for us, we have 2 company to make invoices but in both companies, it's the same contact person with the same email of course.

     

    So, First Name 1 can connect using email  + password and will see ALL invoices/transactions for both companies at the same time, this means, we need to be able to add a new column that will display which company...

    This will require some work for sure, but I already have an idea on how to handle this. :)  I'll create the test scenario today and start work on it.

  15. I've been flooding the forum lately with plugins I've writen (some useful, others niches).  At this piont I would like to extend my services to others looking to have plugins developed as well.

     

    Prices per plugin depend on the request, so it could range from free to some amount.  :)

     

    It would also be up to you to decide if the plugin will be publically available or not.  I know some people don't want their needs put out in the open.

     

    if you're interested, just send me a PM on here or reply to this thread.

     

    I'm also open to working on gateways (merchant and non) as well as modules.

×
×
  • Create New...