Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    3

    Default Newbie to hooks and stuff

    I am a front end designer and do not understand this stuff in depth.

    I'm basically just wanting to customize a default index placeholder page that will be placed in the skel directory for accounts created.

    The only thing I want automatically added to this default page is the domain name associated with it.

    For Ex. The default page would read something like:
    This is the new home of www.XXX.com.

    Where XXX would be dynamically written to reflect the domain just set up. If any of that makes sense.

    If I have a custom index page in the skel directory, I don't want to have to go in and edit the code to reflect the new domain name each time an account is set up, that's the whole point of having things automated, so is this possible and is it a hook thing-a-ma-jig that I need??

    Thanks,
    Tracy

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Rename your index to index.shtml and add this where ever you like:

    Code:
    <!--#echo var="HTTP_HOST" -->
    In your cPanel under the Error Pages section, when you go to edit a file there you are presented with several buttons for a variety of tags you can use for exactly what you're seeking.

    HTH

  3. #3
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    I already sent you this by email, but thought I'd post here in case someone else looks for it.

    2 other options:

    use index.php and add
    Code:
    <?=strtolower($_SERVER['HTTP_HOST'])?>
    anywhere you want the domain to show

    or

    use javascript and add
    Code:
    <script type="text/javascript">
    <!-- Begin
    document.write(window.location.hostname);
    // End -->
    </script>
    anywhere in the body, and/or
    Code:
    <script type="text/javascript">
    document.title = window.location.hostname;
    </script>
    between the head tags.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

Similar Threads & Tags
Similar threads

  1. DNS Hooks
    By tier2 in forum cPanel Developers
    Replies: 2
    Last Post: 01-01-2011, 10:03 AM
  2. cPanel Hooks
    By mynameanu in forum cPanel Developers
    Replies: 5
    Last Post: 09-26-2010, 07:04 AM
  3. EasyApache Hooks
    By VeZoZ in forum cPanel Developers
    Replies: 2
    Last Post: 01-16-2010, 01:49 PM
  4. How to use hooks?
    By blargman in forum cPanel Developers
    Replies: 5
    Last Post: 11-18-2009, 10:20 AM
  5. WHM Hooks help
    By Snoopy in forum New User Questions
    Replies: 2
    Last Post: 11-05-2007, 12:15 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube