Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : softaculous_extra



Threaded Mode | Print  

 softaculous_extra, perhaps i am an idiot! (6 Replies, Read 4140 times)
Mary
Group: Member
Post Group: Newbie
Posts: 1
Status:
For about one month + i am trying to set that damn think.
I have ask for your help, writing the problem as i am seeing it.
I am getting answers of 5 words explain nothing.
So perhaps someone of your members could help me, (i am sure they will explain better if they have face this).
So my problem is this:
I have create a script that takes 11 variables from my customers.
e.g.
Field Name --> Choose Protocol
                  --> Choose Domain
                  --> In Directory

                  --> Database Name... etc

the softaculous_extra.php has these:

$softaculous_conf['fields']['Choose Protocol'] = 'Choose Protocol';
$softaculous_conf['fields']['Choose Domain'] = 'Choose Domain';
$softaculous_conf['fields']['In Directory'] = 'In Directory';
$softaculous_conf['fields']['Database Name'] = 'Database Name';

$add_softaculous_scripts = array(
                    10001 => array('name' => 'SoDShop',
                                'softname' => 'SoDShop',
                                'desc' => 'Το eshop που σας προτείνει το ...',
                                'ins' => 1,
                                'cat' => 'E-Commerce',
                                'type' => 'php',
                                'ver' => '1.4.17'
                                )
                            );

When the script runs without the $softaculous_conf['fields'] it creates the site, db all well except that it takes the default values of the script for those fields.
When i have the $softaculous_conf['fields'] the script is not running. So obviously there is something wrong.
I do not know what. Please give me an example with only one of those variables to understand what i have to do.
The answer i had from you was:
You will have to create a Custom Field in the PHP File :
softaculous_extra.php

This only.

So please someone help!

Thanks in advance
Mary



         
IP: --   

softaculous_extra
alons
Group: Administrator
Post Group: Super Member
Posts: 2280
Status:
Hi,

Your field names is not going to be propagated like this.
Its wrong.
The WHMCS module was not made to pass extra fileds for scripts.

Regards,
ALons

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP
IP: --   

softaculous_extra
toddhgardner
Group: Member
Post Group: Newbie
Posts: 5
Status:
I am also trying to get a custom field from WHMCS into a custom softaculous script.

Aside from hijacking one of the standard fields and parsing it apart on the other side, is there any way to do this?

Best,
Todd
IP: --   

softaculous_extra
alons
Group: Administrator
Post Group: Super Member
Posts: 2280
Status:
Hi,

We havent made this change yet.
I have added it to the to dos.

Regards,
ALons

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP
IP: --   

softaculous_extra
toddhgardner
Group: Member
Post Group: Newbie
Posts: 5
Status:
Thanks ALons,

In the meantime, I think I am going to hijack the admin_username field by concatenating my custom value with the real admin name using some javascript, then parse it apart in the install.php file.

It seems to work okay in my prototype, any issues you think I might run into?

Best,
Todd
IP: --   

softaculous_extra
toddhgardner
Group: Member
Post Group: Newbie
Posts: 5
Status:
For future interest, my final *hacked* implementation:

I used the "Admin Name" field as a container for all my custom fields. I could not use either the "Script" or the "Directory" fields as they are used by Softaculous before control is dropped to the script's install.php file.

I added the following __parseFieldContainer() method to my custom install.php to extract the fields I needed and restore the proper Admin Name. This must be called first (or very early) in the execution of install.php to avoid conflicts.

PHP Code

 function __parseFieldContainer(){
   global 
$__settings$error$software$globals;
   
$fields explode("mn3GDv"$__settings['admin_username']);
   if (
count($fields) == 2) {    
        
$__settings['admin_username'] = $fields[0];
        
$__settings['my_custom_field'] = $fields[1];
    }
    else {
        die(
'This script must be installed through WHMCS Checkout.');
    }




Note that I used the crazy string "mn3GDv" as my delimiter. I initially tried both commas and pipes both literally and HTTP encoded, but they were not being passed through correctly. I instead opted for this random string.

Finally, to wire up WHMCS, I used Javascript ontop of the order form to hide the real "Admin_Name" input and instead display a fake "xxxAdmin" input along with my custom input. Then I use a Javascript event to concatenate the two values on change delimited by my random string.

I know, its a bit of a hack, but it works.
Happy Hacking  ;-D

Best,
Todd.


IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 29, 2024, 1:07 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.025