The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Clients can now change theme

Discussion in 'User Experience' started by dgbaker, Dec 2, 2002.

  1. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Okay, I've have a script working which allows my clients to change their own theme. Now I'm looking for feedback from everyone.

    The way it works is the script is setup like it's own theme directory and a symlink is created in each theme back to the script directory.

    For a demo see
    http://demo.virtual-hosting.ca:2082
    Use ID: demo PW: demo1

    Once in append themechg/theme.php to the URL (sorry I have not created direct links yet)

    so the URL should look like

    http://demo.virtual-hosting.ca:2082/frontend/THEMENAME/themechg/theme.php

    All feedback is welcome. Note that until security feedback issues (if any) :) have been resolved I will not release this.
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    I'm very glad you like!

    One of the challenges is creating an installer for it. I would have to create the symlink in each theme directory that exists on different hosts. (Can be done with foreach statements)

    As well, figure out where to create the link for it. I cannot change others themes, and you'd have to be carefull of themes getting updated.

    Any thoughts on over coming this? One was to send the link to get added to all the different theme developers.
     
  3. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    Wouldn't it be easier to change to value of RS in /var/cpanel/users and then redirecting to the new index?
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Either way works, but the same problems exist, how do you get the link in every theme and have it keeped when the themes get updated.

    I myself prefered this way as it is going through WHM as opposed to doing it at the file level. I know it's the same result, but I thought this way would be safer as the hidden config file is logging directly into whm.
     
  5. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    16
    This has possibilities. Nice.
     
  6. Silvernet_UK

    Silvernet_UK Member

    Joined:
    Aug 9, 2002
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Nice addon for CPanel, I like it a lot.

    Regards,
    Garry
     
  7. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    [quote:e215ae5683][i:e215ae5683]Originally posted by Juanra[/i:e215ae5683]

    Wouldn't it be easier to change to value of RS in /var/cpanel/users and then redirecting to the new index?[/quote:e215ae5683]

    Juanra - I tried the redirect approach and sometimes the browser had to be refreshed a couple of times to notice the change. By closing the browser you clear the login and URL so when user logs back in it always goes to the correct theme path.
     
  8. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Ok, call me dumb, but I just could not see/find the link for changing the Theme? Was it removed since original posting or do I need glasses? :)
     
  9. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    [quote:aa91e5b31f][i:aa91e5b31f]Originally posted by Website Rob[/i:aa91e5b31f]

    Ok, call me dumb, but I just could not see/find the link for changing the Theme? Was it removed since original posting or do I need glasses? :)[/quote:aa91e5b31f]

    Definitly glasses :)

    From the first post, read it all as the url has to change as there is no direct clickon link. :)

    For a demo see
    http://demo.virtual-hosting.ca:2082
    Use ID: demo PW: demo1

    Once in append themechg/theme.php to the URL (sorry I have not created direct links yet)

    so the URL should look like

    http://demo.virtual-hosting.ca:2082/frontend/THEMENAME/themechg/theme.php

    Try that.
     
  10. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Okay, on every theme we have I've added a text link to change theme.
     
  11. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    [quote:aac7ee0b73][i:aac7ee0b73]Originally posted by dgbaker[/i:aac7ee0b73]
    Juanra - I tried the redirect approach and sometimes the browser had to be refreshed a couple of times to notice the change. By closing the browser you clear the login and URL so when user logs back in it always goes to the correct theme path.[/quote:aac7ee0b73]

    Anyway, it wasn't as easy as I thought. I tried to include it in my API but it needs more permissions than Cpanel gives by default.
     
  12. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    For those that want to play with themechg scripts. It can be picked up here
    http://www.virtual-hosting.ca/themechg.tar

    INSTRUCTIONS AND WARNINGS.

    I will not be responsible for this script in any way shape or form other than what I post here. USE AT YOUR OWN RISK.

    SSH into your server
    copy the tar file to server
    cd /usr/local/cpanel/base/frontend
    tar -xvof themes.tar

    pico config.php and make appropriate changes.

    pico theme.php and ensure correct themes are listed for the form dropdown.

    You can put config.php anywhere you like for safety, and I strongly suggest you do as this is not using a hash for the password, just modify the config call in theme.php appropriatly.

    Create a symlink in each theme directory as follows;

    cd themename
    ln -s ../themes themechg

    Use your own naming for links and directories.

    Now the hard part, how do you get it to your users. You have your own choice to make.
    Edit every theme to add a link?
    Send the link to the users?
    Post the link somewhere common?
    Copy themechg to each theme directory?

    Your choice. Since we ourselves handle theme updates manually we added a link to each theme.

    Remember, that to call the theme.php script the syntax will be
    http://host:port/frontend/themename/themechg/theme.php or to that effect.

    If something does not work re-read these instructions. :)

    I take no responsibilty for security or any issues arising from using this.
     
  13. smperik

    smperik Registered

    Joined:
    Aug 21, 2002
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    How is this coming along? Do you think you will be releasing something like this anytime soon? Has anyone fine tuned security for this?
     
  14. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    [quote:158b0e8cde][i:158b0e8cde]Originally posted by smperik[/i:158b0e8cde]

    How is this coming along? Do you think you will be releasing something like this anytime soon? Has anyone fine tuned security for this? [/quote:158b0e8cde]

    Read my previous post a copy is available. No one seemed to have any security issues.
     
  15. EcpHosting

    EcpHosting Well-Known Member

    Joined:
    Dec 16, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    [quote:2aae362844][i:2aae362844]Originally posted by smperik[/i:2aae362844]

    How is this coming along? Do you think you will be releasing something like this anytime soon? Has anyone fine tuned security for this? [/quote:2aae362844]

    oops, someone didnt see page 2
     
  16. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Sounds very cool, How do we get the Dark Orbster's to add it as a theme that will automatically update?

    This is the most useful and functional theme I have seen yet!
     
  17. EcpHosting

    EcpHosting Well-Known Member

    Joined:
    Dec 16, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    any updates on this?
     
  18. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    I had scrapped it, as I found some issues with it. I am still working on a rewrite, not sure when it will be ready though.
     
  19. EcpHosting

    EcpHosting Well-Known Member

    Joined:
    Dec 16, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    We would pay for such a feature. You can be assured $50 (at least from us) if you can make a stable script for this (in a rewrite).

    Thanks.
     
  20. Brownie

    Brownie Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    I, Personally, wouldnt recommend using any script that stores the Web Host Manager password in a text file, un-encrypted - rings security alarm bells
     
Loading...

Share This Page