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.

WHM/cpanel news

Discussion in 'General Discussion' started by mrlarter, Feb 14, 2004.

  1. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    I wish to display the cpanel/whm news in my cpanel custom theme? where is it located? how can they view it?
     
  2. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    https://serverip:2087/scripts2/whmnews

    You can use the php api to connect to this (you will need to modify it) or do a fsockopen to the above url with your root password (not recommended).

    The php api is recommended because it uses only access key to connect to whm and no root password is involved in between.
     
  3. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    php api? sorry I think you lost me there. but yes this definatly sounds like the proper way to have it connected to the cpanel.
     
  4. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    safer way as well. ;)
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I have earlier modified sections of php api of cpanel to access various parts of whm and parse their output so i know its possible.
     
  6. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    I am sorry I am not really understanding. so you mean like a php includes? but the cpanel includes?
     
  7. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
  8. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    alright so cpanel includes dosn't work nor does php includes.

    I am looking at this and I still think its over my head a little.

    I have looked over that page you provided and am not sure really how this helps here.
     
  9. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    acctualy found the answer

    <cpanel News="displaynews()">
     
    #9 mrlarter, Feb 22, 2004
    Last edited: Feb 22, 2004
  10. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    is there anyway to edit the news area? it looks absolutly horrible and very plain.
     
  11. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    glad to know ur probs solved ;)
     
  12. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    This is basically a cpanel api which lets you build your own scripts to do various jobs. Some of the functions are already given in the example. You can extend that further as per your convenience / needs.
     
  13. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    There is a section in the WHM i believe which allows you to edit the news. Try that. Never checked it out though.
     
  14. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    It works! (at least for me;)
     
  15. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    I mean edit the look. going to chekc it out now. i know I can add to it but I want to edit the look. I wonder if it takes css or html coding.
     
  16. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    As i said earlier, have no clue. Do check and post.
     
  17. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    ok apparently I can use html code which is good. so this fixes one thing.

    I wonder is it possible to specify possible variables? like the author of it an image to specify maybe?

    I am going to try this now. is there also a way to specify the date? possible a cpanel command?
     
  18. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    If you can use html, then use the html tags and insert whatever image you want etc.

    As for other stuff you ask, i am sorry i have no clue on that. Maybe someone else can help.

    However i was just wondering, what would you need next in the news section ? :p
     
  19. mrlarter

    mrlarter Well-Known Member

    Joined:
    Jan 23, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Hello

    well I am working on a theme and want the news section to look as informative as possible as well as provide the proper information.

    the way I have it set up right now is the news template is located in a news file. the news file calles upon the news feature of WHM and that provides at this time variable information to the template and hence fills it out.

    I can see I am going to have issues with this since many people can post news in this area. (diffrence resellers and such)

    I think it would acctually be best if I can have the news on the outside of cpanel but as of now unable to call from outside of cpael into cpanel its self.
     
Loading...

Share This Page