Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Display Temp URL on cPanel interface

Discussion in 'General Discussion' started by wanico, Jun 20, 2012.

  1. wanico

    wanico Member

    Joined:
    Feb 27, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hi,

    Is it possible to display a user's temp url on cPanel's interface under the Notices section?

    Via the 'Modify cPanel & WHM News' section I can display a static serverip/~user but is it possible to replace the user with the actual cpanel user for example.

    serverip/~acc1

    Thanks
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,440
    Likes Received:
    416
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are they not the same? I'm not understanding you properly I don't think.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. wanico

    wanico Member

    Joined:
    Feb 27, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Sorry for not being clear, In the news section I can hardcode
    serverip/~user

    and that is what all the users would see, but I want them to see there own account name and not 'user'.

    I want user with account name john5 and user with account name acc10 see
    serverip/~john5
    serverip/~acc10

    Instead of both seeing
    serverip/~user

    So I assume I should make an api call to pull the current account name from within the branding html pages or under the news sections code, something like

    serverip/~xml-api-call-to-get-username
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,440
    Likes Received:
    416
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Ah, understood, something like: /~$user

    Not sure if thats possible, hopefully someone will be by to assist you with this.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. wanico

    wanico Member

    Joined:
    Feb 27, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hi Infopro,

    Its indeed just $user , thanks for the pointer

    All you need to display the temp url as a link to the customer is

    <a href="http://<cpanel print=$hostname>/~<cpanel print=$user>" > <cpanel print="$hostname">/~<cpanel print="$user"> </a>

    I added this to a custom theme under the branding html pages section in WHM branding.

    Thanks
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,440
    Likes Received:
    416
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Nice! I peeked at the API docs and gave that $user as an example, not an answer. But hey if it works, great news. :)

    You're certainly welcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice