SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict brain's Avatar
    Join Date
    Sep 2001
    Location
    Amsterdam
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    grant others to write in the personal guestbook

    Question.....

    I've made personal pages for members of my site, along with a personal guestbook. For now, everybody can write in the personal guestbook.
    I've made this (mySQL)table for the guestbook,
    pgID
    pgName (generated automatically with loginName)
    pgEmail
    pgComments
    pgOwner
    The page PersonalGuestBookView.php sorts on pgOwner:
    e.g. PersonalGuestBookView.php?pgOwner=brian shows all that is written in brain's personal guestbook.

    the question:
    How can I accomplish that the owner of the guestbook can grant the right to other users to write in their personal guestbook so that "the enemy" stays out of his personal guestbook.

  2. #2
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could just use any membership type thing, but add that the owner has to approve each application before they can post in it.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  3. #3
    SitePoint Addict AbelaJohnB's Avatar
    Join Date
    Oct 2001
    Location
    Eureka, CA. USA
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Besides having a "membership system", which would force the people to sign-up before they can enter into your guestbook... the only other option is to make it so ALL messages must be previewed before they are displayed.


    This is -very- easy to do!


    Add one (1) more field to your db schema: active


    In your SQL Insert statement, do the following:


    INSERT INTO table_name (field, names, here, active) value (field, names, here, '1');




    Then:


    in your "view" SQL, you do:


    SELECT * FROM table_name WHERE active = '0'




    Ok, now, inside of your "admin" tool (you do have one, right!!) you add a drop-down box with two options:

    Approved
    Delete




    So, the admin goes into his/her /admin/ section every day or two and checks the messages.
    Any message that s/he likes, they simply change the drop-down box to be "Active".


    Now, you need to include a SQL Update code, to handle the drop-down box.



    So, that would simply be:


    UPDATE table_name SET active = '1' WHERE id = '$id'







    Ok, hopefully you know SQL good enough to follow me




    (Oh, btw, this is what I've done with my guestbook script, at: http://www.4cm.com/guestbookpro/ , for those users who want such a feature)



    Later.
    John B. Abela
    www.JohnAbela.Com

  4. #4
    SitePoint Guru
    Join Date
    Jun 2001
    Location
    Australia
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with AbelaJohnB. I have done this with my current project.
    http://www.cableusers.net/admin/edit...ments.php?id=1
    It allows me to disable/enable comments from vistors.
    Works well and it's easy to use.


Bookmarks

Posting Permissions

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