Thread: Talk To Me!

    #16
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    How to create this forum


    How to create a forum something like this? Any source code I can review in order to create a forum like this? I love this forum.

    This is absolutely a good idea that let the user also post their comment on certain articles, this is what lack of in most websites.
  2. #17
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Making this better?


    I'll be discussing this in an upcoming piece which discusses how to put together a content management system which allows users to post actual content/articles to a site - not just comments.

    Keep an eye out for that one :)
  4. #18
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    ghjg


    ghjghjghj
  6. #19
  7. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    gjy


    gyjgyj
  8. #20
  9. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Making this better?


    One improvement would be to anti-spam the email addresses being shown. Otherwise the site becomes (yet) another target for mail harvesting bots.
  10. #21
  11. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    learn


    It is a good start to read the PHP 101 articles on DevShed.. and take it from there.

    Good luck
  12. #22
  13. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    script execution


    let's say someone pastes a php tag 'or any other scripting language) into his reply
    will the server parse it?, how to impede that? how to control it? say we want a certain type of script to be executed and others to be banned???
    this is not discussed in your article


    thanks,
    Hassan
  14. #23
  15. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    blah


    blah
  16. #24
  17. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Tid bit


    Just wondering with the way you entered No Subject and Anonymous if the user did not fill out those fields.

    Wouldn't it be (slightly) more efficient to store nothing in that field of mySQL, and when php pulls it back out, change the value to No Subject?

    Just a thought to saving space, especially if there are a large number of records
  18. #25
  19. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: script execution - the answer


    this is some code that I use for my site. the my_markup function was taken from a phpbuilder.com tut. and then modified.
    [code]
    function my_markup($output)
    {
    /****************************************************************************
    * Takes a raw string ($output) and formats it for output using a special
    * stripped down markup that is similar to HTML
    ****************************************************************************/

    $output = htmlspecialchars(stripslashes($output));
    $output = nl2br($output);

    /* new paragraph */
    $output = str_replace('[p]', '<p>', $output);

    /* bold */
    $output = str_replace('', '<b>', $output);
    $output = str_replace('
    ', '</b>', $output);

    /* italics */
    $output = str_replace('', '<i>', $output);
    $output = str_replace('
    ', '</i>', $output);

    /* preformatted */
    $output = str_replace('[pre]', '<pre>', $output);
    $output = str_replace('[/pre]', '</pre>', $output);

    /* Color Parsing the code */
    // $output = explode('
    Code:
    ',$output);
    	
        $output = str_replace('
    Code:
    ', '<? highlight_string(\"<?', $output);
        $output = str_replace('
    ', '?>\"); ?>', $output); /* indented blocks (blockquote) */ $output = str_replace('
    ', '<blockquote>', $output); $output = str_replace('
    ', '</blockquote>', $output); /* anchors */ // $output = ereg_replace('\[anchor=&amp;quot;([[:graph:]]+)&amp;quot;\]', '&lt;a name="\1">&lt;/a>', $output); $output = text_to_links($output); /* links, note we try to prevent javascript in links */ // $output = str_replace('[link=&amp;quot;javascript', '[link=&amp;quot; javascript', $output); // $output = ereg_replace('\[link=&amp;quot;([[:graph:]]+)&amp;quot;\]', '&lt;a href="\1">', $output); // $output = str_replace('[/link]', '&lt;/a>', $output); return eval($output); }function emailcheck($intext) { $theresults = ereg("^[^@ ]+@[^@ ]+\.[^@ \.]+$", $intext, $trashed); if ($theresults) { return TRUE; } else { return FALSE; } } // SF.net function text_to_links ($data='') { if(empty($data)) { return $data; } $lines = split("\n",$data); while ( list ($key,$line) = each ($lines)) { $line = eregi_replace("([ \t]|^)www\."," http://www.",$line); $text = eregi_replace("(http://[^ )\r\n]+)","<A href=\"\\1\" target=\"_blank\">\\1</A>",$line); $text = eregi_replace("([-a-z0-9_]+(\.[_a-z0-9-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)+))","<A HREF=\"mailto:\\1\">\\1</A>",$text); $newText .= $text; } return $newText; }
  20. #26
  21. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    testing


    fffff
  22. #27
  23. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: script execution - the answer


    thanks for your reply
  24. #28
  25. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Re:


    what's the matter with you?
    you think y're intelligent cause you know some PHP??
    hhaa, were you born with a php tag in your brain?, the guy says he is a beginner
    w've all been beginners sometime,
    insulting a person just because he says he knows nothing and says it in a bad english
    means y're the stupid one here
    gaouzief
  26. #29
  27. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    the person who says others are stupid is indeed stupid!




    Actually I have successfully set up the Apache on my pc (standlaon PC and Apache acts as local server, localhost) and it shows that the apache runs okay, I also have installed the PHP4 on my pc, the test in the ms-dos promt runs okay, "Hello World" can been seen when I run c:\php.exe sample.php, it runs properly and I can see the string "Hellow World", my problem is I cannot browse the file created with the extention of XXX.php. which means browser cannot display sample.php. By the way, my IE is version 5.0 , it is nothing to do with ie.

    (1) Apache was setup properly (standalong pc)

    (2) PHP4.0 was setup properly

    Problem: cannot see php extention.

    what's wrong with that?

  28. #30
  29. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    catch up, you are newer to php, me too!



    for your information, this forum created with PHP programming langauge, its' characterisic is user interactive, users can upload the comments freely and communicate with each other.it's said it is easier than cgi-bin/perl language. But I am very new about this php, I am still a beginer aand learner,in oder to run the php, they said you have to setup a local server, namely apache to test the php.for this, I have setup the apache and php on my standalong pc, but I cannot browse the php file, I don't know where goese wrong.Maybe you are more newer than me, so catch up, I asked them to help me, they called me stupid! I wonder when they were born they nknew everything, if they knew everything before they came to this world, what's a wast about their lives at this world!

IMN logo majestic logo threadwatch logo seochat tools logo