Cody
-
Posts
1,574 -
Joined
-
Last visited
-
Days Won
74
Posts posted by Cody
-
-
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.
-
Could be related to CORE-1232.
-
Sorry for the late reply, We used the command and backups were generated (but not via blesta)
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.
-
Try using the TAB key. Then you'll have to cycle through each invoice line item field.
-
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.
-
-
-
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); }
-
Thanks, will give It a try now.
What was the result?
-
-
Well I was just asking what the correct script to do it in was...... seems like it runs off of the index.php file in the root dir?
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.
-
$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?
-
-
I like this idea.
I also like the idea of showing a maintenance-specific page, instead of the login.
Please +1 this.
- Michael, Blesta Addons and Daniel B
- 3
-
-
Turn error reporting to -1
in /config/blesta.php:
Configure::errorReporting(-1);
-
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.
-
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);?>
-
Great news.... Seems we are not far from the final release By the way. There Is nothing In the betas folder ; I'm logged
You have to have a license under your account to have access to betas.
-
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.- interfasys, MemoryX2, Daniel B and 3 others
- 6
-
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.
- Michael and Blesta Addons
- 2
-
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.
-
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.
-
Updates to the WHMCS migrator are coming in 3.3.0. These include client passwords, price overrides, options when importing client credits, and more.
- interfasys, PauloV and Michael
- 3
Help In Appcontroller.structure Event :)
in General
Posted
You're using the params wrong for this event.