Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/11/2019 in all areas

  1. thank you so much! it worked!!!
    1 point
  2. Search the service ID and it should have a row. you just double click the client ID for the old client and then put the new client ID in.
    1 point
  3. That's weird regarding your email, I see you're registered with that currently. Maybe the IPBoard Spam service had an issue with the address, because the email/domain is NOT blocked internally by us. We do block a lot of free email domains, but not yours. I'd like to build a Lightsail module, a few people have asked for it but it hasn't risen to the level of demand we need to move forward with it yet. Anyone want to sponsor?
    1 point
  4. In the Universal Module, you can define service options, which are fields that customers can enter when they order a service. You mentioned using regular expressions to validate the input, which you can do by defining them in the "Input Rules" section for each of your fields as described in the Universal Module documentation. e.g. { "hostname":{ "valid":{ "rule":["matches", "/^[a-z0-9]{1,24}$/i"], "message":"Please enter an alphanumeric hostname between 1 and 24 characters in length." } }, "password":{ "valid":{ "rule":["matches", "/^[a-z0-9\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\+\\_\\-\\=]{10,24}$/i"], "message":"Please enter an alphanumeric password between 10 and 24 characters in length. You may also include any of the following characters: !@#$%^&*()+_-=" } } } My example does not enforce a minimum 1 lower case character, 1 upper case character, or 1 digit, but you can update the regular expression to whatever you need.
    1 point
  5. Blesta Addons

    DataTables

    i suggest to use DataTables in tables specially in client side for invoices, services and transactions . the plugin add pagination and search with filter without the need to any http request, why in client side? - Blesta doesn't offer search option for clients in services, transactions, invoices - majority of clients has some few services, invoices and transaction, so it will not lead to freezing page or slow navigation. (against admin side) we using it in some other project and is totally a wonderful plugin to play with tables, and we hope to see it in blesta .
    1 point
  6. @Tyson @MBH2006 @Nahuel Hello We have made some years in 2015 lol, long time ago a tool to map/move services from one module to outher in this case was moving from "Blesta Universal Module" to "OpenSRS Module" We only need the Services ID from Module A (cPanel) and Module B (Direct Admin) Here is the code exemple on the Plugin: public function install($plugin_id) { $sendreport = null; $module_A = array('1','2','3'); // put here the Service Package Id's from Module A $module_B = array('4','5','6'); // put here the Service Package Id's equivalent to Module A to migrate $module_migrate_map = array_map(null, $module_A, $module_B); foreach ($module_migrate_map as &$value) { $upackages = $this->Record->select(array("pricing_id","package_id"))->from("package_pricing")->where("package_pricing.package_id", "=", $value[0])->fetchAll(); $sendreport .= "Module A Package ID = ". $value[0]."\n"; foreach ($upackages as $upackage) { $upricings = $this->Record->select(array("id","period","term"))->from("pricings")->where("pricings.id", "=", $upackage->pricing_id)->fetchAll(); $sendreport .= "Module A Package Price ID = ". $upackage->pricing_id."\n"; foreach ($upricings as $upricing) { $gterm = $upricing->term; if ($upricing->period == "month") $gterm = ($upricing->term / 12); $sendreport .= "Module A Price Period = ". $upricing->period."\n"; $sendreport .= "Module A Package Price Term = ". $gterm." -> Original Term = ".$upricing->term." \n\n"; $sendreport .= "Module B Package ID = ". $value[1]."\n"; $opackages = $this->Record->select(array("pricing_id","package_id"))->from("package_pricing")->where("package_pricing.package_id", "=", $value[1])->fetchAll(); foreach ($opackages as $opackage) { $sendreport .= "Module B Price ID = ". $opackage->pricing_id."\n"; $opricings = $this->Record->select(array("id","period","term"))->from("pricings")->where("pricings.id", "=", $opackage->pricing_id)->where("pricings.period", "=", "year")->where("pricings.term", "=", $gterm)->fetchAll(); foreach ($opricings as $opricing) { $opricingid = $opricing->id; $sendreport .= "Module B Package Price Period = ". $opricing->period."\n"; $sendreport .= "Module B Package Price Term = ". $opricing->term."\n"; $sendreport .= "\n\n---------------BEGINING---------------\n"; $oservices = $this->Record->select(array("id"))->from("services")->where("pricing_id", "=", $upricing->id)->fetchAll(); foreach ($oservices as $oservice) { $sendreport .= "Migrate from A to B Imported Service ID = ". $oservice->id."\n"; $this->Record->where("pricing_id", "=", $upricing->id)->where("module_row_id", "=", "2")->update("services", array("pricing_id"=>$opricingid, "module_row_id"=>"3")); $this->Record->where("service_id", "=", $oservice->id)->where("key", "=", "user1")->update("service_fields", array("key"=>"domain")); $this->Record->from("service_fields")->where("service_id", "=", $oservice->id)->where("key", "in", array("opt1","opt2","pass","user2"))->delete(); } $sendreport .= "\n------------------END-------------------\n\n"; } } } } $sendreport .= "\n\n"; } mail("notify@mydomain.com", "Blesta - Migrate from Module A to Module B Report", $sendreport); } Hope this help someone Regards, PV
    1 point
×
×
  • Create New...