Jump to content

Cody

Blesta Developers
  • Posts

    1,574
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Cody

  1. Didn't I post how to use this event in another thread? <?php class MyPluginPlugin extends Plugin { ... public function getEvents() { return array( array( 'event' => "Appcontroller.structure", 'callback' => array("this", "run") ) // Add multiple events here ); } public function run($event) { // Fetch current return val $result = $event->getReturnVal(); $params = $event->getParams(); // Set return val if not set if (!isset($result['body_start'])) $result['body_start'] = null; // Update return val -- ONLY set if client portal if ($params['portal'] == "client") $result['body_start'] .= "<p>your HTML goes here</p>"; // Update return val $event->setReturnVal($result); } } ?> See Plugin Events. Creating Events.
  2. Could be related to CORE-1232.
  3. Cody

    Backups Not Running

    Did you run the mysqldump command using the same user that your webserver runs as? That's probably your problem right there. The user that the webserver runs as is either: Unable to execute mysqldump, or Unable to write to the temp directory you have configured in Blesta.
  4. Try using the TAB key. Then you'll have to cycle through each invoice line item field.
  5. If submitting your username at /admin/login/reset/ does not produce an email in the log_email table then the username you provided doesn't match any staff user. Remember, your username is not necessarily your email address. Look in the users table for your admin user. Note the id, then look in the staff table for a staff user with that same id set for the user_id field. If you don't find on, that user is not a staff member.
  6. Cody

    Cookie?

    Blesta stores sessions in the database, no files are created on the server for sessions. The only cookie Blesta creates, which is stored on the user's system, is to track the session.
  7. I think the download manager description supports markdown. Let me look into it.
  8. You should probably be using Company::setSetting() instead, since plugins are installed per-company. Also, you can use setSettings() after you create the settings for quick update. But install/uninstall could just loop through all settings your plugin creates. $settings = array('setting1', 'setting2', 'setting3'); // uninstall all plugin settings: foreach ($settings as $setting) { $this->Company->unsetSetting($company_id, $setting); }
  9. Cody

    Backups Not Running

    What was the result?
  10. Set the max execution time in your php.ini file. On most machines, there is not max execution time in CLI mode, so if you're running cron using something like /usr/bin/php instead of wget, then timeout is not the issue here.
  11. Docs here. $return = $event->getReturnVal(); if (!array_key_exists("head", $return)) $return['head'] = null; if (!array_key_exists("body_start", $return)) $return['body_start'] = null; if (!array_key_exists("body_end", $return)) $return['body_end'] = null; $return['head'] .= "<script>alert('head');</script>" $return['body_start'] .= "<p>Set at top of body</p>"; $return['body_end'] .= "<p>Set at bottom of body</p>"; $event->setReturnVal($return); But now that I think about it more, I'm thinking maybe each section should be an array. So instead you could just do: $return = $event->getReturnVal(); $return['head'][] "<script>alert('head');</script>" $return['body_start'][] "<p>Set at top of body</p>"; $return['body_end'][] "<p>Set at bottom of body</p>"; $event->setReturnVal($return); Which is easier to use, and a little harder to accidentally overwrite other plugin's return values. What do you think?
  12. Order of operands does not matter for multiplication. Tyson's proof stands. The two are equivalent: (-)-1 = -1(-) Proof: By Associated law of multiplication LHS: (-1) * -1 = 1 RHS: -1 * (-1) = 1 1 = 1 []
  13. I like this idea. I also like the idea of showing a maintenance-specific page, instead of the login. CORE-1395 Please +1 this.
  14. Cody

    Backups Not Running

    Blesta assumes the mysqldump binary is in the system path (e.g. executable from anywhere). Try the following command (replacing HOST, USER, PASSWORD, and DATABASENAME) with their appropriate values. mysqldump --host="HOST" --user="USER" --password="PASSWORD" DATABASENAME > dump.sql
  15. Turn error reporting to -1 in /config/blesta.php: Configure::errorReporting(-1);
  16. See my reply to your plugin thread here. Not a bug. You should only use the Textparser to parse markdown text, not plain HTML. In 3.3.0-b1 we made a change to ensure that HTML content is not allowed in the markdown parser for security reasons.
  17. Just a quick tip: <?php echo $this->TextParser->encode("markdown", $announcement->body);?> Should only be called if $announcement->body is markdown text. If it's already HTML (and you trust this HTML because you entered it into the system from a WYSIWYG editor) then just use: <?php echo $this->Html->ifSet($announcement->body);?>
  18. Cody

    Release 3.3.0-B1

    You have to have a license under your account to have access to betas.
  19. Cody

    Release 3.3.0-B1

    Version 3.3.0-b1 is now available. You can download it in the Client Area. This is a BETA feature release. This release is not considered stable enough for production use. Please report any bugs in the 3.3 beta bug forum. Installing Blesta See Installing Blesta in the User Manual for instructions. Upgrading Blesta See Upgrading Blesta in the User Manual for instructions. Release Notes See Blesta Core - Version 3.3.0-b1. For older releases see all Change Logs.
  20. That's the 1%, and that could be solved by updating that gateway, allowing users to specify the name for each language. That way they could have it say "Mail in payment" or "Wire Transfer" or whatever they want it to say instead.
  21. Sure you can request a feature for this -- though I'm leaning more towards not allowing language definitions at all in config.json files for modules, gateways, and plugins. 99% of modules and gateways are named the same in every language. For example, PayPal is "PayPal" everywhere in the world.
  22. There are a number of things to consider if we were to allow multiple prices per term and period through the order system. I think that it's something that can technically be done, but there are also a lot of potential issues. Obviously, the more people that want this the more likely it is we'll take time away from other tasks to tackle those issues.
  23. Updates to the WHMCS migrator are coming in 3.3.0. These include client passwords, price overrides, options when importing client credits, and more.
×
×
  • Create New...