Results 1 to 8 of 8

Thread: Adding/Creating a custom PHP Page : Instructions

  1. #1
    Join Date
    Oct 2005
    Location
    Manassas, Virginia
    Posts
    139

    Default Adding/Creating a custom PHP Page : Instructions

    Ok - This is for everyone that has been having problems creating and adding a custom PHP Page. If you don't understand something here, please reply or email me and I'll come back and update this thread.

    STEP 1: Create your PHP page as you normally would.

    Example:

    Test.php
    PHP Code:
    <?php 

    // Query your database  and get a result set

    // Loop through your records and either echo your html and php code, 
    // or just emdbed your html such as:

    $var "Hello World";

    ?>
    <!-- This will print out hello world
    This line is html and should print out <?= $var?>    
    <?php
     
    //  PHP code here if needed.
    ?>
    Place your PHP code whereever you store your custom php files. I tested with them in my web root folder.

    STEP 2: Add Your PHP File as a PHP Page.

    ACP => vba CMPS => Add Page => PHP Page

    Page Title: Test Page
    Page Identifier: testpage
    Parent Name: change if needed
    Custom Style for this page: change as needed
    Active: Yes
    Path To File: Enter the path to your php file to be included
    Clean File Output: I've gotten it to work with this set to Yes and No.
    Use Module Shell Template: Yes

    KEY ITEM: Modules Enabled Section

    Make Sure You Have The Custom Page Content Module Active for this PHP Page. If you don't your PHP Code will not be displayed. I think this is a major area that Admins don't realize.

    Templates are not needed or used to display output from a PHP Page..

    I hope this will help save others many hours of time and frustration. Again, let me know if I have not been clear on something and I will try to help.

    Regards,
    Jim

  2. #2
    Join Date
    Oct 2005
    Posts
    17

    Default Re: Adding/Creating a custom PHP Page : Instructions

    thanks for this.
    but im completely confused with this vb advanced cmps stuff
    on how to add your own page
    i wanna make mines homepage then a link to the forums on that page

    www.thugonline.net - home page

    www.thugonline.net/forums - forums page

  3. #3
    Join Date
    Oct 2005
    Posts
    17

    Default Re: Adding/Creating a custom PHP Page : Instructions

    damn i always get this

    "/usr/local/bin:/usr/bin:/bin"

    ahhhh whats my cmps_index.php file supposed to look like ?

    cause all mine has is:
    /usr/local/bin:/usr/bin:/bin
    Last edited by rb290; 11-14-2005 at 06:20 AM.

  4. #4
    Join Date
    Oct 2005
    Location
    Manassas, Virginia
    Posts
    139

    Default Re: Adding/Creating a custom PHP Page : Instructions

    Quote Originally Posted by rb290
    thanks for this.
    but im completely confused with this vb advanced cmps stuff
    on how to add your own page
    i wanna make mines homepage then a link to the forums on that page

    www.thugonline.net - home page

    www.thugonline.net/forums - forums page
    Vba CMPS will be your portal home page. Then you add a link to your portal navbar to your forum. Anyway, can you tell me more about what you want to do? Try to give as much detail as you can.

    Jim

  5. #5
    Join Date
    Oct 2005
    Location
    Manassas, Virginia
    Posts
    139

    Default Re: Adding/Creating a custom PHP Page : Instructions

    Quote Originally Posted by rb290
    damn i always get this

    "/usr/local/bin:/usr/bin:/bin"

    ahhhh whats my cmps_index.php file supposed to look like ?

    cause all mine has is:
    /usr/local/bin:/usr/bin:/bin
    the path you mention doesn't sound like your $_SERVER['PATH_TRANSLATED'] path to your forum if that is what you mean. That is the only thing you need to change in your cmps_index.php when doing a fresh install. As is mentioned in the install instructions you can comment out the Chdir line if you are installing cmps_index.php in the same folder as your forum. For example if you put the forum in the root of your website.

    If you are on a Unix or linux type web host, the path to your forum should be something like:

    /home3/<user account name>/public_html/

    or

    /home3/<user account name>/public_html/forum


    Can you give more detail on where you are having trouble?

    Jim
    Last edited by jim6763nva; 11-15-2005 at 09:20 AM.

  6. #6
    Join Date
    Oct 2005
    Posts
    17

    Default Re: Adding/Creating a custom PHP Page : Instructions

    i just need the cmps_index.php file because everytime I download it there is nothing in the file might be damaged, can you please upload the file for me ?

  7. #7
    Join Date
    Nov 2005
    Posts
    8

    Default Re: Adding/Creating a custom PHP Page : Instructions

    Well, when i try that out it looks like this...

    whats the problem?

  8. #8
    Join Date
    Oct 2005
    Location
    Manassas, Virginia
    Posts
    139

    Default Re: Adding/Creating a custom PHP Page : Instructions

    Quote Originally Posted by CoLD FeaR
    Well, when i try that out it looks like this...

    whats the problem?
    Hi Cold Fear,

    Can you include a link to your site or the page where you have this configured? It's a little hard to read what is going on in the thumbnail you posted.

    Thanks,
    Jim

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. adding custom content page
    By 8kobe in forum Troubleshooting / "How do I..." Questions
    Replies: 1
    Last Post: 05-14-2005, 02:21 AM
  2. adding custom page
    By piertiong in forum Troubleshooting / "How do I..." Questions
    Replies: 4
    Last Post: 02-04-2005, 03:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •