Forum script

Discussion in 'PHP' started by nile1483, Nov 4, 2005.

  1. #1
    Dear friend i have forum script attach with this thread , when i upload in my ftp folder its not working , plz tell me how i create forum in my site using this script, plz tell me ,if any database create, or any changes, and tell how i directly upload in the ftp folder and forum is working
     

    Attached Files:

    nile1483, Nov 4, 2005 IP
  2. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Whats the name of the forum software (As a general rule I don't download zip files that I don't know the contents of)?
     
    yfs1, Nov 4, 2005 IP
  3. mitchandre

    mitchandre Peon

    Messages:
    313
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Why don't you post your questions to the developer of the forum package?
     
    mitchandre, Nov 4, 2005 IP
  4. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #4
    dera friends , this is no any forum software, this script from cd with i prrchaged book
     
    nile1483, Nov 4, 2005 IP
  5. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Did it come with instructions...Is there a "readme" in the zipped file you attached?

    You will need to give more info as it is quite vague right now.
     
    yfs1, Nov 4, 2005 IP
  6. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #6
    there are no read me file give me your email- id i will send u full script

    thanks for reply
     
    nile1483, Nov 4, 2005 IP
  7. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #7
    No thanks...

    Most forums require 3 things

    1.) Create a mySql database
    2.) Put the details of that database in a config file (it should already be there, just change the details)
    3.) Run an install.php or something similar

    Is there any reason you want to run this type of forum and not phpBB or vB?
     
    yfs1, Nov 4, 2005 IP
  8. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #8
    in this forum script , the following database.php file , this is right?

    <?php
    /* Class: Database
    * Desc: Class that connects to a MySQL database.
    */
    class Database
    {
    private $cxn; // database connection object
    private $database_name;
    private $host;
    private $user;
    private $password;

    function __construct($filename)
    {
    include("$filename");
    if(!$this->cxn = new mysqli($host,$user,$passwd)) #16
    {
    throw new Exception("Database is not available.
    Try again later.");
    email("dbadmin@ourplace.com","DB Problem",
    "MySQL server is not responding. ".
    $this->cxn->error());
    exit();
    }
    $this->host = $host; #25
    $this->user = $user;
    $this->password = $passwd;
    }

    function useDatabase($dbname)
    {
    if(!$result = $this->cxn->query("SHOW DATABASES")) #32
    {
    throw new Exception("Database is not available.
    Try again later");
    email("dbadmin@ourplace.com","DB Problem",
    "MySQL server is not responding. "
    .$this->cxn->error());
    exit();
    }
    else #41
    {
    while($row = $result->fetch_row())
    {
    $databases[] = $row[0];
    }
    }
    if(in_array($dbname,$databases) ||
    in_array(strtolower($dbname),$databases)) #49
    {
    $this->database_name = $dbname;
    $this->cxn->select_db($dbname);
    return TRUE;
    }
    else #55
    {
    throw new Exception("Database $dbname not found.");
    return FALSE;
    }
    }

    function getConnection()
    {
    return $this->cxn;
    }

    function getDatabaseName()
    {
    return $this->database_name;
    }
    }
    ?>
     
    nile1483, Nov 4, 2005 IP
  9. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #9
    There should be a config.inc or something similar
     
    yfs1, Nov 4, 2005 IP
  10. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #10

    there are total following file

    database.php,
    post.php
    postmessage.php
    postreply.php
    thread.php
    vewforum.php
    viewthread.php
    vewtopic.php
    webforum.php
    tabelaccessor.php


    function_main.txt
    function_viewoptions.txt
    function_vewforum.txrt
    messageform.txt
    replyfield.txt
    formvars.txt
    function_post.txt
    function_viewthread.txt
    messagefield.txt
    viewforum.txt
    viewthread.txt
    viewtopic.txt

    and forum.css
     
    nile1483, Nov 4, 2005 IP
  11. mitchandre

    mitchandre Peon

    Messages:
    313
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #11
    And this forum package has no name whatsoever? Or does this "book" have a name?
     
    mitchandre, Nov 4, 2005 IP
  12. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #12
    the books name is php & mysql projects, there are many project in this books

    if any body want i will send u
     
    nile1483, Nov 4, 2005 IP
  13. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #13
    formvars.txt

    Should be changed to match the details of your database (which you need to create)

    The naming is unimportant as long as the formvars.txt then matches it
     
    yfs1, Nov 4, 2005 IP
  14. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #14
    This isn't for school is it? Am I doing your homework?

    PS...The file names you sent me - There is nothing like install.php. THere has to be a way that it sets up the fields for your database. Either they come in a readme which has Create - Insert - etc or there is a file that you run that does it for you.
     
    yfs1, Nov 4, 2005 IP
  15. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #15

    i will send u all the file, i have. tell me what can i do?, can i make forum in my site this way
     
    nile1483, Nov 4, 2005 IP
  16. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Did you set up your mySQL database?
     
    yfs1, Nov 4, 2005 IP
  17. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #17
    where i set up my mysql database?
     
    nile1483, Nov 4, 2005 IP
  18. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #18
    now i am online in yahoo ,
     
    nile1483, Nov 4, 2005 IP
  19. yfs1

    yfs1 User Title Not Found

    Messages:
    13,798
    Likes Received:
    922
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Have you ever set one up before? Doesn't the book give you a step by step?


    If not, do you have cPanel with your hosting?
     
    yfs1, Nov 4, 2005 IP
  20. nile1483

    nile1483 Active Member

    Messages:
    345
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #20
    no , i not set up any database before

    ya , i have a cpanel with hosting

    you can see it by my web hosting providers website

    http://www.jinfo.net/web_hosting/what_is_cpanel.htm
     
    nile1483, Nov 4, 2005 IP