Jump to content

[Cpanelextended] Show Username & Password Fix


Michael

Recommended Posts

Thanks to the amazing Eric, I've found a way to get the username / password box showing if the user clicks the service row in the client area. He explained to me when doing a module for me that the module needs to grab the information with the "getClientServiceInfo" fucntion, and I managed to use the cPanel module from Blesta to implant the features.

 

Go to: /components/modules/cpanelextended/cpanelextended.php

 

Find: 

	public function getClientServiceInfo($service, $package) {
		return null;
	}

Replace it with:

	public function getClientServiceInfo($service, $package) {
		$row = $this->getModuleRow();
		
		// Load the view into this object, so helpers can be automatically added to the view
		$this->view = new View("client_service_info", "default");
		$this->view->base_uri = $this->base_uri;
		$this->view->setDefaultView("components" . DS . "modules" . DS . "cpanelextended" . DS);
		
		// Load the helpers required for this view
		Loader::loadHelpers($this, array("Form", "Html"));

		$this->view->set("module_row", $row);
		$this->view->set("package", $package);
		$this->view->set("service", $service);
		$this->view->set("service_fields", $this->serviceFieldsToObject($service->fields));
		
		return $this->view->fetch();
	}

Save it.

 

 

Now go to: /components/modules/cpanelextended/language/en_us/cpanelextended.php

 

Find:

// Basics
$lang['Cpe.name'] = "cPanel Extended";
$lang['Cpe.module_row'] = "Server";
$lang['Cpe.module_row_plural'] = "Servers";
$lang['Cpe.module_group'] = "Server Group";

Now paste this underneath it:

// Service fields
$lang['CpanelExtended.service_info.domain'] = "Domain";
$lang['CpanelExtended.service_info.username'] = "Username";
$lang['CpanelExtended.service_info.password'] = "Password";
$lang['CpanelExtended.service_info.confirm_password'] = "Confirm Password";
$lang['CpanelExtended.service_info.server'] = "Hostname";

Now save it and you should see the information for their account just like the Blesta cPanel module. You don't get a login url though and since you get it from the manage -> Login to I thought there was no need to try and fix it.

 

I've got the full download here for you, you just need to remove the cpanelextended folder and replace it with the one in the zip.

 

It will only work on 3.1.x I believe due to that's the version I edited it on, feel free to try it on 3.0.x.

 

Again big thanks to @secforus_ehansen and Blesta (@Paul@Cody@Tyson for this edit.

 

Download: http://licensecart.com/public/cpanelextended-customedit.zip

 

You can find the cpanelextended folder in /components/modules/

 

 

Preview:

cpanelextended-edit.PNG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...