Jump to content


  • Content Count

  • Joined

  • Last visited

About nahanil

  • Rank

Profile Information

  • Gender
  • Location
    Melbourne, Australia
  • Interests
    Long walks on the beach in the rain while drinking piña coladas.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sorry to butt in here in an oldish thread, but I was curious about how this could as well - specifically for Australian domains (obviously not from NameSilo, but similar topic so didn't want to start a new one). The [com/net/org/id].au names are generally allowed to be transferred between registrars (or resellers) with no fee incurred, but the expiration date is not modified. Domains under .au are also only allowed to be registered for periods of 2 years, renewal only allowed within the final 90 days to expiration. A rather hefty fee is incurred for changing the registrant at any point in time, but that's out of scope here. I'm guessing Blesta wouldn't handle this kind of free transfer without expiration modification either ey?..
  2. @evolvewh Sucks their "v5" API call appears to remove some of the useful options Still good to know! Would be cool to see similar functionality implemented using other providers and plugins though as mentioned. I just liked the NameStudio implementation as it's free (and I don't currently plan on using any providers w/ LogicBoxes) & pretty flexible. I like that you can get geo-targeted suggestions & the API supports results in several languages (ie, can pass the Blesta users' current language to the API if it's supported and get "better" results). Not sure how you'd be likely to implement it @Blesta Addons, but this plugin I'm trying to get together should work regardless of the registrar plugin used/support all that are in use in your Blesta site.
  3. "Proper" events to target specific pages like would be amazing. My solution is basically a massive hack that inserts a little bit of code in the domain preconfig page. Unfortunately it runs on every page load and guesses in preAction if it's the right page to do the insertion, and then does some AJAX voodoo to pull in the data and build up the table. Wasn't sure how else to do it without modifying any core files. Also means that it will probably break if someone is using a modified order form/not the template pictured above 😣
  4. That was the plan I guess. Still needs a bit of love and attention then I'll stick it up on GitHub for you guys to play with. Just some teasers for now 😛
  5. Recently got an API key for VeriSign's Name Studio, and thought it'd be a decent opportunity to get my hands dirty with a Blesta integration. I've probably broken all kinds of rules and best-practices in implementing it, but not too far from a workable release. Early WIP, but there are a few screenshots below. Curious if anyone would find this useful. EDIT: FWIW if y'all apply for a name studio account now I should have something out by the time they approve your account. It's free, though does have some generous rate-limiting in place (in which case the plugin will just not show any suggestions at this stage). It's a janky process and took a few days - they called me a few days after applying and spelled the account's default password out character by character 😊 Another edit: Feel free to follow along at home/fork and make fantastic - https://github.com/nahanil/blesta-namestudio-plugin
  6. Referring to the method getSld() in <Blesta 4.2.2>/plugins/order/lib/order_types/domain/order_type_domain.php This method doesn't handle domain searches as gracefully as it could. Search: www.something.com (.com checkbox selected) something.com somethingwww..com Search: www.something (.com checkbox selected) www.com Search: something.com (.com checkbox selected) something.com Search: something (.com checkbox selected) something.com I'm not sure how this could be rectified by changing the existing regex, but I've found something like the following to handle all the above inputs to return something sensible function getSld($domain) { $parts = explode(".", $domain); if (count($parts) == 1) { return $parts[0]; } return $parts[0] == "www" ? $parts[1] : $parts[0]; } // Mentioned test cases foreach ([ 'www.something.com', 'www.something', 'something.com', 'something'] as $search) { echo "$search: ", getSld($search), "<br>"; } /* Output www.something.com: something www.something: something something.com: something something: something */
  7. Sorry to drag up an old thread, but is this the latest version of the Vultr module available @Paul, but I couldn't see this included in the full Blesta 4.2.2 package download. Just found an issue around line 905. I guess this is called in my test setup as I allowed clients to select the VPS template when ordering. public function getClientAddFields($package, $vars = null) { Loader::loadHelpers($this, ['Html']); // Get the available templates $templates = $this->getTemplates($module_row, $package); ... Adding the $this->getModuleRow(..) call seems to have fixed it up for now, but wasn't sure if this has already been fixed in a later release. public function getClientAddFields($package, $vars = null) { Loader::loadHelpers($this, ['Html']); $module_row = $this->getModuleRow((isset($package->module_row) ? $package->module_row : 0)); // Get the available templates $templates = $this->getTemplates($module_row, $package); Edit: Found a few other breaking issues, but not sure if it's worth noting them down if there is a newer release/it's somewhere on GitHub. Guess this goes back in the ideas pile. Another Edit: This wouldn't happen to be "up to date", and give me something to build upon if anyone knows? @cyandark https://github.com/CyanDarkInc/module-vultr/
  8. I just set up a fresh v4.2.0 install. The MySQL database password contains the character "$" which was stored in config/blesta.php as "\$". This made sense in older versions as the config options were surrounded by double quotes in v3.6.?, but it appears they've been changed to single quotes which led to me banging my head for a minute trying to figure out why I was only getting blank pages. <?php //... Configure::set('Blesta.database_info', [ //... 'pass' => '\$abc123', //... ] );
  9. After tinkering with a custom fraud-busting module I noticed the issue Jonathan pointed out as well. Guessing it never made it into 3.6.x and short of modifying the core/cart module it's not possible to work around it for now? Not a *huge* issue at this end as the initial plan is to only manage/bill existing clients accounts with Blesta, but moving forward into publicly offering services once more it's a fairly terrifying thought
  10. Hey all, Just wondering if there's a Right Way™ to access the systemEncrypt/systemDecrypt methods from within a module (specifically, a forked version of the Plesk service module). I've hacked it in for now, but it feels dirty and though it works I was wondering if there's a better way. Current 'solution': /** * Wrapper around systemEncrypt function * * @param string $string The string to encrypt * @return string The encrypted version of input string */ protected function encryptString($string) { if (!isset($this->Clients)) Loader::loadModels($this, array("Clients")); return $this->Clients->systemEncrypt($string); } /** * Wrapper around systemDecrypt function * * @param string $string The string to decrypt * @return string The decrypted version of input string */ protected function decryptString($string) { if (!isset($this->Clients)) Loader::loadModels($this, array("Clients")); return $this->Clients->systemDecrypt($string); } I don't actually use the Clients model anywhere, just load it so that I can have access to the systemEncrypt/systemDecrypt methods that are attached. I suppose the real question would be is it possible to add a bonafide custom Model to a module, as I'm storing the encrypted values in a table the module is creating for itself during install/upgrade. ie public function upgrade($current_version) { if (version_compare($this->getVersion(), $current_version, ">")) { // Upgrade to v1.0.2 if (version_compare($current_version, "0.2.3", "<")) { $this->Record-> setField("id", array('type' => "int",'size' => 10,'unsigned' => true,'auto_increment' => true))-> setField("client_id", array('type' => "int", 'size' => 10))-> setField("encrypted_field", array('type' => "varchar", 'size' => 255))-> ... setKey(array("id"), "primary")-> ... create("my_custom_table"); } } } $some_data = $this->Record->select()->from("my_custom_table") ->where("client_id", "=", $service->client_id) ->fetch(); $some_data->encrypted_field = $this->decryptString($some_data->encrypted_field); Not sure how I could wrap this up and have $this->MyModel->foo(), but I assume if it's possible it'd extend some base model class which would give me the encryption methods 'For Free'.
  11. nahanil

    Plesk Module Bugs

    Hey guys, I feel like a bit of a twit for not searching the forums for this stuff before forking and working on a fix for these same issues, but it looks like everyone's come to the same realisations. Password Strength For this issue I took the code in this gist and tweaked it a bit, overwriting the current generatePassword method in plesk.php with this. It can probably be greatly improved upon by someone less lazy than I as it's never going to pass the 'Very Strong' level of password strength set in Plesk. I took a look at Jsw.PasswordGenerator in Plesk Admin's jsw.min.js file and came up with this translation to PHP which seems to do the job. There's also a crude test loop at the bottom. IP/Hostname Debacle Also noticed this when I was playing with the "Log In" links generated for services. Then tweaked so it was called Hostname thinking all would be dandy before realising Plesk requires an IP address to create a service. So, undid my changes and added an extra "module_row" called host_name, and modified addModuleRow, getRowRules, getEmailTags, addService (maybe addService for another unneccessary reason) appropriately, added a new error message for the host_name field in the language file/modified the template file. The existing validateHostname method at a glance looks as though it should work fine for both IP addresses and domain-looking hostnames so I've used this for validating the field. These changes aren't too dissimilar to those in the gist @ctalkington linked to. I can try and tidy the file up and remove other unrelated changes if anyone would care to take a gander - I've hacked in a few other unrelated bits and pieces but after getting to know Blesta a bit better and putting some stuff into plugins I probably don't need them anyway. Moving Forward I'm about to put on my thinking hat in regards to CORE-1533 (Use shared login information for multiple accounts for the same client), but no idea how to approach this one yet - looks like it'd take a bit more work to get something working, especially if you have >1 Plesk server running (which is likely to be the case eventually. . I hope). This is a showstopper for me though before I can actually start using Blesta so it's up near the top of my todo list. Not sure if anyone's made progress on this front? (The fruits of my labor)
  12. Wow! UptimeRobot is pretty sexy. I've had a StatusCake account for a while but toying with the idea of either setting up cachet (since I found it in this thread), writing something that hooks into our internal Nagios stuff (which won't tell me anything about networking issues between the DC and the real world) but this also looks like a pretty sweet alternative StatusCake does the job & has a decent API. I think they have a few network farts here and there though because I'm pretty sure not all of the downtime they notify me about is actually the real deal (but yes I did break our fancy homepage this week for about half an hour - no client services were affected). http://uptime.webmastery.com.au/ linked for a real life comparison of UptimeRobot/Cachet & StatusCake history pages.
  • Create New...