vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Add-On Releases - vHosting Lite (https://vborg.vbsupport.ru/showthread.php?t=124604)

Jesus05uk 08-23-2006 06:41 AM

Would it be possible to get this working with my admin panel?

Edit: Does it come with a userpanel when you pay?

GoTTi 08-23-2006 10:50 AM

wow this is some major stuff here.

good job.

harmor19 08-23-2006 01:39 PM

Quote:

Originally Posted by Jesus05uk
Would it be possible to get this working with my admin panel?

Edit: Does it come with a userpanel when you pay?

I don't understand what you mean.


Quote:

Originally Posted by GoTTi
wow this is some major stuff here.

good job.

Thanks

Jesus05uk 08-23-2006 02:34 PM

I don't have cpanel, so it doesn't autmatically create a subdimain/ftp ect.
My hosting provides their own unique admin panel. Would it be possible to edit the hack to make it work on mine?

Also: Do you include the cpanel files with the retail version.

harmor19 08-23-2006 02:39 PM

Quote:

Originally Posted by Jesus05uk
I don't have cpanel, so it doesn't autmatically create a subdimain/ftp ect.
My hosting provides their own unique admin panel. Would it be possible to edit the hack to make it work on mine?

Also: Do you include the cpanel files with the retail version.

This hack is meant for people that own a reseller or dedicated server.
Even if you did have cpanel it wouldn't automatically set up the account.
My product was coded around WHM and cPanel but you can still give someone hosting.
If you were to make a subdomain for me I would have
Subdomain: harmor19.gmodcentral.com
FTP: harmor19@gmodcentral.com (Used as username)

Is that correct, Jesus05uk?

(That was a choppy paragraph)

I do not include the cpanel files with the retail version.

Kirk Y 08-23-2006 03:55 PM

Wow, very cool indeed.

harmor19 08-23-2006 10:39 PM

Quote:

Originally Posted by acidburn0520
Wow, very cool indeed.

Thank You.

TCooper 08-23-2006 11:29 PM

Quote:

Originally Posted by harmor19
This hack is meant for people that own a reseller or dedicated server.
Even if you did have cpanel it wouldn't automatically set up the account.
My product was coded around WHM and cPanel but you can still give someone hosting.
If you were to make a subdomain for me I would have
Subdomain: harmor19.gmodcentral.com
FTP: harmor19@gmodcentral.com (Used as username)

Is that correct, Jesus05uk?

(That was a choppy paragraph)

I do not include the cpanel files with the retail version.

what do you mean you didnt include the cpanel files. Do you plan on coding auto create account function for cpanel with this? If you are is it b/c you dont have access to test it with as I can give you some room for testing. Sounds like a pay script I would be interested in if you were to do it.

harmor19 08-23-2006 11:58 PM

Quote:

Originally Posted by TCooper
what do you mean you didnt include the cpanel files. Do you plan on coding auto create account function for cpanel with this? If you are is it b/c you dont have access to test it with as I can give you some room for testing. Sounds like a pay script I would be interested in if you were to do it.

I don't have a license to redistribute cPanel.

To clear things up most hosting web site use a "Web Hosting Manager" to create accounts, not cPanel.

I don't plan on coding it but if I come across a way to do it I might consider it.

COBRAws 08-24-2006 02:36 AM

With the paid version, is all this automated? I dont want to manually add every new account on my WHM.

And does the pay version offer a brand free download?

Thank you again

TCooper 08-24-2006 02:42 AM

If you were looking for the basic way in php here is something you may be able to work with
Code:

require ?/usr/local/cpanel/Cpanel/Accounting.php.inc?;

$host = ?localhost?;
$user = ?root?;
$usessl = 0;
$accesshash = ?AccessHashInOneLongString?;
$domain = ?puranet.co.uk?; //the domain name to use on this account WITHOUT THE WWW.
$username = ?Username?; //the username to use on this account
$password = ?UserPasswordToUse?; // the user accounts password (cpanel pass)
$plan = ?PlanName?; //the package name in WHM you wish to use.
$create = createacct($host,$user,$accesshash,$usessl,$domain,$username,$password,$plan);
//it will show an error message if theres an error, or if it works, itll show the account creation like it does in whm

echo $create;

If I come across something that might be easier to work with I will post it. Let me know if that helps or not.

harmor19 08-24-2006 02:51 AM

Quote:

Originally Posted by COBRAws
With the paid version, is all this automated? I dont want to manually add every new account on my WHM.

And does the pay version offer a brand free download?

Thank you again

Currently neither version is fully automated but the user below posted a script that is supposed to do just that.



Quote:

Originally Posted by TCooper
If you were looking for the basic way in php here is something you may be able to work with
Code:

require ‘/usr/local/cpanel/Cpanel/Accounting.php.inc’;

$host = “localhost”;
$user = “root”;
$usessl = 0;
$accesshash = ‘AccessHashInOneLongString’;
$domain = ‘puranet.co.uk’; //the domain name to use on this account WITHOUT THE WWW.
$username = ‘Username’; //the username to use on this account
$password = ‘UserPasswordToUse’; // the user accounts password (cpanel pass)
$plan = ‘PlanName’; //the package name in WHM you wish to use.
$create = createacct($host,$user,$accesshash,$usessl,$domain,$username,$password,$plan);
//it will show an error message if theres an error, or if it works, itll show the account creation like it does in whm

echo $create;

If I come across something that might be easier to work with I will post it. Let me know if that helps or not.

Thank you. I will code this into the free version.
What would the "access hash" be?

TCooper 08-24-2006 03:10 AM

In order to create an account via the api you have to have the access key. You find this by logging into whm and go to the section Cluster/Remote Access and click setup Remote Access Key. You will be presented with the current key to allow your script to create the accounts.

In your vHosting script that would need to be in a settings section for users to edit as well as the $user variable which is the whm user they are using to create the account with.
Feel free to contact me via msn which is in my profile here or on my gaming community site which is in my sig. I do have other messengers as well if needed.

TCooper 08-24-2006 03:21 AM

I would also suggest to have your script have the option for the admins to restrict users appling for a package to use only a subdomain which could be turned on or off. I personally would restrict users to only a subdomain basically like advertising and such. If that is already an option sorry for posting as I have not installed this yet until the automation is coded but will click install for ya and myself to keep and eye on this.

BETIServices 08-24-2006 03:49 AM

New install I get: Database error

BETIServices 08-24-2006 03:51 AM

Well my guess is because I have installed VB image hosting, and I get the following error:

MySQL Error : Table 'hosting_plans' already exists

DigitalDesktops 08-24-2006 05:34 AM

I get a error when trying to add a package:

Quote:

Database error in vBulletin 3.6.0:

Invalid SQL:

INSERT INTO vb_`hosting_plans`
(
`title`,
`posts`,
`webspace`,
`transfer`,
`email`,
`ftp`,
`subdomain`,
`mysqldatabases`,
`addon`,
`parked`
) VALUES (
'Starter',
'1',
'250',
'2000',
'20',
'5',
'0',
'10',
'0',
'0'
);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'hosting_plans`
(
`title`,
`posts`,
`webspace`,
`transfer`,
' at line 1
Error Number : 1064
Date : Thursday, August 24th 2006 @ 07:18:20 AM
Script : http://skindev.jmfemedia.com/admincp....php?do=do_add
Referrer : http://skindev.jmfemedia.com/admincp...ing.php?do=add
IP Address : **.**.***.**
Username : JMF-John
Classname : vb_database

TCooper 08-24-2006 06:06 AM

It appears this part has a typo
Open admincp/admin_hosting.php and search for
Code:

                INSERT INTO " . TABLE_PREFIX . "`hosting_plans`
Try changing it to
Code:

                INSERT INTO " . TABLE_PREFIX . "hosting_plans
I haven't installed this yet so I can not confirm but let me know if I was right as I didn't go through his whole code throughly.

DigitalDesktops 08-24-2006 06:13 AM

a big thumbs up to you TCooper...

DigitalDesktops 08-24-2006 06:16 AM

a new problem now:

Quote:

Database error in vBulletin 3.6.0:

Invalid SQL:
DELETE FROM temp_host_request WHERE userid = '1';

MySQL Error : Table 'jferguso_skindev.temp_host_request' doesn't exist
Error Number : 1146
Date : Thursday, August 24th 2006 @ 08:14:55 AM
Script : http://skindev.jmfemedia.com/hosting...6&postuserid=1
Referrer : http://skindev.jmfemedia.com/showthread.php?t=15
IP Address : **.**.***.**
Username : JMF-John
Classname : vb_database
I got that when I clicked the accept button on a test post that I made for the hosting.

I also get a similar one if I click decline.

Quote:

Database error in vBulletin 3.6.0:

Invalid SQL:
DELETE FROM temp_host_request WHERE userid = '1';

MySQL Error : Table 'jferguso_skindev.temp_host_request' doesn't exist
Error Number : 1146
Date : Thursday, August 24th 2006 @ 08:17:15 AM
Script : http://skindev.jmfemedia.com/hosting.php?do=do_decline
Referrer : http://skindev.jmfemedia.com/hosting...6&postuserid=1
IP Address : **.**.***.**
Username : JMF-John
Classname : vb_database

TCooper 08-24-2006 06:18 AM

I take it that fixed the problem. Sure harmor19 will update the zip for everyone else until then that I guess fixed it.

TCooper 08-24-2006 06:25 AM

Ok think I found that problem as well.
Open hosting.php
Search For:
Code:

$db->query_write("DELETE FROM temp_host_request WHERE userid = '".$db->escape_string($vbulletin->GPC['postuserid'])."' ");
Change to:
Code:

$db->query_write("DELETE FROM " . TABLE_PREFIX . "temp_host_request WHERE userid = '".$db->escape_string($vbulletin->GPC['postuserid'])."' ");
Let me know.

DigitalDesktops 08-24-2006 06:25 AM

I will try them now

that worked a treat. thanks again.

TCooper 08-24-2006 06:30 AM

Make sure you got it twice as it appears twice in that file.

DigitalDesktops 08-24-2006 06:32 AM

yeah I got the 2 of them.

harmor19 08-24-2006 08:09 AM

Thank you TCooper for helping. I'll contact you about the automated account creator script later today.

DigitalDesktops is the only person that got an error which I think is weird. I'll fix the typos and re-upload.

DigitalDesktops 08-24-2006 08:12 AM

woot I am special :D

harmor19 08-24-2006 08:38 AM

I have fixed the errors reported and uploaded a new package.

TCooper 08-24-2006 08:52 AM

Quote:

Originally Posted by harmor19
Thank you TCooper for helping. I'll contact you about the automated account creator script later today.

DigitalDesktops is the only person that got an error which I think is weird. I'll fix the typos and re-upload.

no problem. I am off today need to take some cat naps here and there and now is time for one. glad to help. he might have been the only one to use prefix

harmor19 08-24-2006 07:47 PM

Quote:

Originally Posted by BETIServices
Well my guess is because I have installed VB image hosting, and I get the following error:

MySQL Error : Table 'hosting_plans' already exists

Let me see if 'vB Image Hosting' uses the same table name.

You can uninstall the product and reimport it again. directions on uninstalling are in instructions.html, on the last row.

Edit: 'vB Image Hosting' does not use "hosting_plans" as a table name.

BETIServices 08-24-2006 11:03 PM

Now I'm getting the following:

PHP Code:

Database error in vBulletin 3.6.0:

Invalid SQL:
CREATE TABLE `temp_host_request` (
 `
requestidmediumint(10unsigned NOT NULL auto_increment,
 `
useridint(20unsigned NOT NULL default '',
 `
planidint(20unsigned NOT NULL default '',
 `
titlevarchar(120NOT NULL default '',
 `
subdomainvarchar(200NOT NULL default '',
 `
host_usernamevarchar(200NOT NULL default '',
 `
host_passwordvarchar(7NOT NULL default '',
 
PRIMARY KEY  (`requestid`)
);;

MySQL Error  Invalid default value for 'userid'
Error Number 1067
Date         
ThursdayAugust 24th 2006 07:59:48 PM 


BETIServices 08-24-2006 11:04 PM

Another Error:

PHP Code:

Database error in vBulletin 3.6.0:

Invalid SQL:
CREATE TABLE `hosting_plans` (
 `
planidmediumint(10unsigned NOT NULL auto_increment,
 `
titlevarchar(120NOT NULL default '',
 `
postsvarchar(120NOT NULL default '',
 `
webspacevarchar(120NOT NULL default '',
 `
transfervarchar(120NOT NULL default '',
 `
emailvarchar(120NOT NULL default '',
 `
ftpvarchar(120NOT NULL default '',
 `
subdomainvarchar(120NOT NULL default '',
 `
mysqldatabasesvarchar(120NOT NULL default '',
 `
addonvarchar(120NOT NULL default '',
 `
parkedvarchar(120NOT NULL default '',
 
PRIMARY KEY  (`planid`)
);;

MySQL Error  Table 'hosting_plans' already exists
Error Number 
1050
Date         
ThursdayAugust 24th 2006 07:55:13 PM 


harmor19 08-24-2006 11:36 PM

Quote:

Originally Posted by BETIServices
Now I'm getting the following:

PHP Code:

Database error in vBulletin 3.6.0:

Invalid SQL:
CREATE TABLE `temp_host_request` (
 `
requestidmediumint(10unsigned NOT NULL auto_increment,
 `
useridint(20unsigned NOT NULL default '',
 `
planidint(20unsigned NOT NULL default '',
 `
titlevarchar(120NOT NULL default '',
 `
subdomainvarchar(200NOT NULL default '',
 `
host_usernamevarchar(200NOT NULL default '',
 `
host_passwordvarchar(7NOT NULL default '',
 
PRIMARY KEY  (`requestid`)
);;

MySQL Error  Invalid default value for 'userid'
Error Number 1067
Date         
ThursdayAugust 24th 2006 07:59:48 PM 


I guess it needs a value.

First run the "uninstall_hosting.xml" again. Download the attachment in this post and import it as a product.

BETIServices 08-25-2006 02:13 AM

Quote:

Originally Posted by harmor19
I guess it needs a value.

First run the "uninstall_hosting.xml" again. Download the attachment in this post and import it as a product.

Yes, install is o.k now :D

harmor19 08-25-2006 02:15 AM

Quote:

Originally Posted by BETIServices
Yes, install is o.k now :D

Glad to hear it.

Please click the "Install" button. It's located below the page navigation.

BETIServices 08-25-2006 02:18 AM

Well new problem, I click on Hosting Options:
Them I get the following:
Quote:

Sorry, you don't have permission to access the administrative controls on this page.

If you need to access this page, ask your lead administrator to enable your permissions for this page using the Administrator Permissions section of the control panel.

I go to the Administrator Permissions section and select Can Administer Hosting to yes but it will not do anything

Yes, I will click install as soon is installed. :D

harmor19 08-25-2006 02:23 AM

Quote:

Originally Posted by BETIServices
Well new problem, I click on Hosting Options:
Them I get the following:



I go to the Administrator Permissions section and select Can Administer Hosting to yes but it will not do anything

Yes, I will click install as soon is installed. :D

Make sure you have uploaded the files in the xml folder to public_html/forum_root/includes/xml/

Make sure you have updated the bitfields. It explains how in the instructions.

BETIServices 08-25-2006 02:38 AM

I had done all that:

here is another error:

Quote:

Database error in vBulletin 3.6.0:

Invalid SQL:
UPDATE administrator SET
### Bitfield: administrator.adminpermissions ###
adminpermissions = IF(adminpermissions & 4, adminpermissions, adminpermissions + 4),
adminpermissions = IF(adminpermissions & 8, adminpermissions, adminpermissions + 8),
adminpermissions = IF(adminpermissions & 16, adminpermissions, adminpermissions + 16),
adminpermissions = IF(adminpermissions & 32, adminpermissions, adminpermissions + 32),
adminpermissions = IF(adminpermissions & 64, adminpermissions, adminpermissions + 64),
adminpermissions = IF(adminpermissions & 128, adminpermissions, adminpermissions + 128),
adminpermissions = IF(adminpermissions & 256, adminpermissions, adminpermissions + 256),
adminpermissions = IF(adminpermissions & 512, adminpermissions, adminpermissions + 512),
adminpermissions = IF(adminpermissions & 1024, adminpermissions, adminpermissions + 1024),
adminpermissions = IF(adminpermissions & 2048, adminpermissions, adminpermissions + 2048),
adminpermissions = IF(adminpermissions & 4096, adminpermissions, adminpermissions + 4096),
adminpermissions = IF(adminpermissions & 8192, adminpermissions, adminpermissions + 8192),
adminpermissions = IF(adminpermissions & 16384, adminpermissions, adminpermissions + 16384),
adminpermissions = IF(adminpermissions & 65536, adminpermissions, adminpermissions + 65536),
adminpermissions = IF(adminpermissions & 32768, adminpermissions, adminpermissions + 32768),
### Bitfield: administrator.hostingadminperms ###
hostingadminperms = IF(hostingadminperms & 1, hostingadminperms, hostingadminperms + 1),
cssprefs = 'vBulletin_3_Manual'
WHERE userid = 1;

MySQL Error : Unknown column 'hostingadminperms' in 'field list'
Error Number : 1054
Date : Thursday, August 24th 2006 @ 11:37:36 PM

harmor19 08-25-2006 02:53 AM

Let's try this again shall we.

Uninstall vHosting from your product manager and import the attached version.
You'll need to update the bitfields again.

BETIServices 08-25-2006 04:28 AM

Did not work either!

Maybe attaching some pictures for you will help!

Pictures attached:
Attachment 52640

Attachment 52641

Attachment 52642


All times are GMT. The time now is 01:33 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01853 seconds
  • Memory Usage 1,887KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (3)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete