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.

which template is used by list_cron ?

Discussion in 'User Experience' started by mahmoud73, Dec 25, 2007.

  1. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    hello.
    /usr/local/cpanel/base/frontend/x/cron/advcron.html uses the following line of code to generate the list of cron jobs.

    <cpanel Cron="list_cron()">

    which outputs html code such as

    Code:
    
    <tr>
            <td><input type=text name="1-minute" size=2 value="10"></td>
            <td><input type=text name="1-hour" size=2 value="*"></td>
            <td><input type=text name="1-day" size=2 value="*"></td>
            <td><input type=text name="1-month" size=2 value="*"></td>
            <td><input type=text name="1-weekday" size=2 value="*"></td>
            <td><input type=text name="1-command" size=45 value="some cron job"></td>
            <td><a href="del_cron.html?cnum=1"><img src="/frontend/x2/images/delete.jpg" border=0></a></td>
            </tr>
    
    
    do you have an idea which file is the template that generates this list_cron output?


    n.b. if you insist to know why I'm searching for this info, it is because i'm terribly disturbed by the very small size of the 45 character command-line field....
     
  2. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    hello earth.
     
  3. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    :(:(:( anyone ?
     
  4. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1

    do I need to pay someone something to get an answer ?
     
  5. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The API1 function call <cpanel Cron="list_cron()"> is used in both X and X3 at this time to list existing cron jobs. Most function calls in X3 are calls to API2 rather than API1 as the output of API2 functions can be more easily manipulated. This is an exception to the trend of using API2 functions.
     
  7. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1

    thank you David.

    so which php or html file needs to be edited if I wish to edit that input text field which is fixed at size=45 (in the cron advanced editor)
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You should be able to could achieve this via CSS. You can add your own CSS code via the Branding Editor.

    Unfortunately, since this is an API1 call, there would be no .php or .html file you could edit.
     
  9. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    thank you .

    we are coming close.

    now editing this line
    <cpanel Cron="list_cron()">

    all I want is to force the generated text fields to accept a style of 100% wide, not the default size=45

    so I modified this to

    <span style="width: 100%">

    <cpanel Cron="list_cron()">

    </span>


    any help how can I modify better achieve this ?
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Perhaps a stylesheet that modifies that element's width to your desired with. You could try it by name (though the fact that adding a cron entry would change the name of the element you wanted to modify) or by xpath (haven't tried that myself).
     
  11. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    thank you very much DavidG.

    i really appreciate your help.

    now that you have pointed me in the right direction, ....... I found the solution and am going to post it here for everyone looking for a solution to this issue. thank you again. after all, it was such a simple and easy change.....
     
  12. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1

    hello everyone.

    thank you again DavidG

    as promised before, I am posting here the solution that worked for me , so that anyone with a similar issue can find this solution.

    all that I needed was this tiny bit of code inserted to the head part of the advcron.html

    Code:
    
    <style type="text/css">
    <!--
    input {width: 100%;}
    //-->
    </style>
    
    
    :D am happy
     
  13. mahmoud73

    mahmoud73 Member

    Joined:
    Oct 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1


    note that editing this file /usr/local/cpanel/base/frontend/x/cron/advcron.html

    would give you the desired effect for both X and X2 themes (which apparently share this file)

    however with X3, you have to edit its own advcron.html , thus

    /usr/local/cpanel/base/frontend/x3/cron/advcron.html
     
Loading...

Share This Page