-->

How To Insert HTML, Javascript, PHP Code Into Joomla 1.5 Administrator Page

It begins when i found that my client have problem to contacting me because she do’nt have Yahoo Messenger account, and i only accept any consultation through Yahoo Messenger. Then i was thinking about inserting Yahoo Messenger Pingbox or simply contact form inside her Joomla 1.5 Administrator Page area so she can contacting me every time she needed help with her Joomla site.

Here are default of Joomla 1.5 Administrator Page screen shot (click image to enlarger):

Default Joomla 1.5 Administrator Page

Default Joomla 1.5 Administrator Page

We can insert HTML, or Javascript, or PHP, even Flash embed into that area:

  1. Prepare your code / script, i give an example from PHP form (this is just example, you can add anything):
    <?php
      if (isset($_REQUEST[‘email’]))
    //if "email" is filled out, send email
      {
      //send email
      $email = $_REQUEST[‘email’] ;
      $subject = $_REQUEST[‘subject’] ;
      $message = $_REQUEST[‘message’] ;
      mail( "test@just-test", "Subject: $subject",
      $message, "From: $email" );
      echo "Thank you for contacting me";
      }
    else
    //if email is not filled out, display these form
      {
      echo "<form method=’post’ action=’mailform.php’>
      Email: <input name=’email’ type=’text’ /><br />
      Subject: <input name=’subject’ type=’text’ /><br />
      Message:<br />
      <textarea name=’message’ rows=’15′ cols=’40′>
      </textarea><br />
      <input type=’submit’ />
      </form>"
    ;
      }
    ?>
  2. Open this file (Joomla cpanel administrator) on your Joomla site:
    /administrator/templates/khepri/cpanel.php
    And find these on line 80:

    <jdoc:include type="component" />
  3. Now we can add any code / script below that line, i will give example by insert PHP form above, so the code will shown:
    <jdoc:include type="component" />
    //start insert custom code
    <?php
      if (isset($_REQUEST[‘email’]))
    //if "email" is filled out, send email
      {
      //send email
      $email = $_REQUEST[‘email’] ;
      $subject = $_REQUEST[‘subject’] ;
      $message = $_REQUEST[‘message’] ;
      mail( "test@just-test", "Subject: $subject",
      $message, "From: $email" );
      echo "Thank you for contacting me";
      }
    else
    //if email is not filled out, display these form
      {
      echo "<form method=’post’ action=’mailform.php’>
      Email: <input name=’email’ type=’text’ /><br />
      Subject: <input name=’subject’ type=’text’ /><br />
      Message:<br />
      <textarea name=’message’ rows=’15′ cols=’40′>
      </textarea><br />
      <input type=’submit’ />
      </form>"
    ;
      }
    ?>
    //end of custom code
  4. After inserting that php code, so our Joomla 1.5 administrator page will shown like this (click image to enlarger):

    Custom Code Inserted Into Joomla 1.5 Administrator Area

    Custom Code Inserted Into Joomla 1.5 Administrator Area

Thats all, you can change my PHP form code example into HTML, javascript (like adsense code), iframe (like shoutmix chat box) or flash embed (like youtube or yahoo pingbox).


Related posts:

  1. How To Manage Virtuemart Admin From Joomla Frontend
  2. Simple PHP Password Generator
  3. PHP Simple Logout Script
  4. Community Builder Joomla Social Networking Component
  5. Joomla


Share To Facebook | Tweet! This


 
14 Comments. Leave Comment Or Trackback.
  1. Pingback
    Trackback: How To Insert HTML, Javascript, PHP Code Into Joomla 1.5 … Joom • January 3 2010

    How To Insert HTML, Javascript, PHP Code Into Joomla 1.5 … Joom

  2. Pingback
    Trackback: Dominating Google • May 30 2010

    Dominating Google

  1. #2 • Date 5 January 2010, Guitar lessons melbourne said:
     

    It’s very good thing that you always keep your eyes on the problem of your clients and give some better solution as like this.

    ReplyReply
  2. #3 • Date 5 January 2010, USA Magazines said:
     

    Thanks for the info .

    ReplyReply
  3. #4 • Date 7 January 2010, Dariov said:
     

    this is very interesting. and veroy good explained especially with the pictures that are included.

    ReplyReply
  4. #5 • Date 8 January 2010, Emma said:
     

    Thanks for the lesson & the pictures, it’s easier for me to understand now.

    ReplyReply
  5. #6 • Date 18 January 2010, Lifted trucks said:
     

    Gr8 explanation, It was very helpful to learn something new i bookmarked this post.

    ReplyReply
  6. #7 • Date 25 January 2010, ugg boots said:
     

    the entry is good!

    ReplyReply
  7. #8 • Date 7 March 2010, Chicago Printing said:
     

    Nice post and your screenshots are wonderful. They had help in the tutorial very much.

    ReplyReply
  8. #9 • Date 13 March 2010, html link said:
     

    I’ve been flirting with the idea of converting to Joomla for a long time now. I wanted to have a streamline tool that would manage my site without having to bug my coder. But in your post you say your client still has problems with Joomla? Is this an operator error or does Joomla have a few bugs still? Thanks!

    ReplyReply
  9. #10 • Date 20 March 2010, Removals Isleworth said:
     

    This is great. I like the idea of inserting a Yahoo messenger inside a joomla site.

    ReplyReply
  10. #11 • Date 6 April 2010, Nike Air Force 1 Sales said:
     

    It’s very good thing that you always keep your eyes on the problem of your clients and give some better solution as like this.

    ReplyReply
  11. #12 • Date 8 April 2010, jay said:
     

    I try to do the update, but does not work for me. the send button is not displayed.

    ReplyReply
  12. #13 • Date 22 April 2010, chicago airport limo service said:
     

    Excellent tutorial. Can I use this to my site? Thanks.

    ReplyReply

 

Comment With Facebook?

Comment:

 
 
-->