-
Posts
3,638 -
Joined
-
Last visited
-
Days Won
242
Everything posted by Tyson
-
I think you may need to update the pipe.php file the error refers to to add a hashbang.
-
I'm not sure I understand the question. Your module should be able to define an uninstall method that overrides Module::uninstall($module_id, $last_instance): class MyModule extends Module { ... public function uninstall($module_id, $last_instance) { if ($last_instance) { // do something } } ... }
-
You can create the client info sidebar as a partial template (client_main_myinfo.pdt for client interface, and admin_clients_view.pdt for admin) in your plugin's controller by passing it all the data it will use and then make it available to your plugin's template for output.
-
Adding a section to the right, beside the client info sidebar, is already possible through the use of widgets.
-
Any definitions not translated in a language will default back to the system language or the English version Blesta comes with. You can find the order language files in /plugins/order/language/, /plugins/order/lib/order_types/***/language/, and /plugins/order/components/antifraud/***/language/. Some language was not previously available to the Translator, but is now for version 3.5.1.
-
Based on the module logs you included, Blesta is not receiving a response from Plesk, or the response is blank. It could be.. Invalid Plesk credentials set in Blesta The libxml/simplexml extension is not available to PHP on your server, so Plesk's response could not be parsed The Plesk API is not setup through your account to allow communication with Blesta, or it may be blocked at a firewall I would guess #2.
-
It sounds like you're missing the company setting inv_logo. If you re-save the [settings] -> [billing/Payment] -> [invoice Customization] page, it should re-add that setting. I'd be curious to know how that setting went missing, though. Any custom changes made to Blesta that might have removed it?
-
Some client pages don't have sidebars while others do. What 'left sidebar' are you wanting to display again? Your plugin should recreate this sidebar apart of its output.
-
You shouldn't have to create the directory manually. The directory was attempted to have been created automatically once before, but may not have been writable at that time, which accounts for why it didn't exist. The task Paul added would simply attempt to create the directory before writing attachments to it if the directory does not already exist. In either case, if the directory is not writable, an error would still be encountered and the attachments would not be added.
-
The package fields are loaded via AJAX, so there is no way for it to set javascript into the header. You can, however, set inline javascript by setting HTML on the ModuleFields object you return from that method.
-
Good to hear you got it to retrieve email. As for the From address in sent mail, do you have the "Email" field for the support department set to "support@...", and the "Override the from address set..." field checked? That's all you need. And of course, the ticket must be assigned to this department. All of these conditions met, email sent (e.g. the Ticket Updated email) should come with the From email address as set on the department.
-
A few basic things to confirm: Does the email still exist in your inbox after the cron runs to import ticket emails? Is the support department configured to.. look at the right inbox? allow non-clients to mail in tickets? fetch tickets securely? Is the appropriate port selected? Reference here. Is the cron task, "Download Tickets", enabled and running properly at its set interval? Does the person that sent the email receive a bounce email? (e.g. ticket could not be added) Is the IMAP extension available to PHP on the web server and in CLI mode? If all that seems to be working correctly, you might double-check your IMAP settings.
-
This is a duplicate of another thread.
-
Create a plugin. Your plugin should define a getActions method as shown in the example here, which will set a link in the client primary navigation that will link to a page you create in your plugin. If you want two primary navigation links, you would need to create two plugins at the moment, as plugins, currently, can only register one unique action. This will change when CORE-1697 is completed.
-
Services::getServices is a helper method for creating a Record object. We wouldn't want such a method to be public.
-
Those lines simply ensure that a host name has been provided so that the API can work with it, which is why it throws an exception if it's not. At what point do you receive the error "No host defined"? When saving a new module row? When creating a package? When attempting to create a service? My guess would be any of these. The hostname should be the IP address, yes, and you should make sure you have it set without any white-space before/after it. If you wanted to debug the issue, you would need to update the code looking for the point where the host name gets lost between when you save a module row and when it is passed to the API. e.g. update /components/modules/cpanel/cpanel.php and look for this line private function getRowRules(&$vars) { and below it add print_r($vars); var_dump($vars); die; Then try to add the module row again. You'll get a white page that should display the data you tried to save. Check whether the IP address you set for the host name is included.
-
Take a look at the example in the docs. I can't speak to the error you received as I don't know which line the error refers to from your example. In any case, the BlestaResponse is an object. You are looping over the object's properties rather than the package pricing you want. // Fetch the packages $api = new Api($url, $user, $key); $model = "packages"; $method = "getAllPackagesByGroup"; $params = array('package_group_id'=>'2'); $response = $api->get($model, $method, $params); // Output each package's pricing if (($packages = $response->response())) { foreach ($packages as $package) { print_r($package->pricing); } }
-
Are you using a config file (i.e. "config.json") or are you defining all the required methods in the module? The config.json file supports a key/value pair for "service", e.g. { ... "service": { "name_key": "domain" }, ... } In my example, "domain" is the name of the service field your module saves for the service representing the domain name. Set that and the domain name should appear on the service line item.
-
I'm not sure how this would be a bug with Blesta, but could you elaborate with more details as described in How to Report a Bug if you think it is a bug? I'd like to know what error you are seeing. Class names in Blesta should be CamelCase while file names are undescored. If you named your class "SV", then it should reside in a file named "s_v.php". In any case, "SV" is not very descriptive for a name. You might consider renaming it to something more meaningful.
-
Services::getList is paginated, so you will only receive a max of 20 results by default. Also, additional queries are made automatically for more service information (e.g. package pricing) for each service found. If that's fine for you, then set the status to "all" as naja7host suggested. There is no direct method to fetch every service in a single query. If you really need all services in one method call, you might try Services::getAllChildren by passing in a null $parent_service_id. But of course, that would retrieve all parent services and no addon services. It would also be slow for large numbers of services.
-
If you want to make additional language available to a template from a different area of the system, you will need to load it yourself. This requires that you update the controller(s) that you want to use it, and load the language file. e.g. Open the /plugins/support_managerpro/controllers/client_tickets.php controller Find: public function reply() { Below that line add: Language::loadLang("client_services"); Save the file, then use language definitions from that language file in /plugins/support_managerpro/views/default/client_tickets_reply.pdt
-
Ah, yes, there is one more thing you will need to do since that UI event is not bound by default. The widget should have an ID set (e.g. "<section id='my_widget'>") then you add the JS to bind the GUI events, e.g.: <?php $this->Widget->clear(); $this->Widget->setWidgetButton("full_screen"); $this->Widget->create("My Widget", array('id' => "my_widget"), $this->Html->ifSet($render_section, null)); ... $this->Widget->end(); ?> <script> $(document).ready(function() { $("#my_widget").blestaBindGuiEvents(); }); </script> Then the full screen button should work.
-
Check that your temp and upload directories are writable under [settings] -> [system] -> [General]. Attachments can only be added to a ticket if they can be saved on the file system.
-
It can be used for any widget in the admin interface, assuming the widget is within a "<section>", which it should be by default. $this->Widget->clear(); $this->Widget->setWidgetButton("full_screen"); $this->Widget->create("My Widget", array(), $this->Html->ifSet($render_section, null));