Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/28/2015 in Posts

  1. If you run this in a cronjob, no need to log each message since you log the whole script (email or pipe redirection). I would also make the suggestion you use https as opposed to http for the transfer (geolite supports this). You could get a small performance boost if you used named pipes and curl. Something like this would work: curl -L https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | gunzip > GeoLiteCity.dat That is pretty agressive. The Maxmind website says the database is updated on the first Tuesday of the month. Taking into account the various number of timezones and not knowing when on Tuesday the database is updated, lets run this on Wednesdays instead. 0 9 * * 3 [ `date +\%d` -le 7 ] && curl -L https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | gunzip > /srv/uploads/system/GeoLiteCity.dat Runs on the first Wednesday of every month at 9AM server time. It is more then just countries, cities are accounted for. With IPv4 shortage, v4 addresses are being reallocated, reassigned more fequrently then ever before. Note to Blesta Devs: Should switch to the new GeoLite2 database format. The current one is legacy and will be deprecated at some point. The new GeoLite2 also includes md5 sums which can be added to the script above. http://dev.maxmind.com/geoip/geoip2/geolite2/ -Adam
    2 points
  2. THS.Solved, public function getActions() { return array( array( 'action' => "nav_primary_client", // The action to tie into 'uri' => "plugin/my_plugin/client_main/index/", // The URI to fetch when the action is needed 'name' => "Foo Bar", // The name used by Blesta to display for the action (e.g. The name of the link), 'options' => null // Options required for this action if any (e.g. array('key' => "value")) ) ); } http://docs.blesta.com/display/dev/Plugin+Actions
    2 points
  3. Hello, i was just trying to make some activation/deactivation tests with services, and needed some kind of notification. I've made a workaround using the POST part and a custom php that sends an email just for yesterday The email address is valid and without spaces. But you are totally right about the DNS lookup part, the domain part of the from address was actually unresolvable. Changed it and it's good to go! Thanks.
    1 point
  4. FYI: PHP 5.3 has end of life about 11 months ago and is no longer getting updates or patches for security. PHP 5.4 will EOL in about a month. I suggest upgrading to the latest. More information: http://php.net/eol.php and http://php.net/supported-versions.php -Adam
    1 point
  5. Double-check the "Post URL/Email" field contains a valid email address on the Universal Module product. The email address shouldn't contain any white-space. The "isEmail" rule you're referring to also checks DNS, so the email address' domain should resolve.
    1 point
  6. admin tools also hasthis feature . and in future you will translate it from the plugin also .
    1 point
  7. Here's a copy of the dutch order form we did by using the SDL translation tool, that's why we didn't do it on the crowd source one as it's probably not 100% up to par but a client of ours said the translation we did for his ticket was ok so did this so we can help our customers in NL, etc and here you go https://licensecart.com/public/Dutch-Orderform.zip You upload zip contents to: /plugins/order/language/ Thanks to: http://www.blesta.com/forums/index.php?/topic/4844-blesta-language-compare/ for the help And SDL: http://www.freetranslation.com who helps us translate for free and it's better than Google. PS: Only the client area stuff is translated none of the admin pages but there is only 3.
    1 point
  8. velaware

    Python Blesta Api

    I made a thread on this elsewhere but since I did a bit of a major overhaul, enough to warrant basically a 2.0 of it. This differs in very, very big ways. The biggest is that this supports ORM now. Instead of manually calling APIs via doing this: from blesta_api import * api = BlestaAPI(...) api.get("ApiKeys", "getList") You can do it this way: from blesta_api import * api = BlestaAPI(...) # Get list of API keys api.models.ApiKeys.getList() # Use my API Helper's test module api.plugins.apihelper.test(str="Returning this string") This makes the code easier and more pleasant to read. It should be noted that both methods are supported, and for ORM to work the API Helper plugin needs to be installed. Otherwise this won't work (Blesta doesn't offer a native way to get all available API calls). All api.models calls are found in /blesta/app/models while api.plugins reads all plugins that have a public model in the /blesta/plugins directory. Source: https://github.com/anzenehansen/Blesta-Goodies/blob/master/api/blesta_api.py API Helper tarball: https://github.com/anzenehansen/Blesta-Goodies/raw/master/apihelper_plugin.tar.gz INSTALL Use as you would any other Python script. The only thing you have to actually import is BlestaAPI, so from blesta_api import BlestaAPI is fine too. TODO Create a way to determine HTTP method for each API call (currently only GET is supported) CHANGE LOG v2.0.0 - 01/28/2014 Initial release
    1 point
×
×
  • Create New...