Php Comment system

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by Ainokea, Sep 26, 2008.

  1. Ainokea

    Ainokea New Member

    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    0
    Hi I'm sort of an amateur at php and coding but I know enough to get around. I was thinking how I could make a comment system for my site, each comment log would be unique to its page... etc...

    I can get the posting part and reading it but I want to know how I could make it dynamic and work for each article....

    like article a draws comments from table a, row 1

    how would i do it so I dont need to put this manually for each file.
     
  2. TheMan177

    TheMan177 New Member

    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    0
    Assuming your articles have a unique id field or similar in the database, your comment entries could include a field specifying the article id that it belongs to. When viewing, for example, the article with an id of 1, you search the particular field in the comments table for all comments that belong to article 1.
     
  3. Ainokea

    Ainokea New Member

    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    0
    hmm I see that would be a much better idea... thanks

    I have one more question though I was trying to make a php script to update my sitemap

    something like that... I just wanted more or less pseudocode and get down the basics first then go in add like a gui, with history settings. That auto updates for new pages it detects in a directory...

    which would look like this but any ideas how to get the specific path? and how to add line breaks in xml... I tried \n
     
    Last edited: Sep 26, 2008
  4. Zippoh

    Zippoh New Member

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    AFAIK you don't need the linebreaks in sitemaps, they work perfectly fine without them. And they load fast without linebreaks and indents, if only a little.
     
  5. Ainokea

    Ainokea New Member

    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    0
    well still does any one have any idea how I can obtain directorys?
     

Share This Page