Cpanel interface customization. Need help

begemot

Registered
Nov 21, 2005
1
0
151
Hello.

1. If there any way we can customize Cpanel interface for our customers and include on user's main Cpanel page our logo and links to our site?

2. How we can integrate our own billing with Cpanel not making customers to fill login and password twice while switching between billing and customer's Cpanel interfaces? So the user will login to our billing with his password and will be able to see and use "Cpanel" in our billing interface.

Please advise
Thanks for any help.
 

nineofus

Registered
Nov 30, 2005
4
0
151
customize

:D First you need to duplicate one of the themes you presently have like x theme.
Then download the tarball to your location.
The tarball is actually zipped twice. The first zip is a tarball using tar. The second is gz.
When you extract the file you can use anything, winzip, winrar, wingz, 7zip etc.
When you extract it you will see a single file. Now rerun that file through your extracter again and you will get the entire directory structure.

You will want to edit the index.html file in the root directory. If you want to make some administrative pages you will need to include them within the themes directory structure to make it accessable from cpanel only. Make any pages you want and use the variables used throughout cpanel to pull information from the database to autofill names and domains and such. Anything you access from within the cpanel structure will only be accessable from within the cpanel login. You will not have to login twice. Cpanel places a cookie on your pc so as long as the browser is never closed you will always be able to click back or just retype in the url without using a password.

If your using paypal make sure to make it open a new page for that transaction.
Same with any other payment plans. If your using verisign for billpay or visa and such put your pages again within cpanels structure for password access only.

It's really fairly simple. Just cumbersome and time consuming.
When you want to reinstall the theme first tar it up using 7zip or another tarballer as a tar file with the name you want the theme called. Then gz it. Don't reinstall it as the x theme. You don't want to overwirte what is already working in case you screw it up.

I read some other post here that say you will get errors when extracting it. No...you won't. If you do you are doing it wrong. The tarball extracts perfectly if you do it twice. If you use winrar you will get no errors. Don't use a hacked version of winrar. Winrar cracks have trojans in them you do not want placed in your cpanel.

Frank Mysliwiec
http://streamline-hosting.com
http://theutahnet.com
 
Last edited:

nickp666

Well-Known Member
Jan 28, 2005
769
2
168
/dev/null
I read some other post here that say you will get errors when extracting it. No...you won't. If you do you are doing it wrong. The tarball extracts perfectly if you do it twice.
The WHM "Download a tarball" for x2 tries to gz the symlinks that are to files in the x theme folder, dependant on what program you are using to extract the files this error may or may not appear

I am not a windows user so it may just be under *nix

EDIT: The x2 theme seems to be the only one with symlinks in it
 
Last edited:

djbob2

Well-Known Member
May 14, 2005
99
0
166
I am an established PHP programmer, and I am looking to edit a current theme to include a small line telling the user how much more days of hosting they have left. I will need it to get this information from a SQL server. This can be done with some PHP.

What I need to do is find the index.html for the cPanel skin that is default on my customers' hosting accounts. Then I need to edit it and add some PHP at the top. Then I need to add a .htaccess to modify MIME types to make the .html parse PHP (this seems like the easiest solution, right?). Am I correct?

Also, where can I find the index.html file?
 

Murtaza_t

Well-Known Member
Jan 24, 2005
474
0
166
Earth
cPanel Access Level
Website Owner
djbob2 said:
I am an established PHP programmer, and I am looking to edit a current theme to include a small line telling the user how much more days of hosting they have left. I will need it to get this information from a SQL server. This can be done with some PHP.

What I need to do is find the index.html for the cPanel skin that is default on my customers' hosting accounts. Then I need to edit it and add some PHP at the top. Then I need to add a .htaccess to modify MIME types to make the .html parse PHP (this seems like the easiest solution, right?). Am I correct?

Also, where can I find the index.html file?
Well I am not sure if what you say works but you will fine the index file at :

/usr/local/cpanel/base/frontend/(theme_name)/index.html

dont forget to back up the files before modifying them. :D
 

nickp666

Well-Known Member
Jan 28, 2005
769
2
168
/dev/null
djbob2 said:
I am an established PHP programmer, and I am looking to edit a current theme to include a small line telling the user how much more days of hosting they have left. I will need it to get this information from a SQL server. This can be done with some PHP.

What I need to do is find the index.html for the cPanel skin that is default on my customers' hosting accounts. Then I need to edit it and add some PHP at the top. Then I need to add a .htaccess to modify MIME types to make the .html parse PHP (this seems like the easiest solution, right?). Am I correct?

Also, where can I find the index.html file?
to be honest you are probably better making a seperate php page and linking to it from the index for your account management stuff, you could be opening a new can of worms by making html files parse as php.

Don't forget to copy the x theme and create a new one as cpanel will over-write your changes upon a major update (dodgey branding elements not finished either!)
 
Last edited:

BraveX

Well-Known Member
Apr 8, 2005
155
0
166
nickp666 said:
]Don't forget to copy the x theme and create a new one as cpanel will over-write your changes upon a major update (dodgey branding elements not finished either!)
That just happened to me! How can I avoid that in the future?

Thanks,
BX
 

nickp666

Well-Known Member
Jan 28, 2005
769
2
168
/dev/null
You will need to download a tarball of the x theme, extract it somewhere, rename the folder you extracted (x) to something unique, ensure all of the images in the html template files are referenced to the new folder name opposed to x, put your custom images into the images/mainicons folders then gzip the folder (be sure to retain path information) then rename the gzip to whatever you called the folder.cptheme e.g. if my theme was called "mystyles" i would call the gzip "mystyles.cptheme"

then just upload the theme with WHM's "Install a new cpanel theme" function.


Its a little bit of a mission but stops cpanel messing with your branding ;)