Running a php program in Joomla hero needed

Discussion in 'PHP' started by gabre, Sep 11, 2006.

  1. #1
    Hello!
    I am using joomla, i have a user module i am using and in it I wish to display the date for two calendars.

    The code that I am using contains php, when I have enterd the code in the text editor via the HTML button, and then pressed up date. The php function code disapears and all that is left is basic text formatting.

    The code is as below,
    ------------------------------------------------------------------------
    <div class="modulelightS"><div><div><div>
    <h3 align="center">Today's date is<br />
    the <? echo tabot_day_month() ?><br />H.I.M. <? echo tabot_year() ?><br />
    the <? echo gregorian_day_month() ?><br />A.D. <? echo gregorian_year() ?><br />
    </h3>
    </div></div></div></div>
    ------------------------------------------------------------------------

    So after I paste this in the php bit disapears.

    I then need to link this code to the folder in my directory containing the rest of the php data.

    This code was prepared for me and I was told I could use this
    ------------------------------------------------------------------------
    <?php
    require_once 'tabot_date_fns.php';
    require_once 'greg_date_fns.php';
    ?>
    ------------------------------------------------------------------------
    or a link to the file like this e.g
    ------------------------------------------------------------------------
    <?php
    require_once 'php_files/tabot_date_fns.php';
    require_once 'php_files/greg_date_fns.php';
    ?>
    -------------------------------------------------------------------------

    but it seems that the editor is not accepting the php code.

    So to sum it up, I would like the two calender dates displayed on my home
    page preferably in a module. I am attempting to use a user module, and by entering the code into the text area, but I am having no luck, the editor is not accepting the code, and I am not sure if I know how to direct the code to the files, but of course I can not know if this works as long as the editor keeps eating up the php code.

    I hope I have made sense to some genius out there, my php is like water, there's plenty of it but I have trouble retaining it.
     
    gabre, Sep 11, 2006 IP
  2. sixpack

    sixpack Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    sixpack, Sep 11, 2006 IP
  3. gabre

    gabre Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you very much its just what I have been looking for, you have been a great help!
    You have saved me from getting very upset, the last time I got angry I ended up turning green and mashing up the town, they even wrote a book about me you know and made a film or two, but I don't like to talk about it. :D

    KR,

    Gabre
     
    gabre, Sep 13, 2006 IP