How to Add the Switch Themes Function

bajustin

Registered
Oct 24, 2006
3
0
151
I noticed that when you change to Bluelagoon, or Moonsoon, or many other themes they offer no way to change it back. This being Rather disapointing to me, especially when i tried to Find a solution on these forums. So I post this as an unsupported change.

First from a shell:
Code:
cp /usr/local/cpanel/base/frontend/x/switchtheme.html /usr/local/cpanel/base/frontend/themeyouwanttoedit/.
And then Edit the index.html in /usr/local/cpanel/base/frontend/themeyouwanttoedit/ to include the following lines where ever you feel is astetically pleasing...

Code:
           <form action="switchtheme.html" method="POST" name="tform">
            <table>
                <tr>
                    <td><span class="switcher-head">Switch Themes:</span></td>
                    <td>
                        <select name="theme" onChange="document.tform.submit();">
                                                <cpanel Resellers="themelistopt()">
                        </select>
                    </td>
                    <td><input type="submit" class="input-button" value="Go"></td>
                </tr>
            </table>
           </form>
save and reload. And you will now have it listed on how to change themes.


Note: I am not responsible if you mess up your install. So try it at your own risk
 

bajustin

Registered
Oct 24, 2006
3
0
151
PS:

If you only want the Resellers to be able to change this...use this code instead.


Code:
<cpanelif $isresellerlogin>
<form action="switchtheme.html" method="POST" name="tform">
            <table>
                <tr>
                    <td><span class="switcher-head">Switch Themes:</span></td>
                    <td>
                        <select name="theme" onChange="document.tform.submit();">
                                                <cpanel Resellers="themelistopt()">
                        </select>
                    </td>
                    <td><input type="submit" class="input-button" value="Go"></td>
                </tr>
            </table>
            </form>
</cpanelif>